123456789101112131415161718192021222324252627 |
- package init_serve
- import (
- _ "eta/eta_bridge/docs"
- "eta/eta_bridge/global"
- "eta/eta_bridge/middleware"
- "eta/eta_bridge/routers"
- "github.com/gin-gonic/gin"
- )
- // InitRouter 初始化路由
- func InitRouter() (r *gin.Engine) {
- gin.SetMode(global.CONFIG.Serve.RunMode)
- r = gin.Default()
- r.Use(middleware.Cors())
- r.Use(middleware.Recover())
- rBase := r.Group("api/")
- routers.InitAuth(rBase)
- routers.InitEtaTrial(rBase)
- routers.InitIndexData(rBase)
- routers.InitXiangyu(rBase)
- routers.InitPCSG(rBase)
- routers.InitHTSSO(rBase)
- return
- }
|