// Code generated by goctl. DO NOT EDIT. // goctl 1.7.5 package handler import ( "net/http" "time" app_user "gitea.youtukeji.com.cn/xiabin/youtu_server/game_open_api/internal/handler/app_user" douyin "gitea.youtukeji.com.cn/xiabin/youtu_server/game_open_api/internal/handler/douyin" game "gitea.youtukeji.com.cn/xiabin/youtu_server/game_open_api/internal/handler/game" wechat "gitea.youtukeji.com.cn/xiabin/youtu_server/game_open_api/internal/handler/wechat" "gitea.youtukeji.com.cn/xiabin/youtu_server/game_open_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: "/set_app_account", Handler: app_user.AppUserSetUserHandler(serverCtx), }, }, rest.WithJwt(serverCtx.Config.Auth.AccessSecret), rest.WithPrefix("/v1/app_user"), rest.WithTimeout(3000*time.Millisecond), rest.WithMaxBytes(1048576), ) server.AddRoutes( []rest.Route{ { Method: http.MethodGet, Path: "/code2token", Handler: douyin.DouyinCode2tokenHandler(serverCtx), }, }, rest.WithPrefix("/v1/douyin"), rest.WithTimeout(3000*time.Millisecond), rest.WithMaxBytes(1048576), ) server.AddRoutes( []rest.Route{ { Method: http.MethodGet, Path: "/getEcpm", Handler: douyin.GetEcpmHandler(serverCtx), }, }, rest.WithJwt(serverCtx.Config.Auth.AccessSecret), rest.WithPrefix("/v1/douyin"), rest.WithTimeout(3000*time.Millisecond), rest.WithMaxBytes(1048576), ) server.AddRoutes( []rest.Route{ { Method: http.MethodGet, Path: "/ranking/list", Handler: game.RankingListHandler(serverCtx), }, { Method: http.MethodPost, Path: "/ranking/set_score", Handler: game.RankingSetScoreHandler(serverCtx), }, }, rest.WithJwt(serverCtx.Config.Auth.AccessSecret), rest.WithPrefix("/v1/game"), rest.WithTimeout(30000*time.Millisecond), rest.WithMaxBytes(1048576), ) server.AddRoutes( []rest.Route{ { Method: http.MethodGet, Path: "/code2token", Handler: wechat.WechatCode2UserIdHandler(serverCtx), }, }, rest.WithPrefix("/v1/wechat"), rest.WithTimeout(3000*time.Millisecond), rest.WithMaxBytes(1048576), ) }