提供文件操作类utils内容
This commit is contained in:
@@ -25,6 +25,7 @@ import (
|
||||
"git.huangwc.com/pig/pig-farm-controller/internal/infra/repository"
|
||||
"git.huangwc.com/pig/pig-farm-controller/internal/infra/transport"
|
||||
"git.huangwc.com/pig/pig-farm-controller/internal/infra/transport/lora"
|
||||
"git.huangwc.com/pig/pig-farm-controller/internal/infra/utils/file"
|
||||
"git.huangwc.com/pig/pig-farm-controller/internal/infra/utils/token"
|
||||
|
||||
"gorm.io/gorm"
|
||||
@@ -42,6 +43,8 @@ type Infrastructure struct {
|
||||
|
||||
// initInfrastructure 初始化所有基础设施层组件。
|
||||
func initInfrastructure(ctx context.Context, cfg *config.Config) (*Infrastructure, error) {
|
||||
file.SetTempRoot(cfg.App.TempPath)
|
||||
|
||||
storage, err := initStorage(ctx, cfg.Database)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user