refactor: Use public API structs in persisters

This commit is contained in:
Felix Pojtinger
2022-01-02 00:03:01 +01:00
parent f2b7b1ed60
commit 3b17287d16
20 changed files with 158 additions and 86 deletions

View File

@@ -12,7 +12,6 @@ import (
"sync"
"time"
models "github.com/pojntfx/stfs/internal/db/sqlite/models/metadata"
ifs "github.com/pojntfx/stfs/internal/fs"
"github.com/pojntfx/stfs/pkg/cache"
"github.com/pojntfx/stfs/pkg/config"
@@ -34,7 +33,7 @@ type STFS struct {
ioLock sync.Mutex
onHeader func(hdr *models.Header)
onHeader func(hdr *config.Header)
log logging.StructuredLogger
}
@@ -48,7 +47,7 @@ func NewSTFS(
getFileBuffer func() (cache.WriteCache, func() error, error),
ignorePermissionFlags bool,
onHeader func(hdr *models.Header),
onHeader func(hdr *config.Header),
log logging.StructuredLogger,
) *STFS {
return &STFS{