Versions in this module Expand all Collapse all v0 v0.1.1 Nov 7, 2023 Changes in this version + var NotCached = errors.New("not cached") + var NotFoundError = errors.New("file not found") + type Cached struct + func NewCached(conf config.StorageConf) (*Cached, error) + func (cs *Cached) Delete(path string) error + func (cs *Cached) LoadImage(ctx context.Context, path string) (SourceImage, error) + func (cs *Cached) NewImage() SourceImage + func (cs *Cached) Upload(path string, contents []byte) error + func (cs *Cached) UploadFile(path string, r io.Reader) error + type S3Storage struct + Bucket string + func NewS3Storage(b string, credentials string) (S3Storage, error) + func (f *S3Storage) Delete(path string) error + func (f *S3Storage) Open(ctx context.Context, path string) (io.ReadCloser, error) + func (f *S3Storage) Save(path string, file io.Reader) error + type SourceImage struct + Data []byte + func (si *SourceImage) Close() + func (si *SourceImage) Read(b []byte) (n int, err error) + func (si *SourceImage) ReadFrom(r io.Reader) (n int64, err error) + func (si *SourceImage) Reset()