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

@ -44,6 +44,7 @@ func (o *Operation) HasOutput() bool {
return o.OutputRef.ShapeName != ""
}
// GetSigner returns the signer that should be used for a API request.
func (o *Operation) GetSigner() string {
if o.AuthType == "v4-unsigned-body" {
o.API.imports["github.com/aws/aws-sdk-go/aws/signer/v4"] = true
@ -66,7 +67,8 @@ func (o *Operation) GetSigner() string {
// tplOperation defines a template for rendering an API Operation
var tplOperation = template.Must(template.New("operation").Funcs(template.FuncMap{
"GetCrosslinkURL": GetCrosslinkURL,
"GetCrosslinkURL": GetCrosslinkURL,
"EnableStopOnSameToken": enableStopOnSameToken,
}).Parse(`
const op{{ .ExportedName }} = "{{ .Name }}"
@ -120,10 +122,16 @@ func (c *{{ .API.StructName }}) {{ .ExportedName }}Request(` +
}
output = &{{ .OutputRef.GoTypeElem }}{}
req = c.newRequest(op, input, output){{ if eq .OutputRef.Shape.Placeholder true }}
req.Handlers.Unmarshal.Remove({{ .API.ProtocolPackage }}.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler){{ end }}
req = c.newRequest(op, input, output)
{{ if eq .OutputRef.Shape.Placeholder true -}}
req.Handlers.Unmarshal.Remove({{ .API.ProtocolPackage }}.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
{{ end -}}
{{ if ne .AuthType "" }}{{ .GetSigner }}{{ end -}}
{{ if .OutputRef.Shape.EventStreamsMemberName -}}
req.Handlers.Unmarshal.Swap({{ .API.ProtocolPackage }}.UnmarshalHandler.Name, rest.UnmarshalHandler)
req.Handlers.Unmarshal.PushBack(output.runEventStreamLoop)
{{ end -}}
return
}
@ -214,6 +222,8 @@ func (c *{{ .API.StructName }}) {{ .ExportedName }}PagesWithContext(` +
`fn func({{ .OutputRef.GoType }}, bool) bool, ` +
`opts ...request.Option) error {
p := request.Pagination {
{{ if EnableStopOnSameToken .API.PackageName -}}EndPageOnSameToken: true,
{{ end -}}
NewRequest: func() (*request.Request, error) {
var inCpy {{ .InputRef.GoType }}
if input != nil {
@ -239,6 +249,12 @@ func (c *{{ .API.StructName }}) {{ .ExportedName }}PagesWithContext(` +
// GoCode returns a string of rendered GoCode for this Operation
func (o *Operation) GoCode() string {
var buf bytes.Buffer
if len(o.OutputRef.Shape.EventStreamsMemberName) != 0 {
// TODO need better was of updating protocol unmarshalers
o.API.imports["github.com/aws/aws-sdk-go/private/protocol/rest"] = true
}
err := tplOperation.Execute(&buf, o)
if err != nil {
panic(err)