api.proto 481 B

12345678910111213141516171819202122
  1. syntax = "proto3";
  2. package live.grpcdemo.v1;
  3. option go_package = "v1";
  4. import "github.com/gogo/protobuf/gogoproto/gogo.proto";
  5. service Greeter {
  6. // `method:"POST" internal:"true"`
  7. rpc say_hello_internal(GeeterReq) returns (GreeterResp);
  8. rpc say_hello(GeeterReq) returns (GreeterResp);
  9. }
  10. message GeeterReq {
  11. int32 uid = 1 [(gogoproto.moretags) = "form:\"uid\" validate:\"required\""];
  12. }
  13. message GreeterResp {
  14. int32 uid = 1 [(gogoproto.jsontag) = "uid"];
  15. }