Goctl rpc patch (#117)
* remove mock generation * add: proto project import * update document * remove mock generation * add: proto project import * update document * remove NL * update document * optimize code * add test * add test
This commit is contained in:
28
tools/goctl/rpc/test.proto
Normal file
28
tools/goctl/rpc/test.proto
Normal file
@@ -0,0 +1,28 @@
|
||||
syntax = "proto3";
|
||||
// protoc -I=${GOPATH}/src -I=. test.proto --go_out=plugins=grpc,Mbase.proto=github.com/tal-tech/go-zero/tools/goctl/rpc:./test
|
||||
package test;
|
||||
// @github.com/tal-tech/go-zero/tools/goctl/rpc
|
||||
import "base.proto";
|
||||
import "google/protobuf/any.proto";
|
||||
|
||||
message request {
|
||||
string name = 1;
|
||||
}
|
||||
enum Gender{
|
||||
UNKNOWN = 0;
|
||||
MALE = 1;
|
||||
FEMALE = 2;
|
||||
}
|
||||
message response {
|
||||
string greet = 1;
|
||||
google.protobuf.Any data = 2;
|
||||
|
||||
}
|
||||
message map {
|
||||
map<string, string> m = 1;
|
||||
}
|
||||
|
||||
service Greeter {
|
||||
rpc greet(request) returns (response);
|
||||
rpc idRequest(base.IdRequest)returns(base.EmptyResponse);
|
||||
}
|
||||
Reference in New Issue
Block a user