| 123456789101112131415161718192021222324252627282930 | 
							- package route
 
- import "github.com/gin-gonic/gin"
 
- // HTTPServerRoute 核心 App 服务 HTTP 路由
 
- func HTTPServerRoute(opts ...func(engine *gin.Engine)) func(s *gin.Engine) {
 
- 	routes := []func(s *gin.Engine){
 
- 		Root(opts...),
 
- 		SystemAPI(opts...),
 
- 		PastureManageAPI(opts...),
 
- 		ConfigAPI(opts...),
 
- 		EventAPI(opts...),
 
- 		CowAPI(opts...),
 
- 		GoodsManageAPI(opts...),
 
- 		AnalysisAPI(opts...),
 
- 		DashboardApi(opts...),
 
- 		WorkOrderAPI(opts...),
 
- 		FilesManageAPI(opts...),
 
- 		MilkManageAPI(opts...),
 
- 		WarningAPI(opts...),
 
- 		TestAPI(opts...),
 
- 		FeedingAPI(opts...),
 
- 	}
 
- 	return func(s *gin.Engine) {
 
- 		for _, route := range routes {
 
- 			route(s)
 
- 		}
 
- 	}
 
- }
 
 
  |