55 lines
1.4 KiB
Protocol Buffer
55 lines
1.4 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package testpb;
|
|
|
|
import "google/protobuf/timestamp.proto";
|
|
import "google/protobuf/duration.proto";
|
|
import "cosmos_proto/cosmos.proto";
|
|
import "cosmos/base/query/v1beta1/pagination.proto";
|
|
import "cosmos/base/v1beta1/coin.proto";
|
|
|
|
service Query {
|
|
// Echo returns the request in the response
|
|
rpc Echo(EchoRequest) returns (EchoResponse);
|
|
}
|
|
|
|
message EchoRequest {
|
|
// u32 is an uint32
|
|
uint32 u32 = 1;
|
|
uint64 u64 = 2;
|
|
string str = 3;
|
|
bytes bz = 4;
|
|
google.protobuf.Timestamp timestamp = 5;
|
|
google.protobuf.Duration duration = 6;
|
|
int32 i32 = 7;
|
|
int64 i64 = 10;
|
|
bool a_bool = 15;
|
|
Enum an_enum = 16;
|
|
AMessage a_message = 17;
|
|
cosmos.base.v1beta1.Coin a_coin = 18;
|
|
string an_address = 19 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
|
cosmos.base.query.v1beta1.PageRequest page = 20;
|
|
repeated bool bools = 21;
|
|
repeated uint32 uints = 22;
|
|
repeated string strings = 23;
|
|
repeated Enum enums = 24;
|
|
repeated google.protobuf.Duration durations = 25;
|
|
repeated AMessage some_messages = 26;
|
|
}
|
|
|
|
enum Enum {
|
|
ENUM_UNSPECIFIED = 0;
|
|
ENUM_ONE = 1;
|
|
ENUM_TWO = 2;
|
|
ENUM_FIVE = 5;
|
|
ENUM_NEG_THREE = -3;
|
|
}
|
|
|
|
message AMessage {
|
|
string bar = 1;
|
|
int32 baz = 2;
|
|
}
|
|
|
|
message EchoResponse {
|
|
EchoRequest request = 1;
|
|
} |