sys_server_monitor.go 560 B

123456789101112131415161718192021
  1. package router
  2. import (
  3. "github.com/gin-gonic/gin"
  4. jwt "github.com/go-admin-team/go-admin-core/sdk/pkg/jwtauth"
  5. "go-admin/app/other/apis"
  6. "go-admin/common/middleware"
  7. )
  8. func init() {
  9. routerCheckRole = append(routerCheckRole, registerSysServerMonitorRouter)
  10. }
  11. // 需认证的路由代码
  12. func registerSysServerMonitorRouter(v1 *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddleware) {
  13. api := apis.ServerMonitor{}
  14. r := v1.Group("/server-monitor").Use(authMiddleware.MiddlewareFunc()).Use(middleware.AuthCheckRole())
  15. {
  16. r.GET("", api.ServerInfo)
  17. }
  18. }