This commit is contained in:
2025-12-20 11:05:35 +08:00
parent 788236ecc2
commit c42f2c651f
25 changed files with 245 additions and 95 deletions

View File

@@ -1,13 +1,22 @@
package middlewares
import (
"quyun/v2/providers/app"
"quyun/v2/providers/jwt"
"go.ipao.vip/atom/container"
"go.ipao.vip/atom/opt"
)
func Provide(opts ...opt.Option) error {
if err := container.Container.Provide(func() (*Middlewares, error) {
obj := &Middlewares{}
if err := container.Container.Provide(func(
app *app.Config,
jwt *jwt.JWT,
) (*Middlewares, error) {
obj := &Middlewares{
app: app,
jwt: jwt,
}
if err := obj.Prepare(); err != nil {
return nil, err
}