syntax = "proto3"; //版本声明,使用v3版本 package service.auth; option go_package = "fusen-auth/gen/go/auth"; // 导入google/api/annotations.proto 注释依赖 import "google/api/annotations.proto"; import "basic.proto"; //定义服务 service AuthService { //定义服务方法 rpc SayHello (AuthRequest) returns (service.basic.Response) { //添加http网关注解 option (google.api.http) = { post: "/api/auth/echo" body: "*" }; } rpc SayHelloAgain (AuthRequest) returns (service.basic.Response) {} } // 定义请求消息类型. message AuthRequest { string name = 1; }