mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-12-04 02:55:32 +00:00
Update aws-sdk-go/service/dynamodb/dynamodbattribute (#4744)
Fixes #4721, Fixes #4742
This commit is contained in:
11
vendor/github.com/aws/aws-sdk-go/service/dynamodb/dynamodbattribute/decode.go
generated
vendored
11
vendor/github.com/aws/aws-sdk-go/service/dynamodb/dynamodbattribute/decode.go
generated
vendored
@@ -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()))
|
||||
|
||||
8
vendor/github.com/aws/aws-sdk-go/service/dynamodb/dynamodbattribute/doc.go
generated
vendored
8
vendor/github.com/aws/aws-sdk-go/service/dynamodb/dynamodbattribute/doc.go
generated
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user