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, registerUrlMappingRouter) // routerNoCheckRole = append(routerNoCheckRole, registerUrlMappingRouter) } func registerUrlMappingRouter(v1 *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddleware) { api := apis.UrlMapping{} // r := v1.Group("/servicegraph").Use(authMiddleware.MiddlewareFunc()).Use(middleware.AuthCheckRole()).Use(actions.PermissionAction()) r := v1.Group("/url-mapping").Use(authMiddleware.MiddlewareFunc()).Use(middleware.AuthCheckRole()) { r.GET("", api.GetPage) r.GET("/:id", api.Get) r.GET("/favor", api.Favors) r.GET("/detail", api.GetDetail) r.GET("/sankey", api.Sankey) r.POST("", api.Insert) r.PUT("/:id", api.Update) r.PUT("/favor/:id", api.Favor) r.DELETE("/:ids", api.Delete) r.GET("/quality", api.Quality) r.GET("/errors", api.Errors) r.GET("/slowtop", api.SlowTop) r.GET("/subdigits", api.SubDigits) r.GET("/sublist", api.SubList) r.GET("/chart", api.Chart) r.GET("/info", api.BaseInfo) r.GET("/match", api.Match) } }