cosmos-sdk/codec/testdata/proto.proto
Aaron Craelius 849429ecda
Add proper support for Any in gRPC queries (#6594)
* Add proper gRPC Any support via AnyUnpacker

* Wire up grpc query router AnyUnpacker
2020-07-03 16:42:12 +00:00

60 lines
976 B
Protocol Buffer

syntax = "proto3";
package testdata;
import "google/protobuf/any.proto";
option go_package = "github.com/cosmos/cosmos-sdk/codec/testdata";
message Dog {
string size = 1;
string name = 2;
}
message Cat {
string moniker = 1;
int32 lives = 2;
}
message HasAnimal {
google.protobuf.Any animal = 1;
int64 x = 2;
}
message HasHasAnimal {
google.protobuf.Any has_animal = 1;
}
message HasHasHasAnimal {
google.protobuf.Any has_has_animal = 1;
}
service TestService {
rpc Echo(EchoRequest) returns (EchoResponse);
rpc SayHello(SayHelloRequest) returns (SayHelloResponse);
rpc TestAny(TestAnyRequest) returns (TestAnyResponse);
}
message EchoRequest {
string message = 1;
}
message EchoResponse {
string message = 1;
}
message SayHelloRequest {
string name = 1;
}
message SayHelloResponse {
string greeting = 1;
}
message TestAnyRequest {
google.protobuf.Any any_animal = 1;
}
message TestAnyResponse {
HasAnimal has_animal = 1;
}