1
0
Fork 0
mirror of https://github.com/Luzifer/mondash.git synced 2024-11-14 02:12:42 +00:00
mondash/vendor/github.com/aws/aws-sdk-go/service/s3/service.go

64 lines
1.6 KiB
Go
Raw Normal View History

2016-01-23 12:07:07 +00:00
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
package s3
import (
"github.com/aws/aws-sdk-go/aws"
2016-03-27 18:46:08 +00:00
"github.com/aws/aws-sdk-go/aws/defaults"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/aws/service"
"github.com/aws/aws-sdk-go/aws/service/serviceinfo"
2016-01-23 12:07:07 +00:00
"github.com/aws/aws-sdk-go/internal/protocol/restxml"
"github.com/aws/aws-sdk-go/internal/signer/v4"
)
// S3 is a client for Amazon S3.
type S3 struct {
2016-03-27 18:46:08 +00:00
*service.Service
2016-01-23 12:07:07 +00:00
}
// Used for custom service initialization logic
2016-03-27 18:46:08 +00:00
var initService func(*service.Service)
2016-01-23 12:07:07 +00:00
// Used for custom request initialization logic
2016-03-27 18:46:08 +00:00
var initRequest func(*request.Request)
2016-01-23 12:07:07 +00:00
// New returns a new S3 client.
func New(config *aws.Config) *S3 {
2016-03-27 18:46:08 +00:00
service := &service.Service{
ServiceInfo: serviceinfo.ServiceInfo{
Config: defaults.DefaultConfig.Merge(config),
ServiceName: "s3",
APIVersion: "2006-03-01",
},
2016-01-23 12:07:07 +00:00
}
service.Initialize()
// Handlers
service.Handlers.Sign.PushBack(v4.Sign)
service.Handlers.Build.PushBack(restxml.Build)
service.Handlers.Unmarshal.PushBack(restxml.Unmarshal)
service.Handlers.UnmarshalMeta.PushBack(restxml.UnmarshalMeta)
service.Handlers.UnmarshalError.PushBack(restxml.UnmarshalError)
// Run custom service initialization if present
if initService != nil {
initService(service)
}
return &S3{service}
}
// newRequest creates a new request for a S3 operation and runs any
// custom request initialization.
2016-03-27 18:46:08 +00:00
func (c *S3) newRequest(op *request.Operation, params, data interface{}) *request.Request {
req := c.NewRequest(op, params, data)
2016-01-23 12:07:07 +00:00
// Run custom request initialization if present
if initRequest != nil {
initRequest(req)
}
return req
}