Update aws-sdk-go to 1.1.2 release
This commit is contained in:
parent
fafcda541f
commit
115426becb
|
@ -13,43 +13,43 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/aws/aws-sdk-go/aws",
|
"ImportPath": "github.com/aws/aws-sdk-go/aws",
|
||||||
"Comment": "v1.1.0-15-ga170e9c",
|
"Comment": "v1.1.2",
|
||||||
"Rev": "a170e9cb76475a0da7c0326a13cc2b39e9244b3b"
|
"Rev": "8041be5461786460d86b4358305fbdf32d37cfb2"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/aws/aws-sdk-go/private/endpoints",
|
"ImportPath": "github.com/aws/aws-sdk-go/private/endpoints",
|
||||||
"Comment": "v1.1.0-15-ga170e9c",
|
"Comment": "v1.1.2",
|
||||||
"Rev": "a170e9cb76475a0da7c0326a13cc2b39e9244b3b"
|
"Rev": "8041be5461786460d86b4358305fbdf32d37cfb2"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/aws/aws-sdk-go/private/protocol",
|
"ImportPath": "github.com/aws/aws-sdk-go/private/protocol",
|
||||||
"Comment": "v1.1.0-15-ga170e9c",
|
"Comment": "v1.1.2",
|
||||||
"Rev": "a170e9cb76475a0da7c0326a13cc2b39e9244b3b"
|
"Rev": "8041be5461786460d86b4358305fbdf32d37cfb2"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/aws/aws-sdk-go/private/signer/v4",
|
"ImportPath": "github.com/aws/aws-sdk-go/private/signer/v4",
|
||||||
"Comment": "v1.1.0-15-ga170e9c",
|
"Comment": "v1.1.2",
|
||||||
"Rev": "a170e9cb76475a0da7c0326a13cc2b39e9244b3b"
|
"Rev": "8041be5461786460d86b4358305fbdf32d37cfb2"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/aws/aws-sdk-go/private/waiter",
|
"ImportPath": "github.com/aws/aws-sdk-go/private/waiter",
|
||||||
"Comment": "v1.1.0-15-ga170e9c",
|
"Comment": "v1.1.2",
|
||||||
"Rev": "a170e9cb76475a0da7c0326a13cc2b39e9244b3b"
|
"Rev": "8041be5461786460d86b4358305fbdf32d37cfb2"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/aws/aws-sdk-go/service/ec2",
|
"ImportPath": "github.com/aws/aws-sdk-go/service/ec2",
|
||||||
"Comment": "v1.1.0-15-ga170e9c",
|
"Comment": "v1.1.2",
|
||||||
"Rev": "a170e9cb76475a0da7c0326a13cc2b39e9244b3b"
|
"Rev": "8041be5461786460d86b4358305fbdf32d37cfb2"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/aws/aws-sdk-go/service/s3",
|
"ImportPath": "github.com/aws/aws-sdk-go/service/s3",
|
||||||
"Comment": "v1.1.0-15-ga170e9c",
|
"Comment": "v1.1.2",
|
||||||
"Rev": "a170e9cb76475a0da7c0326a13cc2b39e9244b3b"
|
"Rev": "8041be5461786460d86b4358305fbdf32d37cfb2"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/aws/aws-sdk-go/service/sts",
|
"ImportPath": "github.com/aws/aws-sdk-go/service/sts",
|
||||||
"Comment": "v1.1.0-15-ga170e9c",
|
"Comment": "v1.1.2",
|
||||||
"Rev": "a170e9cb76475a0da7c0326a13cc2b39e9244b3b"
|
"Rev": "8041be5461786460d86b4358305fbdf32d37cfb2"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/bgentry/speakeasy",
|
"ImportPath": "github.com/bgentry/speakeasy",
|
||||||
|
|
|
@ -64,9 +64,6 @@ type BatchError interface {
|
||||||
// If origErr satisfies the Error interface it will not be wrapped within a new
|
// If origErr satisfies the Error interface it will not be wrapped within a new
|
||||||
// Error object and will instead be returned.
|
// Error object and will instead be returned.
|
||||||
func New(code, message string, origErr error) Error {
|
func New(code, message string, origErr error) Error {
|
||||||
if e, ok := origErr.(Error); ok && e != nil {
|
|
||||||
return e
|
|
||||||
}
|
|
||||||
return newBaseError(code, message, origErr)
|
return newBaseError(code, message, origErr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,11 @@ type validator struct {
|
||||||
errors []string
|
errors []string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// There's no validation to be done on the contents of []byte values. Prepare
|
||||||
|
// to check validateAny arguments against that type so we can quickly skip
|
||||||
|
// them.
|
||||||
|
var byteSliceType = reflect.TypeOf([]byte(nil))
|
||||||
|
|
||||||
// validateAny will validate any struct, slice or map type. All validations
|
// validateAny will validate any struct, slice or map type. All validations
|
||||||
// are also performed recursively for nested types.
|
// are also performed recursively for nested types.
|
||||||
func (v *validator) validateAny(value reflect.Value, path string) {
|
func (v *validator) validateAny(value reflect.Value, path string) {
|
||||||
|
@ -42,6 +47,10 @@ func (v *validator) validateAny(value reflect.Value, path string) {
|
||||||
case reflect.Struct:
|
case reflect.Struct:
|
||||||
v.validateStruct(value, path)
|
v.validateStruct(value, path)
|
||||||
case reflect.Slice:
|
case reflect.Slice:
|
||||||
|
if value.Type() == byteSliceType {
|
||||||
|
// We don't need to validate the contents of []byte.
|
||||||
|
return
|
||||||
|
}
|
||||||
for i := 0; i < value.Len(); i++ {
|
for i := 0; i < value.Len(); i++ {
|
||||||
v.validateAny(value.Index(i), path+fmt.Sprintf("[%d]", i))
|
v.validateAny(value.Index(i), path+fmt.Sprintf("[%d]", i))
|
||||||
}
|
}
|
||||||
|
|
8
vendor/github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds/ec2_role_provider.go
generated
vendored
8
vendor/github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds/ec2_role_provider.go
generated
vendored
|
@ -132,7 +132,7 @@ const iamSecurityCredsPath = "/iam/security-credentials"
|
||||||
func requestCredList(client *ec2metadata.EC2Metadata) ([]string, error) {
|
func requestCredList(client *ec2metadata.EC2Metadata) ([]string, error) {
|
||||||
resp, err := client.GetMetadata(iamSecurityCredsPath)
|
resp, err := client.GetMetadata(iamSecurityCredsPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, awserr.New("EC2RoleRequestError", "failed to list EC2 Roles", err)
|
return nil, awserr.New("EC2RoleRequestError", "no EC2 instance role found", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
credsList := []string{}
|
credsList := []string{}
|
||||||
|
@ -142,7 +142,7 @@ func requestCredList(client *ec2metadata.EC2Metadata) ([]string, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := s.Err(); err != nil {
|
if err := s.Err(); err != nil {
|
||||||
return nil, awserr.New("SerializationError", "failed to read list of EC2 Roles", err)
|
return nil, awserr.New("SerializationError", "failed to read EC2 instance role from metadata service", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
return credsList, nil
|
return credsList, nil
|
||||||
|
@ -157,7 +157,7 @@ func requestCred(client *ec2metadata.EC2Metadata, credsName string) (ec2RoleCred
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return ec2RoleCredRespBody{},
|
return ec2RoleCredRespBody{},
|
||||||
awserr.New("EC2RoleRequestError",
|
awserr.New("EC2RoleRequestError",
|
||||||
fmt.Sprintf("failed to get %s EC2 Role credentials", credsName),
|
fmt.Sprintf("failed to get %s EC2 instance role credentials", credsName),
|
||||||
err)
|
err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -165,7 +165,7 @@ func requestCred(client *ec2metadata.EC2Metadata, credsName string) (ec2RoleCred
|
||||||
if err := json.NewDecoder(strings.NewReader(resp)).Decode(&respCreds); err != nil {
|
if err := json.NewDecoder(strings.NewReader(resp)).Decode(&respCreds); err != nil {
|
||||||
return ec2RoleCredRespBody{},
|
return ec2RoleCredRespBody{},
|
||||||
awserr.New("SerializationError",
|
awserr.New("SerializationError",
|
||||||
fmt.Sprintf("failed to decode %s EC2 Role credentials", credsName),
|
fmt.Sprintf("failed to decode %s EC2 instance role credentials", credsName),
|
||||||
err)
|
err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,9 @@
|
||||||
package ec2metadata
|
package ec2metadata
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"io/ioutil"
|
"bytes"
|
||||||
|
"errors"
|
||||||
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
@ -91,23 +93,28 @@ type metadataOutput struct {
|
||||||
|
|
||||||
func unmarshalHandler(r *request.Request) {
|
func unmarshalHandler(r *request.Request) {
|
||||||
defer r.HTTPResponse.Body.Close()
|
defer r.HTTPResponse.Body.Close()
|
||||||
b, err := ioutil.ReadAll(r.HTTPResponse.Body)
|
b := &bytes.Buffer{}
|
||||||
if err != nil {
|
if _, err := io.Copy(b, r.HTTPResponse.Body); err != nil {
|
||||||
r.Error = awserr.New("SerializationError", "unable to unmarshal EC2 metadata respose", err)
|
r.Error = awserr.New("SerializationError", "unable to unmarshal EC2 metadata respose", err)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
data := r.Data.(*metadataOutput)
|
if data, ok := r.Data.(*metadataOutput); ok {
|
||||||
data.Content = string(b)
|
data.Content = b.String()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func unmarshalError(r *request.Request) {
|
func unmarshalError(r *request.Request) {
|
||||||
defer r.HTTPResponse.Body.Close()
|
defer r.HTTPResponse.Body.Close()
|
||||||
_, err := ioutil.ReadAll(r.HTTPResponse.Body)
|
b := &bytes.Buffer{}
|
||||||
if err != nil {
|
if _, err := io.Copy(b, r.HTTPResponse.Body); err != nil {
|
||||||
r.Error = awserr.New("SerializationError", "unable to unmarshal EC2 metadata error respose", err)
|
r.Error = awserr.New("SerializationError", "unable to unmarshal EC2 metadata error respose", err)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO extract the error...
|
// Response body format is not consistent between metadata endpoints.
|
||||||
|
// Grab the error message as a string and include that as the source error
|
||||||
|
r.Error = awserr.New("EC2MetadataError", "failed to make EC2Metadata request", errors.New(b.String()))
|
||||||
}
|
}
|
||||||
|
|
||||||
func validateEndpointHandler(r *request.Request) {
|
func validateEndpointHandler(r *request.Request) {
|
||||||
|
|
|
@ -5,4 +5,4 @@ package aws
|
||||||
const SDKName = "aws-sdk-go"
|
const SDKName = "aws-sdk-go"
|
||||||
|
|
||||||
// SDKVersion is the version of this SDK
|
// SDKVersion is the version of this SDK
|
||||||
const SDKVersion = "1.1.0"
|
const SDKVersion = "1.1.2"
|
||||||
|
|
|
@ -476,6 +476,9 @@ const opGetBucketLifecycle = "GetBucketLifecycle"
|
||||||
|
|
||||||
// GetBucketLifecycleRequest generates a request for the GetBucketLifecycle operation.
|
// GetBucketLifecycleRequest generates a request for the GetBucketLifecycle operation.
|
||||||
func (c *S3) GetBucketLifecycleRequest(input *GetBucketLifecycleInput) (req *request.Request, output *GetBucketLifecycleOutput) {
|
func (c *S3) GetBucketLifecycleRequest(input *GetBucketLifecycleInput) (req *request.Request, output *GetBucketLifecycleOutput) {
|
||||||
|
if c.Client.Config.Logger != nil {
|
||||||
|
c.Client.Config.Logger.Log("This operation, GetBucketLifecycle, has been deprecated")
|
||||||
|
}
|
||||||
op := &request.Operation{
|
op := &request.Operation{
|
||||||
Name: opGetBucketLifecycle,
|
Name: opGetBucketLifecycle,
|
||||||
HTTPMethod: "GET",
|
HTTPMethod: "GET",
|
||||||
|
@ -585,6 +588,9 @@ const opGetBucketNotification = "GetBucketNotification"
|
||||||
|
|
||||||
// GetBucketNotificationRequest generates a request for the GetBucketNotification operation.
|
// GetBucketNotificationRequest generates a request for the GetBucketNotification operation.
|
||||||
func (c *S3) GetBucketNotificationRequest(input *GetBucketNotificationConfigurationRequest) (req *request.Request, output *NotificationConfigurationDeprecated) {
|
func (c *S3) GetBucketNotificationRequest(input *GetBucketNotificationConfigurationRequest) (req *request.Request, output *NotificationConfigurationDeprecated) {
|
||||||
|
if c.Client.Config.Logger != nil {
|
||||||
|
c.Client.Config.Logger.Log("This operation, GetBucketNotification, has been deprecated")
|
||||||
|
}
|
||||||
op := &request.Operation{
|
op := &request.Operation{
|
||||||
Name: opGetBucketNotification,
|
Name: opGetBucketNotification,
|
||||||
HTTPMethod: "GET",
|
HTTPMethod: "GET",
|
||||||
|
@ -1191,6 +1197,9 @@ const opPutBucketLifecycle = "PutBucketLifecycle"
|
||||||
|
|
||||||
// PutBucketLifecycleRequest generates a request for the PutBucketLifecycle operation.
|
// PutBucketLifecycleRequest generates a request for the PutBucketLifecycle operation.
|
||||||
func (c *S3) PutBucketLifecycleRequest(input *PutBucketLifecycleInput) (req *request.Request, output *PutBucketLifecycleOutput) {
|
func (c *S3) PutBucketLifecycleRequest(input *PutBucketLifecycleInput) (req *request.Request, output *PutBucketLifecycleOutput) {
|
||||||
|
if c.Client.Config.Logger != nil {
|
||||||
|
c.Client.Config.Logger.Log("This operation, PutBucketLifecycle, has been deprecated")
|
||||||
|
}
|
||||||
op := &request.Operation{
|
op := &request.Operation{
|
||||||
Name: opPutBucketLifecycle,
|
Name: opPutBucketLifecycle,
|
||||||
HTTPMethod: "PUT",
|
HTTPMethod: "PUT",
|
||||||
|
@ -1281,6 +1290,9 @@ const opPutBucketNotification = "PutBucketNotification"
|
||||||
|
|
||||||
// PutBucketNotificationRequest generates a request for the PutBucketNotification operation.
|
// PutBucketNotificationRequest generates a request for the PutBucketNotification operation.
|
||||||
func (c *S3) PutBucketNotificationRequest(input *PutBucketNotificationInput) (req *request.Request, output *PutBucketNotificationOutput) {
|
func (c *S3) PutBucketNotificationRequest(input *PutBucketNotificationInput) (req *request.Request, output *PutBucketNotificationOutput) {
|
||||||
|
if c.Client.Config.Logger != nil {
|
||||||
|
c.Client.Config.Logger.Log("This operation, PutBucketNotification, has been deprecated")
|
||||||
|
}
|
||||||
op := &request.Operation{
|
op := &request.Operation{
|
||||||
Name: opPutBucketNotification,
|
Name: opPutBucketNotification,
|
||||||
HTTPMethod: "PUT",
|
HTTPMethod: "PUT",
|
||||||
|
@ -1828,7 +1840,7 @@ type CloudFunctionConfiguration struct {
|
||||||
CloudFunction *string `type:"string"`
|
CloudFunction *string `type:"string"`
|
||||||
|
|
||||||
// Bucket event for which to send notifications.
|
// Bucket event for which to send notifications.
|
||||||
Event *string `type:"string" enum:"Event"`
|
Event *string `deprecated:"true" type:"string" enum:"Event"`
|
||||||
|
|
||||||
Events []*string `locationName:"Event" type:"list" flattened:"true"`
|
Events []*string `locationName:"Event" type:"list" flattened:"true"`
|
||||||
|
|
||||||
|
@ -5390,7 +5402,7 @@ type QueueConfigurationDeprecated struct {
|
||||||
_ struct{} `type:"structure"`
|
_ struct{} `type:"structure"`
|
||||||
|
|
||||||
// Bucket event for which to send notifications.
|
// Bucket event for which to send notifications.
|
||||||
Event *string `type:"string" enum:"Event"`
|
Event *string `deprecated:"true" type:"string" enum:"Event"`
|
||||||
|
|
||||||
Events []*string `locationName:"Event" type:"list" flattened:"true"`
|
Events []*string `locationName:"Event" type:"list" flattened:"true"`
|
||||||
|
|
||||||
|
@ -5758,7 +5770,7 @@ type TopicConfigurationDeprecated struct {
|
||||||
_ struct{} `type:"structure"`
|
_ struct{} `type:"structure"`
|
||||||
|
|
||||||
// Bucket event for which to send notifications.
|
// Bucket event for which to send notifications.
|
||||||
Event *string `type:"string" enum:"Event"`
|
Event *string `deprecated:"true" type:"string" enum:"Event"`
|
||||||
|
|
||||||
Events []*string `locationName:"Event" type:"list" flattened:"true"`
|
Events []*string `locationName:"Event" type:"list" flattened:"true"`
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue