go-zero/tools/goctl/rpc/generator/test.proto
Keson 24fb29a356
patch model&rpc (#207)
* change column to read from information_schema

* reactor generate mode from datasource

* reactor generate mode from datasource

* add primary key check logic

* resolve rebase conflicts

* add naming style

* add filename test case

* resolve rebase conflicts

* reactor test

* add test case

* change shell script to makefile

* update rpc new

* update gen_test.go

* format code

* format code

* update test

* generates alias
2020-11-18 15:32:53 +08:00

62 lines
1.0 KiB
Protocol Buffer

// 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);
}