apibff.api 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. syntax = "v1"
  2. info(
  3. title: "API聚合服务"
  4. desc: "API聚合服务"
  5. author: "#Suyghur"
  6. version: "v1"
  7. )
  8. import (
  9. "comm/comm.api"
  10. "cmd/cmd.api"
  11. )
  12. @server(
  13. group: player/login
  14. prefix: api/v1
  15. )
  16. service apibff {
  17. @doc "玩家登录"
  18. @handler playerLogin
  19. post /player/login (PlayerInfo) returns (CommResp)
  20. }
  21. @server(
  22. group: player/cmd
  23. prefix: api/v1
  24. jwt: Auth
  25. )
  26. service apibff {
  27. @doc "玩家发送信息"
  28. @handler playerSend
  29. post /player/send (SendReq) returns (CommResp)
  30. @doc "玩家登出(断开连接)"
  31. @handler playerLogout
  32. post /player/logout returns (CommResp)
  33. }
  34. @server(
  35. group : cs/login
  36. prefix : api/v1
  37. )
  38. service apibff {
  39. @doc "客服登录"
  40. @handler csLogin
  41. post /cs/login (CsLoginInfo) returns (CommResp)
  42. }
  43. @server(
  44. group : cs/cmd
  45. prefix : api/v1
  46. jwt : Auth
  47. )
  48. service apibff {
  49. @doc "获取等待玩家列表"
  50. @handler csFetchQueue
  51. post /cs/fetch_queue returns (CommResp)
  52. @doc "客服连接玩家"
  53. @handler csConnect
  54. post /cs/connect (PlayerInfo) returns (CommResp)
  55. @doc "客服发送信息"
  56. @handler csSend
  57. post /cs/send (SendReq) returns (CommResp)
  58. @doc "客服断开连接"
  59. @handler csDisconnect
  60. post /cs/disconnect returns (CommResp)
  61. @doc "客服登出"
  62. @handler csLogout
  63. post /cs/logout returns (CommResp)
  64. }