初始化提交
This commit is contained in:
34
Proto/ServerInternal/sources/service_user.proto
Normal file
34
Proto/ServerInternal/sources/service_user.proto
Normal file
@@ -0,0 +1,34 @@
|
||||
syntax = "proto3";
|
||||
|
||||
option go_package = "common/proto/ss/grpc_pb";
|
||||
import "ss_common.proto";
|
||||
import "google/api/annotations.proto";
|
||||
|
||||
service User {
|
||||
rpc Login(LoginReq) returns (LoginResp) {}
|
||||
rpc GetUserInfo(GetUserInfoReq) returns (GetUserInfoResp) {
|
||||
option (google.api.http) = {
|
||||
post: "/user/info"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
message LoginReq {
|
||||
string Phone = 1 [json_name = "phone"]; // 手机号
|
||||
string Code = 2 [json_name = "code"]; // 验证码
|
||||
}
|
||||
|
||||
message LoginResp {
|
||||
int64 USN = 1 [json_name = "usn"]; // 用户ID
|
||||
string Name = 2 [json_name = "name"]; // 用户名
|
||||
}
|
||||
|
||||
message GetUserInfoReq {
|
||||
int64 USN = 1 [json_name = "usn"];
|
||||
}
|
||||
|
||||
message GetUserInfoResp {
|
||||
int64 USN = 1 [json_name = "usn"];
|
||||
string Name = 2 [json_name = "name"];
|
||||
}
|
||||
Reference in New Issue
Block a user