1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- // test proto
- syntax = "proto3";
- package test;
- import "base/common.proto";
- import "google/protobuf/any.proto";
- option go_package = "github.com/test";
- message Req {
- string in = 1;
- common.User user = 2;
- google.protobuf.Any object = 4;
- }
- message Reply {
- string out = 1;
- }
- message snake_req {}
- message snake_reply {}
- message CamelReq{}
- message CamelReply{}
- message EnumMessage {
- enum Enum {
- unknown = 0;
- male = 1;
- female = 2;
- }
- }
- message CommonReply{}
- message MapReq{
- map<string, string> m = 1;
- }
- message RepeatedReq{
- repeated string id = 1;
- }
- service Test_Service {
- // service
- rpc Service (Req) returns (Reply);
- // greet service
- rpc GreetService (Req) returns (Reply);
- // case snake
- rpc snake_service (snake_req) returns (snake_reply);
- // case camel
- rpc CamelService (CamelReq) returns (CamelReply);
- // case enum
- rpc EnumService (EnumMessage) returns (CommonReply);
- // case map
- rpc MapService (MapReq) returns (CommonReply);
- // case repeated
- rpc RepeatedService (RepeatedReq) returns (CommonReply);
- }
|