| 123456789101112131415161718192021222324252627282930313233343536373839404142 |
- package routes
- import (
- _ "fwh-toolbox-server/docs"
- "fwh-toolbox-server/middleware"
- "github.com/gofiber/fiber/v2"
- "github.com/gofiber/swagger"
- )
- func Setup(app *fiber.App) {
- // 无需验证
- AuthSetup(app)
- api := app.Group("/api", middleware.AuthMiddleware())
- LogoutSetup(api)
- GlobalWebSocketSetup(api)
- // api.Get("/keyAccounts/sunrun/state", controllers.GetUsers)
- // api.Get("/keyAccounts/sunrun/abnormalList", controllers.GetUsers)
- // …
- UserInfoSetup(api)
- ShutdownStatisticsSetup(api)
- ShutdownManageSetup(api)
- SitesMonitorSetup(api)
- SitesAnalysisSetup(api)
- BatchDownloadSetup(api)
- BackgroundTaskSetup(api)
- AutoUpdateConfigSetup(api)
- XlogSetup(api)
- SiteInfoManageSetup(api)
- DespatchConfigSetup(api)
- FaultRecordSetup(api)
- SimCardManageSetup(api)
- FeedbackSetup(api)
- app.Get("/swagger/*", swagger.HandlerDefault)
- // simple health
- app.Get("/ping", func(c *fiber.Ctx) error { return c.SendString("pong") })
- }
|