Documentation
¶
Overview ¶
Package storage defines the file-storage contract for media-like resources. Implementations (local disk, S3/MinIO) live in core until their extraction as infrastructure-provider modules; they satisfy this interface structurally, so no adapter is needed on either side.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Storage ¶
type Storage interface {
Save(filename string, reader io.Reader) (string, error)
Delete(filePath string) error
GetURL(filePath string) string
}
Storage persists uploaded bytes under opaque keys. Save returns the storage key (local path or object key); Delete removes it; GetURL renders the public URL for a stored key. Implementations must be safe for concurrent use; all methods fail closed with descriptive errors.
Click to show internal directories.
Click to hide internal directories.