aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/aws/aws-sdk-go/service/s3/service.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/aws/aws-sdk-go/service/s3/service.go')
-rw-r--r--vendor/github.com/aws/aws-sdk-go/service/s3/service.go17
1 files changed, 11 insertions, 6 deletions
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/service.go b/vendor/github.com/aws/aws-sdk-go/service/s3/service.go
index 5833952..5e6f229 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/service.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/s3/service.go
@@ -12,8 +12,9 @@ import (
)
// S3 is a client for Amazon S3.
-//The service client's operations are safe to be used concurrently.
+// The service client's operations are safe to be used concurrently.
// It is not safe to mutate any of the client's properties though.
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01
type S3 struct {
*client.Client
}
@@ -24,8 +25,11 @@ var initClient func(*client.Client)
// Used for custom request initialization logic
var initRequest func(*request.Request)
-// A ServiceName is the name of the service the client will make API calls to.
-const ServiceName = "s3"
+// Service information constants
+const (
+ ServiceName = "s3" // Service endpoint prefix API calls made to.
+ EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata.
+)
// New creates a new instance of the S3 client with a session.
// If additional configuration is needed for the client instance use the optional
@@ -38,17 +42,18 @@ const ServiceName = "s3"
// // Create a S3 client with additional configuration
// svc := s3.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
func New(p client.ConfigProvider, cfgs ...*aws.Config) *S3 {
- c := p.ClientConfig(ServiceName, cfgs...)
- return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
+ c := p.ClientConfig(EndpointsID, cfgs...)
+ return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName)
}
// newClient creates, initializes and returns a new service client instance.
-func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *S3 {
+func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *S3 {
svc := &S3{
Client: client.New(
cfg,
metadata.ClientInfo{
ServiceName: ServiceName,
+ SigningName: signingName,
SigningRegion: signingRegion,
Endpoint: endpoint,
APIVersion: "2006-03-01",