thread-master/apps/backend/internal/module/filestorage/noop/store.go

25 lines
609 B
Go
Raw Normal View History

2026-07-10 12:54:45 +00:00
package noop
import (
"context"
"fmt"
"apps/backend/internal/module/filestorage/domain"
)
// Store rejects uploads (storage not configured).
type Store struct{}
func New() *Store { return &Store{} }
func (s *Store) Name() string { return "noop" }
func (s *Store) Enabled() bool { return false }
func (s *Store) Upload(context.Context, string, []byte, string) (string, error) {
return "", fmt.Errorf("object storage not configured: set ObjectStorage.Endpoint to MinIO/S3 (no local disk)")
}
func (s *Store) Delete(context.Context, string) error { return nil }
var _ domain.Storage = (*Store)(nil)