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: 2 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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