proto best

This commit is contained in:
eson
2023-10-24 11:20:42 +08:00
parent e851a4b43c
commit 60b6064e1d
2 changed files with 48 additions and 11 deletions

View File

@@ -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) {}
}
// 定义请求消息类型.