feat(dep/fileindex): enable fileindex in file managing
This commit is contained in:
parent
28b7113d27
commit
dff79ed87f
7 changed files with 111 additions and 44 deletions
|
@ -14,6 +14,7 @@ import (
|
|||
"github.com/ihexxa/quickshare/src/idgen"
|
||||
"github.com/ihexxa/quickshare/src/iolimiter"
|
||||
"github.com/ihexxa/quickshare/src/kvstore"
|
||||
"github.com/ihexxa/quickshare/src/search/fileindex"
|
||||
"github.com/ihexxa/quickshare/src/worker"
|
||||
)
|
||||
|
||||
|
@ -38,6 +39,7 @@ type Deps struct {
|
|||
workers worker.IWorkerPool
|
||||
boltStore *boltstore.BoltStore
|
||||
cron cron.ICron
|
||||
fileIndex fileindex.IFileIndex
|
||||
}
|
||||
|
||||
func NewDeps(cfg gocfg.ICfg) *Deps {
|
||||
|
@ -139,3 +141,11 @@ func (deps *Deps) Cron() cron.ICron {
|
|||
func (deps *Deps) SetCron(cronImp cron.ICron) {
|
||||
deps.cron = cronImp
|
||||
}
|
||||
|
||||
func (deps *Deps) FileIndex() fileindex.IFileIndex {
|
||||
return deps.fileIndex
|
||||
}
|
||||
|
||||
func (deps *Deps) SetIFileIndex(index fileindex.IFileIndex) {
|
||||
deps.fileIndex = index
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue