feat(storage): 实现本地存储功能,包括文件上传和下载接口
This commit is contained in:
@@ -44,6 +44,7 @@ func Provide(opts ...opt.Option) error {
|
||||
content *Content,
|
||||
creator *Creator,
|
||||
middlewares *middlewares.Middlewares,
|
||||
storage *Storage,
|
||||
tenant *Tenant,
|
||||
transaction *Transaction,
|
||||
user *User,
|
||||
@@ -54,6 +55,7 @@ func Provide(opts ...opt.Option) error {
|
||||
content: content,
|
||||
creator: creator,
|
||||
middlewares: middlewares,
|
||||
storage: storage,
|
||||
tenant: tenant,
|
||||
transaction: transaction,
|
||||
user: user,
|
||||
@@ -66,6 +68,13 @@ func Provide(opts ...opt.Option) error {
|
||||
}, atom.GroupRoutes); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := container.Container.Provide(func() (*Storage, error) {
|
||||
obj := &Storage{}
|
||||
|
||||
return obj, nil
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := container.Container.Provide(func() (*Tenant, error) {
|
||||
obj := &Tenant{}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user