| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- syntax="proto3";
- package protos;
- option go_package = ".;protos";
- /// 命令
- enum LoginternalCmd {
- bl_placeholder = 0;
- bl_heartbeat = 1;
- bl_login_verify = 2;
- bl_update_userinfo = 3;
- }
- /// login 到 agent 通信协议
- message OfflineResult {
- int32 reason = 1;
- }
- /// 逻辑服务器报告状态作为心跳
- message StatusParams {
- uint64 id = 1;
- int64 ts = 2; // 当前时间
- int32 active = 3; // 链接数
- int32 support = 4; // 最大支持连接数
- string addr = 5; // 地址
- int32 priority = 8; // 进程优先级
- int32 mem = 9; // memory load
- int32 cpu = 10; // cpu load
- }
- message StatusResult {
- int64 ts = 1;
- }
- /// 用户更新密码后需要通知登录服务器
- /// 失败必须重试,如果重试失败需要记录日志手动修改
- message UpdateUserParams {
- uint64 userId = 1;
- int64 ts = 2;
- map<string, string> fv = 3;
- }
- message UpdateUserResult {
- uint64 userId = 1;
- map<string, string> fv = 3;
- }
- /// 逻辑服务验证用户 token。
- /// 登录服务器的返回 userId, token 必须和请求一致,
- /// 登录服务器可以续租, 但不可更新 token
- message VerifyParams {
- uint64 userId = 1;
- string username = 2;
- string token = 3;
- }
- message VerifyResult {
- uint64 userId = 1;
- string token = 4;
- string nickname = 5;
- string headerIcon = 6;
- string username = 8;
- int32 publish = 10; // 用户注册渠道 见 UserFrom
- int32 platform = 11; // android/ios/web
- }
|