diff options
Diffstat (limited to 'pkg/components/filesystem')
-rw-r--r-- | pkg/components/filesystem/controller.go | 6 | ||||
-rw-r--r-- | pkg/components/filesystem/model.go | 10 |
2 files changed, 4 insertions, 12 deletions
diff --git a/pkg/components/filesystem/controller.go b/pkg/components/filesystem/controller.go index 6b478a5..6c613a3 100644 --- a/pkg/components/filesystem/controller.go +++ b/pkg/components/filesystem/controller.go @@ -5,11 +5,13 @@ import ( "net/url" "path" "strings" + + "git.sr.ht/~gabrielgio/img/pkg/database/repository" ) type ( Controller struct { - repository Repository + repository repository.FileSystemRepository } DirectoryParam struct { @@ -28,7 +30,7 @@ type ( } ) -func NewController(repository Repository) *Controller { +func NewController(repository repository.FileSystemRepository) *Controller { return &Controller{ repository: repository, } diff --git a/pkg/components/filesystem/model.go b/pkg/components/filesystem/model.go deleted file mode 100644 index 2caed82..0000000 --- a/pkg/components/filesystem/model.go +++ /dev/null @@ -1,10 +0,0 @@ -package filesystem - -import "io/fs" - -type ( - Repository interface { - List(path string) ([]fs.FileInfo, error) - Stat(path string) (fs.FileInfo, error) - } -) |