fusen-auth/proto/auth.proto

28 lines
625 B
Protocol Buffer
Raw Normal View History

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