helloworld.proto 694 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. syntax = "proto3";
  2. package helloworld.v1;
  3. import "google/api/annotations.proto";
  4. option go_package = "v1";
  5. // The greeting service definition.
  6. service Hello {
  7. // Sends a greeting
  8. rpc SayHello (HelloRequest) returns (HelloReply) {
  9. option (google.api.http) = {
  10. get:"/hello"
  11. };
  12. }
  13. rpc Echo(EchoRequest) returns (EchoReply) {
  14. option (google.api.http) = {
  15. post:"/echo"
  16. };
  17. }
  18. }
  19. // The request message containing the user's name.
  20. message HelloRequest {
  21. string name = 1;
  22. }
  23. // The response message containing the greetings
  24. message HelloReply {
  25. string message = 1;
  26. }
  27. message EchoRequest {
  28. string content = 1;
  29. }
  30. message EchoReply {
  31. string content = 1;
  32. }