init
This commit is contained in:
44
service/api/internal/handler/routes.go
Normal file
44
service/api/internal/handler/routes.go
Normal file
@ -0,0 +1,44 @@
|
||||
// Code generated by goctl. DO NOT EDIT.
|
||||
// goctl 1.7.6
|
||||
|
||||
package handler
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
api "hk/service/api/internal/handler/api"
|
||||
"hk/service/api/internal/svc"
|
||||
|
||||
"github.com/zeromicro/go-zero/rest"
|
||||
)
|
||||
|
||||
func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
||||
server.AddRoutes(
|
||||
rest.WithMiddlewares(
|
||||
[]rest.Middleware{serverCtx.RealIPMiddleware},
|
||||
[]rest.Route{
|
||||
{
|
||||
Method: http.MethodGet,
|
||||
Path: "/goods/:id",
|
||||
Handler: api.GoodsDetailsHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
Method: http.MethodGet,
|
||||
Path: "/goods/list",
|
||||
Handler: api.GoodsListHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
Method: http.MethodPost,
|
||||
Path: "/push/order172",
|
||||
Handler: api.Order172Handler(serverCtx),
|
||||
},
|
||||
{
|
||||
Method: http.MethodPost,
|
||||
Path: "/tiktok/getVideoInfo",
|
||||
Handler: api.TiktokInfoHandler(serverCtx),
|
||||
},
|
||||
}...,
|
||||
),
|
||||
rest.WithPrefix("/api"),
|
||||
)
|
||||
}
|
Reference in New Issue
Block a user