Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AmazonS3Backend ¶
type AmazonS3Backend struct { Bucket string Client *s3.S3 Downloader *s3manager.Downloader Prefix string Uploader *s3manager.Uploader }
AmazonS3Backend is a storage backend for Amazon S3
func NewAmazonS3Backend ¶
func NewAmazonS3Backend(bucket string, prefix string, region string, endpoint string) *AmazonS3Backend
NewAmazonS3Backend creates a new instance of AmazonS3Backend
func (AmazonS3Backend) DeleteObject ¶
func (b AmazonS3Backend) DeleteObject(path string) error
DeleteObject removes an object from Amazon S3 bucket, at prefix
func (AmazonS3Backend) GetObject ¶
func (b AmazonS3Backend) GetObject(path string) (Object, error)
GetObject retrieves an object from Amazon S3 bucket, at prefix
func (AmazonS3Backend) ListObjects ¶
func (b AmazonS3Backend) ListObjects() ([]Object, error)
ListObjects lists all objects in Amazon S3 bucket, at prefix
type Backend ¶
type Backend interface { ListObjects() ([]Object, error) GetObject(path string) (Object, error) PutObject(path string, connect []byte) error DeleteObject(path string) error }
generic interface for storage backends
type FilesystemBackend ¶
type FilesystemBackend struct {
RootDirectory string
}
FilesystemBackend is a storage backend for local filesystem storage
func NewFilesystemBackend ¶
func NewFilesystemBackend(rootDirectory string) *FilesystemBackend
NewLocalFilesystemBackend creates a new instance of LocalFilesystemBackend
func (FilesystemBackend) DeleteObject ¶
func (fs FilesystemBackend) DeleteObject(path string) error
Delet removes an object from root directory
func (FilesystemBackend) GetObject ¶
func (fs FilesystemBackend) GetObject(path string) (Object, error)
func (FilesystemBackend) ListObjects ¶
func (fs FilesystemBackend) ListObjects() ([]Object, error)
Lists all objects in root directory only, without recursive
Click to show internal directories.
Click to hide internal directories.