fix(test, travis): fix build and test error
This commit is contained in:
parent
d726ac5aa4
commit
472fe8dadb
6 changed files with 16 additions and 300 deletions
|
@ -20,8 +20,6 @@ import (
|
|||
"github.com/ihexxa/quickshare/src/idgen/simpleidgen"
|
||||
"github.com/ihexxa/quickshare/src/kvstore"
|
||||
"github.com/ihexxa/quickshare/src/kvstore/boltdbpvd"
|
||||
"github.com/ihexxa/quickshare/src/logging/simplelog"
|
||||
"github.com/ihexxa/quickshare/src/uploadmgr"
|
||||
)
|
||||
|
||||
type Server struct {
|
||||
|
@ -70,22 +68,14 @@ func initDeps(cfg gocfg.ICfg) *depidx.Deps {
|
|||
ider := simpleidgen.New()
|
||||
filesystem := local.NewLocalFS(rootPath, 0660, opensLimit, openTTL)
|
||||
jwtEncDec := jwt.NewJWTEncDec(secret)
|
||||
logger := simplelog.NewSimpleLogger()
|
||||
kv := boltdbpvd.New(rootPath, 1024)
|
||||
|
||||
deps := depidx.NewDeps(cfg)
|
||||
deps.SetFS(filesystem)
|
||||
deps.SetToken(jwtEncDec)
|
||||
deps.SetLog(logger)
|
||||
deps.SetKV(kv)
|
||||
deps.SetID(ider)
|
||||
|
||||
uploadMgr, err := uploadmgr.NewUploadMgr(deps)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
deps.SetUploader(uploadMgr)
|
||||
|
||||
return deps
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue