Guard.proto 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. syntax = "proto3";
  2. package live_user.v1;
  3. option go_package = "v1";
  4. import "github.com/gogo/protobuf/gogoproto/gogo.proto";
  5. service Guard {
  6. /** 根据uid获取大航海信息
  7. *
  8. */
  9. rpc getByUidTargetId (GuardGetByUidTargetIdReq) returns (GuardGetByUidTargetIdResp);
  10. /** 根据uid获取大航海信息
  11. *
  12. */
  13. rpc getByUid (GuardGetByUidReq) returns (GuardGetByUidResp);
  14. }
  15. message GuardGetByUidTargetIdReq {
  16. // uid
  17. int64 uid = 1 [(gogoproto.jsontag) = "uid"];
  18. // 主播id
  19. int64 target_id = 2 [(gogoproto.jsontag) = "target_id"];
  20. // 是否只返回最高等级的守护,为1时会改变返回数据结构
  21. int64 is_limit_one = 3 [(gogoproto.jsontag) = "is_limit_one"];
  22. }
  23. message GuardGetByUidTargetIdResp {
  24. //
  25. int64 code = 1 [(gogoproto.jsontag) = "code"];
  26. //
  27. string msg = 2 [(gogoproto.jsontag) = "msg"];
  28. //
  29. string message = 3 [(gogoproto.jsontag) = "message"];
  30. //
  31. repeated Data data = 4 [(gogoproto.jsontag) = "data"];
  32. message Data {
  33. //
  34. int64 id = 1 [(gogoproto.jsontag) = "id"];
  35. //
  36. int64 uid = 2 [(gogoproto.jsontag) = "uid"];
  37. // up主id
  38. int64 target_id = 3 [(gogoproto.jsontag) = "target_id"];
  39. // 1:总督,2:提督,3:舰长
  40. int64 privilege_type = 4 [(gogoproto.jsontag) = "privilege_type"];
  41. // 开始时间
  42. string start_time = 5 [(gogoproto.jsontag) = "start_time"];
  43. // 过期时间
  44. string expired_time = 6 [(gogoproto.jsontag) = "expired_time"];
  45. // 创建时间
  46. string ctime = 7 [(gogoproto.jsontag) = "ctime"];
  47. // 修改时间
  48. string utime = 8 [(gogoproto.jsontag) = "utime"];
  49. }
  50. }
  51. message GuardGetByUidReq {
  52. // uid
  53. int64 uid = 1 [(gogoproto.jsontag) = "uid"];
  54. // 是否包含过期的守护,默认包含
  55. int64 inc_expire = 2 [(gogoproto.jsontag) = "inc_expire"];
  56. // 是否只返回等级最高的一条,默认0
  57. int64 is_limit_one = 3 [(gogoproto.jsontag) = "is_limit_one"];
  58. }
  59. message GuardGetByUidResp {
  60. //
  61. int64 code = 1 [(gogoproto.jsontag) = "code"];
  62. //
  63. string msg = 2 [(gogoproto.jsontag) = "msg"];
  64. //
  65. string message = 3 [(gogoproto.jsontag) = "message"];
  66. //
  67. repeated Data data = 4 [(gogoproto.jsontag) = "data"];
  68. message Data {
  69. //
  70. int64 id = 1 [(gogoproto.jsontag) = "id"];
  71. //
  72. int64 uid = 2 [(gogoproto.jsontag) = "uid"];
  73. // up主id
  74. int64 target_id = 3 [(gogoproto.jsontag) = "target_id"];
  75. // 1:总督,2:提督,3:舰长
  76. int64 privilege_type = 4 [(gogoproto.jsontag) = "privilege_type"];
  77. // 开始时间
  78. string start_time = 5 [(gogoproto.jsontag) = "start_time"];
  79. // 过期时间
  80. string expired_time = 6 [(gogoproto.jsontag) = "expired_time"];
  81. // 创建时间
  82. string ctime = 7 [(gogoproto.jsontag) = "ctime"];
  83. // 修改时间
  84. string utime = 8 [(gogoproto.jsontag) = "utime"];
  85. }
  86. }