Refactor filesystem to make it testable

This commit is contained in:
2024-11-13 22:31:04 +01:00
parent 52ffb17e2d
commit 93963b1867
7 changed files with 210 additions and 77 deletions

View File

@@ -10,11 +10,11 @@ import (
// Handler provides common functionality for all handlers
type Handler struct {
DB *db.DB
FS *filesystem.FileSystem
FS *filesystem.Storage
}
// NewHandler creates a new handler with the given dependencies
func NewHandler(db *db.DB, fs *filesystem.FileSystem) *Handler {
func NewHandler(db *db.DB, fs *filesystem.Storage) *Handler {
return &Handler{
DB: db,
FS: fs,