更新
This commit is contained in:
@@ -5,11 +5,19 @@ option go_package = "shenxianhe/gen/shenxianhe/v1;shenxianhev1";
|
|||||||
// 认证类型枚举
|
// 认证类型枚举
|
||||||
enum AuthenticationType {
|
enum AuthenticationType {
|
||||||
AUTHENTICATION_TYPE_UNSPECIFIED = 0;
|
AUTHENTICATION_TYPE_UNSPECIFIED = 0;
|
||||||
AUTHENTICATION_TYPE_PHONE = 1; // 手机号
|
AUTHENTICATION_TYPE_NAME = 1; // 用户名
|
||||||
AUTHENTICATION_TYPE_EMAIL = 2; // 邮箱
|
AUTHENTICATION_TYPE_PHONE = 2; // 手机号
|
||||||
AUTHENTICATION_TYPE_WECHAT = 3; // 微信
|
AUTHENTICATION_TYPE_EMAIL = 3; // 邮箱
|
||||||
|
AUTHENTICATION_TYPE_WECHAT = 4; // 微信
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message SendCredentialRequest {
|
||||||
|
AuthenticationType auth_type = 1; // 认证类型
|
||||||
|
string auth_id = 2; // 认证ID,根据auth_type存储不同的账号信息
|
||||||
|
}
|
||||||
|
|
||||||
|
message SendCredentialResponse {}
|
||||||
|
|
||||||
message AuthRequest {
|
message AuthRequest {
|
||||||
AuthenticationType auth_type = 1; // 认证类型
|
AuthenticationType auth_type = 1; // 认证类型
|
||||||
string auth_id = 2; // 认证ID,根据auth_type存储不同的账号信息
|
string auth_id = 2; // 认证ID,根据auth_type存储不同的账号信息
|
||||||
@@ -37,13 +45,16 @@ message SetAvatarResponse {}
|
|||||||
|
|
||||||
message GetUserInfoRequest {}
|
message GetUserInfoRequest {}
|
||||||
message GetUserInfoResponse {
|
message GetUserInfoResponse {
|
||||||
string name = 1;
|
string id = 1;
|
||||||
string avatar_url = 2;
|
string avatar = 2;
|
||||||
string phone = 3;
|
string invitation_code = 3;
|
||||||
string email = 4;
|
string name = 4;
|
||||||
|
string phone = 5;
|
||||||
|
string email = 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
service AccountService {
|
service AccountService {
|
||||||
|
rpc SendCredential(SendCredentialRequest) returns (SendCredentialResponse);
|
||||||
rpc Auth(AuthRequest) returns (AuthResponse);
|
rpc Auth(AuthRequest) returns (AuthResponse);
|
||||||
rpc SetPassword(SetPasswordRequest) returns (SetPasswordResponse);
|
rpc SetPassword(SetPasswordRequest) returns (SetPasswordResponse);
|
||||||
rpc SetName(SetNameRequest) returns (SetNameResponse);
|
rpc SetName(SetNameRequest) returns (SetNameResponse);
|
||||||
|
|||||||
Reference in New Issue
Block a user