login_internal.proto 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. syntax="proto3";
  2. package protos;
  3. option go_package = ".;protos";
  4. /// 命令
  5. enum LoginternalCmd {
  6. bl_placeholder = 0;
  7. bl_heartbeat = 1;
  8. bl_login_verify = 2;
  9. bl_update_userinfo = 3;
  10. }
  11. /// login 到 agent 通信协议
  12. message OfflineResult {
  13. int32 reason = 1;
  14. }
  15. /// 逻辑服务器报告状态作为心跳
  16. message StatusParams {
  17. uint64 id = 1;
  18. int64 ts = 2; // 当前时间
  19. int32 active = 3; // 链接数
  20. int32 support = 4; // 最大支持连接数
  21. string addr = 5; // 地址
  22. int32 priority = 8; // 进程优先级
  23. int32 mem = 9; // memory load
  24. int32 cpu = 10; // cpu load
  25. }
  26. message StatusResult {
  27. int64 ts = 1;
  28. }
  29. /// 用户更新密码后需要通知登录服务器
  30. /// 失败必须重试,如果重试失败需要记录日志手动修改
  31. message UpdateUserParams {
  32. uint64 userId = 1;
  33. int64 ts = 2;
  34. map<string, string> fv = 3;
  35. }
  36. message UpdateUserResult {
  37. uint64 userId = 1;
  38. map<string, string> fv = 3;
  39. }
  40. /// 逻辑服务验证用户 token。
  41. /// 登录服务器的返回 userId, token 必须和请求一致,
  42. /// 登录服务器可以续租, 但不可更新 token
  43. message VerifyParams {
  44. uint64 userId = 1;
  45. string username = 2;
  46. string token = 3;
  47. }
  48. message VerifyResult {
  49. uint64 userId = 1;
  50. string token = 4;
  51. string nickname = 5;
  52. string headerIcon = 6;
  53. string username = 8;
  54. int32 publish = 10; // 用户注册渠道 见 UserFrom
  55. int32 platform = 11; // android/ios/web
  56. }