reset backend

This commit is contained in:
2025-12-27 19:49:11 +08:00
parent 77ac9d00b3
commit 503b15aab7
129 changed files with 1134 additions and 18084 deletions

View File

@@ -1,60 +1,9 @@
package web
import (
"quyun/v2/app/middlewares"
"quyun/v2/providers/jwt"
"go.ipao.vip/atom"
"go.ipao.vip/atom/container"
"go.ipao.vip/atom/contracts"
"go.ipao.vip/atom/opt"
)
func Provide(opts ...opt.Option) error {
if err := container.Container.Provide(func(
jwt *jwt.JWT,
) (*auth, error) {
obj := &auth{
jwt: jwt,
}
return obj, nil
}); err != nil {
return err
}
if err := container.Container.Provide(func() (*me, error) {
obj := &me{}
return obj, nil
}); err != nil {
return err
}
if err := container.Container.Provide(func(
auth *auth,
me *me,
middlewares *middlewares.Middlewares,
tenantApply *tenantApply,
) (contracts.HttpRoute, error) {
obj := &Routes{
auth: auth,
me: me,
middlewares: middlewares,
tenantApply: tenantApply,
}
if err := obj.Prepare(); err != nil {
return nil, err
}
return obj, nil
}, atom.GroupRoutes); err != nil {
return err
}
if err := container.Container.Provide(func() (*tenantApply, error) {
obj := &tenantApply{}
return obj, nil
}); err != nil {
return err
}
return nil
}