local

package
v0.2.44 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

New creates a new local filesystem storage

Types

type Option

type Option func(*Storage)

Option represents an option for configuring local storage

func WithBaseURL

func WithBaseURL(url string) Option

WithBaseURL sets the base URL for accessing images

func WithPath

func WithPath(path string) Option

WithPath sets the base path for storing images

type Storage

type Storage struct {
	// contains filtered or unexported fields
}

Storage implements ImageStorage for local filesystem

func NewWithOptions

func NewWithOptions(options ...Option) (*Storage, error)

NewWithOptions creates a new local storage with functional options

func (*Storage) Delete

func (s *Storage) Delete(ctx context.Context, url string) error

Delete removes an image from the local filesystem

func (*Storage) Get

func (s *Storage) Get(ctx context.Context, url string) ([]byte, error)

Get retrieves image data from the local filesystem

func (*Storage) Name

func (s *Storage) Name() string

Name returns the storage backend name

func (*Storage) Store

func (s *Storage) Store(ctx context.Context, image *interfaces.GeneratedImage, metadata storage.StorageMetadata) (string, error)

Store saves an image to the local filesystem

Jump to

Keyboard shortcuts

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