package route import ( "kpt-pasture/http/handler/cow" "github.com/gin-gonic/gin" ) func CowAPI(opts ...func(engine *gin.Engine)) func(s *gin.Engine) { return func(s *gin.Engine) { for _, opt := range opts { opt(s) } // CowAPI API 组 牛只信息 eventRoute := authRouteGroup(s, "/api/v1/cow/") eventRoute.POST("/list", cow.List) eventRoute.POST("/event/list", cow.EventList) eventRoute.POST("/behavior/curve", cow.BehaviorCurve) } }