feat: 完成基本功能
( 1. 新建连接 2. 新建桶 3. 上传文件 4. 下载文件 5. 预览图片 )
This commit is contained in:
		| @@ -2,10 +2,12 @@ package controller | ||||
|  | ||||
| import ( | ||||
| 	"context" | ||||
| 	"fmt" | ||||
| 	"github.com/loveuer/nf-disk/internal/api" | ||||
| 	"github.com/loveuer/nf-disk/internal/db" | ||||
| 	"github.com/loveuer/nf-disk/internal/manager" | ||||
| 	"github.com/loveuer/nf-disk/internal/model" | ||||
| 	"github.com/loveuer/nf-disk/internal/opt" | ||||
| 	"github.com/loveuer/nf-disk/internal/tool" | ||||
| 	"github.com/loveuer/nf-disk/ndh" | ||||
| 	"github.com/loveuer/nf/nft/log" | ||||
| @@ -37,7 +39,8 @@ func NewApp(gctx context.Context) *App { | ||||
| func (a *App) Startup(ctx context.Context) { | ||||
| 	log.Info("app startup!!!") | ||||
| 	a.ctx = ctx | ||||
| 	tool.Must(db.Init(ctx, "sqlite::memory", db.OptSqliteByMem(nil))) | ||||
| 	tool.Must(opt.Init()) | ||||
| 	tool.Must(db.Init(ctx, fmt.Sprintf("sqlite::%s", opt.ConfigFile))) | ||||
| 	tool.Must(model.Init(db.Default.Session())) | ||||
| 	tool.Must(manager.Init(ctx)) | ||||
| 	tool.Must(api.Init(ctx)) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user