urlmapping.go 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. package router
  2. import (
  3. "go-admin/app/observe/apis"
  4. "go-admin/common/middleware"
  5. "github.com/gin-gonic/gin"
  6. jwt "github.com/go-admin-team/go-admin-core/sdk/pkg/jwtauth"
  7. )
  8. func init() {
  9. routerCheckRole = append(routerCheckRole, registerUrlMappingRouter)
  10. // routerNoCheckRole = append(routerNoCheckRole, registerUrlMappingRouter)
  11. }
  12. func registerUrlMappingRouter(v1 *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddleware) {
  13. api := apis.UrlMapping{}
  14. // r := v1.Group("/servicegraph").Use(authMiddleware.MiddlewareFunc()).Use(middleware.AuthCheckRole()).Use(actions.PermissionAction())
  15. r := v1.Group("/url-mapping").Use(authMiddleware.MiddlewareFunc()).Use(middleware.AuthCheckRole())
  16. {
  17. r.GET("", api.GetPage)
  18. r.GET("/:id", api.Get)
  19. r.GET("/favor", api.Favors)
  20. r.GET("/detail", api.GetDetail)
  21. r.GET("/sankey", api.Sankey)
  22. r.POST("", api.Insert)
  23. r.PUT("/:id", api.Update)
  24. r.PUT("/favor/:id", api.Favor)
  25. r.DELETE("/:ids", api.Delete)
  26. r.GET("/quality", api.Quality)
  27. r.GET("/errors", api.Errors)
  28. r.GET("/slowtop", api.SlowTop)
  29. r.GET("/subdigits", api.SubDigits)
  30. r.GET("/sublist", api.SubList)
  31. r.GET("/chart", api.Chart)
  32. r.GET("/info", api.BaseInfo)
  33. r.GET("/match", api.Match)
  34. }
  35. }