Documentation
¶
Overview ¶
Package multimanager provides functions for uploading and downloading multiple files concurrently from S3.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DownloaderClient ¶
type DownloaderClient interface {
GetObject(context.Context, *s3.GetObjectInput, ...func(*s3.Options)) (*s3.GetObjectOutput, error)
}
DownloaderClient is an interface representing the S3 Client.
type GetObjectsInput ¶
type GetObjectsInput struct { io.WriterAt *s3.GetObjectInput }
GetObjectsInput defines the parameters required for GetObjects.
WriterAt is represents the destination for the download (a file for example) and is passed directly to the S3 manager Downloader. GetObjectInput should not be nil and is passed directly to the S3 manager Downloader.
type GetObjectsOutput ¶
GetObjectsOutput contains the response or error returned from an S3 manager download.
func GetObjects ¶
func GetObjects(ctx context.Context, c DownloaderClient, inputs []GetObjectsInput, o ...func(*manager.Downloader)) []GetObjectsOutput
GetObjects uses Goroutines to concurrently download objects defined in a slice of GetObjectsInput.
type PutObjectsOutput ¶
type PutObjectsOutput struct { Output *manager.UploadOutput Err error }
PutObjectsOutput contains the response or error returned from an S3 manager upload.
func PutObjects ¶
func PutObjects(ctx context.Context, c UploaderClient, inputs []*s3.PutObjectInput, o ...func(*manager.Uploader)) []PutObjectsOutput
PutObjects uses Goroutines to concurrently upload objects defined in a slice of *s3.PutObjectInput.
type UploaderClient ¶
type UploaderClient interface { PutObject(context.Context, *s3.PutObjectInput, ...func(*s3.Options)) (*s3.PutObjectOutput, error) CreateMultipartUpload(context.Context, *s3.CreateMultipartUploadInput, ...func(*s3.Options)) (*s3.CreateMultipartUploadOutput, error) AbortMultipartUpload(context.Context, *s3.AbortMultipartUploadInput, ...func(*s3.Options)) (*s3.AbortMultipartUploadOutput, error) CompleteMultipartUpload(context.Context, *s3.CompleteMultipartUploadInput, ...func(*s3.Options)) (*s3.CompleteMultipartUploadOutput, error) UploadPart(context.Context, *s3.UploadPartInput, ...func(*s3.Options)) (*s3.UploadPartOutput, error) }
UploaderClient is an interface representing the S3 Client.