Files
qvyun/backend/app/http/auth/routes.gen.go
2025-01-10 14:53:01 +08:00

44 lines
870 B
Go

// Code generated by the atomctl ; DO NOT EDIT.
package auth
import (
. "backend/pkg/f"
_ "git.ipao.vip/rogeecn/atom"
_ "git.ipao.vip/rogeecn/atom/contracts"
"github.com/gofiber/fiber/v3"
log "github.com/sirupsen/logrus"
)
// @provider contracts.HttpRoute atom.GroupRoutes
type Routes struct {
log *log.Entry `inject:"false"`
controller *Controller
}
func (r *Routes) Prepare() error {
r.log = log.WithField("module", "routes.auth")
return nil
}
func (r *Routes) Name() string {
return "auth"
}
func (r *Routes) Register(router fiber.Router) {
// 注册路由组: Controller
router.Get("/auth/wechat/jump", Func1(
r.controller.JumpToAuth,
QueryParam[string]("redirectUri"),
))
router.Get("/auth/login", Func3(
r.controller.Login,
QueryParam[string]("code"),
QueryParam[string]("state"),
QueryParam[string]("redirectUri"),
))
}