Documentation ¶
Overview ¶
Package s3 provides a storagedriver.StorageDriver implementation to store blobs in Amazon S3 cloud storage.
This package leverages the official aws client library for interfacing with S3.
Because S3 is a key, value store the Stat call does not support last modification time for directories (directories are an abstraction for key, value stores)
Keep in mind that S3 guarantees only read-after-write consistency for new objects, but no read-after-update or list-after-write consistency.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BuildContentLength ¶
type BuildContentLength struct{}
func (*BuildContentLength) HandleFinalize ¶
func (p *BuildContentLength) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (middleware.FinalizeOutput, middleware.Metadata, error)
func (*BuildContentLength) ID ¶
func (b *BuildContentLength) ID() string
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
Driver is a storagedriver.StorageDriver implementation backed by Amazon S3 Objects are stored at absolute keys in the provided bucket.
func FromParameters ¶
FromParameters constructs a new Driver with a given parameters map Required parameters: - accesskey - secretkey - region - bucket - encrypt
func New ¶
func New(params DriverParameters) (*Driver, error)
New constructs a new Driver with the given AWS credentials, region, encryption flag, and bucketName
func (*Driver) S3BucketKey ¶
S3BucketKey returns the s3 bucket key for the given storage driver path.
type DriverParameters ¶
type DriverParameters struct { AccessKey string SecretKey string Bucket string Region string RegionEndpoint string ForcePathStyle bool Encrypt bool KeyID string Secure bool SkipVerify bool V4Auth bool ChunkSize int64 MultipartCopyChunkSize int64 MultipartCopyMaxConcurrency int32 MultipartCopyThresholdSize int64 MultipartCombineSmallPart bool RootDirectory string StorageClass s3types.StorageClass UserAgent string ObjectACL s3types.ObjectCannedACL SessionToken string UseDualStack aws.DualStackEndpointState Accelerate bool }
DriverParameters A struct that encapsulates all of the driver parameters after all values have been set
type ParseRequestURL ¶
type ParseRequestURL struct{}
func (*ParseRequestURL) HandleBuild ¶
func (p *ParseRequestURL) HandleBuild(ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler) (middleware.BuildOutput, middleware.Metadata, error)
func (*ParseRequestURL) ID ¶
func (p *ParseRequestURL) ID() string
type V2Signer ¶
type V2Signer struct{}
func (*V2Signer) SignHTTP ¶
func (s *V2Signer) SignHTTP(ctx context.Context, creds aws.Credentials, req *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*awssigner.SignerOptions)) error
Sign requests with signature version 2.
Will sign the requests with the service config's Credentials object Signing is skipped if the credentials is the credentials.AnonymousCredentials object.