storage

package
v3.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package storage provides object-storage contracts with a local filesystem backend; an S3-compatible backend is available via integrations.

Index

Constants

View Source
const ServiceStorage = "service.storage.storage"

Variables

This section is empty.

Functions

func StorageMustFromContainer

func StorageMustFromContainer(serviceContainer containercontract.Container) storagecontract.Storage

func StorageMustFromResolver

func StorageMustFromResolver(resolver containercontract.Resolver) storagecontract.Storage

Types

type LocalStorage

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

func NewLocalStorage

func NewLocalStorage(baseDirectory string) *LocalStorage

func (*LocalStorage) Delete

func (instance *LocalStorage) Delete(
	runtimeInstance runtimecontract.Runtime,
	key string,
) error

func (*LocalStorage) Exists

func (instance *LocalStorage) Exists(
	runtimeInstance runtimecontract.Runtime,
	key string,
) (bool, error)

func (*LocalStorage) Get

func (instance *LocalStorage) Get(
	runtimeInstance runtimecontract.Runtime,
	key string,
) (io.ReadCloser, error)

func (*LocalStorage) PresignedUrl

func (instance *LocalStorage) PresignedUrl(
	runtimeInstance runtimecontract.Runtime,
	key string,
	expiry time.Duration,
) (string, error)

func (*LocalStorage) Put

func (instance *LocalStorage) Put(
	runtimeInstance runtimecontract.Runtime,
	key string,
	reader io.Reader,
	size int64,
	options storagecontract.PutOptions,
) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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