Documentation
¶
Overview ¶
Package storage provides object-storage contracts with a local filesystem backend; an S3-compatible backend is available via integrations.
Index ¶
- Constants
- func StorageMustFromContainer(serviceContainer containercontract.Container) storagecontract.Storage
- func StorageMustFromResolver(resolver containercontract.Resolver) storagecontract.Storage
- type LocalStorage
- func (instance *LocalStorage) Delete(runtimeInstance runtimecontract.Runtime, key string) error
- func (instance *LocalStorage) Exists(runtimeInstance runtimecontract.Runtime, key string) (bool, error)
- func (instance *LocalStorage) Get(runtimeInstance runtimecontract.Runtime, key string) (io.ReadCloser, error)
- func (instance *LocalStorage) PresignedUrl(runtimeInstance runtimecontract.Runtime, key string, expiry time.Duration) (string, error)
- func (instance *LocalStorage) Put(runtimeInstance runtimecontract.Runtime, key string, reader io.Reader, ...) error
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
Click to show internal directories.
Click to hide internal directories.