// Code generated by atomctl. DO NOT EDIT. // Package auth provides HTTP route definitions and registration // for the quyun/v2 application. package auth import ( "quyun/v2/app/http/v1/dto" "quyun/v2/app/middlewares" "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 auth module. // // @provider contracts.HttpRoute atom.GroupRoutes type Routes struct { log *log.Entry `inject:"false"` middlewares *middlewares.Middlewares // Controller instances auth *Auth } // Prepare initializes the routes provider with logging configuration. func (r *Routes) Prepare() error { r.log = log.WithField("module", "routes.auth") r.log.Info("Initializing routes module") return nil } // Name returns the unique identifier for this routes provider. func (r *Routes) Name() string { return "auth" } // 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: Auth r.log.Debugf("Registering route: Post /t/:tenantCode/v1/auth/login -> auth.Login") router.Post("/t/:tenantCode/v1/auth/login"[len(r.Path()):], DataFunc1( r.auth.Login, Body[dto.LoginForm]("form"), )) r.log.Debugf("Registering route: Post /t/:tenantCode/v1/auth/otp -> auth.SendOTP") router.Post("/t/:tenantCode/v1/auth/otp"[len(r.Path()):], Func1( r.auth.SendOTP, Body[dto.SendOTPForm]("form"), )) r.log.Info("Successfully registered all routes") }