cmd.proto 2.9 KB

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