Documentation
¶
Overview ¶
Package storage holds 3rd party driver implementations for blob (and potentially other) stores.
E.g. Amazon Simple Storage Service (S3), Google Drive, Google Cloud Storage or Azure Blob Storage.
Index ¶
Constants ¶
const ( // AmazonS3Store blob storage for Amazon Simple Storage Service (S3). AmazonS3Store BlobStoreType // GoogleDriveStore blob storage for Google Drive. GoogleDriveStore // GoogleCloudStore blob storage for Google Cloud (GCP) Storage Service. GoogleCloudStore // AzureBlobStore blob storage for Microsoft Azure Blob Storage Service. AzureBlobStore AmazonS3Str = "AMAZON_S3" GoogleDriveStr = "GOOGLE_DRIVE" GoogleCloudStr = "GCP_STORAGE" AzureBlobStr = "MS_AZURE_BLOB" )
Variables ¶
var BlobStoreMap = map[string]BlobStoreType{ AmazonS3Str: AmazonS3Store, GoogleDriveStr: GoogleDriveStore, GoogleCloudStr: GoogleCloudStore, AzureBlobStr: AzureBlobStore, }
BlobStoreMap readable name mapping to BlobStoreType.
var ErrInvalidBlobStorage = errors.New("cloudsync: Invalid blob storage")
ErrInvalidBlobStorage the given blob storage type is invalid.
Functions ¶
func NewBlobStorage ¶
NewBlobStorage allocates a new cloudsync.BlobStorage concrete implementation based on given BlobStoreType.
Types ¶
type AmazonS3 ¶
type AmazonS3 struct {
// contains filtered or unexported fields
}
AmazonS3 Amazon Simple Storage Service (S3) concrete implementation of cloudsync.BlobStorage.
func NewAmazonS3 ¶
NewAmazonS3 allocates a new AmazonS3 instance ready to perform underlying S3 API actions using cloudsync.BlobStorage API.
type BlobStoreType ¶
type BlobStoreType uint8
BlobStoreType a kind of blob storage (Amazon S3, Google Drive, Google Cloud Storage and/or Microsoft Azure Blob Storage).