storage

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 11, 2026 License: MIT Imports: 1 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL