routes.go 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. // Code generated by goctl. DO NOT EDIT.
  2. package handler
  3. import (
  4. "net/http"
  5. "ylink/bff/cmdbff/api/internal/svc"
  6. "github.com/zeromicro/go-zero/rest"
  7. )
  8. func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
  9. server.AddRoutes(
  10. []rest.Route{
  11. {
  12. Method: http.MethodPost,
  13. Path: "/player/fetch-cs-info",
  14. Handler: playerFetchCsInfoHandler(serverCtx),
  15. },
  16. {
  17. Method: http.MethodPost,
  18. Path: "/player/fetch-history-msg",
  19. Handler: playerFetchHistoryMsgHandler(serverCtx),
  20. },
  21. {
  22. Method: http.MethodPost,
  23. Path: "/player/send-msg",
  24. Handler: playerSendMsgHandler(serverCtx),
  25. },
  26. {
  27. Method: http.MethodPost,
  28. Path: "/player/disconnect",
  29. Handler: playerDisconnectHandler(serverCtx),
  30. },
  31. {
  32. Method: http.MethodPost,
  33. Path: "/cs/fetch-player-queue",
  34. Handler: csFetchPlayerQueueHandler(serverCtx),
  35. },
  36. {
  37. Method: http.MethodPost,
  38. Path: "/cs/connect-player",
  39. Handler: csConnectPlayerHandler(serverCtx),
  40. },
  41. {
  42. Method: http.MethodPost,
  43. Path: "/cs/fetch-history-list",
  44. Handler: csFetchHistoryListHandler(serverCtx),
  45. },
  46. {
  47. Method: http.MethodPost,
  48. Path: "/cs/fetch-history-msg",
  49. Handler: csFetchHistoryMsgHandler(serverCtx),
  50. },
  51. {
  52. Method: http.MethodPost,
  53. Path: "/cs/send-msg",
  54. Handler: csSendMsgHandler(serverCtx),
  55. },
  56. },
  57. rest.WithJwt(serverCtx.Config.JwtAuth.AccessSecret),
  58. rest.WithPrefix("/api/v1/cmd"),
  59. )
  60. }