protoc-gen-go-micro/examples/flow/protos/test.proto
2017-01-10 11:43:26 +01:00

53 lines
1.5 KiB
Protocol Buffer

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;
}
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;
message TestNestedMessage {
string s = 1;
int32 t = 2;
}
enum TestNestedEnum {
ELEMENT_C = 0;
ELEMENT_D = 1;
}
TestEnum u = 19;
TestNestedEnum v = 20;
repeated TestNestedMessage w = 21;
}
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; }