proto best
This commit is contained in:
@@ -5,19 +5,20 @@ option go_package = "fusen-auth/gen/go/auth";
|
||||
|
||||
// 导入google/api/annotations.proto 注释依赖
|
||||
import "google/api/annotations.proto";
|
||||
import "service/basic.proto";
|
||||
import "basic.proto";
|
||||
|
||||
|
||||
//定义服务
|
||||
service AuthService {
|
||||
//定义服务方法
|
||||
rpc SayHello (AuthRequest) returns (Response) {
|
||||
rpc SayHello (AuthRequest) returns (service.basic.Response) {
|
||||
//添加http网关注解
|
||||
option (google.api.http) = {
|
||||
post: "/api/auth/example/echo"
|
||||
post: "/api/auth/echo"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
rpc SayHelloAgain (AuthRequest) returns (Response) {}
|
||||
rpc SayHelloAgain (AuthRequest) returns (service.basic.Response) {}
|
||||
}
|
||||
|
||||
// 定义请求消息类型.
|
||||
|
||||
Reference in New Issue
Block a user