123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- // Code generated by goctl. DO NOT EDIT.
- package handler
- import (
- "net/http"
- cscmd "ylink/bff/apibff/api/internal/handler/cs/cmd"
- cslogin "ylink/bff/apibff/api/internal/handler/cs/login"
- playercmd "ylink/bff/apibff/api/internal/handler/player/cmd"
- playerlogin "ylink/bff/apibff/api/internal/handler/player/login"
- "ylink/bff/apibff/api/internal/svc"
- "github.com/zeromicro/go-zero/rest"
- )
- func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
- server.AddRoutes(
- []rest.Route{
- {
- Method: http.MethodPost,
- Path: "/player/login",
- Handler: playerlogin.PlayerLoginHandler(serverCtx),
- },
- },
- rest.WithPrefix("/api/v1"),
- )
- server.AddRoutes(
- []rest.Route{
- {
- Method: http.MethodPost,
- Path: "/player/send",
- Handler: playercmd.PlayerSendHandler(serverCtx),
- },
- {
- Method: http.MethodPost,
- Path: "/player/logout",
- Handler: playercmd.PlayerLogoutHandler(serverCtx),
- },
- },
- rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
- rest.WithPrefix("/api/v1"),
- )
- server.AddRoutes(
- []rest.Route{
- {
- Method: http.MethodPost,
- Path: "/cs/login",
- Handler: cslogin.CsLoginHandler(serverCtx),
- },
- },
- rest.WithPrefix("/api/v1"),
- )
- server.AddRoutes(
- []rest.Route{
- {
- Method: http.MethodPost,
- Path: "/cs/fetch_queue",
- Handler: cscmd.CsFetchQueueHandler(serverCtx),
- },
- {
- Method: http.MethodPost,
- Path: "/cs/connect",
- Handler: cscmd.CsConnectHandler(serverCtx),
- },
- {
- Method: http.MethodPost,
- Path: "/cs/send",
- Handler: cscmd.CsSendHandler(serverCtx),
- },
- {
- Method: http.MethodPost,
- Path: "/cs/disconnect",
- Handler: cscmd.CsDisconnectHandler(serverCtx),
- },
- {
- Method: http.MethodPost,
- Path: "/cs/logout",
- Handler: cscmd.CsLogoutHandler(serverCtx),
- },
- },
- rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
- rest.WithPrefix("/api/v1"),
- )
- }
|