67 lines
1.2 KiB
Protocol Buffer
67 lines
1.2 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package api.ucenter.user;
|
|
|
|
import "google/api/annotations.proto";
|
|
import "google/protobuf/timestamp.proto";
|
|
|
|
option go_package = "ky-go-kratos/api/ucenter/user;user";
|
|
option java_multiple_files = true;
|
|
option java_package = "api.ucenter.user";
|
|
|
|
service User {
|
|
// 获取用户信息
|
|
rpc GetUserInfo(GetUserInfoRequest) returns (GetUserInfoReply) {
|
|
option (google.api.http) = {
|
|
get: "/ucenter/user/get_user_info"
|
|
};
|
|
}
|
|
// 创建用户信息
|
|
rpc CreateUserInfo(CreateUserInfoRequest) returns (CreateUserInfoReply) {
|
|
option (google.api.http) = {
|
|
post: "/ucenter/user/create",
|
|
body: "*"
|
|
};
|
|
}
|
|
}
|
|
|
|
message CreateUserInfoRequest {
|
|
string name = 1;
|
|
string nickname = 2;
|
|
string email = 3;
|
|
string phone = 4;
|
|
}
|
|
|
|
message CreateUserInfoReply {
|
|
string id = 1;
|
|
}
|
|
|
|
message GetUserInfoRequest {
|
|
string user_id = 1;
|
|
}
|
|
|
|
message GetUserInfoReply {
|
|
message User {
|
|
string id = 1;
|
|
|
|
string name = 2;
|
|
|
|
string nickname = 3;
|
|
|
|
string email = 4;
|
|
|
|
string phone = 5;
|
|
|
|
string password = 6;
|
|
|
|
bool is_deleted = 7;
|
|
|
|
google.protobuf.Timestamp created_at = 8;
|
|
|
|
google.protobuf.Timestamp updated_at = 9;
|
|
|
|
google.protobuf.Timestamp deleted_at = 10;
|
|
}
|
|
repeated User users = 1;
|
|
}
|