Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlibabaCloudOSSBackend ¶
type AlibabaCloudOSSBackend struct { Bucket *oss.Bucket Client *oss.Client Prefix string SSE string }
AlibabaCloudOSSBackend is a storage backend for Alibaba Cloud OSS
func NewAlibabaCloudOSSBackend ¶
func NewAlibabaCloudOSSBackend(bucket string, prefix string, endpoint string, sse string) *AlibabaCloudOSSBackend
NewAlibabaCloudOSSBackend creates a new instance of AlibabaCloudOSSBackend
func (AlibabaCloudOSSBackend) DeleteObject ¶
func (b AlibabaCloudOSSBackend) DeleteObject(path string) error
DeleteObject removes an object from Alibaba Cloud OSS bucket, at prefix
func (AlibabaCloudOSSBackend) GetObject ¶
func (b AlibabaCloudOSSBackend) GetObject(path string) (Object, error)
GetObject retrieves an object from Alibaba Cloud OSS bucket, at prefix
func (AlibabaCloudOSSBackend) ListObjects ¶
func (b AlibabaCloudOSSBackend) ListObjects(prefix string) ([]Object, error)
ListObjects lists all objects in Alibaba Cloud OSS bucket, at prefix
type AmazonS3Backend ¶
type AmazonS3Backend struct { Bucket string Client *s3.S3 Downloader *s3manager.Downloader Prefix string Uploader *s3manager.Uploader SSE string }
AmazonS3Backend is a storage backend for Amazon S3
func NewAmazonS3Backend ¶
func NewAmazonS3Backend(bucket string, prefix string, region string, endpoint string, sse 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(prefix string) ([]Object, error)
ListObjects lists all objects in Amazon S3 bucket, at prefix
type Backend ¶
type Backend interface { ListObjects(prefix string) ([]Object, error) GetObject(path string) (Object, error) PutObject(path string, content []byte) error DeleteObject(path string) error }
Backend is a generic interface for storage backends
type GoogleCSBackend ¶
type GoogleCSBackend struct { Prefix string Client *storage.BucketHandle Context context.Context }
GoogleCSBackend is a storage backend for Google Cloud Storage
func NewGoogleCSBackend ¶
func NewGoogleCSBackend(bucket string, prefix string) *GoogleCSBackend
NewGoogleCSBackend creates a new instance of GoogleCSBackend
func (GoogleCSBackend) DeleteObject ¶
func (b GoogleCSBackend) DeleteObject(path string) error
DeleteObject removes an object from Google Cloud Storage bucket, at prefix
func (GoogleCSBackend) GetObject ¶
func (b GoogleCSBackend) GetObject(path string) (Object, error)
GetObject retrieves an object from Google Cloud Storage bucket, at prefix
func (GoogleCSBackend) ListObjects ¶
func (b GoogleCSBackend) ListObjects(prefix string) ([]Object, error)
ListObjects lists all objects in Google Cloud Storage bucket, at prefix
type LocalFilesystemBackend ¶
type LocalFilesystemBackend struct {
RootDirectory string
}
LocalFilesystemBackend is a storage backend for local filesystem storage
func NewLocalFilesystemBackend ¶
func NewLocalFilesystemBackend(rootDirectory string) *LocalFilesystemBackend
NewLocalFilesystemBackend creates a new instance of LocalFilesystemBackend
func (LocalFilesystemBackend) DeleteObject ¶
func (b LocalFilesystemBackend) DeleteObject(path string) error
DeleteObject removes an object from root directory
func (LocalFilesystemBackend) GetObject ¶
func (b LocalFilesystemBackend) GetObject(path string) (Object, error)
GetObject retrieves an object from root directory
func (LocalFilesystemBackend) ListObjects ¶
func (b LocalFilesystemBackend) ListObjects(prefix string) ([]Object, error)
ListObjects lists all objects in root directory (depth 1)
type MicrosoftBlobBackend ¶
type MicrosoftBlobBackend struct { Prefix string Container *microsoft_storage.Container }
MicrosoftBlobBackend is a storage backend for Microsoft Azure Blob Storage
func NewMicrosoftBlobBackend ¶
func NewMicrosoftBlobBackend(container string, prefix string) *MicrosoftBlobBackend
NewMicrosoftBlobBackend creates a new instance of MicrosoftBlobBackend
func (MicrosoftBlobBackend) DeleteObject ¶
func (b MicrosoftBlobBackend) DeleteObject(path string) error
DeleteObject removes an object from Microsoft Azure Blob Storage container, at path
func (MicrosoftBlobBackend) GetObject ¶
func (b MicrosoftBlobBackend) GetObject(path string) (Object, error)
GetObject retrieves an object from Microsoft Azure Blob Storage, at path
func (MicrosoftBlobBackend) ListObjects ¶
func (b MicrosoftBlobBackend) ListObjects(prefix string) ([]Object, error)
ListObjects lists all objects in Microsoft Azure Blob Storage container
type Object ¶
Object is a generic representation of a storage object
func (Object) HasExtension ¶
HasExtension determines whether or not an object contains a file extension
type ObjectSliceDiff ¶
ObjectSliceDiff provides information on what has changed since last calling ListObjects
func GetObjectSliceDiff ¶
func GetObjectSliceDiff(os1 []Object, os2 []Object) ObjectSliceDiff
GetObjectSliceDiff takes two objects slices and returns an ObjectSliceDiff
type OpenstackOSBackend ¶
type OpenstackOSBackend struct { Container string Prefix string Region string CACert string Client *gophercloud.ServiceClient }
OpenstackOSBackend is a storage backend for Openstack Object Storage
func NewOpenstackOSBackend ¶
func NewOpenstackOSBackend(container string, prefix string, region string, caCert string) *OpenstackOSBackend
NewOpenstackOSBackend creates a new instance of OpenstackOSBackend
func (OpenstackOSBackend) DeleteObject ¶
func (b OpenstackOSBackend) DeleteObject(path string) error
DeleteObject removes an object from an Openstack container, at prefix
func (OpenstackOSBackend) GetObject ¶
func (b OpenstackOSBackend) GetObject(path string) (Object, error)
GetObject retrieves an object from an Openstack container, at prefix
func (OpenstackOSBackend) ListObjects ¶
func (b OpenstackOSBackend) ListObjects(prefix string) ([]Object, error)
ListObjects lists all objects in an Openstack container, at prefix
type ReauthRoundTripper ¶
type ReauthRoundTripper struct {
// contains filtered or unexported fields
}
ReauthRoundTripper satisfies the http.RoundTripper interface and is used to limit the number of re-auth attempts (infinite by default)