2016-12-20 11:31:46 +01: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);
|
|
|
|
}
|
|
|
|
|
2017-01-06 11:38:48 +01:00
|
|
|
enum TestEnum {
|
|
|
|
ELEMENT_A = 0;
|
|
|
|
ELEMENT_B = 1;
|
|
|
|
}
|
|
|
|
|
2016-12-20 11:31:46 +01: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 11:22:18 +01:00
|
|
|
message TestNestedMessage {
|
|
|
|
string s = 1;
|
|
|
|
int32 t = 2;
|
|
|
|
}
|
|
|
|
enum TestNestedEnum {
|
2017-01-06 11:38:48 +01:00
|
|
|
ELEMENT_C = 0;
|
|
|
|
ELEMENT_D = 1;
|
|
|
|
}
|
2016-12-20 11:31:46 +01: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; }
|