Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AwsManager ¶
type AwsManager struct {
// contains filtered or unexported fields
}
func (*AwsManager) Download ¶
func (m *AwsManager) Download( ctx context.Context, path string, in *DownloadInput, opts ...func(*s3manager.Downloader), ) (int64, error)
func (*AwsManager) Upload ¶
func (m *AwsManager) Upload( ctx context.Context, in *UploadInput, opts ...func(*s3manager.Uploader), ) (*s3manager.UploadOutput, error)
type AwsManagerInterface ¶
type AwsManagerInterface interface { Upload(context.Context, *UploadInput, ...func(*s3manager.Uploader)) (*s3manager.UploadOutput, error) Download(context.Context, string, *DownloadInput, ...func(*s3manager.Downloader)) (int64, error) }
func New ¶
func New(options ...Option) (AwsManagerInterface, error)
type DownloadInput ¶
type DownloadInput struct { Bucket string IfMatch string IfModifiedSince time.Time IfNoneMatch string IfUnmodifiedSince time.Time FileName string PartNumber *int64 Range string RequestPayer string ResponseCacheControl string ResponseContentDisposition string ResponseContentEncoding string ResponseContentLanguage string ResponseContentType string ResponseExpires time.Time SSECustomerAlgorithm string SSECustomerKey string SSECustomerKeyMD5 string VersionId string }
type Options ¶
type Options struct { AccessKeyId string `envconfig:"AWS_ACCESS_KEY_ID" required:"true"` SecretAccessKey string `envconfig:"AWS_SECRET_ACCESS_KEY" required:"true"` Region string `envconfig:"AWS_REGION" default:"eu-west-1"` Bucket string `envconfig:"AWS_BUCKET" required:"true"` Token string `envconfig:"AWS_TOKEN" default:""` }
func (*Options) HasEmptySettings ¶
type UploadInput ¶
type UploadInput struct { ACL string Body io.Reader Path string Bucket string CacheControl string ContentDisposition string ContentEncoding string ContentLanguage string ContentMD5 string ContentType string Expires time.Time GrantFullControl string GrantRead string GrantReadACP string GrantWriteACP string FileName string Metadata map[string]string ObjectLockLegalHoldStatus string ObjectLockMode string ObjectLockRetainUntilDate time.Time RequestPayer string SSECustomerAlgorithm string SSECustomerKey string SSECustomerKeyMD5 string SSEKMSEncryptionContext string SSEKMSKeyId string ServerSideEncryption string StorageClass string Tagging string WebsiteRedirectLocation string }
Click to show internal directories.
Click to hide internal directories.