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
This commit is contained in:
@@ -2,24 +2,61 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package test;
|
||||
option go_package = "go";
|
||||
|
||||
import "test_base.proto";
|
||||
import "base/common.proto";
|
||||
import "google/protobuf/any.proto";
|
||||
|
||||
message TestMessage {
|
||||
base.CommonReq req = 1;
|
||||
}
|
||||
message TestReq {}
|
||||
message TestReply {
|
||||
base.CommonReply reply = 2;
|
||||
option go_package = "github.com/test";
|
||||
|
||||
message Req {
|
||||
string in = 1;
|
||||
common.User user = 2;
|
||||
google.protobuf.Any object = 4;
|
||||
}
|
||||
|
||||
enum TestEnum {
|
||||
unknown = 0;
|
||||
male = 1;
|
||||
female = 2;
|
||||
message Reply {
|
||||
string out = 1;
|
||||
}
|
||||
|
||||
service TestService {
|
||||
rpc TestRpc (TestReq) returns (TestReply);
|
||||
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);
|
||||
}
|
||||
Reference in New Issue
Block a user