Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotFound = errors.New("file not found") ErrInvalidStorageKey = errors.New("invalid storage key") )
Functions ¶
Types ¶
type Storage ¶
type Storage interface {
Stat(key string) (stat Stat, err error)
Get(key string) (content io.ReadCloser, stat Stat, err error)
Put(key string, r io.Reader) error
Delete(key string) error
List(prefix string) (keys []string, err error)
DeleteAll(prefix string) (deletedKeys []string, err error)
}
func New ¶
func New(options *StorageOptions) (storage Storage, err error)
func NewFSStorage ¶
NewFSStorage creates a new storage instance that stores files on the local filesystem.
func NewS3Storage ¶
func NewS3Storage(options *StorageOptions) (Storage, error)
NewS3Storage creates a new S3-compatible storage.
Click to show internal directories.
Click to hide internal directories.