test.proto 602 B

12345678910111213141516171819202122232425262728
  1. syntax = "proto3";
  2. // protoc -I=${GOPATH}/src -I=. test.proto --go_out=plugins=grpc,Mbase.proto=github.com/tal-tech/go-zero/tools/goctl/rpc:./test
  3. package test;
  4. // @github.com/tal-tech/go-zero/tools/goctl/rpc
  5. import "base.proto";
  6. import "google/protobuf/any.proto";
  7. message request {
  8. string name = 1;
  9. }
  10. enum Gender{
  11. UNKNOWN = 0;
  12. MALE = 1;
  13. FEMALE = 2;
  14. }
  15. message response {
  16. string greet = 1;
  17. google.protobuf.Any data = 2;
  18. }
  19. message map {
  20. map<string, string> m = 1;
  21. }
  22. service Greeter {
  23. rpc greet(request) returns (response);
  24. rpc idRequest(base.IdRequest)returns(base.EmptyResponse);
  25. }