apibff.api 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. syntax = "v1"
  2. info(
  3. title: "api前端服务"
  4. desc: "api前端服务 "
  5. author: "#Suyghur"
  6. version: "v1"
  7. )
  8. import (
  9. "bean.api"
  10. )
  11. @server(
  12. group: player/auth
  13. prefix: api/v1
  14. )
  15. service apibff {
  16. @doc "玩家登录"
  17. @handler playerAuth
  18. post /player/auth (PlayerAuthReq) returns (CommResp)
  19. }
  20. @server(
  21. group: player/cmd
  22. prefix: api/v1
  23. jwt: Auth
  24. )
  25. service apibff {
  26. @doc "玩家获取客服信息"
  27. @handler playerFetchCsInfo
  28. post /player/fetch_cs_info (PlayerFetchCsInfoReq) returns (CommResp)
  29. @doc "玩家获取历史消息"
  30. @handler playerFetchHistoryMsg
  31. post /player/fetch_history_msg (PlayerFetchHistoryMsgReq) returns (CommResp)
  32. @doc "玩家获取消息"
  33. @handler playerFetchMsg
  34. post /player/fetch_msg returns (CommResp)
  35. @doc "玩家发送消息"
  36. @handler playerSendMsg
  37. post /player/send_msg (PlayerSendMsgReq) returns (CommResp)
  38. @doc "玩家断开连接客服"
  39. @handler playerDisconnect
  40. post /player/disconnect returns (CommResp)
  41. }
  42. @server(
  43. group : cs/auth
  44. prefix : api/v1
  45. )
  46. service apibff {
  47. @doc "客服登录"
  48. @handler csAuth
  49. post /cs/auth (CsAuthReq) returns (CommResp)
  50. }
  51. @server(
  52. group : cs/cmd
  53. prefix : api/v1
  54. jwt : Auth
  55. )
  56. service apibff {
  57. @doc "客服获取玩家信息"
  58. @handler csFetchPlayerInfo
  59. post /cs/fetch_player_info (CsFetchPlayerInfoReq) returns (CommResp)
  60. @doc "客服获取玩家等待队列"
  61. @handler csFetchPlayerQueue
  62. post /cs/fetch_player_queue (CsFetchPlayerQueueReq) returns (CommResp)
  63. @doc "客服连接玩家"
  64. @handler csConnectPlayer
  65. post /cs/connect_player (CsConnectPlayerReq) returns (CommResp)
  66. @doc "客服获取历史会话列表"
  67. @handler csFetchHistoryList
  68. post /cs/fetch_history_list (CsFetchHistoryChatReq) returns (CommResp)
  69. @doc "客服获取历史消息"
  70. @handler csFetchHistoryMsg
  71. post /cs/fetch_history_msg (CsFetchHistoryMsgReq) returns (CommResp)
  72. @doc "客服获取消息"
  73. @handler csFetchMsg
  74. post /cs/fetch_msg (CsFetchMsgReq) returns (CommResp)
  75. @doc "客服发送消息"
  76. @handler csSendMsg
  77. post /cs/send_msg (CsSendMsgReq) returns (CommResp)
  78. }