package router import ( "go-admin/app/observe/apis" "go-admin/common/middleware" "github.com/gin-gonic/gin" jwt "github.com/go-admin-team/go-admin-core/sdk/pkg/jwtauth" ) func init() { routerCheckRole = append(routerCheckRole, registerBizRouter) // routerNoCheckRole = append(routerNoCheckRole, registerBizRouter) } func registerBizRouter(v1 *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddleware) { api := apis.Biz{} r := v1.Group("/biz").Use(authMiddleware.MiddlewareFunc()).Use(middleware.AuthCheckRole()) // r := v1.Group("/biz") { r.GET("", api.List) r.GET("/stats", api.Stats) r.GET("/digits", api.Digits) r.GET("/detail", api.Detail) r.GET("/graph", api.Graph) r.GET("/graph/stats", api.GraphStats) r.PUT("/mark/:id", api.Mark) r.PUT("/favor/:id", api.Favor) r.DELETE("/:id", api.Delete) r.GET("/gen", api.GenList) r.GET("/basic-guy", api.BasicGuy) r.GET("/node/spans", api.NodeSpans) r.GET("/node/stats", api.NodeStats) r.PUT("/node", api.NodeUpdate) r.GET("/slowtop", api.SlowTop) } }