cmd.proto 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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 cs_id = 1;
  15. }
  16. message PlayerFetchHistoryMsgReq{
  17. int64 page = 1;
  18. int64 limit = 2;
  19. }
  20. message PlayerFetchMsgReq{}
  21. message PlayerSendMsgReq{
  22. string content = 1;
  23. string pic = 2;
  24. }
  25. message PlayerDisconnectReq{}
  26. /**
  27. Cs Command Request Bean
  28. */
  29. message CsFetchPlayerQueueReq{
  30. int64 limit = 1;
  31. }
  32. message CsConnectPlayerReq{
  33. string player_id = 1;
  34. string game_id = 2;
  35. }
  36. message CsFetchHistoryChatReq{
  37. int64 page = 1;
  38. int64 limit = 2;
  39. }
  40. message CsFetchHistoryMsgReq{
  41. string player_id = 1;
  42. string game_id = 2;
  43. int64 page = 3;
  44. int64 limit = 4;
  45. }
  46. message CsFetchMsgReq{
  47. string player_id = 1;
  48. string game_id = 2;
  49. }
  50. message CsSendMsgReq{
  51. string player_id = 1;
  52. string game_id = 2;
  53. string content = 3;
  54. string pic = 4;
  55. }
  56. service Cmd {
  57. rpc playerFetchCsInfo (PlayerFetchCsInfoReq) returns (CmdResp);
  58. rpc playerFetchHistoryMsg (PlayerFetchHistoryMsgReq) returns (CmdResp);
  59. rpc playerFetchMsg (PlayerFetchMsgReq) returns (CmdResp);
  60. rpc playerSendMsg (PlayerSendMsgReq) returns (CmdResp);
  61. rpc playerDisconnect (PlayerDisconnectReq) returns (CmdResp);
  62. rpc csFetchPlayerQueue (CsFetchPlayerQueueReq) returns (CmdResp);
  63. rpc csConnectPlayer (CsConnectPlayerReq) returns (CmdResp);
  64. rpc csFetchHistoryChat (CsFetchHistoryChatReq) returns (CmdResp);
  65. rpc csFetchHistoryMsg (CsFetchHistoryMsgReq) returns (CmdResp);
  66. rpc csFetchMsg (CsFetchMsgReq) returns (CmdResp);
  67. rpc csSendMsg (CsSendMsgReq) returns (CmdResp);
  68. }