cmd.proto 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. syntax = "proto3";
  2. option go_package = "./pb";
  3. package pb;
  4. import "google/protobuf/struct.proto";
  5. message CmdResp{
  6. int64 code = 1;
  7. string msg = 2;
  8. google.protobuf.Struct data = 3;
  9. }
  10. /**
  11. Player Command Request Bean
  12. */
  13. message PlayerFetchCsInfoReq{
  14. string player_id = 1;
  15. string game_id = 2;
  16. string cs_id = 3;
  17. }
  18. message PlayerFetchCsInfoResp{
  19. string cs_id = 1;
  20. string cs_nickname = 2;
  21. string cs_avatar_url = 3;
  22. string cs_signature = 4;
  23. int64 online_status = 5;
  24. }
  25. message PlayerFetchHistoryMsgReq{
  26. string player_id = 1;
  27. string game_id = 2;
  28. int64 page = 3;
  29. int64 limit = 4;
  30. }
  31. message PlayerFetchHistoryMsgResp{
  32. int64 total_page = 1;
  33. int64 current_page = 2;
  34. google.protobuf.ListValue list = 3;
  35. }
  36. message PlayerFetchMsgReq{
  37. string player_id = 1;
  38. string game_id = 2;
  39. }
  40. message PlayerFetchMsgResp{
  41. google.protobuf.ListValue list = 1;
  42. }
  43. message PlayerSendMsgReq{
  44. string player_id = 1;
  45. string game_id = 2;
  46. string content = 4;
  47. string pic = 5;
  48. }
  49. message PlayerSendMsgResp{}
  50. message PlayerDisconnectReq{
  51. string player_id = 1;
  52. string game_id = 2;
  53. }
  54. message PlayerDisconnectResp{}
  55. /**
  56. Cs Command Request Bean
  57. */
  58. message CsFetchPlayerQueueReq{
  59. int64 limit = 1;
  60. }
  61. message CsFetchPlayerQueueResp{
  62. int64 total = 1;
  63. google.protobuf.ListValue list = 2;
  64. }
  65. message CsConnectPlayerReq{
  66. string cs_id = 1;
  67. string player_id = 2;
  68. string game_id = 3;
  69. }
  70. message CsConnectPlayerResp{}
  71. message CsFetchHistoryChatReq{
  72. string cs_id = 1;
  73. int64 page = 2;
  74. int64 limit = 3;
  75. }
  76. message CsFetchHistoryChatResp{
  77. int64 total_page = 1;
  78. int64 current_page = 2;
  79. google.protobuf.ListValue list = 3;
  80. }
  81. message CsFetchHistoryMsgReq{
  82. string cs_id = 1;
  83. string player_id = 2;
  84. string game_id = 3;
  85. int64 page = 4;
  86. int64 limit = 5;
  87. }
  88. message CsFetchHistoryMsgResp{
  89. string cs_id = 1;
  90. int64 total_page = 2;
  91. int64 current_page = 3;
  92. google.protobuf.ListValue list = 4;
  93. }
  94. message CsFetchMsgReq{
  95. string cs_id = 1;
  96. string player_id = 2;
  97. string game_id = 3;
  98. }
  99. message CsFetchMsgResp{
  100. google.protobuf.ListValue list = 4;
  101. }
  102. message CsSendMsgReq{
  103. string cs_id = 1;
  104. string player_id = 2;
  105. string game_id = 3;
  106. string content = 4;
  107. string pic = 5;
  108. }
  109. message CsSendMsgResp{}
  110. service Cmd {
  111. rpc playerFetchCsInfo (PlayerFetchCsInfoReq) returns (PlayerFetchCsInfoResp);
  112. rpc playerFetchHistoryMsg (PlayerFetchHistoryMsgReq) returns (PlayerFetchHistoryMsgResp);
  113. rpc playerFetchMsg (PlayerFetchMsgReq) returns (PlayerFetchMsgResp);
  114. rpc playerSendMsg (PlayerSendMsgReq) returns (PlayerSendMsgResp);
  115. rpc playerDisconnect (PlayerDisconnectReq) returns (PlayerDisconnectResp);
  116. rpc csFetchPlayerQueue (CsFetchPlayerQueueReq) returns (CsFetchPlayerQueueResp);
  117. rpc csConnectPlayer (CsConnectPlayerReq) returns (CsConnectPlayerResp);
  118. rpc csFetchHistoryChat (CsFetchHistoryChatReq) returns (CsFetchHistoryChatResp);
  119. rpc csFetchHistoryMsg (CsFetchHistoryMsgReq) returns (CsFetchHistoryMsgResp);
  120. rpc csFetchMsg (CsFetchMsgReq) returns (CsFetchMsgResp);
  121. rpc csSendMsg (CsSendMsgReq) returns (CsSendMsgResp);
  122. }