-
Notifications
You must be signed in to change notification settings - Fork 0
/
userManager.proto
49 lines (44 loc) · 1.55 KB
/
userManager.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
syntax = "proto3";
import "common.proto";
option go_package = ".;pb";
package pb;
// 服务的定义
service UserManager {
// 注册用户
rpc RegisterUserWithLoginInfo (LoginInfo) returns (OperationResponse) {}
// 登录 获取Token
rpc LoginWithUserLoginInfo (LoginInfo) returns (UserLoginResponse) {}
// 使用微信登录账号获取jwt
rpc LoginWithWechatCode (StringValue) returns (UserLoginResponse) {}
// 账号绑定微信
rpc BindWithWechatCode (StringValue) returns (OperationResponse) {}
// 账号解绑微信
rpc UnbindWechat (Empty) returns (OperationResponse) {}
// 获取用户信息
rpc GetUserInfo (Empty) returns (UserInfo) {}
// 获取用户的微信信息
rpc GetUserWechatInfoByCode (StringValue) returns (WechatUserInfo) {}
// 更新用户信息
rpc UpdateUserName (StringValue) returns (OperationResponse) {}
rpc UpdateUserEmail (StringValue) returns (OperationResponse) {}
rpc UpdateUserMobile (StringValue) returns (OperationResponse) {}
rpc UpdateUserPassword (StringValue) returns (OperationResponse) {}
rpc UpdateUserAvatar (UpdateAvatar) returns (OperationResponse) {}
// 业务相关操作
// 获取所有配置(网关、设备、配置等)用于APP的初始化
rpc GetAllConfig (Empty) returns (StringValue) {}
}
message LoginInfo{
string UserMobile = 1;
string Password = 2;
}
message UpdateAvatar{
bytes NewBytes = 1;
}
message UserLoginResponse{
int32 Code = 1;
string Msg = 2;
string Token = 3;
// UserInfo
UserInfo UserInfo = 4;
}