package routes import ( "github.com/gin-gonic/gin" "github.com/qit-team/snow-core/http/middleware" "qteam/app/http/controllers" "qteam/app/http/middlewares" "qteam/app/http/trace" "qteam/app/utils" "qteam/config" ) func RegisterAdminRoute(router *gin.Engine) { router.Use(middlewares.ServerRecovery(), middleware.GenRequestId, middleware.GenContextKit, middleware.AccessLog()) router.NoRoute(controllers.Error404) if len(config.GetConf().SkyWalkingOapServer) > 0 && config.IsEnvEqual(config.ProdEnv) { err := trace.InitTracer(config.GetConf().ServiceName, config.GetConf().SkyWalkingOapServer) if err != nil { utils.Log(nil, "InitTracer", err.Error()) } else { router.Use(middlewares.Trace()) } } //v1 := router.Group("/admin/api/v1") //{ // //} }