cmd.proto 2.3 KB

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