protoc-gen-go-micro/examples/flow/protos/test.proto

53 lines
1.5 KiB
Protocol Buffer
Raw Normal View History

2016-12-20 13:31:46 +03:00
syntax = "proto3";
package test;
option go_package = "github.com/united-drivers/models/go/test;testpb";
service TestService {
rpc TestNoStream(TestNoStreamRequest) returns (TestNoStreamReply);
rpc TestStreamRequest(stream TestStreamRequestRequest) returns (TestStreamRequestReply);
rpc TestStreamReply(TestStreamReplyRequest) returns (stream TestStreamReplyReply);
rpc TestStreamBoth(stream TestStreamBothRequest) returns (stream TestStreamBothReply);
}
enum TestEnum {
ELEMENT_A = 0;
ELEMENT_B = 1;
}
2016-12-20 13:31:46 +03:00
message TestMessage {
string a = 1;
int32 b = 2;
int64 c = 3;
float d = 4;
double e = 5;
repeated string n = 14;
repeated int32 o = 15;
repeated int64 p = 16;
repeated float q = 17;
repeated double r = 18;
2017-01-10 13:40:48 +03:00
message TestNestedMessage {
string s = 1;
int32 t = 2;
}
enum TestNestedEnum {
ELEMENT_C = 0;
ELEMENT_D = 1;
}
2017-01-10 13:40:48 +03:00
TestEnum u = 19;
TestNestedEnum v = 20;
2017-01-10 13:43:26 +03:00
repeated TestNestedMessage w = 21;
2016-12-20 13:31:46 +03:00
}
message TestNoStreamRequest { TestMessage message = 1; }
message TestNoStreamReply { TestMessage message = 1; string err_msg = 2; }
message TestStreamRequestRequest { TestMessage message = 1; }
message TestStreamRequestReply { TestMessage message = 1; string err_msg = 2; }
message TestStreamReplyRequest { TestMessage message = 1; }
message TestStreamReplyReply { TestMessage message = 1; string err_msg = 2; }
message TestStreamBothRequest { TestMessage message = 1; }
message TestStreamBothReply { TestMessage message = 1; string err_msg = 2; }