From 28ecbac0498f5ab7ee2041bf13058392d3ac183f Mon Sep 17 00:00:00 2001 From: kevinprasanna Date: Sat, 20 Apr 2019 21:46:31 +0530 Subject: [PATCH] added support for S3 signature V4 --- s3/s3.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/s3/s3.go b/s3/s3.go index e85e5813..0a0bdbed 100644 --- a/s3/s3.go +++ b/s3/s3.go @@ -101,6 +101,11 @@ func New(auth aws.Auth, region aws.Region) *S3 { return &S3{auth, region, 0, 0, aws.V2Signature, 0} } +// New creates a new S3. +func NewV4(auth aws.Auth, region aws.Region) *S3 { + return &S3{auth, region, 0, 0, aws.V4Signature, 0} +} + // Bucket returns a Bucket with the given name. func (s3 *S3) Bucket(name string) *Bucket { if s3.Region.S3BucketEndpoint != "" || s3.Region.S3LowercaseBucket {