vendor: update all dependencies

This commit is contained in:
Nick Craig-Wood 2018-06-17 17:59:12 +01:00
parent 3f0789e2db
commit 08021c4636
2474 changed files with 435818 additions and 282709 deletions

View file

@ -472,8 +472,7 @@ func (c *DynamoDB) CreateBackupRequest(input *CreateBackupInput) (req *request.R
// table. The backups is either being created, deleted or restored to a table.
//
// * ErrCodeLimitExceededException "LimitExceededException"
// Up to 50 CreateBackup operations are allowed per second, per account. There
// is no limit to the number of daily on-demand backups that can be taken.
// There is no limit to the number of daily on-demand backups that can be taken.
//
// Up to 10 simultaneous table operations are allowed per account. These operations
// include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup,
@ -558,20 +557,17 @@ func (c *DynamoDB) CreateGlobalTableRequest(input *CreateGlobalTableInput) (req
// relationship between two or more DynamoDB tables with the same table name
// in the provided regions.
//
// Tables can only be added as the replicas of a global table group under the
// following conditions:
// If you want to add a new replica table to a global table, each of the following
// conditions must be true:
//
// * The tables must have the same name.
// * The table must have the same primary key as all of the other replicas.
//
// * The tables must contain no items.
// * The table must have the same name as all of the other replicas.
//
// * The tables must have the same hash key and sort key (if present).
//
// * The tables must have DynamoDB Streams enabled (NEW_AND_OLD_IMAGES).
//
//
// * The tables must have same provisioned and maximum write capacity units.
// * The table must have DynamoDB Streams enabled, with the stream containing
// both the new and the old images of the item.
//
// * None of the replica tables in the global table can contain any data.
//
// If global secondary indexes are specified, then the following conditions
// must also be met:
@ -581,8 +577,15 @@ func (c *DynamoDB) CreateGlobalTableRequest(input *CreateGlobalTableInput) (req
// * The global secondary indexes must have the same hash key and sort key
// (if present).
//
// * The global secondary indexes must have the same provisioned and maximum
// write capacity units.
// Write capacity settings should be set consistently across your replica tables
// and secondary indexes. DynamoDB strongly recommends enabling auto scaling
// to manage the write capacity settings for all of your global tables replicas
// and indexes.
//
// If you prefer to manage write capacity settings manually, you should provision
// equal replicated write capacity units to your replica tables. You should
// also provision equal replicated write capacity units to matching secondary
// indexes across your global table.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@ -593,8 +596,7 @@ func (c *DynamoDB) CreateGlobalTableRequest(input *CreateGlobalTableInput) (req
//
// Returned Error Codes:
// * ErrCodeLimitExceededException "LimitExceededException"
// Up to 50 CreateBackup operations are allowed per second, per account. There
// is no limit to the number of daily on-demand backups that can be taken.
// There is no limit to the number of daily on-demand backups that can be taken.
//
// Up to 10 simultaneous table operations are allowed per account. These operations
// include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup,
@ -712,8 +714,7 @@ func (c *DynamoDB) CreateTableRequest(input *CreateTableInput) (req *request.Req
// in the CREATING state.
//
// * ErrCodeLimitExceededException "LimitExceededException"
// Up to 50 CreateBackup operations are allowed per second, per account. There
// is no limit to the number of daily on-demand backups that can be taken.
// There is no limit to the number of daily on-demand backups that can be taken.
//
// Up to 10 simultaneous table operations are allowed per account. These operations
// include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup,
@ -814,8 +815,7 @@ func (c *DynamoDB) DeleteBackupRequest(input *DeleteBackupInput) (req *request.R
// table. The backups is either being created, deleted or restored to a table.
//
// * ErrCodeLimitExceededException "LimitExceededException"
// Up to 50 CreateBackup operations are allowed per second, per account. There
// is no limit to the number of daily on-demand backups that can be taken.
// There is no limit to the number of daily on-demand backups that can be taken.
//
// Up to 10 simultaneous table operations are allowed per account. These operations
// include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup,
@ -1044,8 +1044,7 @@ func (c *DynamoDB) DeleteTableRequest(input *DeleteTableInput) (req *request.Req
// might not be specified correctly, or its status might not be ACTIVE.
//
// * ErrCodeLimitExceededException "LimitExceededException"
// Up to 50 CreateBackup operations are allowed per second, per account. There
// is no limit to the number of daily on-demand backups that can be taken.
// There is no limit to the number of daily on-demand backups that can be taken.
//
// Up to 10 simultaneous table operations are allowed per account. These operations
// include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup,
@ -2642,8 +2641,7 @@ func (c *DynamoDB) RestoreTableFromBackupRequest(input *RestoreTableFromBackupIn
// table. The backups is either being created, deleted or restored to a table.
//
// * ErrCodeLimitExceededException "LimitExceededException"
// Up to 50 CreateBackup operations are allowed per second, per account. There
// is no limit to the number of daily on-demand backups that can be taken.
// There is no limit to the number of daily on-demand backups that can be taken.
//
// Up to 10 simultaneous table operations are allowed per account. These operations
// include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup,
@ -2782,8 +2780,7 @@ func (c *DynamoDB) RestoreTableToPointInTimeRequest(input *RestoreTableToPointIn
// A target table with the specified name is either being created or deleted.
//
// * ErrCodeLimitExceededException "LimitExceededException"
// Up to 50 CreateBackup operations are allowed per second, per account. There
// is no limit to the number of daily on-demand backups that can be taken.
// There is no limit to the number of daily on-demand backups that can be taken.
//
// Up to 10 simultaneous table operations are allowed per account. These operations
// include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup,
@ -3064,8 +3061,7 @@ func (c *DynamoDB) TagResourceRequest(input *TagResourceInput) (req *request.Req
//
// Returned Error Codes:
// * ErrCodeLimitExceededException "LimitExceededException"
// Up to 50 CreateBackup operations are allowed per second, per account. There
// is no limit to the number of daily on-demand backups that can be taken.
// There is no limit to the number of daily on-demand backups that can be taken.
//
// Up to 10 simultaneous table operations are allowed per account. These operations
// include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup,
@ -3172,8 +3168,7 @@ func (c *DynamoDB) UntagResourceRequest(input *UntagResourceInput) (req *request
//
// Returned Error Codes:
// * ErrCodeLimitExceededException "LimitExceededException"
// Up to 50 CreateBackup operations are allowed per second, per account. There
// is no limit to the number of daily on-demand backups that can be taken.
// There is no limit to the number of daily on-demand backups that can be taken.
//
// Up to 10 simultaneous table operations are allowed per account. These operations
// include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup,
@ -3490,8 +3485,7 @@ func (c *DynamoDB) UpdateGlobalTableSettingsRequest(input *UpdateGlobalTableSett
// The operation tried to access a nonexistent index.
//
// * ErrCodeLimitExceededException "LimitExceededException"
// Up to 50 CreateBackup operations are allowed per second, per account. There
// is no limit to the number of daily on-demand backups that can be taken.
// There is no limit to the number of daily on-demand backups that can be taken.
//
// Up to 10 simultaneous table operations are allowed per account. These operations
// include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup,
@ -3719,8 +3713,7 @@ func (c *DynamoDB) UpdateTableRequest(input *UpdateTableInput) (req *request.Req
// might not be specified correctly, or its status might not be ACTIVE.
//
// * ErrCodeLimitExceededException "LimitExceededException"
// Up to 50 CreateBackup operations are allowed per second, per account. There
// is no limit to the number of daily on-demand backups that can be taken.
// There is no limit to the number of daily on-demand backups that can be taken.
//
// Up to 10 simultaneous table operations are allowed per account. These operations
// include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup,
@ -3848,8 +3841,7 @@ func (c *DynamoDB) UpdateTimeToLiveRequest(input *UpdateTimeToLiveInput) (req *r
// might not be specified correctly, or its status might not be ACTIVE.
//
// * ErrCodeLimitExceededException "LimitExceededException"
// Up to 50 CreateBackup operations are allowed per second, per account. There
// is no limit to the number of daily on-demand backups that can be taken.
// There is no limit to the number of daily on-demand backups that can be taken.
//
// Up to 10 simultaneous table operations are allowed per account. These operations
// include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup,
@ -6312,7 +6304,8 @@ func (s *DescribeContinuousBackupsInput) SetTableName(v string) *DescribeContinu
type DescribeContinuousBackupsOutput struct {
_ struct{} `type:"structure"`
// ContinuousBackupsDescription can be one of the following : ENABLED, DISABLED.
// Represents the continuous backups and point in time recovery settings on
// the table.
ContinuousBackupsDescription *ContinuousBackupsDescription `type:"structure"`
}
@ -7870,7 +7863,10 @@ func (s *KeysAndAttributes) SetProjectionExpression(v string) *KeysAndAttributes
type ListBackupsInput struct {
_ struct{} `type:"structure"`
// LastEvaluatedBackupARN returned by the previous ListBackups call.
// LastEvaluatedBackupArn is the ARN of the backup last evaluated when the current
// page of results was returned, inclusive of the current page of results. This
// value may be specified as the ExclusiveStartBackupArn of a new ListBackups
// operation in order to fetch the next page of results.
ExclusiveStartBackupArn *string `min:"37" type:"string"`
// Maximum number of backups to return at once.
@ -7952,7 +7948,17 @@ type ListBackupsOutput struct {
// List of BackupSummary objects.
BackupSummaries []*BackupSummary `type:"list"`
// Last evaluated BackupARN.
// The ARN of the backup last evaluated when the current page of results was
// returned, inclusive of the current page of results. This value may be specified
// as the ExclusiveStartBackupArn of a new ListBackups operation in order to
// fetch the next page of results.
//
// If LastEvaluatedBackupArn is empty, then the last page of results has been
// processed and there are no more results to be retrieved.
//
// If LastEvaluatedBackupArn is not empty, this may or may not indicate there
// is more data to be returned. All results are guaranteed to have been returned
// if and only if no value for LastEvaluatedBackupArn is returned.
LastEvaluatedBackupArn *string `min:"37" type:"string"`
}
@ -10291,6 +10297,16 @@ func (s *RestoreTableToPointInTimeOutput) SetTableDescription(v *TableDescriptio
type SSEDescription struct {
_ struct{} `type:"structure"`
// The KMS master key ARN used for the KMS encryption.
KMSMasterKeyArn *string `type:"string"`
// Server-side encryption type:
//
// * AES256 - Server-side encryption which uses the AES256 algorithm.
//
// * KMS - Server-side encryption which uses AWS Key Management Service.
SSEType *string `type:"string" enum:"SSEType"`
// The current state of server-side encryption:
//
// * ENABLING - Server-side encryption is being enabled.
@ -10313,6 +10329,18 @@ func (s SSEDescription) GoString() string {
return s.String()
}
// SetKMSMasterKeyArn sets the KMSMasterKeyArn field's value.
func (s *SSEDescription) SetKMSMasterKeyArn(v string) *SSEDescription {
s.KMSMasterKeyArn = &v
return s
}
// SetSSEType sets the SSEType field's value.
func (s *SSEDescription) SetSSEType(v string) *SSEDescription {
s.SSEType = &v
return s
}
// SetStatus sets the Status field's value.
func (s *SSEDescription) SetStatus(v string) *SSEDescription {
s.Status = &v
@ -12930,6 +12958,14 @@ const (
SSEStatusDisabled = "DISABLED"
)
const (
// SSETypeAes256 is a SSEType enum value
SSETypeAes256 = "AES256"
// SSETypeKms is a SSEType enum value
SSETypeKms = "KMS"
)
const (
// ScalarAttributeTypeS is a ScalarAttributeType enum value
ScalarAttributeTypeS = "S"

View file

@ -1,6 +1,7 @@
package dynamodbattribute
import (
"encoding/base64"
"fmt"
"reflect"
"strconv"
@ -538,6 +539,16 @@ func (d *Decoder) decodeString(s *string, v reflect.Value, fieldTag tag) error {
switch v.Kind() {
case reflect.String:
v.SetString(*s)
case reflect.Slice:
// To maintain backwards compatibility with the ConvertFrom family of methods
// which converted []byte into base64-encoded strings if the input was typed
if v.Type() == byteSliceType {
decoded, err := base64.StdEncoding.DecodeString(*s)
if err != nil {
return &UnmarshalError{Err: err, Value: "string", Type: v.Type()}
}
v.SetBytes(decoded)
}
case reflect.Interface:
// Ensure type aliasing is handled properly
v.Set(reflect.ValueOf(*s).Convert(v.Type()))

View file

@ -234,6 +234,30 @@ func TestUnmarshalListError(t *testing.T) {
}
}
func TestUnmarshalConvertToData(t *testing.T) {
type T struct {
Int int
Str string
ByteSlice []byte
StrSlice []string
}
exp := T{
Int: 42,
Str: "foo",
ByteSlice: []byte{42, 97, 83},
StrSlice: []string{"cat", "dog"},
}
av, err := ConvertToMap(exp)
if err != nil {
t.Fatalf("expect no error, got %v", err)
}
var act T
err = UnmarshalMap(av, &act)
assertConvertTest(t, 0, act, exp, err, nil)
}
func TestUnmarshalMapShared(t *testing.T) {
for i, c := range sharedMapTestCases {
err := UnmarshalMap(c.in, c.actual)

View file

@ -81,7 +81,7 @@
// The ConvertTo, ConvertToList, ConvertToMap, ConvertFrom, ConvertFromMap
// and ConvertFromList methods have been deprecated. The Marshal and Unmarshal
// functions should be used instead. The ConvertTo|From marshallers do not
// support BinarySet, NumberSet, nor StringSets, and will incorrect marshal
// support BinarySet, NumberSet, nor StringSets, and will incorrectly marshal
// binary data fields in structs as base64 strings.
//
// The Marshal and Unmarshal functions correct this behavior, and removes
@ -91,5 +91,11 @@
// replaced with have been replaced with dynamodbattribute.Marshaler and
// dynamodbattribute.Unmarshaler interfaces.
//
// The Unmarshal functions are backwards compatible with data marshalled by
// ConvertTo*, but the reverse is not true: objects marshalled using Marshal
// are not necessarily usable by ConvertFrom*. This backward compatibility is
// intended to assist with incremental upgrading of data following a switch
// away from the Convert* family of functions.
//
// `time.Time` is marshaled as RFC3339 format.
package dynamodbattribute

View file

@ -70,8 +70,7 @@ const (
// ErrCodeLimitExceededException for service response error code
// "LimitExceededException".
//
// Up to 50 CreateBackup operations are allowed per second, per account. There
// is no limit to the number of daily on-demand backups that can be taken.
// There is no limit to the number of daily on-demand backups that can be taken.
//
// Up to 10 simultaneous table operations are allowed per account. These operations
// include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup,

View file

@ -488,7 +488,10 @@ func (e Expression) returnExpression(expressionType expressionType) *string {
if e.expressionMap == nil {
return nil
}
return aws.String(e.expressionMap[expressionType])
if s, exists := e.expressionMap[expressionType]; exists {
return &s
}
return nil
}
// exprNode are the generic nodes that represents both Operands and

View file

@ -978,6 +978,39 @@ func TestBuildExpressionString(t *testing.T) {
}
}
func TestReturnExpression(t *testing.T) {
cases := []struct {
name string
input Expression
expected *string
}{
{
name: "projection exists",
input: Expression{
expressionMap: map[expressionType]string{
projection: "#0, #1, #2",
},
},
expected: aws.String("#0, #1, #2"),
},
{
name: "projection not exists",
input: Expression{
expressionMap: map[expressionType]string{},
},
expected: nil,
},
}
for _, c := range cases {
t.Run(c.name, func(t *testing.T) {
actual := c.input.returnExpression(projection)
if e, a := c.expected, actual; !reflect.DeepEqual(a, e) {
t.Errorf("expect %v, got %v", e, a)
}
})
}
}
func TestAliasValue(t *testing.T) {
cases := []struct {
name string

View file

@ -31,6 +31,7 @@ var initRequest func(*request.Request)
const (
ServiceName = "dynamodb" // Service endpoint prefix API calls made to.
EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata.
ServiceID = "DynamoDB" // ServiceID is a unique identifer of a specific service
)
// New creates a new instance of the DynamoDB client with a session.
@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio
cfg,
metadata.ClientInfo{
ServiceName: ServiceName,
ServiceID: ServiceID,
SigningName: signingName,
SigningRegion: signingRegion,
Endpoint: endpoint,