mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-12-03 06:43:53 +00:00
Bump AWS libraries to latest
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
This commit is contained in:
25
vendor/github.com/aws/aws-sdk-go/private/protocol/rest/build.go
generated
vendored
25
vendor/github.com/aws/aws-sdk-go/private/protocol/rest/build.go
generated
vendored
@@ -98,7 +98,7 @@ func buildLocationElements(r *request.Request, v reflect.Value, buildGETQuery bo
|
||||
|
||||
// Support the ability to customize values to be marshaled as a
|
||||
// blob even though they were modeled as a string. Required for S3
|
||||
// API operations like SSECustomerKey is modeled as stirng but
|
||||
// API operations like SSECustomerKey is modeled as string but
|
||||
// required to be base64 encoded in request.
|
||||
if field.Tag.Get("marshal-as") == "blob" {
|
||||
m = m.Convert(byteSliceType)
|
||||
@@ -272,7 +272,29 @@ func convertType(v reflect.Value, tag reflect.StructTag) (str string, err error)
|
||||
|
||||
switch value := v.Interface().(type) {
|
||||
case string:
|
||||
if tag.Get("suppressedJSONValue") == "true" && tag.Get("location") == "header" {
|
||||
value = base64.StdEncoding.EncodeToString([]byte(value))
|
||||
}
|
||||
str = value
|
||||
case []*string:
|
||||
if tag.Get("location") != "header" || tag.Get("enum") == "" {
|
||||
return "", fmt.Errorf("%T is only supported with location header and enum shapes", value)
|
||||
}
|
||||
buff := &bytes.Buffer{}
|
||||
for i, sv := range value {
|
||||
if sv == nil || len(*sv) == 0 {
|
||||
continue
|
||||
}
|
||||
if i != 0 {
|
||||
buff.WriteRune(',')
|
||||
}
|
||||
item := *sv
|
||||
if strings.Index(item, `,`) != -1 || strings.Index(item, `"`) != -1 {
|
||||
item = strconv.Quote(item)
|
||||
}
|
||||
buff.WriteString(item)
|
||||
}
|
||||
str = string(buff.Bytes())
|
||||
case []byte:
|
||||
str = base64.StdEncoding.EncodeToString(value)
|
||||
case bool:
|
||||
@@ -306,5 +328,6 @@ func convertType(v reflect.Value, tag reflect.StructTag) (str string, err error)
|
||||
err := fmt.Errorf("unsupported value for param %v (%s)", v.Interface(), v.Type())
|
||||
return "", err
|
||||
}
|
||||
|
||||
return str, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user