32 lines
639 B
Go
32 lines
639 B
Go
|
// Code generated by goctl. DO NOT EDIT.
|
||
|
// goctl 1.7.2
|
||
|
|
||
|
package handler
|
||
|
|
||
|
import (
|
||
|
"net/http"
|
||
|
|
||
|
product "tianyuan-api/apps/index/internal/handler/product"
|
||
|
"tianyuan-api/apps/index/internal/svc"
|
||
|
|
||
|
"github.com/zeromicro/go-zero/rest"
|
||
|
)
|
||
|
|
||
|
func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
||
|
server.AddRoutes(
|
||
|
[]rest.Route{
|
||
|
{
|
||
|
Method: http.MethodGet,
|
||
|
Path: "/:productId",
|
||
|
Handler: product.GetProductByIdHandler(serverCtx),
|
||
|
},
|
||
|
{
|
||
|
Method: http.MethodGet,
|
||
|
Path: "/list",
|
||
|
Handler: product.GetProductListHandler(serverCtx),
|
||
|
},
|
||
|
},
|
||
|
rest.WithPrefix("/api/index/product"),
|
||
|
)
|
||
|
}
|