// Code generated by atomctl. DO NOT EDIT. // Package super provides HTTP route definitions and registration // for the quyun/v2 application. package super import ( "quyun/v2/app/http/super/dto" "github.com/gofiber/fiber/v3" log "github.com/sirupsen/logrus" _ "go.ipao.vip/atom" _ "go.ipao.vip/atom/contracts" . "go.ipao.vip/atom/fen" ) // Routes implements the HttpRoute contract and provides route registration // for all controllers in the super module. // // @provider contracts.HttpRoute atom.GroupRoutes type Routes struct { log *log.Entry `inject:"false"` // Controller instances authController *authController staticController *staticController tenant *tenant } // Prepare initializes the routes provider with logging configuration. func (r *Routes) Prepare() error { r.log = log.WithField("module", "routes.super") r.log.Info("Initializing routes module") return nil } // Name returns the unique identifier for this routes provider. func (r *Routes) Name() string { return "super" } // Register registers all HTTP routes with the provided fiber router. // Each route is registered with its corresponding controller action and parameter bindings. func (r *Routes) Register(router fiber.Router) { // Register routes for controller: authController r.log.Debugf("Registering route: Post /super/v1/auth/login -> authController.login") router.Post("/super/v1/auth/login", DataFunc1( r.authController.login, Body[dto.LoginForm]("form"), )) // Register routes for controller: tenant r.log.Debugf("Registering route: Get /super/v1/tenants -> tenant.list") router.Get("/super/v1/tenants", DataFunc1( r.tenant.list, Query[dto.TenantFilter]("filter"), )) r.log.Debugf("Registering route: Patch /super/v1/tenants/:tenantID -> tenant.updateExpire") router.Patch("/super/v1/tenants/:tenantID", Func2( r.tenant.updateExpire, PathParam[int64]("tenantID"), Body[dto.TenantExpireUpdateForm]("form"), )) router.Get("/super/*", Func(r.staticController.static)) r.log.Info("Successfully registered all routes") }