Documentation ¶
Index ¶
- Constants
- Variables
- func ConfigureFolder(prefix string, settings map[string]string) (storage.Folder, error)
- func CreateUploaderAPI(svc s3iface.S3API, partsize, concurrency int) s3manageriface.UploaderAPI
- func NewConfiguringError(settingName string) storage.Error
- func NewFolderError(err error, format string, args ...interface{}) storage.Error
- type Folder
- func (folder *Folder) DeleteObjects(objectRelativePaths []string) error
- func (folder *Folder) Exists(objectRelativePath string) (bool, error)
- func (folder *Folder) GetPath() string
- func (folder *Folder) GetSubFolder(subFolderRelativePath string) storage.Folder
- func (folder *Folder) ListFolder() (objects []storage.Object, subFolders []storage.Folder, err error)
- func (folder *Folder) PutObject(name string, content io.Reader) error
- func (folder *Folder) ReadObject(objectRelativePath string) (io.ReadCloser, error)
- type SseKmsIdNotSetError
- type Uploader
Constants ¶
View Source
const ( NotFoundAWSErrorCode = "NotFound" NoSuchKeyAWSErrorCode = "NoSuchKey" EndpointSetting = "AWS_ENDPOINT" RegionSetting = "AWS_REGION" ForcePathStyleSetting = "AWS_S3_FORCE_PATH_STYLE" AccessKeyIdSetting = "AWS_ACCESS_KEY_ID" AccessKeySetting = "AWS_ACCESS_KEY" SecretAccessKeySetting = "AWS_SECRET_ACCESS_KEY" SecretKeySetting = "AWS_SECRET_KEY" SessionTokenSetting = "AWS_SESSION_TOKEN" SseSetting = "S3_SSE" SseKmsIdSetting = "S3_SSE_KMS_ID" StorageClassSetting = "S3_STORAGE_CLASS" UploadConcurrencySetting = "UPLOAD_CONCURRENCY" MaxPartSize = "S3_MAX_PART_SIZE" EndpointSourceSetting = "S3_ENDPOINT_SOURCE" EndpointPortSetting = "S3_ENDPOINT_PORT" )
View Source
const (
DefaultMaxPartSize = 20 << 20
)
View Source
const DefaultPort = "443"
View Source
const HTTP = "http"
Variables ¶
View Source
var ( // MaxRetries limit upload and download retries during interaction with S3 MaxRetries = 15 SettingList = []string{ EndpointPortSetting, EndpointSetting, EndpointSourceSetting, RegionSetting, ForcePathStyleSetting, AccessKeyIdSetting, AccessKeySetting, SecretAccessKeySetting, SecretKeySetting, SessionTokenSetting, SseSetting, SseKmsIdSetting, StorageClassSetting, UploadConcurrencySetting, s3CertFile, MaxPartSize, } )
Functions ¶
func ConfigureFolder ¶
func CreateUploaderAPI ¶
func CreateUploaderAPI(svc s3iface.S3API, partsize, concurrency int) s3manageriface.UploaderAPI
CreateUploaderAPI returns an uploader with customizable concurrency and part size.
func NewConfiguringError ¶
Types ¶
type Folder ¶
type Folder struct { S3API s3iface.S3API Bucket *string Path string // contains filtered or unexported fields }
func (*Folder) DeleteObjects ¶
func (*Folder) GetSubFolder ¶
func (*Folder) ListFolder ¶
func (*Folder) ReadObject ¶
func (folder *Folder) ReadObject(objectRelativePath string) (io.ReadCloser, error)
type SseKmsIdNotSetError ¶
type SseKmsIdNotSetError struct {
// contains filtered or unexported fields
}
func NewSseKmsIdNotSetError ¶
func NewSseKmsIdNotSetError() SseKmsIdNotSetError
func (SseKmsIdNotSetError) Error ¶
func (err SseKmsIdNotSetError) Error() string
type Uploader ¶
type Uploader struct { SSEKMSKeyId string StorageClass string // contains filtered or unexported fields }
func NewUploader ¶
func NewUploader(uploaderAPI s3manageriface.UploaderAPI, serverSideEncryption, sseKmsKeyId, storageClass string) *Uploader
Click to show internal directories.
Click to hide internal directories.