cmd.proto 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  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 PlayerSendMsgReq{
  32. string player_id = 1;
  33. string game_id = 2;
  34. string content = 4;
  35. string pic = 5;
  36. }
  37. message PlayerSendMsgResp{}
  38. message PlayerDisconnectReq{
  39. string player_id = 1;
  40. string game_id = 2;
  41. }
  42. message PlayerDisconnectResp{}
  43. /**
  44. Cs Command Request Bean
  45. */
  46. message CsFetchPlayerQueueReq{
  47. int64 limit = 1;
  48. }
  49. message CsFetchPlayerQueueResp{
  50. int64 total = 1;
  51. google.protobuf.ListValue list = 2;
  52. }
  53. message CsConnectPlayerReq{
  54. string cs_id = 1;
  55. string player_id = 2;
  56. string game_id = 3;
  57. }
  58. message CsConnectPlayerResp{}
  59. message CsFetchHistoryChatReq{
  60. string cs_id = 1;
  61. int64 page = 2;
  62. int64 limit = 3;
  63. }
  64. message CsFetchHistoryChatResp{
  65. int64 total_page = 1;
  66. int64 current_page = 2;
  67. google.protobuf.ListValue list = 3;
  68. }
  69. message CsFetchHistoryMsgReq{
  70. string cs_id = 1;
  71. string player_id = 2;
  72. string game_id = 3;
  73. int64 page = 4;
  74. int64 limit = 5;
  75. }
  76. message CsFetchHistoryMsgResp{
  77. string cs_id = 1;
  78. int64 total_page = 2;
  79. int64 current_page = 3;
  80. google.protobuf.ListValue list = 4;
  81. }
  82. message CsSendMsgReq{
  83. string cs_id = 1;
  84. string player_id = 2;
  85. string game_id = 3;
  86. string content = 4;
  87. string pic = 5;
  88. }
  89. message CsSendMsgResp{}
  90. service Cmd {
  91. rpc playerFetchCsInfo (PlayerFetchCsInfoReq) returns (PlayerFetchCsInfoResp);
  92. rpc playerFetchHistoryMsg (PlayerFetchHistoryMsgReq) returns (PlayerFetchHistoryMsgResp);
  93. rpc playerSendMsg (PlayerSendMsgReq) returns (PlayerSendMsgResp);
  94. rpc playerDisconnect (PlayerDisconnectReq) returns (PlayerDisconnectResp);
  95. rpc csFetchPlayerQueue (CsFetchPlayerQueueReq) returns (CsFetchPlayerQueueResp);
  96. rpc csConnectPlayer (CsConnectPlayerReq) returns (CsConnectPlayerResp);
  97. rpc csFetchHistoryChat (CsFetchHistoryChatReq) returns (CsFetchHistoryChatResp);
  98. rpc csFetchHistoryMsg (CsFetchHistoryMsgReq) returns (CsFetchHistoryMsgResp);
  99. rpc csSendMsg (CsSendMsgReq) returns (CsSendMsgResp);
  100. }