apibff.api 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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/cmd
  13. prefix: api/v1
  14. jwt: JwtAuth
  15. middleware: Player2Ctx
  16. )
  17. service apibff {
  18. @doc "玩家获取客服信息"
  19. @handler playerFetchCsInfo
  20. post /player/fetch-cs-info (PlayerFetchCsInfoReq) returns (PlayerFetchCsInfoResp)
  21. @doc "玩家获取历史消息"
  22. @handler playerFetchHistoryMsg
  23. post /player/fetch-history-msg (PlayerFetchHistoryMsgReq) returns (PlayerFetchHistoryMsgResp)
  24. @doc "玩家获取消息"
  25. @handler playerFetchMsg
  26. post /player/fetch-msg returns (PlayerFetchMsgResp)
  27. @doc "玩家发送消息"
  28. @handler playerSendMsg
  29. post /player/send-msg (PlayerSendMsgReq)
  30. @doc "玩家断开连接客服"
  31. @handler playerDisconnect
  32. post /player/disconnect
  33. }
  34. @server(
  35. group : cs/cmd
  36. prefix : api/v1
  37. jwt : JwtAuth
  38. )
  39. service apibff {
  40. @doc "客服获取玩家等待队列"
  41. @handler csFetchPlayerQueue
  42. post /cs/fetch-player-queue (CsFetchPlayerQueueReq) returns (CsFetchPlayerQueueResp)
  43. @doc "客服连接玩家"
  44. @handler csConnectPlayer
  45. post /cs/connect-player (CsConnectPlayerReq)
  46. @doc "客服获取历史会话列表"
  47. @handler csFetchHistoryList
  48. post /cs/fetch-history-list (CsFetchHistoryChatReq) returns (CsFetchHistoryChatResp)
  49. @doc "客服获取历史消息"
  50. @handler csFetchHistoryMsg
  51. post /cs/fetch-history-msg (CsFetchHistoryMsgReq) returns (CsFetchHistoryMsgResp)
  52. @doc "客服获取消息"
  53. @handler csFetchMsg
  54. post /cs/fetch-msg (CsFetchMsgReq) returns (CsFetchMsgResp)
  55. @doc "客服发送消息"
  56. @handler csSendMsg
  57. post /cs/send-msg (CsSendMsgReq)
  58. }