Extract a FileStore interface from the concrete *storage.Storage MinIO wrapper so the API layer is storage-backend agnostic. - Define FileStore interface in internal/storage/interface.go - Add Exists method to MinIO Storage (via StatObject) - Add compile-time interface satisfaction check - Change Server.storage and ServerState.storage to FileStore interface - Update NewServer and NewServerState signatures - Add Backend and FilesystemConfig fields to StorageConfig - Add backend selection switch in main.go (minio/filesystem/unknown) - Update config.example.yaml with backend field The nil-interface pattern is preserved: when storage is unconfigured, store remains a true nil FileStore (not a typed nil pointer), so all existing if s.storage == nil checks continue to work correctly. Closes #126
7.8 KiB
7.8 KiB