storage

package
v1.3.12 Latest Latest
Warning

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

Go to latest
Published: May 13, 2026 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildKey

func BuildKey(path string) string

BuildKey constructs a full S3 object key with the configured prefix.

func DeleteObject

func DeleteObject(ctx context.Context, key string) error

DeleteObject deletes a file from S3.

func IsEnabled

func IsEnabled() bool

func PutObject

func PutObject(ctx context.Context, key string, body io.Reader, size int64, contentType string) error

PutObject uploads a file to S3.

Types

type ErrS3InitializationFailed

type ErrS3InitializationFailed struct{}

func (ErrS3InitializationFailed) Error

type LocalCacheError added in v1.3.3

type LocalCacheError struct{}

func (LocalCacheError) Error added in v1.3.3

func (e LocalCacheError) Error() string

type ObjectInfo

type ObjectInfo struct {
	CachePath     string
	Body          io.ReadCloser
	ContentLength int64
	ContentType   string
}

ObjectInfo holds metadata about a retrieved object.

func GetObject

func GetObject(ctx context.Context, key string) (*ObjectInfo, error)

GetObject retrieves a file directly from S3.

func GetObjectViaCache added in v1.3.3

func GetObjectViaCache(ctx context.Context, key string) (*ObjectInfo, error)

func GetObjectViaProxy

func GetObjectViaProxy(ctx context.Context, key string) (*ObjectInfo, error)

GetObjectViaProxy retrieves a file via CDN if configured, otherwise falls back to S3.

Jump to

Keyboard shortcuts

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