Documentation
¶
Index ¶
Constants ¶
const ( StorageProviderAWS = "aws" AWSRegion = "aws.region" AWSAccessKeyID = "aws.access.key.id" AWSSecretAccessKey = "aws.secret.access.key" AWSSessionToken = "aws.session.token" AWSBucket = "aws.s3.bucket" AWSObjectKey = "aws.object.key" )
Constants for AWS upload 'start' operation options
const ( StorageProviderAzure = "azure" AzureEndpoint = "azure.storage.endpoint" AzureSAS = "azure.shared.access.signature" AzureContainerName = "azure.blob.container" )
Constants for Azure upload 'start' operation options
const ( StorageProviderHTTP = "generic" URLProp = "https.url" MethodProp = "https.method" HeadersPrefix = "https.header." )
Constants for HTTP(S) file upload 'start' operation options
const ContentMD5 = "Content-MD5"
ContentMD5 header name
Variables ¶
This section is empty.
Functions ¶
func ComputeMD5 ¶
ComputeMD5 returns the MD5 hash of a file, which can be encoded as base64 string.
func ExtractDictionary ¶
ExtractDictionary extracts from the given map properties with a specified prefix. In the resulting dictionary, property names have the prefix removed.
func SupportedCipherSuites ¶
func SupportedCipherSuites() []uint16
SupportedCipherSuites returns the ids of secure TLS cipher suites
Types ¶
type AWSUploader ¶
type AWSUploader struct {
// contains filtered or unexported fields
}
AWSUploader handles upload to AWS S3 storage
func (*AWSUploader) UploadFile ¶
func (u *AWSUploader) UploadFile(file *os.File, useChecksum bool, listener func(bytesTransferred int64)) error
UploadFile performs AWS S3 file upload
type AzureUploader ¶
type AzureUploader struct {
// contains filtered or unexported fields
}
AzureUploader handles upload to Azure Blob storage
func (*AzureUploader) UploadFile ¶
func (u *AzureUploader) UploadFile(file *os.File, useChecksum bool, listener func(bytesTransferred int64)) error
UploadFile performs Azure file upload
type HTTPUploader ¶
type HTTPUploader struct {
// contains filtered or unexported fields
}
HTTPUploader handles generic HTTP uploads
func (*HTTPUploader) UploadFile ¶
func (u *HTTPUploader) UploadFile(file *os.File, useChecksum bool, listener func(bytesTransferred int64)) error
UploadFile performs generic HTTP file upload
type Uploader ¶
type Uploader interface {
UploadFile(file *os.File, useChecksum bool, listener func(bytesTransferred int64)) error
}
Uploader interface wraps the generic UploadFile method
func NewAWSUploader ¶
NewAWSUploader construct new AWSUploader from the provided 'start' operation options
func NewAzureUploader ¶
NewAzureUploader constructs new AzureUploader from provided 'start' operation options