diff --git a/.travis.yml b/.travis.yml index 16994ad..a0e3fd9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,14 +1,14 @@ language: go go: + - 1.x - 1.9.x - - 1.8.x install: - - pwd #just for using vendored dependencies + - go get -u golang.org/x/lint/golint script: - - go test -race -v $(go list ./... | grep -v /vendor/) + - make after_success: - curl --request POST "https://goreportcard.com/checks" --data "repo=github.com/artemnikitin/devicefarm-ci-tool" diff --git a/Gopkg.lock b/Gopkg.lock new file mode 100644 index 0000000..1c37f66 --- /dev/null +++ b/Gopkg.lock @@ -0,0 +1,32 @@ +# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. + + +[[projects]] + name = "github.com/aws/aws-sdk-go" + packages = ["aws","aws/awserr","aws/awsutil","aws/client","aws/client/metadata","aws/corehandlers","aws/credentials","aws/credentials/ec2rolecreds","aws/credentials/endpointcreds","aws/credentials/stscreds","aws/csm","aws/defaults","aws/ec2metadata","aws/endpoints","aws/request","aws/session","aws/signer/v4","internal/sdkio","internal/sdkrand","internal/shareddefaults","private/protocol","private/protocol/json/jsonutil","private/protocol/jsonrpc","private/protocol/query","private/protocol/query/queryutil","private/protocol/rest","private/protocol/xml/xmlutil","service/devicefarm","service/devicefarm/devicefarmiface","service/sts"] + revision = "c9af76f2478f81c6566d0f7f4d522254ec7c0b52" + version = "v1.14.3" + +[[projects]] + name = "github.com/fatih/structs" + packages = ["."] + revision = "a720dfa8df582c51dee1b36feabb906bde1588bd" + version = "v1.0" + +[[projects]] + name = "github.com/go-ini/ini" + packages = ["."] + revision = "06f5f3d67269ccec1fe5fe4134ba6e982984f7f5" + version = "v1.37.0" + +[[projects]] + name = "github.com/jmespath/go-jmespath" + packages = ["."] + revision = "0b12d6b5" + +[solve-meta] + analyzer-name = "dep" + analyzer-version = 1 + inputs-digest = "779ddb6908733c1e90bb2b87a5d0eb6d3bb9d66f401007d108e6c07da67ab3c7" + solver-name = "gps-cdcl" + solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml new file mode 100644 index 0000000..de6fc6c --- /dev/null +++ b/Gopkg.toml @@ -0,0 +1,30 @@ + +# Gopkg.toml example +# +# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md +# for detailed Gopkg.toml documentation. +# +# required = ["github.com/user/thing/cmd/thing"] +# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] +# +# [[constraint]] +# name = "github.com/user/project" +# version = "1.0.0" +# +# [[constraint]] +# name = "github.com/user/project2" +# branch = "dev" +# source = "github.com/myfork/project2" +# +# [[override]] +# name = "github.com/x/y" +# version = "2.4.0" + + +[[constraint]] + name = "github.com/aws/aws-sdk-go" + version = "1.14.3" + +[[constraint]] + name = "github.com/fatih/structs" + version = "1.0.0" diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..a9f1f4e --- /dev/null +++ b/Makefile @@ -0,0 +1,27 @@ +.PHONY: all clean lint test build + +all: clean lint test + +clean: + @echo "Cleanup..." + rm -f devicefarm-ci-tool_windows_amd64.exe + rm -f devicefarm-ci-tool_darwin_amd64 + rm -f devicefarm-ci-tool_linux_arm + rm -f devicefarm-ci-tool_linux_amd64 + +lint: + @echo "Run checks..." + go fmt $$(go list ./... | grep -v /vendor/) + go vet $$(go list ./... | grep -v /vendor/) + golint $$(go list ./... | grep -v /vendor/) + +test: + @echo "Run tests..." + go test -v -race $$(go list ./... | grep -v /vendor/) + +build: + @echo "Building binaries..." + GOOS=windows GOARCH=amd64 go build -ldflags "-w -s" -o devicefarm-ci-tool_windows_amd64.exe + GOOS=darwin GOARCH=amd64 go build -ldflags "-w -s" -o devicefarm-ci-tool_darwin_amd64 + GOOS=linux GOARCH=arm go build -ldflags "-w -s" -o devicefarm-ci-tool_linux_arm + GOOS=linux GOARCH=amd64 go build -ldflags "-w -s" -o devicefarm-ci-tool_linux_amd64 diff --git a/README.md b/README.md index fffba82..c28ff1f 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ Example: `-testType INSTRUMENTATION` #### Configuration file All parameters in the configuration file are optional. Configuration file is based on a syntax of [ScheduleRun](http://docs.aws.amazon.com/devicefarm/latest/APIReference/API_ScheduleRun.html) request. -Example of config (for current master): +Config example: ```json { "name": "string", @@ -98,50 +98,6 @@ Example of config (for current master): } } ``` -Example of old config (for release 1.2.1): -```json -{ - "runName":"name", - "devicePoolArn":"ARN", - "devicePoolName":"Top Devices", - "test":{ - "type":"BUILTIN_FUZZ|BUILTIN_EXPLORER|APPIUM_JAVA_JUNIT|APPIUM_JAVA_TESTNG|APPIUM_PYTHON|APPIUM_WEB_JAVA_JUNIT|APPIUM_WEB_JAVA_TESTNG|APPIUM_WEB_PYTHON|CALABASH|INSTRUMENTATION|UIAUTOMATION|UIAUTOMATOR|XCTEST", - "testPackageArn":"string", - "testPackagePath":"string", - "filter":"string", - "parameters":{ - "key":"value", - "key":"value" - } - }, - "additionalData":{ - "extraDataPackageArn":"string", - "extraDataPackagePath":"string", - "networkProfileArn":"string", - "locale":"string", - "location":{ - "latitude":1.222, - "longitude":1.222 - }, - "radios":{ - "wifi":"true|false", - "bluetooth":"true|false", - "nfc":"true|false", - "gps":"true|false" - }, - "auxiliaryApps":[ - "string1", - "string2" - ], - "billingMethod":"METERED|UNMETERED" - }, - "executionConfiguration":{ - "jobTimeoutMinutes":111, - "accountsCleanup":false, - "appPackagesCleanup":false - } -} -``` ## License diff --git a/build_artifacts.sh b/build_artifacts.sh deleted file mode 100755 index a915d33..0000000 --- a/build_artifacts.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -env GOOS=windows GOARCH=amd64 go build -ldflags "-w -s" -o devicefarm-ci-tool_windows_amd64.exe -env GOOS=darwin GOARCH=amd64 go build -ldflags "-w -s" -o devicefarm-ci-tool_darwin_amd64 -env GOOS=linux GOARCH=arm go build -ldflags "-w -s" -o devicefarm-ci-tool_linux_arm -env GOOS=linux GOARCH=amd64 go build -ldflags "-w -s" -o devicefarm-ci-tool_linux_amd64 \ No newline at end of file diff --git a/glide.lock b/glide.lock deleted file mode 100644 index c3e084e..0000000 --- a/glide.lock +++ /dev/null @@ -1,44 +0,0 @@ -hash: 870f82277d043c4455c5b21eb54e422d0666a8354f9d05486236775d85470fab -updated: 2017-05-05T22:57:34.819084692+02:00 -imports: -- name: github.com/aws/aws-sdk-go - version: 0dbc446aca87aebb6e0a24509b59bafc0e3ec0ae - repo: https://github.com/aws/aws-sdk-go - subpackages: - - aws - - aws/awserr - - aws/awsutil - - aws/client - - aws/client/metadata - - aws/corehandlers - - aws/credentials - - aws/credentials/ec2rolecreds - - aws/credentials/endpointcreds - - aws/credentials/stscreds - - aws/defaults - - aws/ec2metadata - - aws/endpoints - - aws/request - - aws/session - - aws/signer/v4 - - private/endpoints - - private/protocol - - private/protocol/json/jsonutil - - private/protocol/jsonrpc - - private/protocol/query - - private/protocol/query/queryutil - - private/protocol/rest - - private/protocol/xml/xmlutil - - private/signer/v4 - - service/devicefarm - - service/devicefarm/devicefarmiface - - service/sts -- name: github.com/fatih/structs - version: a720dfa8df582c51dee1b36feabb906bde1588bd -- name: github.com/go-ini/ini - version: afbd495e5aaea13597b5e14fe514ddeaa4d76fc3 - repo: https://github.com/go-ini/ini -- name: github.com/jmespath/go-jmespath - version: 0b12d6b521d83fc7f755e7cfc1b1fbdd35a01a74 - repo: https://github.com/jmespath/go-jmespath -testImports: [] diff --git a/glide.yaml b/glide.yaml deleted file mode 100644 index 295b325..0000000 --- a/glide.yaml +++ /dev/null @@ -1,23 +0,0 @@ -package: github.com/artemnikitin/devicefarm-ci-tool -import: -- package: github.com/aws/aws-sdk-go - version: v1.8.19 - repo: https://github.com/aws/aws-sdk-go - subpackages: - - aws - - aws/session - - private/endpoints - - private/protocol - - private/signer/v4 - - service/devicefarm - - service/sts - - aws/request - - service/devicefarm/devicefarmiface -- package: github.com/go-ini/ini - version: v1.8.6 - repo: https://github.com/go-ini/ini -- package: github.com/jmespath/go-jmespath - version: 0b12d6b521d83fc7f755e7cfc1b1fbdd35a01a74 - repo: https://github.com/jmespath/go-jmespath -- package: github.com/fatih/structs - version: v1.0 diff --git a/main.go b/main.go index 9ec494a..1c09620 100644 --- a/main.go +++ b/main.go @@ -6,6 +6,7 @@ import ( "io/ioutil" "log" "os" + "strings" "github.com/artemnikitin/devicefarm-ci-tool/errors" "github.com/artemnikitin/devicefarm-ci-tool/model" @@ -24,6 +25,7 @@ var ( appPath = flag.String("app", "", "Path to an app") testPath = flag.String("test", "", "Path to test app") devicePool = flag.String("devices", "Top Devices", "Specify list of devices for tests") + randomDevicePool = flag.String("randomDevices", "", "List of device pools for random choice") configJSON = flag.String("config", "", "Path to JSON config") wait = flag.Bool("wait", false, "Wait for run end") checkEvery = flag.Int("checkEvery", 5, "Specified time slice for checking status of run") @@ -92,7 +94,7 @@ func runJob(client devicefarmiface.DeviceFarmAPI, config *model.RunConfig) ([]*m } } - if *ignoreUnavailableDevices { + if *ignoreUnavailableDevices && *wait { pass = svc.IsTestRunPassIgnoringUnavailableDevices(runArn) } @@ -110,7 +112,13 @@ func getConfig() *model.RunConfig { configFile = model.Transform(bytes) } if configFile.DevicePoolArn == "" && configFile.DevicePoolName == "" { - configFile.DevicePoolName = *devicePool + if *randomDevicePool != "" { + pools := strings.Split(*randomDevicePool, ",") + i := tools.Random(0, len(pools)-1) + configFile.DevicePoolName = pools[i] + } else { + configFile.DevicePoolName = *devicePool + } } if *runName != "" { configFile.Name = *runName diff --git a/service/mock.go b/service/mock.go index ada411b..197ee41 100644 --- a/service/mock.go +++ b/service/mock.go @@ -10,6 +10,7 @@ import ( "github.com/aws/aws-sdk-go/service/devicefarm" ) +// UploadARN using for tests const UploadARN = "wefere3f3f33gv3fre3f3f3f3f3v34v3v43v433v34v43v34" // CreateFakeServer creates a fake server for tests @@ -30,6 +31,162 @@ type MockClient struct { FakeServer *httptest.Server } +func (c *MockClient) CreateInstanceProfile(*devicefarm.CreateInstanceProfileInput) (*devicefarm.CreateInstanceProfileOutput, error) { + panic("implement me") +} + +func (c *MockClient) CreateInstanceProfileWithContext(aws.Context, *devicefarm.CreateInstanceProfileInput, ...request.Option) (*devicefarm.CreateInstanceProfileOutput, error) { + panic("implement me") +} + +func (c *MockClient) CreateInstanceProfileRequest(*devicefarm.CreateInstanceProfileInput) (*request.Request, *devicefarm.CreateInstanceProfileOutput) { + panic("implement me") +} + +func (c *MockClient) CreateVPCEConfiguration(*devicefarm.CreateVPCEConfigurationInput) (*devicefarm.CreateVPCEConfigurationOutput, error) { + panic("implement me") +} + +func (c *MockClient) CreateVPCEConfigurationWithContext(aws.Context, *devicefarm.CreateVPCEConfigurationInput, ...request.Option) (*devicefarm.CreateVPCEConfigurationOutput, error) { + panic("implement me") +} + +func (c *MockClient) CreateVPCEConfigurationRequest(*devicefarm.CreateVPCEConfigurationInput) (*request.Request, *devicefarm.CreateVPCEConfigurationOutput) { + panic("implement me") +} + +func (c *MockClient) DeleteInstanceProfile(*devicefarm.DeleteInstanceProfileInput) (*devicefarm.DeleteInstanceProfileOutput, error) { + panic("implement me") +} + +func (c *MockClient) DeleteInstanceProfileWithContext(aws.Context, *devicefarm.DeleteInstanceProfileInput, ...request.Option) (*devicefarm.DeleteInstanceProfileOutput, error) { + panic("implement me") +} + +func (c *MockClient) DeleteInstanceProfileRequest(*devicefarm.DeleteInstanceProfileInput) (*request.Request, *devicefarm.DeleteInstanceProfileOutput) { + panic("implement me") +} + +func (c *MockClient) DeleteVPCEConfiguration(*devicefarm.DeleteVPCEConfigurationInput) (*devicefarm.DeleteVPCEConfigurationOutput, error) { + panic("implement me") +} + +func (c *MockClient) DeleteVPCEConfigurationWithContext(aws.Context, *devicefarm.DeleteVPCEConfigurationInput, ...request.Option) (*devicefarm.DeleteVPCEConfigurationOutput, error) { + panic("implement me") +} + +func (c *MockClient) DeleteVPCEConfigurationRequest(*devicefarm.DeleteVPCEConfigurationInput) (*request.Request, *devicefarm.DeleteVPCEConfigurationOutput) { + panic("implement me") +} + +func (c *MockClient) GetDeviceInstance(*devicefarm.GetDeviceInstanceInput) (*devicefarm.GetDeviceInstanceOutput, error) { + panic("implement me") +} + +func (c *MockClient) GetDeviceInstanceWithContext(aws.Context, *devicefarm.GetDeviceInstanceInput, ...request.Option) (*devicefarm.GetDeviceInstanceOutput, error) { + panic("implement me") +} + +func (c *MockClient) GetDeviceInstanceRequest(*devicefarm.GetDeviceInstanceInput) (*request.Request, *devicefarm.GetDeviceInstanceOutput) { + panic("implement me") +} + +func (c *MockClient) GetInstanceProfile(*devicefarm.GetInstanceProfileInput) (*devicefarm.GetInstanceProfileOutput, error) { + panic("implement me") +} + +func (c *MockClient) GetInstanceProfileWithContext(aws.Context, *devicefarm.GetInstanceProfileInput, ...request.Option) (*devicefarm.GetInstanceProfileOutput, error) { + panic("implement me") +} + +func (c *MockClient) GetInstanceProfileRequest(*devicefarm.GetInstanceProfileInput) (*request.Request, *devicefarm.GetInstanceProfileOutput) { + panic("implement me") +} + +func (c *MockClient) GetVPCEConfiguration(*devicefarm.GetVPCEConfigurationInput) (*devicefarm.GetVPCEConfigurationOutput, error) { + panic("implement me") +} + +func (c *MockClient) GetVPCEConfigurationWithContext(aws.Context, *devicefarm.GetVPCEConfigurationInput, ...request.Option) (*devicefarm.GetVPCEConfigurationOutput, error) { + panic("implement me") +} + +func (c *MockClient) GetVPCEConfigurationRequest(*devicefarm.GetVPCEConfigurationInput) (*request.Request, *devicefarm.GetVPCEConfigurationOutput) { + panic("implement me") +} + +func (c *MockClient) ListDeviceInstances(*devicefarm.ListDeviceInstancesInput) (*devicefarm.ListDeviceInstancesOutput, error) { + panic("implement me") +} + +func (c *MockClient) ListDeviceInstancesWithContext(aws.Context, *devicefarm.ListDeviceInstancesInput, ...request.Option) (*devicefarm.ListDeviceInstancesOutput, error) { + panic("implement me") +} + +func (c *MockClient) ListDeviceInstancesRequest(*devicefarm.ListDeviceInstancesInput) (*request.Request, *devicefarm.ListDeviceInstancesOutput) { + panic("implement me") +} + +func (c *MockClient) ListInstanceProfiles(*devicefarm.ListInstanceProfilesInput) (*devicefarm.ListInstanceProfilesOutput, error) { + panic("implement me") +} + +func (c *MockClient) ListInstanceProfilesWithContext(aws.Context, *devicefarm.ListInstanceProfilesInput, ...request.Option) (*devicefarm.ListInstanceProfilesOutput, error) { + panic("implement me") +} + +func (c *MockClient) ListInstanceProfilesRequest(*devicefarm.ListInstanceProfilesInput) (*request.Request, *devicefarm.ListInstanceProfilesOutput) { + panic("implement me") +} + +func (c *MockClient) ListVPCEConfigurations(*devicefarm.ListVPCEConfigurationsInput) (*devicefarm.ListVPCEConfigurationsOutput, error) { + panic("implement me") +} + +func (c *MockClient) ListVPCEConfigurationsWithContext(aws.Context, *devicefarm.ListVPCEConfigurationsInput, ...request.Option) (*devicefarm.ListVPCEConfigurationsOutput, error) { + panic("implement me") +} + +func (c *MockClient) ListVPCEConfigurationsRequest(*devicefarm.ListVPCEConfigurationsInput) (*request.Request, *devicefarm.ListVPCEConfigurationsOutput) { + panic("implement me") +} + +func (c *MockClient) UpdateDeviceInstance(*devicefarm.UpdateDeviceInstanceInput) (*devicefarm.UpdateDeviceInstanceOutput, error) { + panic("implement me") +} + +func (c *MockClient) UpdateDeviceInstanceWithContext(aws.Context, *devicefarm.UpdateDeviceInstanceInput, ...request.Option) (*devicefarm.UpdateDeviceInstanceOutput, error) { + panic("implement me") +} + +func (c *MockClient) UpdateDeviceInstanceRequest(*devicefarm.UpdateDeviceInstanceInput) (*request.Request, *devicefarm.UpdateDeviceInstanceOutput) { + panic("implement me") +} + +func (c *MockClient) UpdateInstanceProfile(*devicefarm.UpdateInstanceProfileInput) (*devicefarm.UpdateInstanceProfileOutput, error) { + panic("implement me") +} + +func (c *MockClient) UpdateInstanceProfileWithContext(aws.Context, *devicefarm.UpdateInstanceProfileInput, ...request.Option) (*devicefarm.UpdateInstanceProfileOutput, error) { + panic("implement me") +} + +func (c *MockClient) UpdateInstanceProfileRequest(*devicefarm.UpdateInstanceProfileInput) (*request.Request, *devicefarm.UpdateInstanceProfileOutput) { + panic("implement me") +} + +func (c *MockClient) UpdateVPCEConfiguration(*devicefarm.UpdateVPCEConfigurationInput) (*devicefarm.UpdateVPCEConfigurationOutput, error) { + panic("implement me") +} + +func (c *MockClient) UpdateVPCEConfigurationWithContext(aws.Context, *devicefarm.UpdateVPCEConfigurationInput, ...request.Option) (*devicefarm.UpdateVPCEConfigurationOutput, error) { + panic("implement me") +} + +func (c *MockClient) UpdateVPCEConfigurationRequest(*devicefarm.UpdateVPCEConfigurationInput) (*request.Request, *devicefarm.UpdateVPCEConfigurationOutput) { + panic("implement me") +} + func (c *MockClient) CreateDevicePool(*devicefarm.CreateDevicePoolInput) (*devicefarm.CreateDevicePoolOutput, error) { return nil, nil } diff --git a/tools/tools.go b/tools/tools.go index b5cacaf..02d0635 100644 --- a/tools/tools.go +++ b/tools/tools.go @@ -3,7 +3,9 @@ package tools import ( "fmt" "log" + "math/rand" "strings" + "time" ) // UploadFile used to upload file by S3 pre-signed URL @@ -37,3 +39,9 @@ func GenerateReportURL(arn string) string { run := str[index+1:] return fmt.Sprintf(URL, project, run) } + +// Random generates random integer in given range +func Random(min, max int) int { + rand.Seed(time.Now().Unix()) + return rand.Intn(max-min) + min +} diff --git a/tools/tools_test.go b/tools/tools_test.go index 504814c..491950f 100644 --- a/tools/tools_test.go +++ b/tools/tools_test.go @@ -51,3 +51,10 @@ func TestGenerateReportURL(t *testing.T) { } } } + +func TestRandom(t *testing.T) { + i := Random(1, 10) + if i < 1 || i > 10 { + t.Error("Random int should be in given range") + } +} diff --git a/vendor/github.com/aws/aws-sdk-go/.github/ISSUE_TEMPLATE.md b/vendor/github.com/aws/aws-sdk-go/.github/ISSUE_TEMPLATE.md deleted file mode 100644 index 1ecb636..0000000 --- a/vendor/github.com/aws/aws-sdk-go/.github/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,14 +0,0 @@ -Please fill out the sections below to help us address your issue. - -### Version of AWS SDK for Go? - - -### Version of Go (`go version`)? - - -### What issue did you see? - -### Steps to reproduce - -If you have have an runnable example, please include it. - diff --git a/vendor/github.com/aws/aws-sdk-go/.github/PULL_REQUEST_TEMPLATE.md b/vendor/github.com/aws/aws-sdk-go/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index a9aaa9a..0000000 --- a/vendor/github.com/aws/aws-sdk-go/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,3 +0,0 @@ -For changes to files under the `/model/` folder, and manual edits to autogenerated code (e.g. `/service/s3/api.go`) please create an Issue instead of a PR for those type of changes. - -If there is an existing bug or feature this PR is answers please reference it here. diff --git a/vendor/github.com/aws/aws-sdk-go/.travis.yml b/vendor/github.com/aws/aws-sdk-go/.travis.yml index 02c9321..0b34640 100644 --- a/vendor/github.com/aws/aws-sdk-go/.travis.yml +++ b/vendor/github.com/aws/aws-sdk-go/.travis.yml @@ -1,24 +1,48 @@ language: go -sudo: false - -go: - - 1.5 - - 1.6 - - 1.7 - - 1.8 - - tip - -# Use Go 1.5's vendoring experiment for 1.5 tests. -env: - - GO15VENDOREXPERIMENT=1 - -install: - - make get-deps +matrix: + allow_failures: + - go: tip + - go: 1.6.x + os: linux + include: + - os: linux + sudo: required + go: 1.5.x + # Use Go 1.5's vendoring experiment for 1.5 tests. + env: GO15VENDOREXPERIMENT=1 + - os: linux + sudo: required + go: 1.6.x + - os: linux + sudo: required + go: 1.7.x + - os: linux + sudo: required + go: 1.8.x + - os: linux + sudo: required + go: 1.9.x + - os: linux + sudo: required + go: 1.10.x + - os: linux + sudo: required + go: tip + - os: osx + go: 1.7.x + - os: osx + go: 1.8.x + - os: osx + go: 1.9.x + - os: osx + go: 1.10.x + - os: osx + go: tip script: - - make unit-with-race-cover + - make ci-test -matrix: - allow_failures: - - go: tip +branches: + only: + - master diff --git a/vendor/github.com/aws/aws-sdk-go/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go/CHANGELOG.md index f5a8b9d..4d0ac57 100644 --- a/vendor/github.com/aws/aws-sdk-go/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go/CHANGELOG.md @@ -1,3 +1,2436 @@ +Release v1.14.3 (2018-06-08) +=== + +### Service Client Updates +* `service/mediatailor`: Updates service API + +Release v1.14.2 (2018-06-07) +=== + +### Service Client Updates +* `service/medialive`: Updates service API, documentation, and paginators + * AWS Elemental MediaLive now makes channel log information available through Amazon CloudWatch Logs. You can set up each MediaLive channel with a logging level; when the channel is run, logs will automatically be published to your account on Amazon CloudWatch Logs + +Release v1.14.1 (2018-06-05) +=== + +### Service Client Updates +* `service/ce`: Updates service API and documentation +* `service/polly`: Updates service API and documentation + * Amazon Polly adds new French voice - "Lea" +* `service/rds`: Updates service API and documentation + * This release adds customizable processor features for RDS instances. +* `service/secretsmanager`: Updates service documentation + * Documentation updates for secretsmanager +* `service/shield`: Updates service API and documentation + * DDoS Response Team access management for AWS Shield + +Release v1.14.0 (2018-06-04) +=== + +### Service Client Updates +* `service/AWSMigrationHub`: Updates service documentation +* `service/appstream`: Updates service API and documentation + * Amazon AppStream 2.0 adds support for Google Drive for G Suite. With this feature, customers will be able to connect their G Suite accounts with AppStream 2.0 and enable Google Drive access for an AppStream 2.0 stack. Users of the stack can then link their Google Drive using their G Suite login credentials and use their existing files stored in Drive with their AppStream 2.0 applications. File changes will be synced automatically to Google cloud. +* `service/ec2`: Updates service API and documentation + * You are now able to use instance storage (up to 3600 GB of NVMe based SSD) on M5 instances, the next generation of EC2's General Purpose instances in us-east-1, us-west-2, us-east-2, eu-west-1 and ca-central-1. M5 instances offer up to 96 vCPUs, 384 GiB of DDR4 instance memory, 25 Gbps in Network bandwidth and improved EBS and Networking bandwidth on smaller instance sizes and provide a balance of compute, memory and network resources for many applications. +* `service/eks`: Adds new service +* `service/mediaconvert`: Updates service API and documentation + * This release adds the support for Common Media Application Format (CMAF) fragmented outputs, RF64 WAV audio output format, and HEV1 or HEVC1 MP4 packaging types when using HEVC in DASH or CMAF outputs. +* `service/sagemaker`: Updates service API, documentation, and paginators + * Amazon SageMaker has added the ability to run hyperparameter tuning jobs. A hyperparameter tuning job will create and evaluate multiple training jobs while tuning algorithm hyperparameters, to optimize a customer specified objective metric. + +### SDK Features +* Add support for EventStream based APIs (S3 SelectObjectContent) ([#1941](https://github.com/aws/aws-sdk-go/pull/1941)) + * Adds support for EventStream asynchronous APIs such as S3 SelectObjectContents API. This API allows your application to receiving multiple events asynchronously from the API response. Your application recieves these events from a channel on the API response. + * See PR [#1941](https://github.com/aws/aws-sdk-go/pull/1941) for example. + * Fixes [#1895](https://github.com/aws/aws-sdk-go/issues/1895) + +Release v1.13.60 (2018-06-01) +=== + +### Service Client Updates +* `service/ds`: Updates service API and documentation + * Added ResetUserPassword API. Customers can now reset their users' passwords without providing the old passwords in Simple AD and Microsoft AD. +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/iot`: Updates service API and documentation + * We are releasing force CancelJob and CancelJobExecution functionalities to customers. +* `service/mediatailor`: Adds new service +* `service/redshift`: Updates service documentation + * Documentation updates for redshift +* `service/sns`: Updates service API, documentation, and paginators + * The SNS Subscribe API has been updated with two new optional parameters: Attributes and ReturnSubscriptionArn. Attributes is a map of subscription attributes which can be one or more of: FilterPolicy, DeliveryPolicy, and RawMessageDelivery. ReturnSubscriptionArn is a boolean parameter that overrides the default behavior of returning "pending confirmation" for subscriptions that require confirmation instead of returning the subscription ARN. + +### SDK Bugs +* `private/mode/api`: Fix error code constants being generated incorrectly.([#1958](https://github.com/aws/aws-sdk-go/issues/1958)) + * Fixes the SDK's code generation to not modify the error code text value when generating error code constants. This prevents generating error code values which are invalid and will never be sent by the service. This change does not change the error code constant variable name generated by the SDK, only the value of the error code. + * Fixes [#1856](https://github.com/aws/aws-sdk-go/issues/1856) +Release v1.13.59 (2018-05-31) +=== + +* `aws/endpoints`: Updated Regions and Endpoints metadata. +Release v1.13.58 (2018-05-30) +=== + +### Service Client Updates +* `service/elasticloadbalancingv2`: Updates service API and documentation +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/neptune`: Adds new service + * Amazon Neptune is a fast, reliable graph database service that makes it easy to build and run applications that work with highly connected datasets. Neptune supports popular graph models Property Graph and W3C's Resource Description Frame (RDF), and their respective query languages Apache TinkerPop Gremlin 3.3.2 and SPARQL 1.1. + +Release v1.13.57 (2018-05-29) +=== + +### Service Client Updates +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/pi`: Adds new service + +Release v1.13.56 (2018-05-25) +=== + +### Service Client Updates +* `service/appstream`: Updates service API and documentation + * This API update enables customers to control whether users can transfer data between their local devices and their streaming applications through file uploads and downloads, clipboard operations, or printing to local devices +* `service/config`: Updates service API and documentation +* `service/glue`: Updates service API and documentation + * AWS Glue now sends a delay notification to Amazon CloudWatch Events when an ETL job runs longer than the specified delay notification threshold. +* `service/iot`: Updates service API + * We are exposing DELETION_IN_PROGRESS as a new job status in regards to the release of DeleteJob API. + +Release v1.13.55 (2018-05-24) +=== + +### Service Client Updates +* `service/codebuild`: Updates service API + * AWS CodeBuild Adds Support for Windows Builds. +* `service/elasticloadbalancingv2`: Updates service documentation +* `service/rds`: Updates service API and documentation + * This release adds CloudWatch Logs integration capabilities to RDS Aurora MySQL clusters +* `service/secretsmanager`: Updates service documentation + * Documentation updates for secretsmanager + +Release v1.13.54 (2018-05-22) +=== + +### Service Client Updates +* `service/ecs`: Updates service API and documentation + * Amazon Elastic Container Service (ECS) adds service discovery for services that use host or bridged network mode. ECS can now also register instance IPs for active tasks using bridged and host networking with Route 53, making them available via DNS. +* `service/inspector`: Updates service API + * We are launching the ability to target all EC2 instances. With this launch, resourceGroupArn is now optional for CreateAssessmentTarget and UpdateAssessmentTarget. If resourceGroupArn is not specified, all EC2 instances in the account in the AWS region are included in the assessment target. + +Release v1.13.53 (2018-05-21) +=== + +### Service Client Updates +* `service/cloudformation`: Updates service API and documentation + * 1) Filtered Update for StackSet based on Accounts and Regions: This feature will allow flexibility for the customers to roll out updates on a StackSet based on specific Accounts and Regions. 2) Support for customized ExecutionRoleName: This feature will allow customers to attach ExecutionRoleName to the StackSet thus ensuring more security and controlling the behavior of any AWS resources in the target accounts. + +Release v1.13.52 (2018-05-18) +=== + +### Service Client Updates +* `service/email`: Updates service documentation + * Fixed a broken link in the documentation for S3Action. +* `service/iot`: Updates service API and documentation + * We are releasing DeleteJob and DeleteJobExecution APIs to allow customer to delete resources created using AWS IoT Jobs. + +Release v1.13.51 (2018-05-17) +=== + +### Service Client Updates +* `service/codedeploy`: Updates service documentation + * Documentation updates for codedeploy +* `service/cognito-idp`: Updates service API and documentation +* `service/ec2`: Updates service API and documentation + * You are now able to use instance storage (up to 1800 GB of NVMe based SSD) on C5 instances, the next generation of EC2's compute optimized instances in us-east-1, us-west-2, us-east-2, eu-west-1 and ca-central-1. C5 instances offer up to 72 vCPUs, 144 GiB of DDR4 instance memory, 25 Gbps in Network bandwidth and improved EBS and Networking bandwidth on smaller instance sizes to deliver improved performance for compute-intensive workloads.You can now run bare metal workloads on EC2 with i3.metal instances. As a new instance size belonging to the I3 instance family, i3.metal instances have the same characteristics as other instances in the family, including NVMe SSD-backed instance storage optimized for low latency, very high random I/O performance, and high sequential read throughput. I3.metal instances are powered by 2.3 GHz Intel Xeon processors, offering 36 hyper-threaded cores (72 logical processors), 512 GiB of memory, and 15.2 TB of NVMe SSD-backed instance storage. These instances deliver high networking throughput and lower latency with up to 25 Gbps of aggregate network bandwidth using Elastic Network Adapter (ENA)-based Enhanced Networking. + +Release v1.13.50 (2018-05-16) +=== + +### Service Client Updates +* `service/secretsmanager`: Updates service documentation + * Documentation updates for secretsmanager +* `service/servicecatalog`: Updates service API and documentation + * Users can now pass a new option to ListAcceptedPortfolioShares called portfolio-share-type with a value of AWS_SERVICECATALOG in order to access Getting Started Portfolios that contain selected products representing common customer use cases. + +Release v1.13.49 (2018-05-15) +=== + +### Service Client Updates +* `service/config`: Updates service API + +Release v1.13.48 (2018-05-14) +=== + +### Service Client Updates +* `service/codebuild`: Updates service API and documentation + * Adding support for more override fields for StartBuild API, add support for idempotency token field for StartBuild API in AWS CodeBuild. +* `service/iot1click-devices`: Adds new service +* `service/iot1click-projects`: Adds new service +* `service/organizations`: Updates service documentation + * Documentation updates for organizations + +Release v1.13.47 (2018-05-10) +=== + +### Service Client Updates +* `service/firehose`: Updates service API and documentation + * With this release, Amazon Kinesis Data Firehose can convert the format of your input data from JSON to Apache Parquet or Apache ORC before storing the data in Amazon S3. Parquet and ORC are columnar data formats that save space and enable faster queries compared to row-oriented formats like JSON. + +Release v1.13.46 (2018-05-10) +=== + +### Service Client Updates +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/gamelift`: Updates service API and documentation + * AutoScaling Target Tracking scaling simplification along with StartFleetActions and StopFleetActions APIs to suspend and resume automatic scaling at will. + +Release v1.13.45 (2018-05-10) +=== + +### Service Client Updates +* `service/budgets`: Updates service API and documentation + * Updating the regex for the NumericValue fields. +* `service/ec2`: Updates service API and documentation + * Enable support for latest flag with Get Console Output +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/rds`: Updates service API and documentation + * Changes to support the Aurora MySQL Backtrack feature. + +Release v1.13.44 (2018-05-08) +=== + +### Service Client Updates +* `service/ec2`: Updates service API and documentation + * Enable support for specifying CPU options during instance launch. +* `service/rds`: Updates service documentation + * Correction to the documentation about copying unencrypted snapshots. + +Release v1.13.43 (2018-05-07) +=== + +### Service Client Updates +* `service/alexaforbusiness`: Updates service API +* `service/budgets`: Updates service API and documentation + * "With this release, customers can use AWS Budgets to monitor how much of their Amazon EC2, Amazon RDS, Amazon Redshift, and Amazon ElastiCache instance usage is covered by reservations, and receive alerts when their coverage falls below the threshold they define." +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/es`: Updates service API, documentation, and paginators + * This change brings support for Reserved Instances to AWS Elasticsearch. +* `service/s3`: Updates service API and documentation + * Added BytesReturned details for Progress and Stats Events for Amazon S3 Select . + +Release v1.13.42 (2018-05-04) +=== + +### Service Client Updates +* `service/guardduty`: Updates service API, documentation, and paginators + * Amazon GuardDuty is adding five new API operations for creating and managing filters. For each filter, you can specify a criteria and an action. The action you specify is applied to findings that match the specified criteria. + +Release v1.13.41 (2018-05-03) +=== + +### Service Client Updates +* `service/appsync`: Updates service API and documentation +* `service/config`: Updates service API and documentation +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/secretsmanager`: Updates service documentation + * Documentation updates for secretsmanager + +Release v1.13.40 (2018-05-02) +=== + +### Service Client Updates +* `service/acm`: Updates service documentation + * Documentation updates for acm +* `service/codepipeline`: Updates service API and documentation + * Added support for webhooks with accompanying definitions as needed in the AWS CodePipeline API Guide. +* `service/ec2`: Updates service API and documentation + * Amazon EC2 Fleet is a new feature that simplifies the provisioning of Amazon EC2 capacity across different EC2 instance types, Availability Zones, and the On-Demand, Reserved Instance, and Spot Instance purchase models. With a single API call, you can now provision capacity to achieve desired scale, performance, and cost. +* `service/ssm`: Updates service API and documentation + * Added support for new parameter, DocumentVersion, for SendCommand API. Users can now specify version of SSM document to be executed on the target(s). + +Release v1.13.39 (2018-04-30) +=== + +### Service Client Updates +* `service/alexaforbusiness`: Updates service API, documentation, and paginators +* `service/dynamodb`: Updates service API and documentation + * Adds two new APIs UpdateGlobalTableSettings and DescribeGlobalTableSettings. This update introduces new constraints in the CreateGlobalTable and UpdateGlobalTable APIs . Tables must have the same write capacity units. If Global Secondary Indexes exist then they must have the same write capacity units and key schema. +* `service/guardduty`: Updates service API and documentation + * You can disable the email notification when inviting GuardDuty members using the disableEmailNotification parameter in the InviteMembers operation. +* `service/route53domains`: Updates service API and documentation + * This release adds a SubmittedSince attribute to the ListOperations API, so you can list operations that were submitted after a specified date and time. +* `service/sagemaker`: Updates service API and documentation + * SageMaker has added support for VPC configuration for both Endpoints and Training Jobs. This allows you to connect from the instances running the Endpoint or Training Job to your VPC and any resources reachable in the VPC rather than being restricted to resources that were internet accessible. +* `service/workspaces`: Updates service API and documentation + * Added new IP Access Control APIs, an API to change the state of a Workspace, and the ADMIN_MAINTENANCE WorkSpace state. With the new IP Access Control APIs, you can now create/delete IP Access Control Groups, add/delete/update rules for IP Access Control Groups, Associate/Disassociate IP Access Control Groups to/from a WorkSpaces Directory, and Describe IP Based Access Control Groups. + +Release v1.13.38 (2018-04-26) +=== + +### Service Client Updates +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/glacier`: Updates service documentation + * Documentation updates for Glacier to fix a broken link +* `service/secretsmanager`: Updates service documentation + * Documentation updates for secretsmanager + +Release v1.13.37 (2018-04-25) +=== + +### Service Client Updates +* `service/codedeploy`: Updates service API and documentation + * AWS CodeDeploy has a new exception that indicates when a GitHub token is not valid. +* `service/rekognition`: Updates service documentation + * Documentation updates for Amazon Rekognition. +* `service/xray`: Updates service API and documentation + * Added PutEncryptionConfig and GetEncryptionConfig APIs for managing data encryption settings. Use PutEncryptionConfig to configure X-Ray to use an AWS Key Management Service customer master key to encrypt trace data at rest. + +Release v1.13.36 (2018-04-24) +=== + +### Service Client Updates +* `service/elasticbeanstalk`: Updates service API and documentation + * Support tracking Elastic Beanstalk resources in AWS Config. +* `service/secretsmanager`: Updates service documentation + * Documentation updates for secretsmanager + +Release v1.13.35 (2018-04-23) +=== + +### Service Client Updates +* `service/autoscaling-plans`: Updates service API and documentation +* `service/iot`: Updates service API and documentation + * Add IotAnalyticsAction which sends message data to an AWS IoT Analytics channel +* `service/iotanalytics`: Adds new service + +### SDK Enhancements +* `aws/endpoints`: Add Get Region description to endpoints package ([#1909](https://github.com/aws/aws-sdk-go/pull/1909)) + * Adds exposing the description field of the endpoints Region struct. + * Fixes [#1194](https://github.com/aws/aws-sdk-go/issues/1194) + +### SDK Bugs +* Fix XML unmarshaler not correctly unmarshaling list of timestamp values ([#1894](https://github.com/aws/aws-sdk-go/pull/1894)) + * Fixes a bug in the XML unmarshaler that would incorrectly try to unmarshal "time.Time" parameters that did not have the struct tag type on them. This would occur for nested lists like CloudWatch's GetMetricDataResponse MetricDataResults timestamp parameters. + * Fixes [#1892](https://github.com/aws/aws-sdk-go/issues/1892) +Release v1.13.34 (2018-04-20) +=== + +### Service Client Updates +* `service/firehose`: Updates service API and documentation + * With this release, Amazon Kinesis Data Firehose allows you to tag your delivery streams. Tags are metadata that you can create and use to manage your delivery streams. For more information about tagging, see AWS Tagging Strategies. For technical documentation, look for the tagging operations in the Amazon Kinesis Firehose API reference. +* `service/medialive`: Updates service API and documentation + * With AWS Elemental MediaLive you can now output live channels as RTMP (Real-Time Messaging Protocol) and RTMPS as the encrypted version of the protocol (Secure, over SSL/TLS). RTMP is the preferred protocol for sending live streams to popular social platforms which means you can send live channel content to social and sharing platforms in a secure and reliable way while continuing to stream to your own website, app or network. + +Release v1.13.33 (2018-04-19) +=== + +### Service Client Updates +* `service/ce`: Updates service API and documentation +* `service/codepipeline`: Updates service API and documentation + * Added new SourceRevision structure to Execution Summary with accompanying definitions as needed in the AWS CodePipeline API Guide. +* `service/devicefarm`: Updates service API and documentation + * Adding support for VPCEndpoint feature. Allows customers to be able to access their private endpoints/services running in their VPC during test automation. +* `service/ec2`: Updates service API and documentation + * Added support for customers to see the time at which a Dedicated Host was allocated or released. +* `service/rds`: Updates service API and documentation + * The ModifyDBCluster operation now includes an EngineVersion parameter. You can use this to upgrade the engine for a clustered database. +* `service/secretsmanager`: Updates service documentation and examples + * Documentation updates +* `service/ssm`: Updates service API and documentation + * Added new APIs DeleteInventory and DescribeInventoryDeletions, for customers to delete their custom inventory data. + +Release v1.13.32 (2018-04-10) +=== + +### Service Client Updates +* `service/dms`: Updates service API and documentation + * Native Change Data Capture start point and task recovery support in Database Migration Service. +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/glue`: Updates service API and documentation + * "AWS Glue now supports timeout values for ETL jobs. With this release, all new ETL jobs have a default timeout value of 48 hours. AWS Glue also now supports the ability to start a schedule or job events trigger when it is created." +* `service/mediapackage`: Updates service API and documentation + * Adds a new OriginEndpoint package type CmafPackage in MediaPackage. Origin endpoints can now be configured to use the Common Media Application Format (CMAF) media streaming format. This version of CmafPackage only supports HTTP Live Streaming (HLS) manifests with fragmented MP4. +* `service/ssm`: Updates service API and documentation + * Added TooManyUpdates exception for AddTagsToResource and RemoveTagsFromResource API +* `service/workmail`: Updates service API, documentation, and paginators + * Amazon WorkMail adds the ability to grant users and groups with "Full Access", "Send As" and "Send on Behalf" permissions on a given mailbox. + +Release v1.13.31 (2018-04-09) +=== + +### Service Client Updates +* `service/clouddirectory`: Updates service API and documentation + * Cloud Directory customers can fetch attributes within a facet on an object with the new GetObjectAttributes API and can fetch attributes from multiple facets or objects with the BatchGetObjectAttributes operation. +* `aws/endpoints`: Updated Regions and Endpoints metadata. + +Release v1.13.30 (2018-04-06) +=== + +### Service Client Updates +* `service/batch`: Updates service API and documentation + * Support for Timeout in SubmitJob and RegisterJobDefinition + +Release v1.13.29 (2018-04-05) +=== + +### Service Client Updates +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/ssm`: Updates service documentation + +Release v1.13.28 (2018-04-04) +=== + +### Service Client Updates +* `service/acm`: Updates service API and documentation + * AWS Certificate Manager has added support for AWS Certificate Manager Private Certificate Authority (CA). Customers can now request private certificates with the RequestCertificate API, and also export private certificates with the ExportCertificate API. +* `service/acm-pca`: Adds new service +* `service/config`: Updates service API and documentation +* `service/fms`: Adds new service +* `service/monitoring`: Updates service API and documentation + * The new GetMetricData API enables you to collect batch amounts of metric data and optionally perform math expressions on the data. With one GetMetricData call you can retrieve as many as 100 different metrics and a total of 100,800 data points. +* `service/s3`: Updates service API and documentation + * ONEZONE_IA storage class stores object data in only one Availability Zone at a lower price than STANDARD_IA. This SDK release provides API support for this new storage class. +* `service/sagemaker`: Updates service API and documentation + * SageMaker is now supporting many additional instance types in previously supported families for Notebooks, Training Jobs, and Endpoints. Training Jobs and Endpoints now support instances in the m5 family in addition to the previously supported instance families. For specific instance types supported please see the documentation for the SageMaker API. +* `service/secretsmanager`: Adds new service + * AWS Secrets Manager enables you to easily create and manage the secrets that you use in your customer-facing apps. Instead of embedding credentials into your source code, you can dynamically query Secrets Manager from your app whenever you need credentials. You can automatically and frequently rotate your secrets without having to deploy updates to your apps. All secret values are encrypted when they're at rest with AWS KMS, and while they're in transit with HTTPS and TLS. +* `service/transcribe`: Updates service API, documentation, and paginators + +Release v1.13.27 (2018-04-03) +=== + +### Service Client Updates +* `service/devicefarm`: Updates service API and documentation + * Added Private Device Management feature. Customers can now manage their private devices efficiently - view their status, set labels and apply profiles on them. Customers can also schedule automated tests and remote access sessions on individual instances in their private device fleet. +* `service/lambda`: Updates service API and documentation + * added nodejs8.10 as a valid runtime +* `service/translate`: Updates service API and documentation + +Release v1.13.26 (2018-04-02) +=== + +### Service Client Updates +* `service/apigateway`: Updates service API and documentation + * Amazon API Gateway now supports resource policies for APIs making it easier to set access controls for invoking APIs. +* `service/cloudfront`: Adds new service + * You can now use a new Amazon CloudFront capability called Field-Level Encryption to further enhance the security of sensitive data, such as credit card numbers or personally identifiable information (PII) like social security numbers. CloudFront's field-level encryption further encrypts sensitive data in an HTTPS form using field-specific encryption keys (which you supply) before a POST request is forwarded to your origin. This ensures that sensitive data can only be decrypted and viewed by certain components or services in your application stack. Field-level encryption is easy to setup. Simply configure the fields that have to be further encrypted by CloudFront using the public keys you specify and you can reduce attack surface for your sensitive data. +* `service/es`: Updates service API and documentation + * This adds Amazon Cognito authentication support to Kibana. + +Release v1.13.25 (2018-03-30) +=== + +### Service Client Updates +* `service/acm`: Updates service API and documentation + * Documentation updates for acm +* `service/connect`: Adds new service +* `aws/endpoints`: Updated Regions and Endpoints metadata. + +Release v1.13.24 (2018-03-29) +=== + +### Service Client Updates +* `service/alexaforbusiness`: Updates service API, documentation, and paginators +* `service/cloudformation`: Updates service API and documentation + * Enabling resource level permission control for StackSets APIs. Adding support for customers to use customized AdministrationRole to create security boundaries between different users. +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/greengrass`: Updates service API and documentation + * Greengrass APIs now support creating Machine Learning resource types and configuring binary data as the input payload for Greengrass Lambda functions. +* `service/ssm`: Updates service API + * This Patch Manager release supports creating patch baselines for CentOS. + +Release v1.13.23 (2018-03-28) +=== + +### Service Client Updates +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/iam`: Updates service API and documentation + * Add support for Longer Role Sessions. Four APIs manage max session duration: GetRole, ListRoles, CreateRole, and the new API UpdateRole. The max session duration integer attribute is measured in seconds. +* `service/mturk-requester`: Updates service API and documentation +* `service/sts`: Updates service API and documentation + * Change utilizes the Max Session Duration attribute introduced for IAM Roles and allows STS customers to request session duration up to the Max Session Duration of 12 hours from AssumeRole based APIs. + +Release v1.13.22 (2018-03-27) +=== + +### Service Client Updates +* `service/acm`: Updates service API and documentation + * AWS Certificate Manager has added support for customers to disable Certificate Transparency logging on a per-certificate basis. +* `aws/endpoints`: Updated Regions and Endpoints metadata. + +Release v1.13.21 (2018-03-26) +=== + +### Service Client Updates +* `service/dynamodb`: Updates service API and documentation + * Point-in-time recovery (PITR) provides continuous backups of your DynamoDB table data. With PITR, you do not have to worry about creating, maintaining, or scheduling backups. You enable PITR on your table and your backup is available for restore at any point in time from the moment you enable it, up to a maximum of the 35 preceding days. PITR provides continuous backups until you explicitly disable it. For more information, see the Amazon DynamoDB Developer Guide. + +Release v1.13.20 (2018-03-23) +=== + +### Service Client Updates +* `service/rds`: Updates service documentation + * Documentation updates for RDS + +Release v1.13.19 (2018-03-22) +=== + +### Service Client Updates +* `service/appstream`: Updates service API and documentation + * Feedback URL allows admins to provide a feedback link or a survey link for collecting user feedback while streaming sessions. When a feedback link is provided, streaming users will see a "Send Feedback" choice in their streaming session toolbar. On selecting this choice, user will be redirected to the link provided in a new browser tab. If a feedback link is not provided, users will not see the "Send Feedback" option. +* `service/codebuild`: Updates service API and documentation + * Adding support for branch filtering when using webhooks with AWS CodeBuild. +* `service/ecs`: Updates service API and documentation + * Amazon Elastic Container Service (ECS) now includes integrated Service Discovery using Route 53 Auto Naming. Customers can now specify a Route 53 Auto Naming service as part of an ECS service. ECS will register task IPs with Route 53, making them available via DNS in your VPC. +* `aws/endpoints`: Updated Regions and Endpoints metadata. + +### SDK Bugs +* `aws/endpoints`: Use service metadata for fallback signing name ([#1854](https://github.com/aws/aws-sdk-go/pull/1854)) + * Updates the SDK's endpoint resolution to fallback deriving the service's signing name from the service's modeled metadata in addition the endpoints modeled data. + * Fixes [#1850](https://github.com/aws/aws-sdk-go/issues/1850) +Release v1.13.18 (2018-03-21) +=== + +### Service Client Updates +* `service/serverlessrepo`: Updates service documentation + +Release v1.13.17 (2018-03-20) +=== + +### Service Client Updates +* `service/ce`: Updates service API and documentation +* `service/config`: Updates service API and documentation +* `service/ecs`: Updates service API and documentation + * Amazon ECS users can now mount a temporary volume in memory in containers and specify the shared memory that a container can use through the use of docker's 'tmpfs' and 'shm-size' features respectively. These fields can be specified under linuxParameters in ContainerDefinition in the Task Definition Template. +* `service/elasticbeanstalk`: Updates service documentation + * Documentation updates for the new Elastic Beanstalk API DescribeAccountAttributes. +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/events`: Updates service API and documentation + * Added SQS FIFO queue target support +* `service/glue`: Updates service API and documentation + * API Updates for DevEndpoint: PublicKey is now optional for CreateDevEndpoint. The new DevEndpoint field PrivateAddress will be populated for DevEndpoints associated with a VPC. +* `service/medialive`: Updates service API and documentation + * AWS Elemental MediaLive has added support for updating Inputs and Input Security Groups. You can update Input Security Groups at any time and it will update all channels using that Input Security Group. Inputs can be updated as long as they are not attached to a currently running channel. + +Release v1.13.16 (2018-03-16) +=== + +### Service Client Updates +* `service/elasticbeanstalk`: Updates service API and documentation + * AWS Elastic Beanstalk is launching a new public API named DescribeAccountAttributes which allows customers to access account level attributes. In this release, the API will support quotas for resources such as applications, application versions, and environments. + +Release v1.13.15 (2018-03-15) +=== + +### Service Client Updates +* `service/organizations`: Updates service API and documentation + * This release adds additional reason codes to improve clarity to exceptions that can occur. +* `service/pinpoint`: Updates service API and documentation + * With this release, you can delete endpoints from your Amazon Pinpoint projects. Customers can now specify one of their leased dedicated long or short codes to send text messages. +* `service/sagemaker`: Updates service API, documentation, and paginators + * This release provides support for ml.p3.xlarge instance types for notebook instances. Lifecycle configuration is now available to customize your notebook instances on start; the configuration can be reused between multiple notebooks. If a notebook instance is attached to a VPC you can now opt out of internet access that by default is provided by SageMaker. + +Release v1.13.14 (2018-03-14) +=== + +### Service Client Updates +* `service/lightsail`: Updates service API and documentation + * Updates to existing Lightsail documentation + +Release v1.13.13 (2018-03-13) +=== + +### Service Client Updates +* `service/servicediscovery`: Updates service API and documentation + * This release adds support for custom health checks, which let you check the health of resources that aren't accessible over the internet. For example, you can use a custom health check when the instance is in an Amazon VPC. + +Release v1.13.12 (2018-03-12) +=== + +### Service Client Updates +* `service/cloudhsmv2`: Updates service API + * CreateCluster can now take both 8 and 17 character Subnet IDs. DeleteHsm can now take both 8 and 17 character ENI IDs. +* `service/discovery`: Updates service API and documentation + * Documentation updates for discovery +* `service/iot`: Updates service API and documentation + * We added new fields to the response of the following APIs. (1) describe-certificate: added new generationId, customerVersion fields (2) describe-ca-certificate: added new generationId, customerVersion and lastModifiedDate fields (3) get-policy: added generationId, creationDate and lastModifiedDate fields +* `service/redshift`: Updates service API and documentation + * DescribeClusterSnapshotsMessage with ClusterExists flag returns snapshots of existing clusters. Else both existing and deleted cluster snapshots are returned + +Release v1.13.11 (2018-03-08) +=== + +### Service Client Updates +* `service/AWSMigrationHub`: Updates service API and documentation +* `service/ecs`: Updates service API and documentation + * Amazon Elastic Container Service (ECS) now supports container health checks. Customers can now specify a docker container health check command and parameters in their task definition. ECS will monitor, report and take scheduling action based on the health status. +* `service/pinpoint`: Updates service API and documentation + * With this release, you can export endpoints from your Amazon Pinpoint projects. You can export a) all of the endpoints assigned to a project or b) the subset of endpoints assigned to a segment. +* `service/rds`: Updates service documentation + * Documentation updates for RDS + +Release v1.13.10 (2018-03-07) +=== + +### Service Client Updates +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/medialive`: Updates service API and documentation + * Updates API to model required traits and minimum/maximum constraints. + +Release v1.13.9 (2018-03-06) +=== + +### Service Client Updates +* `service/ecs`: Updates service documentation + * Documentation updates for Amazon ECS +* `aws/endpoints`: Updated Regions and Endpoints metadata. + +Release v1.13.8 (2018-03-01) +=== + +### Service Client Updates +* `service/ec2`: Updates service API and documentation + * Added support for modifying Placement Group association of instances via ModifyInstancePlacement API. +* `service/events`: Updates service API and documentation + * Added BatchParameters to the PutTargets API +* `service/servicecatalog`: Updates service API and documentation + * This release of ServiceCatalog adds the DeleteTagOption API. +* `service/ssm`: Updates service API and documentation + * This Inventory release supports the status message details reported by the last sync for the resource data sync API. +* `service/storagegateway`: Updates service API and documentation + * AWS Storage Gateway (File) support for two new file share attributes are added. 1. Users can specify the S3 Canned ACL to use for new objects created in the file share. 2. Users can create file shares for requester-pays buckets. + +Release v1.13.7 (2018-02-28) +=== + +### Service Client Updates +* `service/application-autoscaling`: Updates service API and documentation +* `aws/endpoints`: Updated Regions and Endpoints metadata. + +Release v1.13.6 (2018-02-27) +=== + +### Service Client Updates +* `service/ecr`: Updates service documentation + * Documentation updates for Amazon ECR. + +Release v1.13.5 (2018-02-26) +=== + +### Service Client Updates +* `service/route53`: Updates service API + * Added support for creating LBR rules using ap-northeast-3 region. +* `service/sts`: Updates service API and documentation + * Increased SAMLAssertion parameter size from 50000 to 100000 for AWS Security Token Service AssumeRoleWithSAML API to allow customers to pass bigger SAML assertions + +Release v1.13.4 (2018-02-23) +=== + +### Service Client Updates +* `service/appstream`: Updates service API and documentation + * This API update is to enable customers to copy their Amazon AppStream 2.0 images within and between AWS Regions +* `aws/endpoints`: Updated Regions and Endpoints metadata. + +Release v1.13.3 (2018-02-22) +=== + +### Service Client Updates +* `service/ce`: Updates service API and documentation +* `service/elasticloadbalancingv2`: Updates service documentation +* `aws/endpoints`: Updated Regions and Endpoints metadata. + +Release v1.13.2 (2018-02-21) +=== + +### Service Client Updates +* `service/codecommit`: Updates service API and documentation + * This release adds an API for adding a file directly to an AWS CodeCommit repository without requiring a Git client. +* `service/ec2`: Updates service API and documentation + * Adds support for tagging an EBS snapshot as part of the API call that creates the EBS snapshot +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/serverlessrepo`: Updates service API, documentation, and paginators + +Release v1.13.1 (2018-02-20) +=== + +### Service Client Updates +* `service/autoscaling`: Updates service API and documentation + * Amazon EC2 Auto Scaling support for service-linked roles +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/waf`: Updates service API and documentation + * The new PermissionPolicy APIs in AWS WAF Regional allow customers to attach resource-based policies to their entities. +* `service/waf-regional`: Updates service API and documentation + +Release v1.13.0 (2018-02-19) +=== + +### Service Client Updates +* `service/config`: Updates service API + * With this release, AWS Config updated the ConfigurationItemStatus enum values. The values prior to this update did not represent appropriate values returned by GetResourceConfigHistory. You must update your code to enumerate the new enum values so this is a breaking change. To map old properties to new properties, use the following descriptions: New discovered resource - Old property: Discovered, New property: ResourceDiscovered. Updated resource - Old property: Ok, New property: OK. Deleted resource - Old property: Deleted, New property: ResourceDeleted or ResourceDeletedNotRecorded. Not-recorded resource - Old property: N/A, New property: ResourceNotRecorded or ResourceDeletedNotRecorded. + +Release v1.12.79 (2018-02-16) +=== + +### Service Client Updates +* `service/rds`: Updates service API and documentation + * Updates RDS API to indicate whether a DBEngine supports read replicas. + +Release v1.12.78 (2018-02-15) +=== + +### Service Client Updates +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/gamelift`: Updates service API and documentation + * Updates to allow Fleets to run on On-Demand or Spot instances. +* `service/mediaconvert`: Updates service API and documentation + * Nielsen ID3 tags can now be inserted into transport stream (TS) and HLS outputs. For more information on Nielsen configuration you can go to https://docs.aws.amazon.com/mediaconvert/latest/apireference/jobs.html#jobs-nielsenconfiguration + +Release v1.12.77 (2018-02-14) +=== + +### Service Client Updates +* `service/appsync`: Updates service API and documentation +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/lex-models`: Updates service API and documentation + +Release v1.12.76 (2018-02-13) +=== + +### Service Client Updates +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/glacier`: Updates service documentation + * Documentation updates for glacier +* `service/route53`: Updates service API + * Added support for creating Private Hosted Zones and metric-based healthchecks in the ap-northeast-3 region for whitelisted customers. + +Release v1.12.75 (2018-02-12) +=== + +### Service Client Updates +* `service/cognito-idp`: Updates service API and documentation +* `service/ec2`: Updates service API and documentation + * Network interfaces now supply the following additional status of "associated" to better distinguish the current status. +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/guardduty`: Updates service API and documentation + * Added PortProbeAction information to the Action section of the port probe-type finding. +* `service/kms`: Updates service API + * This release of AWS Key Management Service includes support for InvalidArnException in the RetireGrant API. +* `service/rds`: Updates service documentation + * Aurora MySQL now supports MySQL 5.7. + +Release v1.12.74 (2018-02-09) +=== + +### Service Client Updates +* `service/ec2`: Updates service API and documentation + * Users can now better understand the longer ID opt-in status of their account using the two new APIs DescribeAggregateIdFormat and DescribePrincipalIdFormat +* `service/lex-models`: Updates service API and documentation +* `service/runtime.lex`: Updates service API and documentation + +Release v1.12.73 (2018-02-08) +=== + +### Service Client Updates +* `service/appstream`: Updates service API and documentation + * Adds support for allowing customers to provide a redirect URL for a stack. Users will be redirected to the link provided by the admin at the end of their streaming session. +* `service/budgets`: Updates service API and documentation + * Making budgetLimit and timePeriod optional, and updating budgets docs. +* `service/dms`: Updates service API, documentation, and paginators + * This release includes the addition of two new APIs: describe replication instance task logs and reboot instance. The first allows user to see how much storage each log for a task on a given instance is occupying. The second gives users the option to reboot the application software on the instance and force a fail over for MAZ instances to test robustness of their integration with our service. +* `service/ds`: Updates service API + * Updated the regex of some input parameters to support longer EC2 identifiers. +* `service/dynamodb`: Updates service API and documentation + * Amazon DynamoDB now supports server-side encryption using a default service key (alias/aws/dynamodb) from the AWS Key Management Service (KMS). AWS KMS is a service that combines secure, highly available hardware and software to provide a key management system scaled for the cloud. AWS KMS is used via the AWS Management Console or APIs to centrally create encryption keys, define the policies that control how keys can be used, and audit key usage to prove they are being used correctly. For more information, see the Amazon DynamoDB Developer Guide. +* `service/gamelift`: Updates service API and documentation + * Amazon GameLift FlexMatch added the StartMatchBackfill API. This API allows developers to add new players to an existing game session using the same matchmaking rules and player data that were used to initially create the session. +* `service/medialive`: Updates service API and documentation + * AWS Elemental MediaLive has added support for updating channel settings for idle channels. You can now update channel name, channel outputs and output destinations, encoder settings, user role ARN, and input specifications. Channel settings can be updated in the console or with API calls. Please note that running channels need to be stopped before they can be updated. We've also deprecated the 'Reserved' field. +* `service/mediastore`: Updates service API and documentation + * AWS Elemental MediaStore now supports per-container CORS configuration. + +Release v1.12.72 (2018-02-07) +=== + +### Service Client Updates +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/glue`: Updates service API and documentation + * This new feature will now allow customers to add a customized json classifier. They can specify a json path to indicate the object, array or field of the json documents they'd like crawlers to inspect when they crawl json files. +* `service/servicecatalog`: Updates service API, documentation, and paginators + * This release of Service Catalog adds SearchProvisionedProducts API and ProvisionedProductPlan APIs. +* `service/servicediscovery`: Updates service API and documentation + * This release adds support for registering CNAME record types and creating Route 53 alias records that route traffic to Amazon Elastic Load Balancers using Amazon Route 53 Auto Naming APIs. +* `service/ssm`: Updates service API and documentation + * This Patch Manager release supports configuring Linux repos as part of patch baselines, controlling updates of non-OS security packages and also creating patch baselines for SUSE12 + +### SDK Enhancements +* `private/model/api`: Add validation to ensure there is no duplication of services in models/apis ([#1758](https://github.com/aws/aws-sdk-go/pull/1758)) + * Prevents the SDK from mistakenly generating code a single service multiple times with different model versions. +* `example/service/ec2/instancesbyRegion`: Fix typos in example ([#1762](https://github.com/aws/aws-sdk-go/pull/1762)) +* `private/model/api`: removing SDK API reference crosslinks from input/output shapes. (#1765) + +### SDK Bugs +* `aws/session`: Fix bug in session.New not supporting AWS_SDK_LOAD_CONFIG ([#1770](https://github.com/aws/aws-sdk-go/pull/1770)) + * Fixes a bug in the session.New function that was not correctly sourcing the shared configuration files' path. + * Fixes [#1771](https://github.com/aws/aws-sdk-go/pull/1771) +Release v1.12.71 (2018-02-05) +=== + +### Service Client Updates +* `service/acm`: Updates service documentation + * Documentation updates for acm +* `service/cloud9`: Updates service documentation and examples + * API usage examples for AWS Cloud9. +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/kinesis`: Updates service API and documentation + * Using ListShards a Kinesis Data Streams customer or client can get information about shards in a data stream (including meta-data for each shard) without obtaining data stream level information. +* `service/opsworks`: Updates service API, documentation, and waiters + * AWS OpsWorks Stacks supports EBS encryption and HDD volume types. Also, a new DescribeOperatingSystems API is available, which lists all operating systems supported by OpsWorks Stacks. + +Release v1.12.70 (2018-01-26) +=== + +### Service Client Updates +* `service/devicefarm`: Updates service API and documentation + * Add InteractionMode in CreateRemoteAccessSession for DirectDeviceAccess feature. +* `service/medialive`: Updates service API and documentation + * Add InputSpecification to CreateChannel (specification of input attributes is used for channel sizing and affects pricing); add NotFoundException to DeleteInputSecurityGroups. +* `service/mturk-requester`: Updates service documentation + +Release v1.12.69 (2018-01-26) +=== + +### SDK Bugs +* `models/api`: Fix colliding names [#1754](https://github.com/aws/aws-sdk-go/pull/1754) [#1756](https://github.com/aws/aws-sdk-go/pull/1756) + * SDK had duplicate folders that were causing errors in some builds. + * Fixes [#1753](https://github.com/aws/aws-sdk-go/issues/1753) +Release v1.12.68 (2018-01-25) +=== + +### Service Client Updates +* `service/alexaforbusiness`: Updates service API and documentation +* `service/codebuild`: Updates service API and documentation + * Adding support for Shallow Clone and GitHub Enterprise in AWS CodeBuild. +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/guardduty`: Adds new service + * Added the missing AccessKeyDetails object to the resource shape. +* `service/lambda`: Updates service API and documentation + * AWS Lambda now supports Revision ID on your function versions and aliases, to track and apply conditional updates when you are updating your function version or alias resources. + +### SDK Bugs +* `service/s3/s3manager`: Fix check for nil OrigErr in Error() [#1749](https://github.com/aws/aws-sdk-go/issues/1749) + * S3 Manager's `Error` type did not check for nil of `OrigErr` when calling `Error()` + * Fixes [#1748](https://github.com/aws/aws-sdk-go/issues/1748) +Release v1.12.67 (2018-01-22) +=== + +### Service Client Updates +* `service/budgets`: Updates service API and documentation + * Add additional costTypes: IncludeDiscount, UseAmortized, to support finer control for different charges included in a cost budget. + +Release v1.12.66 (2018-01-19) +=== + +### Service Client Updates +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/glue`: Updates service API and documentation + * New AWS Glue DataCatalog APIs to manage table versions and a new feature to skip archiving of the old table version when updating table. +* `service/transcribe`: Adds new service + +Release v1.12.65 (2018-01-18) +=== + +### Service Client Updates +* `service/sagemaker`: Updates service API and documentation + * CreateTrainingJob and CreateEndpointConfig now supports KMS Key for volume encryption. + +Release v1.12.64 (2018-01-17) +=== + +### Service Client Updates +* `service/autoscaling-plans`: Updates service documentation +* `service/ec2`: Updates service documentation + * Documentation updates for EC2 + +Release v1.12.63 (2018-01-17) +=== + +### Service Client Updates +* `service/application-autoscaling`: Updates service API and documentation +* `service/autoscaling-plans`: Adds new service +* `service/rds`: Updates service API and documentation + * With this release you can now integrate RDS DB instances with CloudWatch Logs. We have added parameters to the operations for creating and modifying DB instances (for example CreateDBInstance) to allow you to take advantage of this capability through the CLI and API. Once you enable this feature, a stream of log events will publish to CloudWatch Logs for each log type you enable. + +Release v1.12.62 (2018-01-15) +=== + +### Service Client Updates +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/lambda`: Updates service API and documentation + * Support for creating Lambda Functions using 'dotnetcore2.0' and 'go1.x'. + +Release v1.12.61 (2018-01-12) +=== + +### Service Client Updates +* `service/glue`: Updates service API and documentation + * Support is added to generate ETL scripts in Scala which can now be run by AWS Glue ETL jobs. In addition, the trigger API now supports firing when any conditions are met (in addition to all conditions). Also, jobs can be triggered based on a "failed" or "stopped" job run (in addition to a "succeeded" job run). + +Release v1.12.60 (2018-01-11) +=== + +### Service Client Updates +* `service/elasticloadbalancing`: Updates service API and documentation +* `service/elasticloadbalancingv2`: Updates service API and documentation +* `service/rds`: Updates service API and documentation + * Read Replicas for Amazon RDS for MySQL, MariaDB, and PostgreSQL now support Multi-AZ deployments.Amazon RDS Read Replicas enable you to create one or more read-only copies of your database instance within the same AWS Region or in a different AWS Region. Updates made to the source database are asynchronously copied to the Read Replicas. In addition to providing scalability for read-heavy workloads, you can choose to promote a Read Replica to become standalone a DB instance when needed.Amazon RDS Multi-AZ Deployments provide enhanced availability for database instances within a single AWS Region. With Multi-AZ, your data is synchronously replicated to a standby in a different Availability Zone (AZ). In case of an infrastructure failure, Amazon RDS performs an automatic failover to the standby, minimizing disruption to your applications.You can now combine Read Replicas with Multi-AZ as part of a disaster recovery strategy for your production databases. A well-designed and tested plan is critical for maintaining business continuity after a disaster. Since Read Replicas can also be created in different regions than the source database, your Read Replica can be promoted to become the new production database in case of a regional disruption.You can also combine Read Replicas with Multi-AZ for your database engine upgrade process. You can create a Read Replica of your production database instance and upgrade it to a new database engine version. When the upgrade is complete, you can stop applications, promote the Read Replica to a standalone database instance and switch over your applications. Since the database instance is already a Multi-AZ deployment, no additional steps are needed.For more information, see the Amazon RDS User Guide. +* `service/ssm`: Updates service documentation + * Updates documentation for the HierarchyLevelLimitExceededException error. + +Release v1.12.59 (2018-01-09) +=== + +### Service Client Updates +* `service/kms`: Updates service documentation + * Documentation updates for AWS KMS + +Release v1.12.58 (2018-01-09) +=== + +### Service Client Updates +* `service/ds`: Updates service API and documentation + * On October 24 we introduced AWS Directory Service for Microsoft Active Directory (Standard Edition), also known as AWS Microsoft AD (Standard Edition), which is a managed Microsoft Active Directory (AD) that is optimized for small and midsize businesses (SMBs). With this SDK release, you can now create an AWS Microsoft AD directory using API. This enables you to run typical SMB workloads using a cost-effective, highly available, and managed Microsoft AD in the AWS Cloud. + +Release v1.12.57 (2018-01-08) +=== + +### Service Client Updates +* `service/codedeploy`: Updates service API and documentation + * The AWS CodeDeploy API was updated to support DeleteGitHubAccountToken, a new method that deletes a GitHub account connection. +* `service/discovery`: Updates service API and documentation + * Documentation updates for AWS Application Discovery Service. +* `service/route53`: Updates service API and documentation + * This release adds an exception to the CreateTrafficPolicyVersion API operation. + +Release v1.12.56 (2018-01-05) +=== + +### Service Client Updates +* `service/inspector`: Updates service API, documentation, and examples + * Added 2 new attributes to the DescribeAssessmentTemplate response, indicating the total number of assessment runs and last assessment run ARN (if present.) +* `service/snowball`: Updates service documentation + * Documentation updates for snowball +* `service/ssm`: Updates service documentation + * Documentation updates for ssm + +Release v1.12.55 (2018-01-02) +=== + +### Service Client Updates +* `service/rds`: Updates service documentation + * Documentation updates for rds + +Release v1.12.54 (2017-12-29) +=== + +### Service Client Updates +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/workspaces`: Updates service API and documentation + * Modify WorkSpaces have been updated with flexible storage and switching of hardware bundles feature. The following configurations have been added to ModifyWorkSpacesProperties: storage and compute. This update provides the capability to configure the storage of a WorkSpace. It also adds the capability of switching hardware bundle of a WorkSpace by specifying an eligible compute (Value, Standard, Performance, Power). + +Release v1.12.53 (2017-12-22) +=== + +### Service Client Updates +* `service/ec2`: Updates service API + * This release fixes an issue with tags not showing in DescribeAddresses responses. +* `service/ecs`: Updates service API and documentation + * Amazon ECS users can now set a health check initialization wait period of their ECS services, the services that are associated with an Elastic Load Balancer (ELB) will wait for a period of time before the ELB become healthy. You can now configure this in Create and Update Service. +* `service/inspector`: Updates service API and documentation + * PreviewAgents API now returns additional fields within the AgentPreview data type. The API now shows the agent health and availability status for all instances included in the assessment target. This allows users to check the health status of Inspector Agents before running an assessment. In addition, it shows the instance ID, hostname, and IP address of the targeted instances. +* `service/sagemaker`: Updates service API and documentation + * SageMaker Models no longer support SupplementalContainers. API's that have been affected are CreateModel and DescribeModel. + +Release v1.12.52 (2017-12-21) +=== + +### Service Client Updates +* `service/codebuild`: Updates service API and documentation + * Adding support allowing AWS CodeBuild customers to select specific curated image versions. +* `service/ec2`: Updates service API and documentation + * Elastic IP tagging enables you to add key and value metadata to your Elastic IPs so that you can search, filter, and organize them according to your organization's needs. +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/kinesisanalytics`: Updates service API and documentation + * Kinesis Analytics now supports AWS Lambda functions as output. + +Release v1.12.51 (2017-12-21) +=== + +### Service Client Updates +* `service/config`: Updates service API +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/iot`: Updates service API and documentation + * This release adds support for code signed Over-the-air update functionality for Amazon FreeRTOS. Users can now create and schedule Over-the-air updates to their Amazon FreeRTOS devices using these new APIs. + +Release v1.12.50 (2017-12-19) +=== + +### Service Client Updates +* `service/apigateway`: Updates service API and documentation + * API Gateway now adds support for calling API with compressed payloads using one of the supported content codings, tagging an API stage for cost allocation, and returning API keys from a custom authorizer for use with a usage plan. +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/mediastore-data`: Updates service documentation +* `service/route53`: Updates service API and documentation + * Route 53 added support for a new China (Ningxia) region, cn-northwest-1. You can now specify cn-northwest-1 as the region for latency-based or geoproximity routing. Route 53 also added support for a new EU (Paris) region, eu-west-3. You can now associate VPCs in eu-west-3 with private hosted zones and create alias records that route traffic to resources in eu-west-3. + +Release v1.12.49 (2017-12-19) +=== + +### Service Client Updates +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/monitoring`: Updates service documentation + * Documentation updates for monitoring + +Release v1.12.48 (2017-12-15) +=== + +### Service Client Updates +* `service/appstream`: Updates service API and documentation + * This API update is to enable customers to add tags to their Amazon AppStream 2.0 resources + +Release v1.12.47 (2017-12-14) +=== + +### Service Client Updates +* `service/apigateway`: Updates service API and documentation + * Adds support for Cognito Authorizer scopes at the API method level. +* `service/email`: Updates service documentation + * Added information about the maximum number of transactions per second for the SendCustomVerificationEmail operation. +* `aws/endpoints`: Updated Regions and Endpoints metadata. + +Release v1.12.46 (2017-12-12) +=== + +### Service Client Updates +* `service/workmail`: Adds new service + * Today, Amazon WorkMail released an administrative SDK and enabled AWS CloudTrail integration. With the administrative SDK, you can natively integrate WorkMail with your existing services. The SDK enables programmatic user, resource, and group management through API calls. This means your existing IT tools and workflows can now automate WorkMail management, and third party applications can streamline WorkMail migrations and account actions. + +Release v1.12.45 (2017-12-11) +=== + +### Service Client Updates +* `service/cognito-idp`: Updates service API and documentation +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/lex-models`: Updates service API and documentation +* `service/sagemaker`: Updates service API + * CreateModel API Update: The request parameter 'ExecutionRoleArn' has changed from optional to required. + +Release v1.12.44 (2017-12-08) +=== + +### Service Client Updates +* `service/appstream`: Updates service API and documentation + * This API update is to support the feature that allows customers to automatically consume the latest Amazon AppStream 2.0 agent as and when published by AWS. +* `service/ecs`: Updates service documentation + * Documentation updates for Windows containers. +* `service/monitoring`: Updates service API and documentation + * With this launch, you can now create a CloudWatch alarm that alerts you when M out of N datapoints of a metric are breaching your predefined threshold, such as three out of five times in any given five minutes interval or two out of six times in a thirty minutes interval. When M out of N datapoints are not breaching your threshold in an interval, the alarm will be in OK state. Please note that the M datapoints out of N datapoints in an interval can be of any order and does not need to be consecutive. Consequently, you can now get alerted even when the spikes in your metrics are intermittent over an interval. + +Release v1.12.43 (2017-12-07) +=== + +### Service Client Updates +* `service/email`: Updates service API, documentation, and paginators + * Customers can customize the emails that Amazon SES sends when verifying new identities. This feature is helpful for developers whose applications send email through Amazon SES on behalf of their customers. +* `service/es`: Updates service API and documentation + * Added support for encryption of data at rest on Amazon Elasticsearch Service using AWS KMS + +### SDK Bugs +* `models/apis` Fixes removes colliding sagemaker models folders ([#1686](https://github.com/aws/aws-sdk-go/pull/1686)) + * Fixes Release v1.12.42's SageMaker vs sagemaker model folders. +Release v1.12.42 (2017-12-06) +=== + +### Service Client Updates +* `service/clouddirectory`: Updates service API and documentation + * Amazon Cloud Directory makes it easier for you to apply schema changes across your directories with in-place schema upgrades. Your directories now remain available while backward-compatible schema changes are being applied, such as the addition of new fields. You also can view the history of your schema changes in Cloud Directory by using both major and minor version identifiers, which can help you track and audit schema versions across directories. +* `service/elasticbeanstalk`: Updates service documentation + * Documentation updates for AWS Elastic Beanstalk. +* `service/sagemaker`: Adds new service + * Initial waiters for common SageMaker workflows. + +Release v1.12.41 (2017-12-05) +=== + +### Service Client Updates +* `service/iot`: Updates service API and documentation + * Add error action API for RulesEngine. +* `service/servicecatalog`: Updates service API and documentation + * ServiceCatalog has two distinct personas for its use, an "admin" persona (who creates sets of products with different versions and prescribes who has access to them) and an "end-user" persona (who can launch cloud resources based on the configuration data their admins have given them access to). This API update will allow admin users to deactivate/activate product versions, end-user will only be able to access and launch active product versions. +* `service/servicediscovery`: Adds new service + * Amazon Route 53 Auto Naming lets you configure public or private namespaces that your microservice applications run in. When instances of the service become available, you can call the Auto Naming API to register the instance, and Amazon Route 53 automatically creates up to five DNS records and an optional health check. Clients that submit DNS queries for the service receive an answer that contains up to eight healthy records. + +Release v1.12.40 (2017-12-04) +=== + +### Service Client Updates +* `service/budgets`: Updates service API and documentation + * Add additional costTypes to support finer control for different charges included in a cost budget. +* `service/ecs`: Updates service documentation + * Documentation updates for ecs + +Release v1.12.39 (2017-12-01) +=== + +### Service Client Updates +* `service/SageMaker`: Updates service waiters + +Release v1.12.38 (2017-11-30) +=== + +### Service Client Updates +* `service/AWSMoneypenny`: Adds new service +* `service/Cloud9`: Adds new service +* `service/Serverless Registry`: Adds new service +* `service/apigateway`: Updates service API, documentation, and paginators + * Added support Private Integration and VPC Link features in API Gateway. This allows to create an API with the API Gateway private integration, thus providing clients access to HTTP/HTTPS resources in an Amazon VPC from outside of the VPC through a VpcLink resource. +* `service/ec2`: Updates service API and documentation + * Adds the following updates: 1. Spread Placement ensures that instances are placed on distinct hardware in order to reduce correlated failures. 2. Inter-region VPC Peering allows customers to peer VPCs across different AWS regions without requiring additional gateways, VPN connections or physical hardware +* `service/lambda`: Updates service API and documentation + * AWS Lambda now supports the ability to set the concurrency limits for individual functions, and increasing memory to 3008 MB. + +Release v1.12.37 (2017-11-30) +=== + +### Service Client Updates +* `service/Ardi`: Adds new service +* `service/autoscaling`: Updates service API and documentation + * You can now use Auto Scaling with EC2 Launch Templates via the CreateAutoScalingGroup and UpdateAutoScalingGroup APIs. +* `service/ec2`: Updates service API and documentation + * Adds the following updates: 1. T2 Unlimited enables high CPU performance for any period of time whenever required 2. You are now able to create and launch EC2 m5 and h1 instances +* `service/lightsail`: Updates service API and documentation + * This release adds support for load balancer and TLS/SSL certificate management. This set of APIs allows customers to create, manage, and scale secure load balanced applications on Lightsail infrastructure. To provide support for customers who manage their DNS on Lightsail, we've added the ability create an Alias A type record which can point to a load balancer DNS name via the CreateDomainEntry API http://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_CreateDomainEntry.html. +* `service/ssm`: Updates service API and documentation + * This release updates AWS Systems Manager APIs to enable executing automations at controlled rate, target resources in a resource groups and execute entire automation at once or single step at a time. It is now also possible to use YAML, in addition to JSON, when creating Systems Manager documents. +* `service/waf`: Updates service API and documentation + * This release adds support for rule group and managed rule group. Rule group is a container of rules that customers can create, put rules in it and associate the rule group to a WebACL. All rules in a rule group will function identically as they would if each rule was individually associated to the WebACL. Managed rule group is a pre-configured rule group composed by our security partners and made available via the AWS Marketplace. Customers can subscribe to these managed rule groups, associate the managed rule group to their WebACL and start using them immediately to protect their resources. +* `service/waf-regional`: Updates service API and documentation + +Release v1.12.36 (2017-11-29) +=== + +### Service Client Updates +* `service/DeepInsight`: Adds new service +* `service/IronmanRuntime`: Adds new service +* `service/Orchestra - Laser`: Adds new service +* `service/SageMaker`: Adds new service +* `service/Shine`: Adds new service +* `service/archived.kinesisvideo`: Adds new service +* `service/data.kinesisvideo`: Adds new service +* `service/dynamodb`: Updates service API and documentation + * Amazon DynamoDB now supports the following features: Global Table and On-Demand Backup. Global Table is a fully-managed, multi-region, multi-master database. DynamoDB customers can now write anywhere and read anywhere with single-digit millisecond latency by performing database operations closest to where end users reside. Global Table also enables customers to disaster-proof their applications, keeping them running and data accessible even in the face of natural disasters or region disruptions. Customers can set up Global Table with just a few clicks in the AWS Management Console-no application rewrites required. On-Demand Backup capability is to protect data from loss due to application errors, and meet customers' archival needs for compliance and regulatory reasons. Customers can backup and restore their DynamoDB table data anytime, with a single-click in the AWS management console or a single API call. Backup and restore actions execute with zero impact on table performance or availability. For more information, see the Amazon DynamoDB Developer Guide. +* `service/ecs`: Updates service API and documentation + * Amazon Elastic Container Service (Amazon ECS) released a new launch type for running containers on a serverless infrastructure. The Fargate launch type allows you to run your containerized applications without the need to provision and manage the backend infrastructure. Just register your task definition and Fargate launches the container for you. +* `service/glacier`: Updates service API and documentation + * This release includes support for Glacier Select, a new feature that allows you to filter and analyze your Glacier archives and store the results in a user-specified S3 location. +* `service/greengrass`: Updates service API and documentation + * Greengrass OTA feature allows updating Greengrass Core and Greengrass OTA Agent. Local Resource Access feature allows Greengrass Lambdas to access local resources such as peripheral devices and volumes. +* `service/iot`: Updates service API and documentation + * This release adds support for a number of new IoT features, including AWS IoT Device Management (Jobs, Fleet Index and Thing Registration), Thing Groups, Policies on Thing Groups, Registry & Job Events, JSON Logs, Fine-Grained Logging Controls, Custom Authorization and AWS Service Authentication Using X.509 Certificates. +* `service/kinesisvideo`: Adds new service + * Announcing Amazon Kinesis Video Streams, a fully managed video ingestion and storage service. Kinesis Video Streams makes it easy to securely stream video from connected devices to AWS for machine learning, analytics, and processing. You can also stream other time-encoded data like RADAR and LIDAR signals using Kinesis Video Streams. +* `service/rekognition`: Updates service API, documentation, and paginators + * This release introduces Amazon Rekognition support for video analysis. +* `service/s3`: Updates service API and documentation + * This release includes support for Glacier Select, a new feature that allows you to filter and analyze your Glacier storage class objects and store the results in a user-specified S3 location. + +Release v1.12.35 (2017-11-29) +=== + +### Service Client Updates +* `service/AmazonMQ`: Adds new service +* `service/GuardDuty`: Adds new service +* `service/apigateway`: Updates service API and documentation + * Changes related to CanaryReleaseDeployment feature. Enables API developer to create a deployment as canary deployment and test API changes with percentage of customers before promoting changes to all customers. +* `service/batch`: Updates service API and documentation + * Add support for Array Jobs which allow users to easily submit many copies of a job with a single API call. This change also enhances the job dependency model to support N_TO_N and sequential dependency chains. The ListJobs and DescribeJobs APIs now have the ability to list or describe the status of entire Array Jobs or individual elements within the array. +* `service/cognito-idp`: Updates service API and documentation +* `service/deepdish`: Adds new service + * AWS AppSync is an enterprise-level, fully managed GraphQL service with real-time data synchronization and offline programming features. +* `service/ec2`: Updates service API and documentation + * Adds the following updates: 1. You are now able to host a service powered by AWS PrivateLink to provide private connectivity to other VPCs. You are now also able to create endpoints to other services powered by PrivateLink including AWS services, Marketplace Seller services or custom services created by yourself or other AWS VPC customers. 2. You are now able to save launch parameters in a single template that can be used with Auto Scaling, Spot Fleet, Spot, and On Demand instances. 3. You are now able to launch Spot instances via the RunInstances API, using a single additional parameter. RunInstances will response synchronously with an instance ID should capacity be available for your Spot request. 4. A simplified Spot pricing model which delivers low, predictable prices that adjust gradually, based on long-term trends in supply and demand. 5. Amazon EC2 Spot can now hibernate Amazon EBS-backed instances in the event of an interruption, so your workloads pick up from where they left off. Spot can fulfill your request by resuming instances from a hibernated state when capacity is available. +* `service/lambda`: Updates service API and documentation + * Lambda aliases can now shift traffic between two function versions, based on preassigned weights. + +Release v1.12.34 (2017-11-27) +=== + +### Service Client Updates +* `service/data.mediastore`: Adds new service +* `service/mediaconvert`: Adds new service + * AWS Elemental MediaConvert is a file-based video conversion service that transforms media into formats required for traditional broadcast and for internet streaming to multi-screen devices. +* `service/medialive`: Adds new service + * AWS Elemental MediaLive is a video service that lets you easily create live outputs for broadcast and streaming delivery. +* `service/mediapackage`: Adds new service + * AWS Elemental MediaPackage is a just-in-time video packaging and origination service that lets you format highly secure and reliable live outputs for a variety of devices. +* `service/mediastore`: Adds new service + * AWS Elemental MediaStore is an AWS storage service optimized for media. It gives you the performance, consistency, and low latency required to deliver live and on-demand video content. AWS Elemental MediaStore acts as the origin store in your video workflow. + +Release v1.12.33 (2017-11-22) +=== + +### Service Client Updates +* `service/acm`: Updates service API and documentation + * AWS Certificate Manager now supports the ability to import domainless certs and additional Key Types as well as an additional validation method for DNS. +* `aws/endpoints`: Updated Regions and Endpoints metadata. + +Release v1.12.32 (2017-11-22) +=== + +### Service Client Updates +* `service/apigateway`: Updates service API and documentation + * Add support for Access logs and customizable integration timeouts +* `service/cloudformation`: Updates service API and documentation + * 1) Instance-level parameter overrides (CloudFormation-StackSet feature): This feature will allow the customers to override the template parameters on specific stackInstances. Customers will also have ability to update their existing instances with/without parameter-overrides using a new API "UpdateStackInstances" 2) Add support for SSM parameters in CloudFormation - This feature will allow the customers to use Systems Manager parameters in CloudFormation templates. They will be able to see values for these parameters in Describe APIs. +* `service/codebuild`: Updates service API and documentation + * Adding support for accessing Amazon VPC resources from AWS CodeBuild, dependency caching and build badges. +* `service/elasticmapreduce`: Updates service API and documentation + * Enable Kerberos on Amazon EMR. +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/rekognition`: Updates service API and documentation + * This release includes updates to Amazon Rekognition for the following APIs. The new DetectText API allows you to recognize and extract textual content from images. Face Model Versioning has been added to operations that deal with face detection. +* `service/shield`: Updates service API, documentation, and paginators + * The AWS Shield SDK has been updated in order to support Elastic IP address protections, the addition of AttackProperties objects in DescribeAttack responses, and a new GetSubscriptionState operation. +* `service/storagegateway`: Updates service API and documentation + * AWS Storage Gateway now enables you to get notification when all your files written to your NFS file share have been uploaded to Amazon S3. Storage Gateway also enables guessing of the MIME type for uploaded objects based on file extensions. +* `service/xray`: Updates service API, documentation, and paginators + * Added automatic pagination support for AWS X-Ray APIs in the SDKs that support this feature. + +Release v1.12.31 (2017-11-20) +=== + +### Service Client Updates +* `service/apigateway`: Updates service documentation + * Documentation updates for Apigateway +* `service/codecommit`: Updates service API, documentation, and paginators + * AWS CodeCommit now supports pull requests. You can use pull requests to collaboratively review code changes for minor changes or fixes, major feature additions, or new versions of your released software. +* `service/firehose`: Updates service API and documentation + * This release includes a new Kinesis Firehose feature that supports Splunk as Kinesis Firehose delivery destination. You can now use Kinesis Firehose to ingest real-time data to Splunk in a serverless, reliable, and salable manner. This release also includes a new feature that allows you to configure Lambda buffer size in Kinesis Firehose data transformation feature. You can now customize the data buffer size before invoking Lambda function in Kinesis Firehose for data transformation. This feature allows you to flexibly trade-off processing and delivery latency with cost and efficiency based on your specific use cases and requirements. +* `service/iis`: Adds new service + * The AWS Cost Explorer API gives customers programmatic access to AWS cost and usage information, allowing them to perform adhoc queries and build interactive cost management applications that leverage this dataset. +* `service/kinesis`: Updates service API and documentation + * Customers can now obtain the important characteristics of their stream with DescribeStreamSummary. The response will not include the shard list for the stream but will have the number of open shards, and all the other fields included in the DescribeStream response. +* `service/workdocs`: Updates service API and documentation + * DescribeGroups API and miscellaneous enhancements + +### SDK Bugs +* `aws/client`: Retry delays for throttled exception were not limited to 5 minutes [#1654](https://github.com/aws/aws-sdk-go/pull/1654) + * Fixes [#1653](https://github.com/aws/aws-sdk-go/issues/1653) +Release v1.12.30 (2017-11-17) +=== + +### Service Client Updates +* `service/application-autoscaling`: Updates service API and documentation +* `service/dms`: Updates service API, documentation, and paginators + * Support for migration task assessment. Support for data validation after the migration. +* `service/elasticloadbalancingv2`: Updates service API and documentation +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/rds`: Updates service API and documentation + * Amazon RDS now supports importing MySQL databases by using backup files from Amazon S3. +* `service/s3`: Updates service API + * Added ORC to the supported S3 Inventory formats. + +### SDK Bugs +* `private/protocol/restjson`: Define JSONValue marshaling for body and querystring ([#1640](https://github.com/aws/aws-sdk-go/pull/1640)) + * Adds support for APIs which use JSONValue for body and querystring targets. + * Fixes [#1636](https://github.com/aws/aws-sdk-go/issues/1636) +Release v1.12.29 (2017-11-16) +=== + +### Service Client Updates +* `service/application-autoscaling`: Updates service API and documentation +* `service/ec2`: Updates service API + * You are now able to create and launch EC2 x1e smaller instance sizes +* `service/glue`: Updates service API and documentation + * API update for AWS Glue. New crawler configuration attribute enables customers to specify crawler behavior. New XML classifier enables classification of XML data. +* `service/opsworkscm`: Updates service API, documentation, and waiters + * Documentation updates for OpsWorks-cm: a new feature, OpsWorks for Puppet Enterprise, that allows users to create and manage OpsWorks-hosted Puppet Enterprise servers. +* `service/organizations`: Updates service API, documentation, and paginators + * This release adds APIs that you can use to enable and disable integration with AWS services designed to work with AWS Organizations. This integration allows the AWS service to perform operations on your behalf on all of the accounts in your organization. Although you can use these APIs yourself, we recommend that you instead use the commands provided in the other AWS service to enable integration with AWS Organizations. +* `service/route53`: Updates service API and documentation + * You can use Route 53's GetAccountLimit/GetHostedZoneLimit/GetReusableDelegationSetLimit APIs to view your current limits (including custom set limits) on Route 53 resources such as hosted zones and health checks. These APIs also return the number of each resource you're currently using to enable comparison against your current limits. + +Release v1.12.28 (2017-11-15) +=== + +### Service Client Updates +* `service/apigateway`: Updates service API and documentation + * 1. Extended GetDocumentationParts operation to support retrieving documentation parts resources without contents. 2. Added hosted zone ID in the custom domain response. +* `service/email`: Updates service API, documentation, and examples + * SES launches Configuration Set Reputation Metrics and Email Pausing Today, two features that build upon the capabilities of the reputation dashboard. The first is the ability to export reputation metrics for individual configuration sets. The second is the ability to temporarily pause email sending, either at the configuration set level, or across your entire Amazon SES account. +* `service/polly`: Updates service API + * Amazon Polly adds Korean language support with new female voice - "Seoyeon" and new Indian English female voice - "Aditi" +* `service/states`: Updates service API and documentation + * You can now use the UpdateStateMachine API to update your state machine definition and role ARN. Existing executions will continue to use the previous definition and role ARN. You can use the DescribeStateMachineForExecution API to determine which state machine definition and role ARN is associated with an execution + +Release v1.12.27 (2017-11-14) +=== + +### Service Client Updates +* `service/ecs`: Updates service API and documentation + * Added new mode for Task Networking in ECS, called awsvpc mode. Mode configuration parameters to be passed in via awsvpcConfiguration. Updated APIs now use/show this new mode - RegisterTaskDefinition, CreateService, UpdateService, RunTask, StartTask. +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/lightsail`: Updates service API and documentation + * Lightsail now supports attached block storage, which allows you to scale your applications and protect application data with additional SSD-backed storage disks. This feature allows Lightsail customers to attach secure storage disks to their Lightsail instances and manage their attached disks, including creating and deleting disks, attaching and detaching disks from instances, and backing up disks via snapshot. +* `service/route53`: Updates service API and documentation + * When a Route 53 health check or hosted zone is created by a linked AWS service, the object now includes information about the service that created it. Hosted zones or health checks that are created by a linked service can't be updated or deleted using Route 53. +* `service/ssm`: Updates service API and documentation + * EC2 Systems Manager GetInventory API adds support for aggregation. + +### SDK Enhancements +* `aws/request`: Remove default port from HTTP host header ([#1618](https://github.com/aws/aws-sdk-go/pull/1618)) + * Updates the SDK to automatically remove default ports based on the URL's scheme when setting the HTTP Host header's value. + * Fixes [#1537](https://github.com/aws/aws-sdk-go/issues/1537) + +Release v1.12.26 (2017-11-09) +=== + +### Service Client Updates +* `service/ec2`: Updates service API and documentation + * Introduces the following features: 1. Create a default subnet in an Availability Zone if no default subnet exists. 2. Spot Fleet integrates with Elastic Load Balancing to enable you to attach one or more load balancers to a Spot Fleet request. When you attach the load balancer, it automatically registers the instance in the Spot Fleet to the load balancers which distributes incoming traffic across the instances. +* `aws/endpoints`: Updated Regions and Endpoints metadata. + +Release v1.12.25 (2017-11-08) +=== + +### Service Client Updates +* `service/application-autoscaling`: Updates service API and documentation +* `service/batch`: Updates service documentation + * Documentation updates for AWS Batch. +* `service/ec2`: Updates service API and documentation + * AWS PrivateLink for Amazon Services - Customers can now privately access Amazon services from their Amazon Virtual Private Cloud (VPC), without using public IPs, and without requiring the traffic to traverse across the Internet. +* `service/elasticache`: Updates service API and documentation + * This release adds online resharding for ElastiCache for Redis offering, providing the ability to add and remove shards from a running cluster. Developers can now dynamically scale-out or scale-in their Redis cluster workloads to adapt to changes in demand. ElastiCache will resize the cluster by adding or removing shards and redistribute hash slots uniformly across the new shard configuration, all while the cluster continues to stay online and serves requests. +* `aws/endpoints`: Updated Regions and Endpoints metadata. + +Release v1.12.24 (2017-11-07) +=== + +### Service Client Updates +* `service/elasticloadbalancingv2`: Updates service documentation +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/rds`: Updates service API and documentation + * DescribeOrderableDBInstanceOptions now returns the minimum and maximum allowed values for storage size, total provisioned IOPS, and provisioned IOPS per GiB for a DB instance. +* `service/s3`: Updates service API, documentation, and examples + * This releases adds support for 4 features: 1. Default encryption for S3 Bucket, 2. Encryption status in inventory and Encryption support for inventory. 3. Cross region replication of KMS-encrypted objects, and 4. ownership overwrite for CRR. + +Release v1.12.23 (2017-11-07) +=== + +### Service Client Updates +* `service/api.pricing`: Adds new service +* `service/ec2`: Updates service API + * You are now able to create and launch EC2 C5 instances, the next generation of EC2's compute-optimized instances, in us-east-1, us-west-2 and eu-west-1. C5 instances offer up to 72 vCPUs, 144 GiB of DDR4 instance memory, 25 Gbps in Network bandwidth and improved EBS and Networking bandwidth on smaller instance sizes to deliver improved performance for compute-intensive workloads. +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/kms`: Updates service API, documentation, and examples + * Documentation updates for AWS KMS. +* `service/organizations`: Updates service documentation + * This release updates permission statements for several API operations, and corrects some other minor errors. +* `service/states`: Updates service API, documentation, and paginators + * Documentation update. + +Release v1.12.22 (2017-11-03) +=== + +### Service Client Updates +* `service/ecs`: Updates service API and documentation + * Amazon ECS users can now add devices to their containers and enable init process in containers through the use of docker's 'devices' and 'init' features. These fields can be specified under linuxParameters in ContainerDefinition in the Task Definition Template. +* `aws/endpoints`: Updated Regions and Endpoints metadata. + +Release v1.12.21 (2017-11-02) +=== + +### Service Client Updates +* `service/apigateway`: Updates service API and documentation + * This release supports creating and managing Regional and Edge-Optimized API endpoints. +* `aws/endpoints`: Updated Regions and Endpoints metadata. + +### SDK Bugs +* `aws/request`: Fix bug in request presign creating invalid URL ([#1624](https://github.com/aws/aws-sdk-go/pull/1624)) + * Fixes a bug the Request Presign and PresignRequest methods that would allow a invalid expire duration as input. A expire time of 0 would be interpreted by the SDK to generate a normal request signature, not a presigned URL. This caused the returned URL unusable. + * Fixes [#1617](https://github.com/aws/aws-sdk-go/issues/1617) +Release v1.12.20 (2017-11-01) +=== + +### Service Client Updates +* `service/acm`: Updates service documentation + * Documentation updates for ACM +* `service/cloudhsmv2`: Updates service documentation + * Minor documentation update for AWS CloudHSM (cloudhsmv2). +* `service/directconnect`: Updates service API and documentation + * AWS DirectConnect now provides support for Global Access for Virtual Private Cloud (VPC) via a new feature called Direct Connect Gateway. A Direct Connect Gateway will allow you to group multiple Direct Connect Private Virtual Interfaces (DX-VIF) and Private Virtual Gateways (VGW) from different AWS regions (but belonging to the same AWS Account) and pass traffic from any DX-VIF to any VPC in the grouping. +* `aws/endpoints`: Updated Regions and Endpoints metadata. + +### SDK Enhancements +* `aws/client`: Adding status code 429 to throttlable status codes in default retryer (#1621) + +Release v1.12.19 (2017-10-26) +=== + +### Service Client Updates +* `aws/endpoints`: Updated Regions and Endpoints metadata. + +Release v1.12.18 (2017-10-26) +=== + +### Service Client Updates +* `service/cloudfront`: Updates service API and documentation + * You can now specify additional options for MinimumProtocolVersion, which controls the SSL/TLS protocol that CloudFront uses to communicate with viewers. The minimum protocol version that you choose also determines the ciphers that CloudFront uses to encrypt the content that it returns to viewers. +* `service/ec2`: Updates service API + * You are now able to create and launch EC2 P3 instance, next generation GPU instances, optimized for machine learning and high performance computing applications. With up to eight NVIDIA Tesla V100 GPUs, P3 instances provide up to one petaflop of mixed-precision, 125 teraflops of single-precision, and 62 teraflops of double-precision floating point performance, as well as a 300 GB/s second-generation NVLink interconnect that enables high-speed, low-latency GPU-to-GPU communication. P3 instances also feature up to 64 vCPUs based on custom Intel Xeon E5 (Broadwell) processors, 488 GB of DRAM, and 25 Gbps of dedicated aggregate network bandwidth using the Elastic Network Adapter (ENA). +* `aws/endpoints`: Updated Regions and Endpoints metadata. + +Release v1.12.17 (2017-10-24) +=== + +### Service Client Updates +* `service/config`: Updates service API +* `service/elasticache`: Updates service API, documentation, and examples + * Amazon ElastiCache for Redis today announced support for data encryption both for data in-transit and data at-rest. The new encryption in-transit functionality enables ElastiCache for Redis customers to encrypt data for all communication between clients and Redis engine, and all intra-cluster Redis communication. The encryption at-rest functionality allows customers to encrypt their S3 based backups. Customers can begin using the new functionality by simply enabling this functionality via AWS console, and a small configuration change in their Redis clients. The ElastiCache for Redis service automatically manages life cycle of the certificates required for encryption, including the issuance, renewal and expiration of certificates. Additionally, as part of this launch, customers will gain the ability to start using the Redis AUTH command that provides an added level of authentication. +* `service/glue`: Adds new service + * AWS Glue: Adding a new API, BatchStopJobRun, to stop one or more job runs for a specified Job. +* `service/pinpoint`: Updates service API and documentation + * Added support for APNs VoIP messages. Added support for collapsible IDs, message priority, and TTL for APNs and FCM/GCM. + +Release v1.12.16 (2017-10-23) +=== + +### Service Client Updates +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/organizations`: Updates service API and documentation + * This release supports integrating other AWS services with AWS Organizations through the use of an IAM service-linked role called AWSServiceRoleForOrganizations. Certain operations automatically create that role if it does not already exist. + +Release v1.12.15 (2017-10-20) +=== + +### Service Client Updates +* `service/ec2`: Updates service API and documentation + * Adding pagination support for DescribeSecurityGroups for EC2 Classic and VPC Security Groups + +Release v1.12.14 (2017-10-19) +=== + +### Service Client Updates +* `service/sqs`: Updates service API and documentation + * Added support for tracking cost allocation by adding, updating, removing, and listing the metadata tags of Amazon SQS queues. +* `service/ssm`: Updates service API and documentation + * EC2 Systems Manager versioning support for Parameter Store. Also support for referencing parameter versions in SSM Documents. + +Release v1.12.13 (2017-10-18) +=== + +### Service Client Updates +* `service/lightsail`: Updates service API and documentation + * This release adds support for Windows Server-based Lightsail instances. The GetInstanceAccessDetails API now returns the password of your Windows Server-based instance when using the default key pair. GetInstanceAccessDetails also returns a PasswordData object for Windows Server instances containing the ciphertext and keyPairName. The Blueprint data type now includes a list of platform values (LINUX_UNIX or WINDOWS). The Bundle data type now includes a list of SupportedPlatforms values (LINUX_UNIX or WINDOWS). + +Release v1.12.12 (2017-10-17) +=== + +### Service Client Updates +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/es`: Updates service API and documentation + * This release adds support for VPC access to Amazon Elasticsearch Service. + * This release adds support for VPC access to Amazon Elasticsearch Service. + +Release v1.12.11 (2017-10-16) +=== + +### Service Client Updates +* `service/cloudhsm`: Updates service API and documentation + * Documentation updates for AWS CloudHSM Classic. +* `service/ec2`: Updates service API and documentation + * You can now change the tenancy of your VPC from dedicated to default with a single API operation. For more details refer to the documentation for changing VPC tenancy. +* `service/es`: Updates service API and documentation + * AWS Elasticsearch adds support for enabling slow log publishing. Using slow log publishing options customers can configure and enable index/query slow log publishing of their domain to preferred AWS Cloudwatch log group. +* `service/rds`: Updates service API and waiters + * Adds waiters for DBSnapshotAvailable and DBSnapshotDeleted. +* `service/waf`: Updates service API and documentation + * This release adds support for regular expressions as match conditions in rules, and support for geographical location by country of request IP address as a match condition in rules. +* `service/waf-regional`: Updates service API and documentation + +Release v1.12.10 (2017-10-12) +=== + +### Service Client Updates +* `service/codecommit`: Updates service API and documentation + * This release includes the DeleteBranch API and a change to the contents of a Commit object. +* `service/dms`: Updates service API and documentation + * This change includes addition of new optional parameter to an existing API +* `service/elasticbeanstalk`: Updates service API and documentation + * Added the ability to add, delete or update Tags +* `service/polly`: Updates service API + * Amazon Polly exposes two new voices: "Matthew" (US English) and "Takumi" (Japanese) +* `service/rds`: Updates service API and documentation + * You can now call DescribeValidDBInstanceModifications to learn what modifications you can make to your DB instance. You can use this information when you call ModifyDBInstance. + +Release v1.12.9 (2017-10-11) +=== + +### Service Client Updates +* `service/ecr`: Updates service API, documentation, and paginators + * Adds support for new API set used to manage Amazon ECR repository lifecycle policies. Amazon ECR lifecycle policies enable you to specify the lifecycle management of images in a repository. The configuration is a set of one or more rules, where each rule defines an action for Amazon ECR to apply to an image. This allows the automation of cleaning up unused images, for example expiring images based on age or status. A lifecycle policy preview API is provided as well, which allows you to see the impact of a lifecycle policy on an image repository before you execute it +* `service/email`: Updates service API and documentation + * Added content related to email template management and templated email sending operations. +* `aws/endpoints`: Updated Regions and Endpoints metadata. + +Release v1.12.8 (2017-10-10) +=== + +### Service Client Updates +* `service/ec2`: Updates service API and documentation + * This release includes updates to AWS Virtual Private Gateway. +* `service/elasticloadbalancingv2`: Updates service API and documentation +* `service/opsworkscm`: Updates service API and documentation + * Provide engine specific information for node associations. + +Release v1.12.7 (2017-10-06) +=== + +### Service Client Updates +* `service/sqs`: Updates service documentation + * Documentation updates regarding availability of FIFO queues and miscellaneous corrections. + +Release v1.12.6 (2017-10-05) +=== + +### Service Client Updates +* `service/redshift`: Updates service API and documentation + * DescribeEventSubscriptions API supports tag keys and tag values as request parameters. + +Release v1.12.5 (2017-10-04) +=== + +### Service Client Updates +* `service/kinesisanalytics`: Updates service API and documentation + * Kinesis Analytics now supports schema discovery on objects in S3. Additionally, Kinesis Analytics now supports input data preprocessing through Lambda. +* `service/route53domains`: Updates service API and documentation + * Added a new API that checks whether a domain name can be transferred to Amazon Route 53. + +### SDK Bugs +* `service/s3/s3crypto`: Correct PutObjectRequest documentation ([#1568](https://github.com/aws/aws-sdk-go/pull/1568)) + * s3Crypto's PutObjectRequest docstring example was using an incorrect value. Corrected the type used in the example. +Release v1.12.4 (2017-10-03) +=== + +### Service Client Updates +* `service/ec2`: Updates service API, documentation, and waiters + * This release includes service updates to AWS VPN. +* `service/ssm`: Updates service API and documentation + * EC2 Systems Manager support for tagging SSM Documents. Also support for tag-based permissions to restrict access to SSM Documents based on these tags. + +Release v1.12.3 (2017-10-02) +=== + +### Service Client Updates +* `service/cloudhsm`: Updates service documentation and paginators + * Documentation updates for CloudHSM + +Release v1.12.2 (2017-09-29) +=== + +### Service Client Updates +* `service/appstream`: Updates service API and documentation + * Includes APIs for managing and accessing image builders, and deleting images. +* `service/codebuild`: Updates service API and documentation + * Adding support for Building GitHub Pull Requests in AWS CodeBuild +* `service/mturk-requester`: Updates service API and documentation +* `service/organizations`: Updates service API and documentation + * This release flags the HandshakeParty structure's Type and Id fields as 'required'. They effectively were required in the past, as you received an error if you did not include them. This is now reflected at the API definition level. +* `service/route53`: Updates service API and documentation + * This change allows customers to reset elements of health check. + +### SDK Bugs +* `private/protocol/query`: Fix query protocol handling of nested byte slices ([#1557](https://github.com/aws/aws-sdk-go/issues/1557)) + * Fixes the query protocol to correctly marshal nested []byte values of API operations. +* `service/s3`: Fix PutObject and UploadPart API to include ContentMD5 field ([#1559](https://github.com/aws/aws-sdk-go/pull/1559)) + * Fixes the SDK's S3 PutObject and UploadPart API code generation to correctly render the ContentMD5 field into the associated input types for these two API operations. + * Fixes [#1553](https://github.com/aws/aws-sdk-go/pull/1553) +Release v1.12.1 (2017-09-27) +=== + +### Service Client Updates +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/pinpoint`: Updates service API and documentation + * Added two new push notification channels: Amazon Device Messaging (ADM) and, for push notification support in China, Baidu Cloud Push. Added support for APNs auth via .p8 key file. Added operation for direct message deliveries to user IDs, enabling you to message an individual user on multiple endpoints. + +Release v1.12.0 (2017-09-26) +=== + +### SDK Bugs +* `API Marshaler`: Revert REST JSON and XML protocol marshaler improvements + * Bug [#1550](https://github.com/aws/aws-sdk-go/issues/1550) identified a missed condition in the Amazon Route 53 RESTXML protocol marshaling causing requests to that service to fail. Reverting the marshaler improvements until the bug can be fixed. + +Release v1.11.0 (2017-09-26) +=== + +### Service Client Updates +* `service/cloudformation`: Updates service API and documentation + * You can now prevent a stack from being accidentally deleted by enabling termination protection on the stack. If you attempt to delete a stack with termination protection enabled, the deletion fails and the stack, including its status, remains unchanged. You can enable termination protection on a stack when you create it. Termination protection on stacks is disabled by default. After creation, you can set termination protection on a stack whose status is CREATE_COMPLETE, UPDATE_COMPLETE, or UPDATE_ROLLBACK_COMPLETE. + +### SDK Features +* Add dep Go dependency management metadata files (#1544) + * Adds the Go `dep` dependency management metadata files to the SDK. + * Fixes [#1451](https://github.com/aws/aws-sdk-go/issues/1451) + * Fixes [#634](https://github.com/aws/aws-sdk-go/issues/634) +* `service/dynamodb/expression`: Add expression building utility for DynamoDB ([#1527](https://github.com/aws/aws-sdk-go/pull/1527)) + * Adds a new package, expression, to the SDK providing builder utilities to create DynamoDB expressions safely taking advantage of type safety. +* `API Marshaler`: Add generated marshalers for RESTXML protocol ([#1409](https://github.com/aws/aws-sdk-go/pull/1409)) + * Updates the RESTXML protocol marshaler to use generated code instead of reflection for REST XML based services. +* `API Marshaler`: Add generated marshalers for RESTJSON protocol ([#1547](https://github.com/aws/aws-sdk-go/pull/1547)) + * Updates the RESTJSON protocol marshaler to use generated code instead of reflection for REST JSON based services. + +### SDK Enhancements +* `private/protocol`: Update format of REST JSON and XMl benchmarks ([#1546](https://github.com/aws/aws-sdk-go/pull/1546)) + * Updates the format of the REST JSON and XML benchmarks to be readable. RESTJSON benchmarks were updated to more accurately bench building of the protocol. + +Release v1.10.51 (2017-09-22) +=== + +### Service Client Updates +* `service/config`: Updates service API and documentation +* `service/ecs`: Updates service API and documentation + * Amazon ECS users can now add and drop Linux capabilities to their containers through the use of docker's cap-add and cap-drop features. Customers can specify the capabilities they wish to add or drop for each container in their task definition. +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/rds`: Updates service documentation + * Documentation updates for rds + +Release v1.10.50 (2017-09-21) +=== + +### Service Client Updates +* `service/budgets`: Updates service API + * Including "DuplicateRecordException" in UpdateNotification and UpdateSubscriber. +* `service/ec2`: Updates service API and documentation + * Add EC2 APIs to copy Amazon FPGA Images (AFIs) within the same region and across multiple regions, delete AFIs, and modify AFI attributes. AFI attributes include name, description and granting/denying other AWS accounts to load the AFI. +* `service/logs`: Updates service API and documentation + * Adds support for associating LogGroups with KMS Keys. + +### SDK Bugs +* Fix greengrass service model being duplicated with different casing. ([#1541](https://github.com/aws/aws-sdk-go/pull/1541)) + * Fixes [#1540](https://github.com/aws/aws-sdk-go/issues/1540) + * Fixes [#1539](https://github.com/aws/aws-sdk-go/issues/1539) +Release v1.10.49 (2017-09-20) +=== + +### Service Client Updates +* `service/Greengrass`: Adds new service +* `service/appstream`: Updates service API and documentation + * API updates for supporting On-Demand fleets. +* `service/codepipeline`: Updates service API and documentation + * This change includes a PipelineMetadata object that is part of the output from the GetPipeline API that includes the Pipeline ARN, created, and updated timestamp. +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/rds`: Updates service API and documentation + * Introduces the --option-group-name parameter to the ModifyDBSnapshot CLI command. You can specify this parameter when you upgrade an Oracle DB snapshot. The same option group considerations apply when upgrading a DB snapshot as when upgrading a DB instance. For more information, see http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Oracle.html#USER_UpgradeDBInstance.Oracle.OGPG.OG +* `service/runtime.lex`: Updates service API and documentation + +Release v1.10.48 (2017-09-19) +=== + +### Service Client Updates +* `service/ec2`: Updates service API + * Fixed bug in EC2 clients preventing ElasticGpuSet from being set. + +### SDK Enhancements +* `aws/credentials`: Add EnvProviderName constant. ([#1531](https://github.com/aws/aws-sdk-go/issues/1531)) + * Adds the "EnvConfigCredentials" string literal as EnvProviderName constant. + * Fixes [#1444](https://github.com/aws/aws-sdk-go/issues/1444) + +Release v1.10.47 (2017-09-18) +=== + +### Service Client Updates +* `service/ec2`: Updates service API and documentation + * Amazon EC2 now lets you opt for Spot instances to be stopped in the event of an interruption instead of being terminated. Your Spot request can be fulfilled again by restarting instances from a previously stopped state, subject to availability of capacity at or below your preferred price. When you submit a persistent Spot request, you can choose from "terminate" or "stop" as the instance interruption behavior. Choosing "stop" will shutdown your Spot instances so you can continue from this stopped state later on. This feature is only available for instances with Amazon EBS volume as their root device. +* `service/email`: Updates service API and documentation + * Amazon Simple Email Service (Amazon SES) now lets you customize the domains used for tracking open and click events. Previously, open and click tracking links referred to destinations hosted on domains operated by Amazon SES. With this feature, you can use your own branded domains for capturing open and click events. +* `service/iam`: Updates service API and documentation + * A new API, DeleteServiceLinkedRole, submits a service-linked role deletion request and returns a DeletionTaskId, which you can use to check the status of the deletion. + +Release v1.10.46 (2017-09-15) +=== + +### Service Client Updates +* `service/apigateway`: Updates service API and documentation + * Add a new enum "REQUEST" to '--type ' field in the current create-authorizer API, and make "identitySource" optional. + +Release v1.10.45 (2017-09-14) +=== + +### Service Client Updates +* `service/codebuild`: Updates service API and documentation + * Supporting Parameter Store in environment variables for AWS CodeBuild +* `service/organizations`: Updates service documentation + * Documentation updates for AWS Organizations +* `service/servicecatalog`: Updates service API, documentation, and paginators + * This release of Service Catalog adds API support to copy products. + +Release v1.10.44 (2017-09-13) +=== + +### Service Client Updates +* `service/autoscaling`: Updates service API and documentation + * Customers can create Life Cycle Hooks at the time of creating Auto Scaling Groups through the CreateAutoScalingGroup API +* `service/batch`: Updates service documentation and examples + * Documentation updates for batch +* `service/ec2`: Updates service API + * You are now able to create and launch EC2 x1e.32xlarge instance, a new EC2 instance in the X1 family, in us-east-1, us-west-2, eu-west-1, and ap-northeast-1. x1e.32xlarge offers 128 vCPUs, 3,904 GiB of DDR4 instance memory, high memory bandwidth, large L3 caches, and leading reliability capabilities to boost the performance and reliability of in-memory applications. +* `service/events`: Updates service API and documentation + * Exposes ConcurrentModificationException as one of the valid exceptions for PutPermission and RemovePermission operation. + +### SDK Enhancements +* `service/autoscaling`: Fix documentation for PutScalingPolicy.AutoScalingGroupName [#1522](https://github.com/aws/aws-sdk-go/pull/1522) +* `service/s3/s3manager`: Clarify S3 Upload manager Concurrency config [#1521](https://github.com/aws/aws-sdk-go/pull/1521) + * Fixes [#1458](https://github.com/aws/aws-sdk-go/issues/1458) +* `service/dynamodb/dynamodbattribute`: Add support for time alias. [#1520](https://github.com/aws/aws-sdk-go/pull/1520) + * Related to [#1505](https://github.com/aws/aws-sdk-go/pull/1505) + +Release v1.10.43 (2017-09-12) +=== + +### Service Client Updates +* `service/ec2`: Updates service API + * Fixed bug in EC2 clients preventing HostOfferingSet from being set +* `aws/endpoints`: Updated Regions and Endpoints metadata. + +Release v1.10.42 (2017-09-12) +=== + +### Service Client Updates +* `service/devicefarm`: Updates service API and documentation + * DeviceFarm has added support for two features - RemoteDebugging and Customer Artifacts. Customers can now do remote Debugging on their Private Devices and can now retrieve custom files generated by their tests on the device and the device host (execution environment) on both public and private devices. + +Release v1.10.41 (2017-09-08) +=== + +### Service Client Updates +* `service/logs`: Updates service API and documentation + * Adds support for the PutResourcePolicy, DescribeResourcePolicy and DeleteResourcePolicy APIs. + +Release v1.10.40 (2017-09-07) +=== + +### Service Client Updates +* `service/application-autoscaling`: Updates service documentation +* `service/ec2`: Updates service API and documentation + * With Tagging support, you can add Key and Value metadata to search, filter and organize your NAT Gateways according to your organization's needs. +* `service/elasticloadbalancingv2`: Updates service API and documentation +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/lex-models`: Updates service API and documentation +* `service/route53`: Updates service API and documentation + * You can configure Amazon Route 53 to log information about the DNS queries that Amazon Route 53 receives for your domains and subdomains. When you configure query logging, Amazon Route 53 starts to send logs to CloudWatch Logs. You can use various tools, including the AWS console, to access the query logs. + +Release v1.10.39 (2017-09-06) +=== + +### Service Client Updates +* `service/budgets`: Updates service API and documentation + * Add an optional "thresholdType" to notifications to support percentage or absolute value thresholds. + +Release v1.10.38 (2017-09-05) +=== + +### Service Client Updates +* `service/codestar`: Updates service API and documentation + * Added support to tag CodeStar projects. Tags can be used to organize and find CodeStar projects on key-value pairs that you can choose. For example, you could add a tag with a key of "Release" and a value of "Beta" to projects your organization is working on for an upcoming beta release. +* `aws/endpoints`: Updated Regions and Endpoints metadata. + +Release v1.10.37 (2017-09-01) +=== + +### Service Client Updates +* `service/MobileHub`: Adds new service +* `service/gamelift`: Updates service API and documentation + * GameLift VPC resources can be peered with any other AWS VPC. R4 memory-optimized instances now available to deploy. +* `service/ssm`: Updates service API and documentation + * Adding KMS encryption support to SSM Inventory Resource Data Sync. Exposes the ClientToken parameter on SSM StartAutomationExecution to provide idempotent execution requests. + +Release v1.10.36 (2017-08-31) +=== + +### Service Client Updates +* `service/codebuild`: Updates service API, documentation, and examples + * The AWS CodeBuild HTTP API now provides the BatchDeleteBuilds operation, which enables you to delete existing builds. +* `service/ec2`: Updates service API and documentation + * Descriptions for Security Group Rules enables customers to be able to define a description for ingress and egress security group rules . The Descriptions for Security Group Rules feature supports one description field per Security Group rule for both ingress and egress rules . Descriptions for Security Group Rules provides a simple way to describe the purpose or function of a Security Group Rule allowing for easier customer identification of configuration elements . Prior to the release of Descriptions for Security Group Rules , customers had to maintain a separate system outside of AWS if they wanted to track Security Group Rule mapping and their purpose for being implemented. If a security group rule has already been created and you would like to update or change your description for that security group rule you can use the UpdateSecurityGroupRuleDescription API. +* `service/elasticloadbalancingv2`: Updates service API and documentation +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/lex-models`: Updates service API and documentation + +### SDK Bugs +* `aws/signer/v4`: Revert [#1491](https://github.com/aws/aws-sdk-go/issues/1491) as change conflicts with an undocumented AWS v4 signature test case. + * Related to: [#1495](https://github.com/aws/aws-sdk-go/issues/1495). +Release v1.10.35 (2017-08-30) +=== + +### Service Client Updates +* `service/application-autoscaling`: Updates service API and documentation +* `service/organizations`: Updates service API and documentation + * The exception ConstraintViolationException now contains a new reason subcode MASTERACCOUNT_MISSING_CONTACT_INFO to make it easier to understand why attempting to remove an account from an Organization can fail. We also improved several other of the text descriptions and examples. + +Release v1.10.34 (2017-08-29) +=== + +### Service Client Updates +* `service/config`: Updates service API and documentation +* `service/ec2`: Updates service API and documentation + * Provides capability to add secondary CIDR blocks to a VPC. + +### SDK Bugs +* `aws/signer/v4`: Fix Signing Unordered Multi Value Query Parameters ([#1491](https://github.com/aws/aws-sdk-go/pull/1491)) + * Removes sorting of query string values when calculating v4 signing as this is not part of the spec. The spec only requires the keys, not values, to be sorted which is achieved by Query.Encode(). +Release v1.10.33 (2017-08-25) +=== + +### Service Client Updates +* `service/cloudformation`: Updates service API and documentation + * Rollback triggers enable you to have AWS CloudFormation monitor the state of your application during stack creation and updating, and to roll back that operation if the application breaches the threshold of any of the alarms you've specified. +* `service/gamelift`: Updates service API + * Update spelling of MatchmakingTicket status values for internal consistency. +* `service/rds`: Updates service API and documentation + * Option group options now contain additional properties that identify requirements for certain options. Check these properties to determine if your DB instance must be in a VPC or have auto minor upgrade turned on before you can use an option. Check to see if you can downgrade the version of an option after you have installed it. + +### SDK Enhancements +* `example/service/ec2`: Add EC2 list instances example ([#1492](https://github.com/aws/aws-sdk-go/pull/1492)) + +Release v1.10.32 (2017-08-25) +=== + +### Service Client Updates +* `service/rekognition`: Updates service API, documentation, and examples + * Update the enum value of LandmarkType and GenderType to be consistent with service response + +Release v1.10.31 (2017-08-23) +=== + +### Service Client Updates +* `service/appstream`: Updates service documentation + * Documentation updates for appstream +* `aws/endpoints`: Updated Regions and Endpoints metadata. + +Release v1.10.30 (2017-08-22) +=== + +### Service Client Updates +* `service/ssm`: Updates service API and documentation + * Changes to associations in Systems Manager State Manager can now be recorded. Previously, when you edited associations, you could not go back and review older association settings. Now, associations are versioned, and can be named using human-readable strings, allowing you to see a trail of association changes. You can also perform rate-based scheduling, which allows you to schedule associations more granularly. + +Release v1.10.29 (2017-08-21) +=== + +### Service Client Updates +* `service/firehose`: Updates service API, documentation, and paginators + * This change will allow customers to attach a Firehose delivery stream to an existing Kinesis stream directly. You no longer need a forwarder to move data from a Kinesis stream to a Firehose delivery stream. You can now run your streaming applications on your Kinesis stream and easily attach a Firehose delivery stream to it for data delivery to S3, Redshift, or Elasticsearch concurrently. +* `service/route53`: Updates service API and documentation + * Amazon Route 53 now supports CAA resource record type. A CAA record controls which certificate authorities are allowed to issue certificates for the domain or subdomain. + +Release v1.10.28 (2017-08-18) +=== + +### Service Client Updates +* `aws/endpoints`: Updated Regions and Endpoints metadata. + +Release v1.10.27 (2017-08-16) +=== + +### Service Client Updates +* `service/gamelift`: Updates service API and documentation + * The Matchmaking Grouping Service is a new feature that groups player match requests for a given game together into game sessions based on developer configured rules. + +### SDK Enhancements +* `aws/arn`: aws/arn: Package for parsing and producing ARNs ([#1463](https://github.com/aws/aws-sdk-go/pull/1463)) + * Adds the `arn` package for AWS ARN parsing and building. Use this package to build AWS ARNs for services such as outlined in the [documentation](http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). + +### SDK Bugs +* `aws/signer/v4`: Correct V4 presign signature to include content sha25 in URL ([#1469](https://github.com/aws/aws-sdk-go/pull/1469)) + * Updates the V4 signer so that when a Presign is generated the `X-Amz-Content-Sha256` header is added to the query string instead of being required to be in the header. This allows you to generate presigned URLs for GET requests, e.g S3.GetObject that do not require additional headers to be set by the downstream users of the presigned URL. + * Related To: [#1467](https://github.com/aws/aws-sdk-go/issues/1467) + +Release v1.10.26 (2017-08-15) +=== + +### Service Client Updates +* `service/ec2`: Updates service API + * Fixed bug in EC2 clients preventing HostReservation from being set +* `aws/endpoints`: Updated Regions and Endpoints metadata. + +Release v1.10.25 (2017-08-14) +=== + +### Service Client Updates +* `service/AWS Glue`: Adds new service +* `service/batch`: Updates service API and documentation + * This release enhances the DescribeJobs API to include the CloudWatch logStreamName attribute in ContainerDetail and ContainerDetailAttempt +* `service/cloudhsmv2`: Adds new service + * CloudHSM provides hardware security modules for protecting sensitive data and cryptographic keys within an EC2 VPC, and enable the customer to maintain control over key access and use. This is a second-generation of the service that will improve security, lower cost and provide better customer usability. +* `service/elasticfilesystem`: Updates service API, documentation, and paginators + * Customers can create encrypted EFS file systems and specify a KMS master key to encrypt it with. +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/mgh`: Adds new service + * AWS Migration Hub provides a single location to track migrations across multiple AWS and partner solutions. Using Migration Hub allows you to choose the AWS and partner migration tools that best fit your needs, while providing visibility into the status of your entire migration portfolio. Migration Hub also provides key metrics and progress for individual applications, regardless of which tools are being used to migrate them. For example, you might use AWS Database Migration Service, AWS Server Migration Service, and partner migration tools to migrate an application comprised of a database, virtualized web servers, and a bare metal server. Using Migration Hub will provide you with a single screen that shows the migration progress of all the resources in the application. This allows you to quickly get progress updates across all of your migrations, easily identify and troubleshoot any issues, and reduce the overall time and effort spent on your migration projects. Migration Hub is available to all AWS customers at no additional charge. You only pay for the cost of the migration tools you use, and any resources being consumed on AWS. +* `service/ssm`: Updates service API and documentation + * Systems Manager Maintenance Windows include the following changes or enhancements: New task options using Systems Manager Automation, AWS Lambda, and AWS Step Functions; enhanced ability to edit the targets of a Maintenance Window, including specifying a target name and description, and ability to edit the owner field; enhanced ability to edits tasks; enhanced support for Run Command parameters; and you can now use a --safe flag when attempting to deregister a target. If this flag is enabled when you attempt to deregister a target, the system returns an error if the target is referenced by any task. Also, Systems Manager now includes Configuration Compliance to scan your fleet of managed instances for patch compliance and configuration inconsistencies. You can collect and aggregate data from multiple AWS accounts and Regions, and then drill down into specific resources that aren't compliant. +* `service/storagegateway`: Updates service API and documentation + * Add optional field ForceDelete to DeleteFileShare api. + +Release v1.10.24 (2017-08-11) +=== + +### Service Client Updates +* `service/codedeploy`: Updates service API and documentation + * Adds support for specifying Application Load Balancers in deployment groups, for both in-place and blue/green deployments. +* `service/cognito-idp`: Updates service API and documentation +* `service/ec2`: Updates service API and documentation + * Provides customers an opportunity to recover an EIP that was released + +Release v1.10.23 (2017-08-10) +=== + +### Service Client Updates +* `service/clouddirectory`: Updates service API and documentation + * Enable BatchDetachPolicy +* `service/codebuild`: Updates service API + * Supporting Bitbucket as source type in AWS CodeBuild. + +Release v1.10.22 (2017-08-09) +=== + +### Service Client Updates +* `service/rds`: Updates service documentation + * Documentation updates for RDS. + +Release v1.10.21 (2017-08-09) +=== + +### Service Client Updates +* `service/elasticbeanstalk`: Updates service API and documentation + * Add support for paginating the result of DescribeEnvironments Include the ARN of described environments in DescribeEnvironments output + +### SDK Enhancements +* `aws`: Add pointer conversion utilities to transform int64 to time.Time [#1433](https://github.com/aws/aws-sdk-go/pull/1433) + * Adds `SecondsTimeValue` and `MillisecondsTimeValue` utilities. + +Release v1.10.20 (2017-08-01) +=== + +### Service Client Updates +* `service/codedeploy`: Updates service API and documentation + * AWS CodeDeploy now supports the use of multiple tag groups in a single deployment group (an intersection of tags) to identify the instances for a deployment. When you create or update a deployment group, use the new ec2TagSet and onPremisesTagSet structures to specify up to three groups of tags. Only instances that are identified by at least one tag in each of the tag groups are included in the deployment group. +* `service/config`: Updates service API and documentation +* `service/ec2`: Updates service waiters + * Ec2 SpotInstanceRequestFulfilled waiter update +* `service/elasticloadbalancingv2`: Updates service waiters +* `service/email`: Updates service API, documentation, paginators, and examples + * This update adds information about publishing email open and click events. This update also adds information about publishing email events to Amazon Simple Notification Service (Amazon SNS). +* `service/pinpoint`: Updates service API and documentation + * This release of the Pinpoint SDK enables App management - create, delete, update operations, Raw Content delivery for APNs and GCM campaign messages and From Address override. + +Release v1.10.19 (2017-08-01) +=== + +### Service Client Updates +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/inspector`: Updates service API, documentation, and paginators + * Inspector's StopAssessmentRun API has been updated with a new input option - stopAction. This request parameter can be set to either START_EVALUATION or SKIP_EVALUATION. START_EVALUATION (the default value, and the previous behavior) stops the AWS agent data collection and begins the results evaluation for findings generation based on the data collected so far. SKIP_EVALUATION cancels the assessment run immediately, after which no findings are generated. +* `service/ssm`: Updates service API and documentation + * Adds a SendAutomationSignal API to SSM Service. This API is used to send a signal to an automation execution to change the current behavior or status of the execution. + +Release v1.10.18 (2017-07-27) +=== + +### Service Client Updates +* `service/ec2`: Updates service API and documentation + * The CreateDefaultVPC API enables you to create a new default VPC . You no longer need to contact AWS support, if your default VPC has been deleted. +* `service/kinesisanalytics`: Updates service API and documentation + * Added additional exception types and clarified documentation. + +Release v1.10.17 (2017-07-27) +=== + +### Service Client Updates +* `service/dynamodb`: Updates service documentation and examples + * Corrected a typo. +* `service/ec2`: Updates service API and documentation + * Amazon EC2 Elastic GPUs allow you to easily attach low-cost graphics acceleration to current generation EC2 instances. With Amazon EC2 Elastic GPUs, you can configure the right amount of graphics acceleration to your particular workload without being constrained by fixed hardware configurations and limited GPU selection. +* `service/monitoring`: Updates service documentation + * This release adds high resolution features to CloudWatch, with support for Custom Metrics down to 1 second and Alarms down to 10 seconds. + +Release v1.10.16 (2017-07-26) +=== + +### Service Client Updates +* `service/clouddirectory`: Updates service API and documentation + * Cloud Directory adds support for additional batch operations. +* `service/cloudformation`: Updates service API and documentation + * AWS CloudFormation StackSets enables you to manage stacks across multiple accounts and regions. + +### SDK Enhancements +* `aws/signer/v4`: Optimize V4 signer's header duplicate space stripping. [#1417](https://github.com/aws/aws-sdk-go/pull/1417) + +Release v1.10.15 (2017-07-24) +=== + +### Service Client Updates +* `service/appstream`: Updates service API, documentation, and waiters + * Amazon AppStream 2.0 image builders and fleets can now access applications and network resources that rely on Microsoft Active Directory (AD) for authentication and permissions. This new feature allows you to join your streaming instances to your AD, so you can use your existing AD user management tools. +* `service/ec2`: Updates service API and documentation + * Spot Fleet tagging capability allows customers to automatically tag instances launched by Spot Fleet. You can use this feature to label or distinguish instances created by distinct Spot Fleets. Tagging your EC2 instances also enables you to see instance cost allocation by tag in your AWS bill. + +### SDK Bugs +* `aws/signer/v4`: Fix out of bounds panic in stripExcessSpaces [#1412](https://github.com/aws/aws-sdk-go/pull/1412) + * Fixes the out of bands panic in stripExcessSpaces caused by an incorrect calculation of the stripToIdx value. Simplified to code also. + * Fixes [#1411](https://github.com/aws/aws-sdk-go/issues/1411) +Release v1.10.14 (2017-07-20) +=== + +### Service Client Updates +* `service/elasticmapreduce`: Updates service API and documentation + * Amazon EMR now includes the ability to use a custom Amazon Linux AMI and adjustable root volume size when launching a cluster. + +Release v1.10.13 (2017-07-19) +=== + +### Service Client Updates +* `service/budgets`: Updates service API and documentation + * Update budget Management API's to list/create/update RI_UTILIZATION type budget. Update budget Management API's to support DAILY timeUnit for RI_UTILIZATION type budget. + +### SDK Enhancements +* `service/s3`: Use interfaces assertions instead of ValuesAtPath for S3 field lookups. [#1401](https://github.com/aws/aws-sdk-go/pull/1401) + * Improves the performance across the board for all S3 API calls by removing the usage of `ValuesAtPath` being used for every S3 API call. + +### SDK Bugs +* `aws/request`: waiter test bug + * waiters_test.go file would sometimes fail due to travis hiccups. This occurs because a test would sometimes fail the cancel check and succeed the timeout. However, the timeout check should never occur in that test. This fix introduces a new field that dictates how waiters will sleep. +Release v1.10.12 (2017-07-17) +=== + +### Service Client Updates +* `service/cognito-idp`: Updates service API and documentation +* `service/lambda`: Updates service API and documentation + * Lambda@Edge lets you run code closer to your end users without provisioning or managing servers. With Lambda@Edge, your code runs in AWS edge locations, allowing you to respond to your end users at the lowest latency. Your code is triggered by Amazon CloudFront events, such as requests to and from origin servers and viewers, and it is ready to execute at every AWS edge location whenever a request for content is received. You just upload your Node.js code to AWS Lambda and Lambda takes care of everything required to run and scale your code with high availability. You only pay for the compute time you consume - there is no charge when your code is not running. + +Release v1.10.11 (2017-07-14) +=== + +### Service Client Updates +* `service/discovery`: Updates service API and documentation + * Adding feature to the Export API for Discovery Service to allow filters for the export task to allow export based on per agent id. +* `service/ec2`: Updates service API + * New EC2 GPU Graphics instance +* `service/marketplacecommerceanalytics`: Updates service documentation + * Update to Documentation Model For New Report Cadence / Reformat of Docs + +Release v1.10.10 (2017-07-13) +=== + +### Service Client Updates +* `service/apigateway`: Updates service API and documentation + * Adds support for management of gateway responses. +* `service/ec2`: Updates service API and documentation + * X-ENI (or Cross-Account ENI) is a new feature that allows the attachment or association of Elastic Network Interfaces (ENI) between VPCs in different AWS accounts located in the same availability zone. With this new capability, service providers and partners can deliver managed solutions in a variety of new architectural patterns where the provider and consumer of the service are in different AWS accounts. +* `service/lex-models`: Updates service documentation + +Release v1.10.9 (2017-07-12) +=== + +### Service Client Updates +* `service/autoscaling`: Updates service API and documentation + * Auto Scaling now supports a new type of scaling policy called target tracking scaling policies that you can use to set up dynamic scaling for your application. +* `service/swf`: Updates service API, documentation, paginators, and examples + * Added support for attaching control data to Lambda tasks. Control data lets you attach arbitrary strings to your decisions and history events. + +Release v1.10.8 (2017-07-06) +=== + +### Service Client Updates +* `service/ds`: Updates service API, documentation, and paginators + * You can now improve the resilience and performance of your Microsoft AD directory by deploying additional domain controllers. Added UpdateNumberofDomainControllers API that allows you to update the number of domain controllers you want for your directory, and DescribeDomainControllers API that allows you to describe the detailed information of each domain controller of your directory. Also added the 'DesiredNumberOfDomainControllers' field to the DescribeDirectories API output for Microsoft AD. +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/kinesis`: Updates service API and documentation + * You can now encrypt your data at rest within an Amazon Kinesis Stream using server-side encryption. Server-side encryption via AWS KMS makes it easy for customers to meet strict data management requirements by encrypting their data at rest within the Amazon Kinesis Streams, a fully managed real-time data processing service. +* `service/kms`: Updates service API and documentation + * This release of AWS Key Management Service introduces the ability to determine whether a key is AWS managed or customer managed. +* `service/ssm`: Updates service API and documentation + * Amazon EC2 Systems Manager now expands Patching support to Amazon Linux, Red Hat and Ubuntu in addition to the already supported Windows Server. + +Release v1.10.7 (2017-07-05) +=== + +### Service Client Updates +* `service/monitoring`: Updates service API and documentation + * We are excited to announce the availability of APIs and CloudFormation support for CloudWatch Dashboards. You can use the new dashboard APIs or CloudFormation templates to dynamically build and maintain dashboards to monitor your infrastructure and applications. There are four new dashboard APIs - PutDashboard, GetDashboard, DeleteDashboards, and ListDashboards APIs. PutDashboard is used to create a new dashboard or modify an existing one whereas GetDashboard is the API to get the details of a specific dashboard. ListDashboards and DeleteDashboards are used to get the names or delete multiple dashboards respectively. Getting started with dashboard APIs is similar to any other AWS APIs. The APIs can be accessed through AWS SDK or through CLI tools. +* `service/route53`: Updates service API and documentation + * Bug fix for InvalidChangeBatch exception. + +### SDK Enhancements +* `service/s3/s3manager`: adding cleanup function to batch objects [#1375](https://github.com/aws/aws-sdk-go/issues/1375) + * This enhancement will add an After field that will be called after each iteration of the batch operation. + +Release v1.10.6 (2017-06-30) +=== + +### Service Client Updates +* `service/marketplacecommerceanalytics`: Updates service documentation + * Documentation updates for AWS Marketplace Commerce Analytics. +* `service/s3`: Updates service API and documentation + * API Update for S3: Adding Object Tagging Header to MultipartUpload Initialization + +Release v1.10.5 (2017-06-29) +=== + +### Service Client Updates +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/events`: Updates service API and documentation + * CloudWatch Events now allows different AWS accounts to share events with each other through a new resource called event bus. Event buses accept events from AWS services, other AWS accounts and PutEvents API calls. Currently all AWS accounts have one default event bus. To send events to another account, customers simply write rules to match the events of interest and attach an event bus in the receiving account as the target to the rule. The PutTargets API has been updated to allow adding cross account event buses as targets. In addition, we have released two new APIs - PutPermission and RemovePermission - that enables customers to add/remove permissions to their default event bus. +* `service/gamelift`: Updates service API and documentation + * Allow developers to download GameLift fleet creation logs to assist with debugging. +* `service/ssm`: Updates service API and documentation + * Adding Resource Data Sync support to SSM Inventory. New APIs: * CreateResourceDataSync - creates a new resource data sync configuration, * ListResourceDataSync - lists existing resource data sync configurations, * DeleteResourceDataSync - deletes an existing resource data sync configuration. + +Release v1.10.4 (2017-06-27) +=== + +### Service Client Updates +* `service/servicecatalog`: Updates service API, documentation, and paginators + * Proper tagging of resources is critical to post-launch operations such as billing, cost allocation, and resource management. By using Service Catalog's TagOption Library, administrators can define a library of re-usable TagOptions that conform to company standards, and associate these with Service Catalog portfolios and products. Learn how to move your current tags to the new library, create new TagOptions, and view and associate your library items with portfolios and products. Understand how to ensure that the right tags are created on products launched through Service Catalog and how to provide users with defined selectable tags. + +### SDK Bugs +* `aws/signer/v4`: checking length on `stripExcessSpaces` [#1372](https://github.com/aws/aws-sdk-go/issues/1372) + * Fixes a bug where `stripExcessSpaces` did not check length against the slice. + * Fixes: [#1371](https://github.com/aws/aws-sdk-go/issues/1371) +Release v1.10.3 (2017-06-23) +=== + +### Service Client Updates +* `service/lambda`: Updates service API and documentation + * The Lambda Invoke API will now throw new exception InvalidRuntimeException (status code 502) for invokes with deprecated runtimes. + +Release v1.10.2 (2017-06-22) +=== + +### Service Client Updates +* `service/codepipeline`: Updates service API, documentation, and paginators + * A new API, ListPipelineExecutions, enables you to retrieve summary information about the most recent executions in a pipeline, including pipeline execution ID, status, start time, and last updated time. You can request information for a maximum of 100 executions. Pipeline execution data is available for the most recent 12 months of activity. +* `service/dms`: Updates service API and documentation + * Added tagging for DMS certificates. +* `service/elasticloadbalancing`: Updates service waiters +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/lightsail`: Updates service API and documentation + * This release adds a new nextPageToken property to the result of the GetOperationsForResource API. Developers can now get the next set of items in a list by making subsequent calls to GetOperationsForResource API with the token from the previous call. This release also deprecates the nextPageCount property, which previously returned null (use the nextPageToken property instead). This release also deprecates the customImageName property on the CreateInstancesRequest class, which was previously ignored by the API. +* `service/route53`: Updates service API and documentation + * This release reintroduces the HealthCheckInUse exception. + +Release v1.10.1 (2017-06-21) +=== + +### Service Client Updates +* `service/dax`: Adds new service + * Amazon DynamoDB Accelerator (DAX) is a fully managed, highly available, in-memory cache for DynamoDB that delivers up to a 10x performance improvement - from milliseconds to microseconds - even at millions of requests per second. DAX does all the heavy lifting required to add in-memory acceleration to your DynamoDB tables, without requiring developers to manage cache invalidation, data population, or cluster management. +* `service/route53`: Updates service API and documentation + * Amazon Route 53 now supports multivalue answers in response to DNS queries, which lets you route traffic approximately randomly to multiple resources, such as web servers. Create one multivalue answer record for each resource and, optionally, associate an Amazon Route 53 health check with each record, and Amazon Route 53 responds to DNS queries with up to eight healthy records. +* `service/ssm`: Updates service API, documentation, and paginators + * Adding hierarchy support to the SSM Parameter Store API. Added support tor tagging. New APIs: GetParameter - retrieves one parameter, DeleteParameters - deletes multiple parameters (max number 10), GetParametersByPath - retrieves parameters located in the hierarchy. Updated APIs: PutParameter - added ability to enforce parameter value by applying regex (AllowedPattern), DescribeParameters - modified to support Tag filtering. +* `service/waf`: Updates service API and documentation + * You can now create, edit, update, and delete a new type of WAF rule with a rate tracking component. +* `service/waf-regional`: Updates service API and documentation + +Release v1.10.0 (2017-06-20) +=== + +### Service Client Updates +* `service/workdocs`: Updates service API and documentation + * This release provides a new API to retrieve the activities performed by WorkDocs users. + +### SDK Features +* `aws/credentials/plugincreds`: Add support for Go plugin for credentials [#1320](https://github.com/aws/aws-sdk-go/pull/1320) + * Adds support for using plugins to retrieve credentials for API requests. This change adds a new package plugincreds under aws/credentials. See the `example/aws/credentials/plugincreds` folder in the SDK for example usage. + +Release v1.9.00 (2017-06-19) +=== + +### Service Client Updates +* `service/organizations`: Updates service API and documentation + * Improvements to Exception Modeling + +### SDK Features +* `service/s3/s3manager`: Adds batch operations to s3manager [#1333](https://github.com/aws/aws-sdk-go/pull/1333) + * Allows for batch upload, download, and delete of objects. Also adds the interface pattern to allow for easy traversal of objects. E.G `DownloadWithIterator`, `UploadWithIterator`, and `BatchDelete`. `BatchDelete` also contains a utility iterator using the `ListObjects` API to easily delete a list of objects. + +Release v1.8.44 (2017-06-16) +=== + +### Service Client Updates +* `service/xray`: Updates service API, documentation, and paginators + * Add a response time histogram to the services in response of GetServiceGraph API. + +Release v1.8.43 (2017-06-15) +=== + +### Service Client Updates +* `service/ec2`: Updates service API and documentation + * Adds API to describe Amazon FPGA Images (AFIs) available to customers, which includes public AFIs, private AFIs that you own, and AFIs owned by other AWS accounts for which you have load permissions. +* `service/ecs`: Updates service API and documentation + * Added support for cpu, memory, and memory reservation container overrides on the RunTask and StartTask APIs. +* `service/iot`: Updates service API and documentation + * Revert the last release: remove CertificatePem from DescribeCertificate API. +* `service/servicecatalog`: Updates service API, documentation, and paginators + * Added ProvisioningArtifactSummaries to DescribeProductAsAdmin's output to show the provisioning artifacts belong to the product. Allow filtering by SourceProductId in SearchProductsAsAdmin for AWS Marketplace products. Added a verbose option to DescribeProvisioningArtifact to display the CloudFormation template used to create the provisioning artifact.Added DescribeProvisionedProduct API. Changed the type of ProvisionedProduct's Status to be distinct from Record's Status. New ProvisionedProduct's Status are AVAILABLE, UNDER_CHANGE, TAINTED, ERROR. Changed Record's Status set of values to CREATED, IN_PROGRESS, IN_PROGRESS_IN_ERROR, SUCCEEDED, FAILED. + +### SDK Bugs +* `private/model/api`: Fix RESTXML support for XML Namespace [#1343](https://github.com/aws/aws-sdk-go/pull/1343) + * Fixes a bug with the SDK's generation of services using the REST XML protocol not annotating shape references with the XML Namespace attribute. + * Fixes [#1334](https://github.com/aws/aws-sdk-go/pull/1334) +Release v1.8.42 (2017-06-14) +=== + +### Service Client Updates +* `service/applicationautoscaling`: Updates service API and documentation +* `service/clouddirectory`: Updates service documentation + * Documentation update for Cloud Directory + +Release v1.8.41 (2017-06-13) +=== + +### Service Client Updates +* `service/configservice`: Updates service API + +Release v1.8.40 (2017-06-13) +=== + +### Service Client Updates +* `service/rds`: Updates service API and documentation + * API Update for RDS: this update enables copy-on-write, a new Aurora MySQL Compatible Edition feature that allows users to restore their database, and support copy of TDE enabled snapshot cross region. + +### SDK Bugs +* `aws/request`: Fix NewErrParamMinLen to use correct ParamMinLenErrCode [#1336](https://github.com/aws/aws-sdk-go/issues/1336) + * Fixes the `NewErrParamMinLen` function returning the wrong error code. `ParamMinLenErrCode` should be returned not `ParamMinValueErrCode`. + * Fixes [#1335](https://github.com/aws/aws-sdk-go/issues/1335) +Release v1.8.39 (2017-06-09) +=== + +### Service Client Updates +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/opsworks`: Updates service API and documentation + * Tagging Support for AWS OpsWorks Stacks + +Release v1.8.38 (2017-06-08) +=== + +### Service Client Updates +* `service/iot`: Updates service API and documentation + * In addition to using certificate ID, AWS IoT customers can now obtain the description of a certificate with the certificate PEM. +* `service/pinpoint`: Updates service API and documentation + * Starting today Amazon Pinpoint adds SMS Text and Email Messaging support in addition to Mobile Push Notifications, providing developers, product managers and marketers with multi-channel messaging capabilities to drive user engagement in their applications. Pinpoint also enables backend services and applications to message users directly and provides advanced user and app analytics to understand user behavior and messaging performance. +* `service/rekognition`: Updates service API and documentation + * API Update for AmazonRekognition: Adding RecognizeCelebrities API + +Release v1.8.37 (2017-06-07) +=== + +### Service Client Updates +* `service/codebuild`: Updates service API and documentation + * Add support to APIs for privileged containers. This change would allow performing privileged operations like starting the Docker daemon inside builds possible in custom docker images. +* `service/greengrass`: Adds new service + * AWS Greengrass is software that lets you run local compute, messaging, and device state synchronization for connected devices in a secure way. With AWS Greengrass, connected devices can run AWS Lambda functions, keep device data in sync, and communicate with other devices securely even when not connected to the Internet. Using AWS Lambda, Greengrass ensures your IoT devices can respond quickly to local events, operate with intermittent connections, and minimize the cost of transmitting IoT data to the cloud. + +Release v1.8.36 (2017-06-06) +=== + +### Service Client Updates +* `service/acm`: Updates service documentation + * Documentation update for AWS Certificate Manager. +* `service/cloudfront`: Updates service documentation + * Doc update to fix incorrect prefix in S3OriginConfig +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/iot`: Updates service API + * Update client side validation for SalesForce action. + +Release v1.8.35 (2017-06-05) +=== + +### Service Client Updates +* `service/appstream`: Updates service API and documentation + * AppStream 2.0 Custom Security Groups allows you to easily control what network resources your streaming instances and images have access to. You can assign up to 5 security groups per Fleet to control the inbound and outbound network access to your streaming instances to specific IP ranges, network protocols, or ports. +* `service/iot`: Updates service API, documentation, paginators, and examples + * Added Salesforce action to IoT Rules Engine. + +Release v1.8.34 (2017-06-02) +=== + +### Service Client Updates +* `service/kinesisanalytics`: Updates service API, documentation, and paginators + * Kinesis Analytics publishes error messages CloudWatch logs in case of application misconfigurations +* `service/workdocs`: Updates service API and documentation + * This release includes new APIs to manage tags and custom metadata on resources and also new APIs to add and retrieve comments at the document level. + +Release v1.8.33 (2017-06-01) +=== + +### Service Client Updates +* `service/codedeploy`: Updates service API and documentation + * AWS CodeDeploy has improved how it manages connections to GitHub accounts and repositories. You can now create and store up to 25 connections to GitHub accounts in order to associate AWS CodeDeploy applications with GitHub repositories. Each connection can support multiple repositories. You can create connections to up to 25 different GitHub accounts, or create more than one connection to a single account. The ListGitHubAccountTokenNames command has been introduced to retrieve the names of stored connections to GitHub accounts that you have created. The name of the connection to GitHub used for an AWS CodeDeploy application is also included in the ApplicationInfo structure. Two new fields, lastAttemptedDeployment and lastSuccessfulDeployment, have been added to DeploymentGroupInfo to improve the handling of deployment group information in the AWS CodeDeploy console. Information about these latest deployments can also be retrieved using the GetDeploymentGroup and BatchGetDeployment group requests. Also includes a region update (us-gov-west-1). +* `service/cognitoidentityprovider`: Updates service API, documentation, and paginators +* `service/elbv2`: Updates service API and documentation +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/lexmodelbuildingservice`: Updates service documentation and examples + +### SDK Enhancements +* `aws/defaults`: Exports shared credentials and config default filenames used by the SDK. [#1308](https://github.com/aws/aws-sdk-go/pull/1308) + * Adds SharedCredentialsFilename and SharedConfigFilename functions to defaults package. + +### SDK Bugs +* `aws/credentials`: Fixes shared credential provider's default filename on Windows. [#1308](https://github.com/aws/aws-sdk-go/pull/1308) + * The shared credentials provider would attempt to use the wrong filename on Windows if the `HOME` environment variable was defined. +* `service/s3/s3manager`: service/s3/s3manager: Fix Downloader ignoring Range get parameter [#1311](https://github.com/aws/aws-sdk-go/pull/1311) + * Fixes the S3 Download Manager ignoring the GetObjectInput's Range parameter. If this parameter is provided it will force the downloader to fallback to a single GetObject request disabling concurrency and automatic part size gets. + * Fixes [#1296](https://github.com/aws/aws-sdk-go/issues/1296) +Release v1.8.32 (2017-05-31) +=== + +### Service Client Updates +* `service/rds`: Updates service API and documentation + * Amazon RDS customers can now easily and quickly stop and start their DB instances. + +Release v1.8.31 (2017-05-30) +=== + +### Service Client Updates +* `service/clouddirectory`: Updates service API, documentation, and paginators + * Cloud Directory has launched support for Typed Links, enabling customers to create object-to-object relationships that are not hierarchical in nature. Typed Links enable customers to quickly query for data along these relationships. Customers can also enforce referential integrity using Typed Links, ensuring data in use is not inadvertently deleted. +* `service/s3`: Updates service paginators and examples + * New example snippets for Amazon S3. + +Release v1.8.30 (2017-05-25) +=== + +### Service Client Updates +* `service/appstream`: Updates service API and documentation + * Support added for persistent user storage, backed by S3. +* `service/rekognition`: Updates service API and documentation + * Updated the CompareFaces API response to include orientation information, unmatched faces, landmarks, pose, and quality of the compared faces. + +Release v1.8.29 (2017-05-24) +=== + +### Service Client Updates +* `service/iam`: Updates service API + * The unique ID and access key lengths were extended from 32 to 128 +* `service/storagegateway`: Updates service API and documentation + * Two Storage Gateway data types, Tape and TapeArchive, each have a new response element, TapeUsedInBytes. This element helps you manage your virtual tapes. By using TapeUsedInBytes, you can see the amount of data written to each virtual tape. +* `service/sts`: Updates service API, documentation, and paginators + * The unique ID and access key lengths were extended from 32 to 128. + +Release v1.8.28 (2017-05-23) +=== + +### Service Client Updates +* `service/databasemigrationservice`: Updates service API, documentation, paginators, and examples + * This release adds support for using Amazon S3 and Amazon DynamoDB as targets for database migration, and using MongoDB as a source for database migration. For more information, see the AWS Database Migration Service documentation. + +Release v1.8.27 (2017-05-22) +=== + +### Service Client Updates +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/resourcegroupstaggingapi`: Updates service API, documentation, and paginators + * You can now specify the number of resources returned per page in GetResources operation, as an optional parameter, to easily manage the list of resources returned by your queries. + +### SDK Bugs +* `aws/request`: Add support for PUT temporary redirects (307) [#1283](https://github.com/aws/aws-sdk-go/issues/1283) + * Adds support for Go 1.8's GetBody function allowing the SDK's http request using PUT and POST methods to be redirected with temporary redirects with 307 status code. + * Fixes: [#1267](https://github.com/aws/aws-sdk-go/issues/1267) +* `aws/request`: Add handling for retrying temporary errors during unmarshal [#1289](https://github.com/aws/aws-sdk-go/issues/1289) + * Adds support for retrying temporary errors that occur during unmarshaling of a request's response body. + * Fixes: [#1275](https://github.com/aws/aws-sdk-go/issues/1275) +Release v1.8.26 (2017-05-18) +=== + +### Service Client Updates +* `service/athena`: Adds new service + * This release adds support for Amazon Athena. Amazon Athena is an interactive query service that makes it easy to analyze data in Amazon S3 using standard SQL. Athena is serverless, so there is no infrastructure to manage, and you pay only for the queries that you run. +* `service/lightsail`: Updates service API, documentation, and paginators + * This release adds new APIs that make it easier to set network port configurations on Lightsail instances. Developers can now make a single request to both open and close public ports on an instance using the PutInstancePublicPorts operation. + +### SDK Bugs +* `aws/request`: Fix logging from reporting wrong retry request errors #1281 + * Fixes the SDK's retry request logging to report the the actual error that occurred, not a stubbed Unknown error message. + * Fixes the SDK's response logger to not output the response log multiple times per retry. +Release v1.8.25 (2017-05-17) +=== + +### Service Client Updates +* `service/autoscaling`: Updates service documentation, paginators, and examples + * Various Auto Scaling documentation updates +* `service/cloudwatchevents`: Updates service documentation + * Various CloudWatch Events documentation updates. +* `service/cloudwatchlogs`: Updates service documentation and paginators + * Various CloudWatch Logs documentation updates. +* `service/polly`: Updates service API + * Amazon Polly adds new German voice "Vicki" + +Release v1.8.24 (2017-05-16) +=== + +### Service Client Updates +* `service/codedeploy`: Updates service API and documentation + * This release introduces the previousRevision field in the responses to the GetDeployment and BatchGetDeployments actions. previousRevision provides information about the application revision that was deployed to the deployment group before the most recent successful deployment. Also, the fileExistsBehavior parameter has been added for CreateDeployment action requests. In the past, if the AWS CodeDeploy agent detected files in a target location that weren't part of the application revision from the most recent successful deployment, it would fail the current deployment by default. This new parameter provides options for how the agent handles these files: fail the deployment, retain the content, or overwrite the content. +* `service/gamelift`: Updates service API and documentation + * Allow developers to specify how metrics are grouped in CloudWatch for their GameLift fleets. Developers can also specify how many concurrent game sessions activate on a per-instance basis. +* `service/inspector`: Updates service API, documentation, paginators, and examples + * Adds ability to produce an assessment report that includes detailed and comprehensive results of a specified assessment run. +* `service/kms`: Updates service documentation + * Update documentation for KMS. + +Release v1.8.23 (2017-05-15) +=== + +### Service Client Updates +* `service/ssm`: Updates service API and documentation + * UpdateAssociation API now supports updating document name and targets of an association. GetAutomationExecution API can return FailureDetails as an optional field to the StepExecution Object, which contains failure type, failure stage as well as other failure related information for a failed step. + +### SDK Enhancements +* `aws/session`: SDK should be able to load multiple custom shared config files. [#1258](https://github.com/aws/aws-sdk-go/issues/1258) + * This change adds a `SharedConfigFiles` field to the `session.Options` type that allows you to specify the files, and their order, the SDK will use for loading shared configuration and credentials from when the `Session` is created. Use the `NewSessionWithOptions` Session constructor to specify these options. You'll also most likely want to enable support for the shared configuration file's additional attributes by setting `session.Option`'s `SharedConfigState` to `session.SharedConfigEnabled`. + +Release v1.8.22 (2017-05-11) +=== + +### Service Client Updates +* `service/elb`: Updates service API, documentation, and paginators +* `service/elbv2`: Updates service API and documentation +* `service/lexmodelbuildingservice`: Updates service API and documentation +* `service/organizations`: Updates service API, documentation, paginators, and examples + * AWS Organizations APIs that return an Account object now include the email address associated with the account’s root user. + +Release v1.8.21 (2017-05-09) +=== + +### Service Client Updates +* `service/codestar`: Updates service documentation + * Updated documentation for AWS CodeStar. +* `service/workspaces`: Updates service API, documentation, and paginators + * Doc-only Update for WorkSpaces + +Release v1.8.20 (2017-05-04) +=== + +### Service Client Updates +* `service/ecs`: Updates service API, documentation, and paginators + * Exposes container instance registration time in ECS:DescribeContainerInstances. +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/marketplaceentitlementservice`: Adds new service +* `service/lambda`: Updates service API and documentation + * Support for UpdateFunctionCode DryRun option + Release v1.8.19 (2017-04-28) === diff --git a/vendor/github.com/aws/aws-sdk-go/CODE_OF_CONDUCT.md b/vendor/github.com/aws/aws-sdk-go/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..3b64466 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/CODE_OF_CONDUCT.md @@ -0,0 +1,4 @@ +## Code of Conduct +This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct). +For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact +opensource-codeofconduct@amazon.com with any additional questions or comments. diff --git a/vendor/github.com/aws/aws-sdk-go/CONTRIBUTING.md b/vendor/github.com/aws/aws-sdk-go/CONTRIBUTING.md index 7c0186f..9f4a0c1 100644 --- a/vendor/github.com/aws/aws-sdk-go/CONTRIBUTING.md +++ b/vendor/github.com/aws/aws-sdk-go/CONTRIBUTING.md @@ -67,7 +67,7 @@ Please be aware of the following notes prior to opening a pull request: 5. The JSON files under the SDK's `models` folder are sourced from outside the SDK. Such as `models/apis/ec2/2016-11-15/api.json`. We will not accept pull requests directly on these models. If you discover an issue with the models please - create a Github [issue](issues) describing the issue. + create a [GitHub issue][issues] describing the issue. ### Testing @@ -89,7 +89,7 @@ go test -tags codegen ./private/... See the `Makefile` for additional testing tags that can be used in testing. To test on multiple platform the SDK includes several DockerFiles under the -`awstesting/sandbox` folder, and associated make recipes to to execute +`awstesting/sandbox` folder, and associated make recipes to execute unit testing within environments configured for specific Go versions. ``` diff --git a/vendor/github.com/aws/aws-sdk-go/Gopkg.lock b/vendor/github.com/aws/aws-sdk-go/Gopkg.lock new file mode 100644 index 0000000..854c94f --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/Gopkg.lock @@ -0,0 +1,20 @@ +# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. + + +[[projects]] + name = "github.com/go-ini/ini" + packages = ["."] + revision = "300e940a926eb277d3901b20bdfcc54928ad3642" + version = "v1.25.4" + +[[projects]] + name = "github.com/jmespath/go-jmespath" + packages = ["."] + revision = "0b12d6b5" + +[solve-meta] + analyzer-name = "dep" + analyzer-version = 1 + inputs-digest = "51a86a867df617990082dec6b868e4efe2fdb2ed0e02a3daa93cd30f962b5085" + solver-name = "gps-cdcl" + solver-version = 1 diff --git a/vendor/github.com/aws/aws-sdk-go/Gopkg.toml b/vendor/github.com/aws/aws-sdk-go/Gopkg.toml new file mode 100644 index 0000000..664fc59 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/Gopkg.toml @@ -0,0 +1,48 @@ + +# Gopkg.toml example +# +# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md +# for detailed Gopkg.toml documentation. +# +# required = ["github.com/user/thing/cmd/thing"] +# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] +# +# [[constraint]] +# name = "github.com/user/project" +# version = "1.0.0" +# +# [[constraint]] +# name = "github.com/user/project2" +# branch = "dev" +# source = "github.com/myfork/project2" +# +# [[override]] +# name = "github.com/x/y" +# version = "2.4.0" + +ignored = [ + # Testing/Example/Codegen dependencies + "github.com/stretchr/testify", + "github.com/stretchr/testify/assert", + "github.com/stretchr/testify/require", + "github.com/go-sql-driver/mysql", + "github.com/gucumber/gucumber", + "github.com/pkg/errors", + "golang.org/x/net", + "golang.org/x/net/html", + "golang.org/x/net/http2", + "golang.org/x/text", + "golang.org/x/text/html", + "golang.org/x/tools", + "golang.org/x/tools/go/loader", +] + + +[[constraint]] + name = "github.com/go-ini/ini" + version = "1.25.4" + +[[constraint]] + name = "github.com/jmespath/go-jmespath" + revision = "0b12d6b5" + #version = "0.2.2" diff --git a/vendor/github.com/aws/aws-sdk-go/Makefile b/vendor/github.com/aws/aws-sdk-go/Makefile index b1611d2..bab31d2 100644 --- a/vendor/github.com/aws/aws-sdk-go/Makefile +++ b/vendor/github.com/aws/aws-sdk-go/Makefile @@ -5,13 +5,15 @@ LINTIGNORESTUTTER='service/[^/]+/(api|service)\.go:.+(and that stutters)' LINTIGNOREINFLECT='service/[^/]+/(api|errors|service)\.go:.+(method|const) .+ should be ' LINTIGNOREINFLECTS3UPLOAD='service/s3/s3manager/upload\.go:.+struct field SSEKMSKeyId should be ' LINTIGNOREDEPS='vendor/.+\.go' -UNIT_TEST_TAGS="example codegen" +LINTIGNOREPKGCOMMENT='service/[^/]+/doc_custom.go:.+package comment should be of the form' +UNIT_TEST_TAGS="example codegen awsinclude" SDK_WITH_VENDOR_PKGS=$(shell go list -tags ${UNIT_TEST_TAGS} ./... | grep -v "/vendor/src") SDK_ONLY_PKGS=$(shell go list ./... | grep -v "/vendor/") SDK_UNIT_TEST_ONLY_PKGS=$(shell go list -tags ${UNIT_TEST_TAGS} ./... | grep -v "/vendor/") SDK_GO_1_4=$(shell go version | grep "go1.4") SDK_GO_1_5=$(shell go version | grep "go1.5") +SDK_GO_1_6=$(shell go version | grep "go1.6") SDK_GO_VERSION=$(shell go version | awk '''{print $$3}''' | tr -d '''\n''') all: get-deps generate unit @@ -59,6 +61,18 @@ unit-with-race-cover: get-deps-tests build verify @echo "go test SDK and vendor packages" @go test -tags ${UNIT_TEST_TAGS} -race -cpu=1,2,4 $(SDK_UNIT_TEST_ONLY_PKGS) +ci-test: ci-test-generate unit-with-race-cover ci-test-generate-validate + +ci-test-generate: get-deps + @echo "CI test generated code" + @if [ \( -z "${SDK_GO_1_6}" \) -a \( -z "${SDK_GO_1_5}" \) ]; then make generate; else echo "skipping generate"; fi + +ci-test-generate-validate: + @echo "CI test validate no generated code changes" + @gitstatus=`if [ \( -z "${SDK_GO_1_6}" \) -a \( -z "${SDK_GO_1_5}" \) ]; then git status --porcelain; else echo "skipping validation"; fi`; \ + echo "$$gitstatus"; \ + if [ "$$gitstatus" != "" ] && [ "$$gitstatus" != "skipping validation" ]; then git diff; exit 1; fi + integration: get-deps-tests integ-custom smoke-tests performance integ-custom: @@ -73,7 +87,7 @@ smoke-tests: get-deps-tests performance: get-deps-tests AWS_TESTING_LOG_RESULTS=${log-detailed} AWS_TESTING_REGION=$(region) AWS_TESTING_DB_TABLE=$(table) gucumber -go-tags "integration" ./awstesting/performance -sandbox-tests: sandbox-test-go15 sandbox-test-go15-novendorexp sandbox-test-go16 sandbox-test-go17 sandbox-test-go18 sandbox-test-gotip +sandbox-tests: sandbox-test-go15 sandbox-test-go15-novendorexp sandbox-test-go16 sandbox-test-go17 sandbox-test-go18 sandbox-test-go19 sandbox-test-gotip sandbox-build-go15: docker build -f ./awstesting/sandbox/Dockerfile.test.go1.5 -t "aws-sdk-go-1.5" . @@ -110,6 +124,13 @@ sandbox-go18: sandbox-build-go18 sandbox-test-go18: sandbox-build-go18 docker run -t aws-sdk-go-1.8 +sandbox-build-go19: + docker build -f ./awstesting/sandbox/Dockerfile.test.go1.8 -t "aws-sdk-go-1.9" . +sandbox-go19: sandbox-build-go19 + docker run -i -t aws-sdk-go-1.9 bash +sandbox-test-go19: sandbox-build-go19 + docker run -t aws-sdk-go-1.9 + sandbox-build-gotip: @echo "Run make update-aws-golang-tip, if this test fails because missing aws-golang:tip container" docker build -f ./awstesting/sandbox/Dockerfile.test.gotip -t "aws-sdk-go-tip" . @@ -126,7 +147,7 @@ verify: get-deps-verify lint vet lint: @echo "go lint SDK and vendor packages" @lint=`if [ \( -z "${SDK_GO_1_4}" \) -a \( -z "${SDK_GO_1_5}" \) ]; then golint ./...; else echo "skipping golint"; fi`; \ - lint=`echo "$$lint" | grep -E -v -e ${LINTIGNOREDOT} -e ${LINTIGNOREDOC} -e ${LINTIGNORECONST} -e ${LINTIGNORESTUTTER} -e ${LINTIGNOREINFLECT} -e ${LINTIGNOREDEPS} -e ${LINTIGNOREINFLECTS3UPLOAD}`; \ + lint=`echo "$$lint" | grep -E -v -e ${LINTIGNOREDOT} -e ${LINTIGNOREDOC} -e ${LINTIGNORECONST} -e ${LINTIGNORESTUTTER} -e ${LINTIGNOREINFLECT} -e ${LINTIGNOREDEPS} -e ${LINTIGNOREINFLECTS3UPLOAD} -e ${LINTIGNOREPKGCOMMENT}`; \ echo "$$lint"; \ if [ "$$lint" != "" ] && [ "$$lint" != "skipping golint" ]; then exit 1; fi @@ -152,6 +173,7 @@ get-deps-tests: go get github.com/stretchr/testify go get github.com/smartystreets/goconvey go get golang.org/x/net/html + go get golang.org/x/net/http2 get-deps-verify: @echo "go get SDK verification utilities" diff --git a/vendor/github.com/aws/aws-sdk-go/README.md b/vendor/github.com/aws/aws-sdk-go/README.md index 4f2925d..3200765 100644 --- a/vendor/github.com/aws/aws-sdk-go/README.md +++ b/vendor/github.com/aws/aws-sdk-go/README.md @@ -1,9 +1,13 @@ -# AWS SDK for Go [![API Reference](https://img.shields.io/badge/api-reference-blue.svg)](https://docs.aws.amazon.com/sdk-for-go/api) [![Join the chat at https://gitter.im/aws/aws-sdk-go](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/aws/aws-sdk-go?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Build Status](https://img.shields.io/travis/aws/aws-sdk-go.svg)](https://travis-ci.org/aws/aws-sdk-go) [![Apache V2 License](https://img.shields.io/badge/license-Apache%20V2-blue.svg)](https://github.com/aws/aws-sdk-go/blob/master/LICENSE.txt) +[![API Reference](http://img.shields.io/badge/api-reference-blue.svg)](http://docs.aws.amazon.com/sdk-for-go/api) [![Join the chat at https://gitter.im/aws/aws-sdk-go](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/aws/aws-sdk-go?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Build Status](https://img.shields.io/travis/aws/aws-sdk-go.svg)](https://travis-ci.org/aws/aws-sdk-go) [![Apache V2 License](http://img.shields.io/badge/license-Apache%20V2-blue.svg)](https://github.com/aws/aws-sdk-go/blob/master/LICENSE.txt) + +# AWS SDK for Go aws-sdk-go is the official AWS SDK for the Go programming language. Checkout our [release notes](https://github.com/aws/aws-sdk-go/releases) for information about the latest bug fixes, updates, and features added to the SDK. +We [announced](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-2-0-developer-preview/) the Developer Preview for the [v2 AWS SDK for Go](https://github.com/aws/aws-sdk-go-v2). The v2 SDK is available at https://github.com/aws/aws-sdk-go-v2, and `go get github.com/aws/aws-sdk-go-v2` via `go get`. Check out the v2 SDK's [changes and updates](https://github.com/aws/aws-sdk-go-v2/blob/master/CHANGELOG.md), and let us know what you think. We want your feedback. + ## Installing If you are using Go 1.5 with the `GO15VENDOREXPERIMENT=1` vendoring flag, or 1.6 and higher you can use the following command to retrieve the SDK. The SDK's non-testing dependencies will be included and are vendored in the `vendor` folder. @@ -26,10 +30,11 @@ These two processes will still include the `vendor` folder and it should be dele ## Getting Help Please use these community resources for getting help. We use the GitHub issues for tracking bugs and feature requests. + * Ask a question on [StackOverflow](http://stackoverflow.com/) and tag it with the [`aws-sdk-go`](http://stackoverflow.com/questions/tagged/aws-sdk-go) tag. * Come join the AWS SDK for Go community chat on [gitter](https://gitter.im/aws/aws-sdk-go). * Open a support ticket with [AWS Support](http://docs.aws.amazon.com/awssupport/latest/user/getting-started.html). -* If you think you may of found a bug, please open an [issue](https://github.com/aws/aws-sdk-go/issues/new). +* If you think you may have found a bug, please open an [issue](https://github.com/aws/aws-sdk-go/issues/new). ## Opening Issues @@ -47,113 +52,397 @@ The GitHub issues are intended for bug reports and feature requests. For help an [`SDK Examples`](https://github.com/aws/aws-sdk-go/tree/master/example) - Included in the SDK's repo are a several hand crafted examples using the SDK features and AWS services. -## Configuring Credentials +## Overview of SDK's Packages + +The SDK is composed of two main components, SDK core, and service clients. +The SDK core packages are all available under the aws package at the root of +the SDK. Each client for a supported AWS service is available within its own +package under the service folder at the root of the SDK. + + * aws - SDK core, provides common shared types such as Config, Logger, + and utilities to make working with API parameters easier. + + * awserr - Provides the error interface that the SDK will use for all + errors that occur in the SDK's processing. This includes service API + response errors as well. The Error type is made up of a code and message. + Cast the SDK's returned error type to awserr.Error and call the Code + method to compare returned error to specific error codes. See the package's + documentation for additional values that can be extracted such as RequestID. + + * credentials - Provides the types and built in credentials providers + the SDK will use to retrieve AWS credentials to make API requests with. + Nested under this folder are also additional credentials providers such as + stscreds for assuming IAM roles, and ec2rolecreds for EC2 Instance roles. + + * endpoints - Provides the AWS Regions and Endpoints metadata for the SDK. + Use this to lookup AWS service endpoint information such as which services + are in a region, and what regions a service is in. Constants are also provided + for all region identifiers, e.g UsWest2RegionID for "us-west-2". + + * session - Provides initial default configuration, and load + configuration from external sources such as environment and shared + credentials file. + + * request - Provides the API request sending, and retry logic for the SDK. + This package also includes utilities for defining your own request + retryer, and configuring how the SDK processes the request. + + * service - Clients for AWS services. All services supported by the SDK are + available under this folder. + +## How to Use the SDK's AWS Service Clients + +The SDK includes the Go types and utilities you can use to make requests to +AWS service APIs. Within the service folder at the root of the SDK you'll find +a package for each AWS service the SDK supports. All service clients follows +a common pattern of creation and usage. + +When creating a client for an AWS service you'll first need to have a Session +value constructed. The Session provides shared configuration that can be shared +between your service clients. When service clients are created you can pass +in additional configuration via the aws.Config type to override configuration +provided by in the Session to create service client instances with custom +configuration. + +Once the service's client is created you can use it to make API requests the +AWS service. These clients are safe to use concurrently. + +## Configuring the SDK + +In the AWS SDK for Go, you can configure settings for service clients, such +as the log level and maximum number of retries. Most settings are optional; +however, for each service client, you must specify a region and your credentials. +The SDK uses these values to send requests to the correct AWS region and sign +requests with the correct credentials. You can specify these values as part +of a session or as environment variables. -Before using the SDK, ensure that you've configured credentials. The best -way to configure credentials on a development machine is to use the -`~/.aws/credentials` file, which might look like: +See the SDK's [configuration guide][config_guide] for more information. +See the [session][session_pkg] package documentation for more information on how to use Session +with the SDK. + +See the [Config][config_typ] type in the [aws][aws_pkg] package for more information on configuration +options. + +[config_guide]: https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html +[session_pkg]: https://docs.aws.amazon.com/sdk-for-go/api/aws/session/ +[config_typ]: https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config +[aws_pkg]: https://docs.aws.amazon.com/sdk-for-go/api/aws/ + +### Configuring Credentials + +When using the SDK you'll generally need your AWS credentials to authenticate +with AWS services. The SDK supports multiple methods of supporting these +credentials. By default the SDK will source credentials automatically from +its default credential chain. See the session package for more information +on this chain, and how to configure it. The common items in the credential +chain are the following: + + * Environment Credentials - Set of environment variables that are useful + when sub processes are created for specific roles. + + * Shared Credentials file (~/.aws/credentials) - This file stores your + credentials based on a profile name and is useful for local development. + + * EC2 Instance Role Credentials - Use EC2 Instance Role to assign credentials + to application running on an EC2 instance. This removes the need to manage + credential files in production. + +Credentials can be configured in code as well by setting the Config's Credentials +value to a custom provider or using one of the providers included with the +SDK to bypass the default credential chain and use a custom one. This is +helpful when you want to instruct the SDK to only use a specific set of +credentials or providers. + +This example creates a credential provider for assuming an IAM role, "myRoleARN" +and configures the S3 service client to use that role for API requests. + +```go + // Initial credentials loaded from SDK's default credential chain. Such as + // the environment, shared credentials (~/.aws/credentials), or EC2 Instance + // Role. These credentials will be used to to make the STS Assume Role API. + sess := session.Must(session.NewSession()) + + // Create the credentials from AssumeRoleProvider to assume the role + // referenced by the "myRoleARN" ARN. + creds := stscreds.NewCredentials(sess, "myRoleArn") + + // Create service client value configured for credentials + // from assumed role. + svc := s3.New(sess, &aws.Config{Credentials: creds}) ``` -[default] -aws_access_key_id = AKID1234567890 -aws_secret_access_key = MY-SECRET-KEY + +See the [credentials][credentials_pkg] package documentation for more information on credential +providers included with the SDK, and how to customize the SDK's usage of +credentials. + +The SDK has support for the shared configuration file (~/.aws/config). This +support can be enabled by setting the environment variable, "AWS_SDK_LOAD_CONFIG=1", +or enabling the feature in code when creating a Session via the +Option's SharedConfigState parameter. + +```go + sess := session.Must(session.NewSessionWithOptions(session.Options{ + SharedConfigState: session.SharedConfigEnable, + })) ``` -You can learn more about the credentials file from this -[blog post](http://blogs.aws.amazon.com/security/post/Tx3D6U6WSFGOK2H/A-New-and-Standardized-Way-to-Manage-Credentials-in-the-AWS-SDKs). +[credentials_pkg]: https://docs.aws.amazon.com/sdk-for-go/api/aws/credentials + +### Configuring AWS Region -Alternatively, you can set the following environment variables: +In addition to the credentials you'll need to specify the region the SDK +will use to make AWS API requests to. In the SDK you can specify the region +either with an environment variable, or directly in code when a Session or +service client is created. The last value specified in code wins if the region +is specified multiple ways. +To set the region via the environment variable set the "AWS_REGION" to the +region you want to the SDK to use. Using this method to set the region will +allow you to run your application in multiple regions without needing additional +code in the application to select the region. + + AWS_REGION=us-west-2 + +The endpoints package includes constants for all regions the SDK knows. The +values are all suffixed with RegionID. These values are helpful, because they +reduce the need to type the region string manually. + +To set the region on a Session use the aws package's Config struct parameter +Region to the AWS region you want the service clients created from the session to +use. This is helpful when you want to create multiple service clients, and +all of the clients make API requests to the same region. + +```go + sess := session.Must(session.NewSession(&aws.Config{ + Region: aws.String(endpoints.UsWest2RegionID), + })) +``` + +See the [endpoints][endpoints_pkg] package for the AWS Regions and Endpoints metadata. + +In addition to setting the region when creating a Session you can also set +the region on a per service client bases. This overrides the region of a +Session. This is helpful when you want to create service clients in specific +regions different from the Session's region. + +```go + svc := s3.New(sess, &aws.Config{ + Region: aws.String(endpoints.UsWest2RegionID), + }) ``` -AWS_ACCESS_KEY_ID=AKID1234567890 -AWS_SECRET_ACCESS_KEY=MY-SECRET-KEY + +See the [Config][config_typ] type in the [aws][aws_pkg] package for more information and additional +options such as setting the Endpoint, and other service client configuration options. + +[endpoints_pkg]: https://docs.aws.amazon.com/sdk-for-go/api/aws/endpoints/ + +## Making API Requests + +Once the client is created you can make an API request to the service. +Each API method takes a input parameter, and returns the service response +and an error. The SDK provides methods for making the API call in multiple ways. + +In this list we'll use the S3 ListObjects API as an example for the different +ways of making API requests. + + * ListObjects - Base API operation that will make the API request to the service. + + * ListObjectsRequest - API methods suffixed with Request will construct the + API request, but not send it. This is also helpful when you want to get a + presigned URL for a request, and share the presigned URL instead of your + application making the request directly. + + * ListObjectsPages - Same as the base API operation, but uses a callback to + automatically handle pagination of the API's response. + + * ListObjectsWithContext - Same as base API operation, but adds support for + the Context pattern. This is helpful for controlling the canceling of in + flight requests. See the Go standard library context package for more + information. This method also takes request package's Option functional + options as the variadic argument for modifying how the request will be + made, or extracting information from the raw HTTP response. + + * ListObjectsPagesWithContext - same as ListObjectsPages, but adds support for + the Context pattern. Similar to ListObjectsWithContext this method also + takes the request package's Option function option types as the variadic + argument. + +In addition to the API operations the SDK also includes several higher level +methods that abstract checking for and waiting for an AWS resource to be in +a desired state. In this list we'll use WaitUntilBucketExists to demonstrate +the different forms of waiters. + + * WaitUntilBucketExists. - Method to make API request to query an AWS service for + a resource's state. Will return successfully when that state is accomplished. + + * WaitUntilBucketExistsWithContext - Same as WaitUntilBucketExists, but adds + support for the Context pattern. In addition these methods take request + package's WaiterOptions to configure the waiter, and how underlying request + will be made by the SDK. + +The API method will document which error codes the service might return for +the operation. These errors will also be available as const strings prefixed +with "ErrCode" in the service client's package. If there are no errors listed +in the API's SDK documentation you'll need to consult the AWS service's API +documentation for the errors that could be returned. + +```go + ctx := context.Background() + + result, err := svc.GetObjectWithContext(ctx, &s3.GetObjectInput{ + Bucket: aws.String("my-bucket"), + Key: aws.String("my-key"), + }) + if err != nil { + // Cast err to awserr.Error to handle specific error codes. + aerr, ok := err.(awserr.Error) + if ok && aerr.Code() == s3.ErrCodeNoSuchKey { + // Specific error code handling + } + return err + } + + // Make sure to close the body when done with it for S3 GetObject APIs or + // will leak connections. + defer result.Body.Close() + + fmt.Println("Object Size:", aws.Int64Value(result.ContentLength)) ``` -### AWS shared config file (`~/.aws/config`) -The AWS SDK for Go added support the shared config file in release [v1.3.0](https://github.com/aws/aws-sdk-go/releases/tag/v1.3.0). You can opt into enabling support for the shared config by setting the environment variable `AWS_SDK_LOAD_CONFIG` to a truthy value. See the [Session](https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/sessions.html) docs for more information about this feature. +### API Request Pagination and Resource Waiters -## Using the Go SDK +Pagination helper methods are suffixed with "Pages", and provide the +functionality needed to round trip API page requests. Pagination methods +take a callback function that will be called for each page of the API's response. -To use a service in the SDK, create a service variable by calling the `New()` -function. Once you have a service client, you can call API operations which each -return response data and a possible error. +```go + objects := []string{} + err := svc.ListObjectsPagesWithContext(ctx, &s3.ListObjectsInput{ + Bucket: aws.String(myBucket), + }, func(p *s3.ListObjectsOutput, lastPage bool) bool { + for _, o := range p.Contents { + objects = append(objects, aws.StringValue(o.Key)) + } + return true // continue paging + }) + if err != nil { + panic(fmt.Sprintf("failed to list objects for bucket, %s, %v", myBucket, err)) + } + + fmt.Println("Objects in bucket:", objects) +``` -For example the following code shows how to upload an object to Amazon S3 with a Context timeout. +Waiter helper methods provide the functionality to wait for an AWS resource +state. These methods abstract the logic needed to check the state of an +AWS resource, and wait until that resource is in a desired state. The waiter +will block until the resource is in the state that is desired, an error occurs, +or the waiter times out. If a resource times out the error code returned will +be request.WaiterResourceNotReadyErrorCode. ```go -package main - -import ( - "context" - "flag" - "fmt" - "os" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/session" - "github.com/aws/aws-sdk-go/service/s3" -) - -// Uploads a file to S3 given a bucket and object key. Also takes a duration -// value to terminate the update if it doesn't complete within that time. -// -// The AWS Region needs to be provided in the AWS shared config or on the -// environment variable as `AWS_REGION`. Credentials also must be provided -// Will default to shared config file, but can load from environment if provided. -// -// Usage: -// # Upload myfile.txt to myBucket/myKey. Must complete within 10 minutes or will fail -// go run withContext.go -b mybucket -k myKey -d 10m < myfile.txt -func main() { - var bucket, key string - var timeout time.Duration - - flag.StringVar(&bucket, "b", "", "Bucket name.") - flag.StringVar(&key, "k", "", "Object key name.") - flag.DurationVar(&timeout, "d", 0, "Upload timeout.") - flag.Parse() - - sess := session.Must(session.NewSession()) - svc := s3.New(sess) - - // Create a context with a timeout that will abort the upload if it takes - // more than the passed in timeout. - ctx := context.Background() - var cancelFn func() - if timeout > 0 { - ctx, cancelFn = context.WithTimeout(ctx, timeout) - } - // Ensure the context is canceled to prevent leaking. - // See context package for more information, https://golang.org/pkg/context/ - defer cancelFn() - - // Uploads the object to S3. The Context will interrupt the request if the - // timeout expires. - _, err := svc.PutObjectWithContext(ctx, &s3.PutObjectInput{ - Bucket: aws.String(bucket), - Key: aws.String(key), - Body: os.Stdin, - }) - if err != nil { - if aerr, ok := err.(awserr.Error); ok && aerr.Code() == request.CanceledErrorCode { - // If the SDK can determine the request or retry delay was canceled - // by a context the CanceledErrorCode error code will be returned. - fmt.Fprintf(os.Stderr, "upload canceled due to timeout, %v\n", err) - } else { - fmt.Fprintf(os.Stderr, "failed to upload object, %v\n", err) - } - os.Exit(1) - } - - fmt.Printf("successfully uploaded file to %s/%s\n", bucket, key) -} + err := svc.WaitUntilBucketExistsWithContext(ctx, &s3.HeadBucketInput{ + Bucket: aws.String(myBucket), + }) + if err != nil { + aerr, ok := err.(awserr.Error) + if ok && aerr.Code() == request.WaiterResourceNotReadyErrorCode { + fmt.Fprintf(os.Stderr, "timed out while waiting for bucket to exist") + } + panic(fmt.Errorf("failed to wait for bucket to exist, %v", err)) + } + fmt.Println("Bucket", myBucket, "exists") ``` -You can find more information and operations in our -[API documentation](https://docs.aws.amazon.com/sdk-for-go/api/). +## Complete SDK Example + +This example shows a complete working Go file which will upload a file to S3 +and use the Context pattern to implement timeout logic that will cancel the +request if it takes too long. This example highlights how to use sessions, +create a service client, make a request, handle the error, and process the +response. + +```go + package main + + import ( + "context" + "flag" + "fmt" + "os" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/aws/session" + "github.com/aws/aws-sdk-go/service/s3" + ) + + // Uploads a file to S3 given a bucket and object key. Also takes a duration + // value to terminate the update if it doesn't complete within that time. + // + // The AWS Region needs to be provided in the AWS shared config or on the + // environment variable as `AWS_REGION`. Credentials also must be provided + // Will default to shared config file, but can load from environment if provided. + // + // Usage: + // # Upload myfile.txt to myBucket/myKey. Must complete within 10 minutes or will fail + // go run withContext.go -b mybucket -k myKey -d 10m < myfile.txt + func main() { + var bucket, key string + var timeout time.Duration + + flag.StringVar(&bucket, "b", "", "Bucket name.") + flag.StringVar(&key, "k", "", "Object key name.") + flag.DurationVar(&timeout, "d", 0, "Upload timeout.") + flag.Parse() + + // All clients require a Session. The Session provides the client with + // shared configuration such as region, endpoint, and credentials. A + // Session should be shared where possible to take advantage of + // configuration and credential caching. See the session package for + // more information. + sess := session.Must(session.NewSession()) + + // Create a new instance of the service's client with a Session. + // Optional aws.Config values can also be provided as variadic arguments + // to the New function. This option allows you to provide service + // specific configuration. + svc := s3.New(sess) + + // Create a context with a timeout that will abort the upload if it takes + // more than the passed in timeout. + ctx := context.Background() + var cancelFn func() + if timeout > 0 { + ctx, cancelFn = context.WithTimeout(ctx, timeout) + } + // Ensure the context is canceled to prevent leaking. + // See context package for more information, https://golang.org/pkg/context/ + defer cancelFn() + + // Uploads the object to S3. The Context will interrupt the request if the + // timeout expires. + _, err := svc.PutObjectWithContext(ctx, &s3.PutObjectInput{ + Bucket: aws.String(bucket), + Key: aws.String(key), + Body: os.Stdin, + }) + if err != nil { + if aerr, ok := err.(awserr.Error); ok && aerr.Code() == request.CanceledErrorCode { + // If the SDK can determine the request or retry delay was canceled + // by a context the CanceledErrorCode error code will be returned. + fmt.Fprintf(os.Stderr, "upload canceled due to timeout, %v\n", err) + } else { + fmt.Fprintf(os.Stderr, "failed to upload object, %v\n", err) + } + os.Exit(1) + } + + fmt.Printf("successfully uploaded file to %s/%s\n", bucket, key) + } +``` ## License diff --git a/vendor/github.com/aws/aws-sdk-go/aws/awsutil/copy_test.go b/vendor/github.com/aws/aws-sdk-go/aws/awsutil/copy_test.go index 0e75c5e..007b37b 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/awsutil/copy_test.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/awsutil/copy_test.go @@ -5,11 +5,11 @@ import ( "fmt" "io" "io/ioutil" + "reflect" "testing" "time" "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/stretchr/testify/assert" ) func ExampleCopy() { @@ -81,12 +81,24 @@ func TestCopy1(t *testing.T) { awsutil.Copy(&f2, f1) // Values are equal - assert.Equal(t, f2.A, f1.A) - assert.Equal(t, f2.B, f1.B) - assert.Equal(t, f2.C, f1.C) - assert.Equal(t, f2.D, f1.D) - assert.Equal(t, f2.E.B, f1.E.B) - assert.Equal(t, f2.E.D, f1.E.D) + if v1, v2 := f2.A, f1.A; v1 != v2 { + t.Errorf("expected values to be equivalent but received %v and %v", v1, v2) + } + if v1, v2 := f2.B, f1.B; !reflect.DeepEqual(v1, v2) { + t.Errorf("expected values to be equivalent but received %v and %v", v1, v2) + } + if v1, v2 := f2.C, f1.C; !reflect.DeepEqual(v1, v2) { + t.Errorf("expected values to be equivalent but received %v and %v", v1, v2) + } + if v1, v2 := f2.D, f1.D; !v1.Equal(*v2) { + t.Errorf("expected values to be equivalent but received %v and %v", v1, v2) + } + if v1, v2 := f2.E.B, f1.E.B; !reflect.DeepEqual(v1, v2) { + t.Errorf("expected values to be equivalent but received %v and %v", v1, v2) + } + if v1, v2 := f2.E.D, f1.E.D; v1 != v2 { + t.Errorf("expected values to be equivalent but received %v and %v", v1, v2) + } // But pointers are not! str3 := "nothello" @@ -99,14 +111,30 @@ func TestCopy1(t *testing.T) { *f2.E.B = int3 f2.E.c = 5 f2.E.D = 5 - assert.NotEqual(t, f2.A, f1.A) - assert.NotEqual(t, f2.B, f1.B) - assert.NotEqual(t, f2.C, f1.C) - assert.NotEqual(t, f2.D, f1.D) - assert.NotEqual(t, f2.E.a, f1.E.a) - assert.NotEqual(t, f2.E.B, f1.E.B) - assert.NotEqual(t, f2.E.c, f1.E.c) - assert.NotEqual(t, f2.E.D, f1.E.D) + if v1, v2 := f2.A, f1.A; v1 == v2 { + t.Errorf("expected values to be not equivalent, but received %v", v1) + } + if v1, v2 := f2.B, f1.B; reflect.DeepEqual(v1, v2) { + t.Errorf("expected values to be not equivalent, but received %v", v1) + } + if v1, v2 := f2.C, f1.C; reflect.DeepEqual(v1, v2) { + t.Errorf("expected values to be not equivalent, but received %v", v1) + } + if v1, v2 := f2.D, f1.D; v1 == v2 { + t.Errorf("expected values to be not equivalent, but received %v", v1) + } + if v1, v2 := f2.E.a, f1.E.a; v1 == v2 { + t.Errorf("expected values to be not equivalent, but received %v", v1) + } + if v1, v2 := f2.E.B, f1.E.B; v1 == v2 { + t.Errorf("expected values to be not equivalent, but received %v", v1) + } + if v1, v2 := f2.E.c, f1.E.c; v1 == v2 { + t.Errorf("expected values to be not equivalent, but received %v", v1) + } + if v1, v2 := f2.E.D, f1.E.D; v1 == v2 { + t.Errorf("expected values to be not equivalent, but received %v", v1) + } } func TestCopyNestedWithUnexported(t *testing.T) { @@ -125,10 +153,18 @@ func TestCopyNestedWithUnexported(t *testing.T) { awsutil.Copy(&f2, f1) // Values match - assert.Equal(t, f2.A, f1.A) - assert.NotEqual(t, f2.B, f1.B) - assert.NotEqual(t, f2.B.a, f1.B.a) - assert.Equal(t, f2.B.B, f2.B.B) + if v1, v2 := f2.A, f1.A; v1 != v2 { + t.Errorf("expected values to be equivalent but received %v and %v", v1, v2) + } + if v1, v2 := f2.B, f1.B; v1 == v2 { + t.Errorf("expected values to be not equivalent, but received %v", v1) + } + if v1, v2 := f2.B.a, f1.B.a; v1 == v2 { + t.Errorf("expected values to be not equivalent, but received %v", v1) + } + if v1, v2 := f2.B.B, f2.B.B; v1 != v2 { + t.Errorf("expected values to be equivalent but received %v and %v", v1, v2) + } } func TestCopyIgnoreNilMembers(t *testing.T) { @@ -139,34 +175,56 @@ func TestCopyIgnoreNilMembers(t *testing.T) { } f := &Foo{} - assert.Nil(t, f.A) - assert.Nil(t, f.B) - assert.Nil(t, f.C) + if v1 := f.A; v1 != nil { + t.Errorf("expected nil, but received %v", v1) + } + if v1 := f.B; v1 != nil { + t.Errorf("expected nil, but received %v", v1) + } + if v1 := f.C; v1 != nil { + t.Errorf("expected nil, but received %v", v1) + } var f2 Foo awsutil.Copy(&f2, f) - assert.Nil(t, f2.A) - assert.Nil(t, f2.B) - assert.Nil(t, f2.C) + if v1 := f2.A; v1 != nil { + t.Errorf("expected nil, but received %v", v1) + } + if v1 := f2.B; v1 != nil { + t.Errorf("expected nil, but received %v", v1) + } + if v1 := f2.C; v1 != nil { + t.Errorf("expected nil, but received %v", v1) + } fcopy := awsutil.CopyOf(f) f3 := fcopy.(*Foo) - assert.Nil(t, f3.A) - assert.Nil(t, f3.B) - assert.Nil(t, f3.C) + if v1 := f3.A; v1 != nil { + t.Errorf("expected nil, but received %v", v1) + } + if v1 := f3.B; v1 != nil { + t.Errorf("expected nil, but received %v", v1) + } + if v1 := f3.C; v1 != nil { + t.Errorf("expected nil, but received %v", v1) + } } func TestCopyPrimitive(t *testing.T) { str := "hello" var s string awsutil.Copy(&s, &str) - assert.Equal(t, "hello", s) + if v1, v2 := "hello", s; v1 != v2 { + t.Errorf("expected values to be equivalent but received %v and %v", v1, v2) + } } func TestCopyNil(t *testing.T) { var s string awsutil.Copy(&s, nil) - assert.Equal(t, "", s) + if v1, v2 := "", s; v1 != v2 { + t.Errorf("expected values to be equivalent but received %v and %v", v1, v2) + } } func TestCopyReader(t *testing.T) { @@ -174,13 +232,21 @@ func TestCopyReader(t *testing.T) { var r io.Reader awsutil.Copy(&r, buf) b, err := ioutil.ReadAll(r) - assert.NoError(t, err) - assert.Equal(t, []byte("hello world"), b) + if err != nil { + t.Errorf("expected no error, but received %v", err) + } + if v1, v2 := []byte("hello world"), b; !bytes.Equal(v1, v2) { + t.Errorf("expected values to be equivalent but received %v and %v", v1, v2) + } // empty bytes because this is not a deep copy b, err = ioutil.ReadAll(buf) - assert.NoError(t, err) - assert.Equal(t, []byte(""), b) + if err != nil { + t.Errorf("expected no error, but received %v", err) + } + if v1, v2 := []byte(""), b; !bytes.Equal(v1, v2) { + t.Errorf("expected values to be equivalent but received %v and %v", v1, v2) + } } func TestCopyDifferentStructs(t *testing.T) { @@ -226,17 +292,39 @@ func TestCopyDifferentStructs(t *testing.T) { awsutil.Copy(&f2, f1) // Values are equal - assert.Equal(t, f2.A, f1.A) - assert.Equal(t, f2.B, f1.B) - assert.Equal(t, f2.C, f1.C) - assert.Equal(t, "unique", f1.SrcUnique) - assert.Equal(t, 1, f1.SameNameDiffType) - assert.Equal(t, 0, f2.DstUnique) - assert.Equal(t, "", f2.SameNameDiffType) - assert.Equal(t, int1, *f1.unexportedPtr) - assert.Nil(t, f2.unexportedPtr) - assert.Equal(t, int2, *f1.ExportedPtr) - assert.Equal(t, int2, *f2.ExportedPtr) + if v1, v2 := f2.A, f1.A; v1 != v2 { + t.Errorf("expected values to be equivalent but received %v and %v", v1, v2) + } + if v1, v2 := f2.B, f1.B; !reflect.DeepEqual(v1, v2) { + t.Errorf("expected values to be equivalent but received %v and %v", v1, v2) + } + if v1, v2 := f2.C, f1.C; !reflect.DeepEqual(v1, v2) { + t.Errorf("expected values to be equivalent but received %v and %v", v1, v2) + } + if v1, v2 := "unique", f1.SrcUnique; v1 != v2 { + t.Errorf("expected values to be equivalent but received %v and %v", v1, v2) + } + if v1, v2 := 1, f1.SameNameDiffType; v1 != v2 { + t.Errorf("expected values to be equivalent but received %v and %v", v1, v2) + } + if v1, v2 := 0, f2.DstUnique; v1 != v2 { + t.Errorf("expected values to be equivalent but received %v and %v", v1, v2) + } + if v1, v2 := "", f2.SameNameDiffType; v1 != v2 { + t.Errorf("expected values to be equivalent but received %v and %v", v1, v2) + } + if v1, v2 := int1, *f1.unexportedPtr; v1 != v2 { + t.Errorf("expected values to be equivalent but received %v and %v", v1, v2) + } + if v1 := f2.unexportedPtr; v1 != nil { + t.Errorf("expected nil, but received %v", v1) + } + if v1, v2 := int2, *f1.ExportedPtr; v1 != v2 { + t.Errorf("expected values to be equivalent but received %v and %v", v1, v2) + } + if v1, v2 := int2, *f2.ExportedPtr; v1 != v2 { + t.Errorf("expected values to be equivalent but received %v and %v", v1, v2) + } } func ExampleCopyOf() { diff --git a/vendor/github.com/aws/aws-sdk-go/aws/awsutil/equal_test.go b/vendor/github.com/aws/aws-sdk-go/aws/awsutil/equal_test.go index 7a5db6e..18d3c5b 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/awsutil/equal_test.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/awsutil/equal_test.go @@ -5,7 +5,6 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/stretchr/testify/assert" ) func TestDeepEqual(t *testing.T) { @@ -24,6 +23,8 @@ func TestDeepEqual(t *testing.T) { } for i, c := range cases { - assert.Equal(t, c.equal, awsutil.DeepEqual(c.a, c.b), "%d, a:%v b:%v, %t", i, c.a, c.b, c.equal) + if awsutil.DeepEqual(c.a, c.b) != c.equal { + t.Errorf("%d, a:%v b:%v, %t", i, c.a, c.b, c.equal) + } } } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/awsutil/path_value_test.go b/vendor/github.com/aws/aws-sdk-go/aws/awsutil/path_value_test.go index b222556..58a05d6 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/awsutil/path_value_test.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/awsutil/path_value_test.go @@ -1,10 +1,10 @@ package awsutil_test import ( + "strings" "testing" "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/stretchr/testify/assert" ) type Struct struct { @@ -50,8 +50,12 @@ func TestValueAtPathSuccess(t *testing.T) { } for i, c := range testCases { v, err := awsutil.ValuesAtPath(c.data, c.path) - assert.NoError(t, err, "case %d, expected no error, %s", i, c.path) - assert.Equal(t, c.expect, v, "case %d, %s", i, c.path) + if err != nil { + t.Errorf("case %v, expected no error, %v", i, c.path) + } + if e, a := c.expect, v; !awsutil.DeepEqual(e, a) { + t.Errorf("case %v, %v", i, c.path) + } } } @@ -78,12 +82,18 @@ func TestValueAtPathFailure(t *testing.T) { for i, c := range testCases { v, err := awsutil.ValuesAtPath(c.data, c.path) if c.errContains != "" { - assert.Contains(t, err.Error(), c.errContains, "case %d, expected error, %s", i, c.path) + if !strings.Contains(err.Error(), c.errContains) { + t.Errorf("case %v, expected error, %v", i, c.path) + } continue } else { - assert.NoError(t, err, "case %d, expected no error, %s", i, c.path) + if err != nil { + t.Errorf("case %v, expected no error, %v", i, c.path) + } + } + if e, a := c.expect, v; !awsutil.DeepEqual(e, a) { + t.Errorf("case %v, %v", i, c.path) } - assert.Equal(t, c.expect, v, "case %d, %s", i, c.path) } } @@ -92,51 +102,81 @@ func TestSetValueAtPathSuccess(t *testing.T) { awsutil.SetValueAtPath(&s, "C", "test1") awsutil.SetValueAtPath(&s, "B.B.C", "test2") awsutil.SetValueAtPath(&s, "B.D.C", "test3") - assert.Equal(t, "test1", s.C) - assert.Equal(t, "test2", s.B.B.C) - assert.Equal(t, "test3", s.B.D.C) + if e, a := "test1", s.C; e != a { + t.Errorf("expected %v, but received %v", e, a) + } + if e, a := "test2", s.B.B.C; e != a { + t.Errorf("expected %v, but received %v", e, a) + } + if e, a := "test3", s.B.D.C; e != a { + t.Errorf("expected %v, but received %v", e, a) + } awsutil.SetValueAtPath(&s, "B.*.C", "test0") - assert.Equal(t, "test0", s.B.B.C) - assert.Equal(t, "test0", s.B.D.C) + if e, a := "test0", s.B.B.C; e != a { + t.Errorf("expected %v, but received %v", e, a) + } + if e, a := "test0", s.B.D.C; e != a { + t.Errorf("expected %v, but received %v", e, a) + } var s2 Struct awsutil.SetValueAtPath(&s2, "b.b.c", "test0") - assert.Equal(t, "test0", s2.B.B.C) + if e, a := "test0", s2.B.B.C; e != a { + t.Errorf("expected %v, but received %v", e, a) + } awsutil.SetValueAtPath(&s2, "A", []Struct{{}}) - assert.Equal(t, []Struct{{}}, s2.A) + if e, a := []Struct{{}}, s2.A; !awsutil.DeepEqual(e, a) { + t.Errorf("expected %v, but received %v", e, a) + } str := "foo" s3 := Struct{} awsutil.SetValueAtPath(&s3, "b.b.c", str) - assert.Equal(t, "foo", s3.B.B.C) + if e, a := "foo", s3.B.B.C; e != a { + t.Errorf("expected %v, but received %v", e, a) + } s3 = Struct{B: &Struct{B: &Struct{C: str}}} awsutil.SetValueAtPath(&s3, "b.b.c", nil) - assert.Equal(t, "", s3.B.B.C) + if e, a := "", s3.B.B.C; e != a { + t.Errorf("expected %v, but received %v", e, a) + } s3 = Struct{} awsutil.SetValueAtPath(&s3, "b.b.c", nil) - assert.Equal(t, "", s3.B.B.C) + if e, a := "", s3.B.B.C; e != a { + t.Errorf("expected %v, but received %v", e, a) + } s3 = Struct{} awsutil.SetValueAtPath(&s3, "b.b.c", &str) - assert.Equal(t, "foo", s3.B.B.C) + if e, a := "foo", s3.B.B.C; e != a { + t.Errorf("expected %v, but received %v", e, a) + } var s4 struct{ Name *string } awsutil.SetValueAtPath(&s4, "Name", str) - assert.Equal(t, str, *s4.Name) + if e, a := str, *s4.Name; e != a { + t.Errorf("expected %v, but received %v", e, a) + } s4 = struct{ Name *string }{} awsutil.SetValueAtPath(&s4, "Name", nil) - assert.Equal(t, (*string)(nil), s4.Name) + if e, a := (*string)(nil), s4.Name; e != a { + t.Errorf("expected %v, but received %v", e, a) + } s4 = struct{ Name *string }{Name: &str} awsutil.SetValueAtPath(&s4, "Name", nil) - assert.Equal(t, (*string)(nil), s4.Name) + if e, a := (*string)(nil), s4.Name; e != a { + t.Errorf("expected %v, but received %v", e, a) + } s4 = struct{ Name *string }{} awsutil.SetValueAtPath(&s4, "Name", &str) - assert.Equal(t, str, *s4.Name) + if e, a := str, *s4.Name; e != a { + t.Errorf("expected %v, but received %v", e, a) + } } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/client/client.go b/vendor/github.com/aws/aws-sdk-go/aws/client/client.go index 48b0fbd..3271a18 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/client/client.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/client/client.go @@ -2,10 +2,8 @@ package client import ( "fmt" - "net/http/httputil" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/client/metadata" "github.com/aws/aws-sdk-go/aws/request" ) @@ -17,6 +15,12 @@ type Config struct { Endpoint string SigningRegion string SigningName string + + // States that the signing name did not come from a modeled source but + // was derived based on other data. Used by service client constructors + // to determine if the signin name can be overriden based on metadata the + // service has. + SigningNameDerived bool } // ConfigProvider provides a generic way for a service client to receive @@ -90,60 +94,3 @@ func (c *Client) AddDebugHandlers() { c.Handlers.Send.PushFrontNamed(request.NamedHandler{Name: "awssdk.client.LogRequest", Fn: logRequest}) c.Handlers.Send.PushBackNamed(request.NamedHandler{Name: "awssdk.client.LogResponse", Fn: logResponse}) } - -const logReqMsg = `DEBUG: Request %s/%s Details: ----[ REQUEST POST-SIGN ]----------------------------- -%s ------------------------------------------------------` - -const logReqErrMsg = `DEBUG ERROR: Request %s/%s: ----[ REQUEST DUMP ERROR ]----------------------------- -%s ------------------------------------------------------` - -func logRequest(r *request.Request) { - logBody := r.Config.LogLevel.Matches(aws.LogDebugWithHTTPBody) - dumpedBody, err := httputil.DumpRequestOut(r.HTTPRequest, logBody) - if err != nil { - r.Config.Logger.Log(fmt.Sprintf(logReqErrMsg, r.ClientInfo.ServiceName, r.Operation.Name, err)) - r.Error = awserr.New(request.ErrCodeRead, "an error occurred during request body reading", err) - return - } - - if logBody { - // Reset the request body because dumpRequest will re-wrap the r.HTTPRequest's - // Body as a NoOpCloser and will not be reset after read by the HTTP - // client reader. - r.ResetBody() - } - - r.Config.Logger.Log(fmt.Sprintf(logReqMsg, r.ClientInfo.ServiceName, r.Operation.Name, string(dumpedBody))) -} - -const logRespMsg = `DEBUG: Response %s/%s Details: ----[ RESPONSE ]-------------------------------------- -%s ------------------------------------------------------` - -const logRespErrMsg = `DEBUG ERROR: Response %s/%s: ----[ RESPONSE DUMP ERROR ]----------------------------- -%s ------------------------------------------------------` - -func logResponse(r *request.Request) { - var msg = "no response data" - if r.HTTPResponse != nil { - logBody := r.Config.LogLevel.Matches(aws.LogDebugWithHTTPBody) - dumpedBody, err := httputil.DumpResponse(r.HTTPResponse, logBody) - if err != nil { - r.Config.Logger.Log(fmt.Sprintf(logRespErrMsg, r.ClientInfo.ServiceName, r.Operation.Name, err)) - r.Error = awserr.New(request.ErrCodeRead, "an error occurred during response body reading", err) - return - } - - msg = string(dumpedBody) - } else if r.Error != nil { - msg = r.Error.Error() - } - r.Config.Logger.Log(fmt.Sprintf(logRespMsg, r.ClientInfo.ServiceName, r.Operation.Name, msg)) -} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/client/default_retryer.go b/vendor/github.com/aws/aws-sdk-go/aws/client/default_retryer.go index 1313478..a397b0d 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/client/default_retryer.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/client/default_retryer.go @@ -1,11 +1,11 @@ package client import ( - "math/rand" - "sync" + "strconv" "time" "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/internal/sdkrand" ) // DefaultRetryer implements basic retry logic using exponential backoff for @@ -15,11 +15,11 @@ import ( // the MaxRetries method: // // type retryer struct { -// service.DefaultRetryer +// client.DefaultRetryer // } // // // This implementation always has 100 max retries -// func (d retryer) MaxRetries() uint { return 100 } +// func (d retryer) MaxRetries() int { return 100 } type DefaultRetryer struct { NumMaxRetries int } @@ -30,25 +30,27 @@ func (d DefaultRetryer) MaxRetries() int { return d.NumMaxRetries } -var seededRand = rand.New(&lockedSource{src: rand.NewSource(time.Now().UnixNano())}) - // RetryRules returns the delay duration before retrying this request again func (d DefaultRetryer) RetryRules(r *request.Request) time.Duration { // Set the upper limit of delay in retrying at ~five minutes minTime := 30 throttle := d.shouldThrottle(r) if throttle { + if delay, ok := getRetryDelay(r); ok { + return delay + } + minTime = 500 } retryCount := r.RetryCount - if retryCount > 13 { - retryCount = 13 - } else if throttle && retryCount > 8 { + if throttle && retryCount > 8 { retryCount = 8 + } else if retryCount > 13 { + retryCount = 13 } - delay := (1 << uint(retryCount)) * (seededRand.Intn(minTime) + minTime) + delay := (1 << uint(retryCount)) * (sdkrand.SeededRand.Intn(minTime) + minTime) return time.Duration(delay) * time.Millisecond } @@ -60,7 +62,7 @@ func (d DefaultRetryer) ShouldRetry(r *request.Request) bool { return *r.Retryable } - if r.HTTPResponse.StatusCode >= 500 { + if r.HTTPResponse.StatusCode >= 500 && r.HTTPResponse.StatusCode != 501 { return true } return r.IsErrorRetryable() || d.shouldThrottle(r) @@ -68,29 +70,47 @@ func (d DefaultRetryer) ShouldRetry(r *request.Request) bool { // ShouldThrottle returns true if the request should be throttled. func (d DefaultRetryer) shouldThrottle(r *request.Request) bool { - if r.HTTPResponse.StatusCode == 502 || - r.HTTPResponse.StatusCode == 503 || - r.HTTPResponse.StatusCode == 504 { - return true + switch r.HTTPResponse.StatusCode { + case 429: + case 502: + case 503: + case 504: + default: + return r.IsErrorThrottle() } - return r.IsErrorThrottle() -} -// lockedSource is a thread-safe implementation of rand.Source -type lockedSource struct { - lk sync.Mutex - src rand.Source + return true } -func (r *lockedSource) Int63() (n int64) { - r.lk.Lock() - n = r.src.Int63() - r.lk.Unlock() - return +// This will look in the Retry-After header, RFC 7231, for how long +// it will wait before attempting another request +func getRetryDelay(r *request.Request) (time.Duration, bool) { + if !canUseRetryAfterHeader(r) { + return 0, false + } + + delayStr := r.HTTPResponse.Header.Get("Retry-After") + if len(delayStr) == 0 { + return 0, false + } + + delay, err := strconv.Atoi(delayStr) + if err != nil { + return 0, false + } + + return time.Duration(delay) * time.Second, true } -func (r *lockedSource) Seed(seed int64) { - r.lk.Lock() - r.src.Seed(seed) - r.lk.Unlock() +// Will look at the status code to see if the retry header pertains to +// the status code. +func canUseRetryAfterHeader(r *request.Request) bool { + switch r.HTTPResponse.StatusCode { + case 429: + case 503: + default: + return false + } + + return true } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/client/default_retryer_test.go b/vendor/github.com/aws/aws-sdk-go/aws/client/default_retryer_test.go new file mode 100644 index 0000000..fddba4e --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/client/default_retryer_test.go @@ -0,0 +1,189 @@ +package client + +import ( + "net/http" + "testing" + "time" + + "github.com/aws/aws-sdk-go/aws/request" +) + +func TestRetryThrottleStatusCodes(t *testing.T) { + cases := []struct { + expectThrottle bool + expectRetry bool + r request.Request + }{ + { + false, + false, + request.Request{ + HTTPResponse: &http.Response{StatusCode: 200}, + }, + }, + { + true, + true, + request.Request{ + HTTPResponse: &http.Response{StatusCode: 429}, + }, + }, + { + true, + true, + request.Request{ + HTTPResponse: &http.Response{StatusCode: 502}, + }, + }, + { + true, + true, + request.Request{ + HTTPResponse: &http.Response{StatusCode: 503}, + }, + }, + { + true, + true, + request.Request{ + HTTPResponse: &http.Response{StatusCode: 504}, + }, + }, + { + false, + true, + request.Request{ + HTTPResponse: &http.Response{StatusCode: 500}, + }, + }, + } + + d := DefaultRetryer{NumMaxRetries: 10} + for i, c := range cases { + throttle := d.shouldThrottle(&c.r) + retry := d.ShouldRetry(&c.r) + + if e, a := c.expectThrottle, throttle; e != a { + t.Errorf("%d: expected %v, but received %v", i, e, a) + } + + if e, a := c.expectRetry, retry; e != a { + t.Errorf("%d: expected %v, but received %v", i, e, a) + } + } +} + +func TestCanUseRetryAfter(t *testing.T) { + cases := []struct { + r request.Request + e bool + }{ + { + request.Request{ + HTTPResponse: &http.Response{StatusCode: 200}, + }, + false, + }, + { + request.Request{ + HTTPResponse: &http.Response{StatusCode: 500}, + }, + false, + }, + { + request.Request{ + HTTPResponse: &http.Response{StatusCode: 429}, + }, + true, + }, + { + request.Request{ + HTTPResponse: &http.Response{StatusCode: 503}, + }, + true, + }, + } + + for i, c := range cases { + a := canUseRetryAfterHeader(&c.r) + if c.e != a { + t.Errorf("%d: expected %v, but received %v", i, c.e, a) + } + } +} + +func TestGetRetryDelay(t *testing.T) { + cases := []struct { + r request.Request + e time.Duration + equal bool + ok bool + }{ + { + request.Request{ + HTTPResponse: &http.Response{StatusCode: 429, Header: http.Header{"Retry-After": []string{"3600"}}}, + }, + 3600 * time.Second, + true, + true, + }, + { + request.Request{ + HTTPResponse: &http.Response{StatusCode: 503, Header: http.Header{"Retry-After": []string{"120"}}}, + }, + 120 * time.Second, + true, + true, + }, + { + request.Request{ + HTTPResponse: &http.Response{StatusCode: 503, Header: http.Header{"Retry-After": []string{"120"}}}, + }, + 1 * time.Second, + false, + true, + }, + { + request.Request{ + HTTPResponse: &http.Response{StatusCode: 503, Header: http.Header{"Retry-After": []string{""}}}, + }, + 0 * time.Second, + true, + false, + }, + } + + for i, c := range cases { + a, ok := getRetryDelay(&c.r) + if c.ok != ok { + t.Errorf("%d: expected %v, but received %v", i, c.ok, ok) + } + + if (c.e != a) == c.equal { + t.Errorf("%d: expected %v, but received %v", i, c.e, a) + } + } +} + +func TestRetryDelay(t *testing.T) { + r := request.Request{} + for i := 0; i < 100; i++ { + rTemp := r + rTemp.HTTPResponse = &http.Response{StatusCode: 500, Header: http.Header{"Retry-After": []string{""}}} + rTemp.RetryCount = i + a, _ := getRetryDelay(&rTemp) + if a > 5*time.Minute { + t.Errorf("retry delay should never be greater than five minutes, received %d", a) + } + } + + for i := 0; i < 100; i++ { + rTemp := r + rTemp.RetryCount = i + rTemp.HTTPResponse = &http.Response{StatusCode: 503, Header: http.Header{"Retry-After": []string{""}}} + a, _ := getRetryDelay(&rTemp) + if a > 5*time.Minute { + t.Errorf("retry delay should never be greater than five minutes, received %d", a) + } + } +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/client/logger.go b/vendor/github.com/aws/aws-sdk-go/aws/client/logger.go new file mode 100644 index 0000000..e223c54 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/client/logger.go @@ -0,0 +1,112 @@ +package client + +import ( + "bytes" + "fmt" + "io" + "io/ioutil" + "net/http/httputil" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/request" +) + +const logReqMsg = `DEBUG: Request %s/%s Details: +---[ REQUEST POST-SIGN ]----------------------------- +%s +-----------------------------------------------------` + +const logReqErrMsg = `DEBUG ERROR: Request %s/%s: +---[ REQUEST DUMP ERROR ]----------------------------- +%s +------------------------------------------------------` + +type logWriter struct { + // Logger is what we will use to log the payload of a response. + Logger aws.Logger + // buf stores the contents of what has been read + buf *bytes.Buffer +} + +func (logger *logWriter) Write(b []byte) (int, error) { + return logger.buf.Write(b) +} + +type teeReaderCloser struct { + // io.Reader will be a tee reader that is used during logging. + // This structure will read from a body and write the contents to a logger. + io.Reader + // Source is used just to close when we are done reading. + Source io.ReadCloser +} + +func (reader *teeReaderCloser) Close() error { + return reader.Source.Close() +} + +func logRequest(r *request.Request) { + logBody := r.Config.LogLevel.Matches(aws.LogDebugWithHTTPBody) + bodySeekable := aws.IsReaderSeekable(r.Body) + dumpedBody, err := httputil.DumpRequestOut(r.HTTPRequest, logBody) + if err != nil { + r.Config.Logger.Log(fmt.Sprintf(logReqErrMsg, r.ClientInfo.ServiceName, r.Operation.Name, err)) + return + } + + if logBody { + if !bodySeekable { + r.SetReaderBody(aws.ReadSeekCloser(r.HTTPRequest.Body)) + } + // Reset the request body because dumpRequest will re-wrap the r.HTTPRequest's + // Body as a NoOpCloser and will not be reset after read by the HTTP + // client reader. + r.ResetBody() + } + + r.Config.Logger.Log(fmt.Sprintf(logReqMsg, r.ClientInfo.ServiceName, r.Operation.Name, string(dumpedBody))) +} + +const logRespMsg = `DEBUG: Response %s/%s Details: +---[ RESPONSE ]-------------------------------------- +%s +-----------------------------------------------------` + +const logRespErrMsg = `DEBUG ERROR: Response %s/%s: +---[ RESPONSE DUMP ERROR ]----------------------------- +%s +-----------------------------------------------------` + +func logResponse(r *request.Request) { + lw := &logWriter{r.Config.Logger, bytes.NewBuffer(nil)} + r.HTTPResponse.Body = &teeReaderCloser{ + Reader: io.TeeReader(r.HTTPResponse.Body, lw), + Source: r.HTTPResponse.Body, + } + + handlerFn := func(req *request.Request) { + body, err := httputil.DumpResponse(req.HTTPResponse, false) + if err != nil { + lw.Logger.Log(fmt.Sprintf(logRespErrMsg, req.ClientInfo.ServiceName, req.Operation.Name, err)) + return + } + + b, err := ioutil.ReadAll(lw.buf) + if err != nil { + lw.Logger.Log(fmt.Sprintf(logRespErrMsg, req.ClientInfo.ServiceName, req.Operation.Name, err)) + return + } + lw.Logger.Log(fmt.Sprintf(logRespMsg, req.ClientInfo.ServiceName, req.Operation.Name, string(body))) + if req.Config.LogLevel.Matches(aws.LogDebugWithHTTPBody) { + lw.Logger.Log(string(b)) + } + } + + const handlerName = "awsdk.client.LogResponse.ResponseBody" + + r.Handlers.Unmarshal.SetBackNamed(request.NamedHandler{ + Name: handlerName, Fn: handlerFn, + }) + r.Handlers.UnmarshalError.SetBackNamed(request.NamedHandler{ + Name: handlerName, Fn: handlerFn, + }) +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/client/logger_test.go b/vendor/github.com/aws/aws-sdk-go/aws/client/logger_test.go new file mode 100644 index 0000000..f0e06b8 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/client/logger_test.go @@ -0,0 +1,144 @@ +package client + +import ( + "bytes" + "fmt" + "io" + "io/ioutil" + "reflect" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/client/metadata" + "github.com/aws/aws-sdk-go/aws/corehandlers" + "github.com/aws/aws-sdk-go/aws/credentials" + "github.com/aws/aws-sdk-go/aws/request" +) + +type mockCloser struct { + closed bool +} + +func (closer *mockCloser) Read(b []byte) (int, error) { + return 0, io.EOF +} + +func (closer *mockCloser) Close() error { + closer.closed = true + return nil +} + +func TestTeeReaderCloser(t *testing.T) { + expected := "FOO" + buf := bytes.NewBuffer([]byte(expected)) + lw := bytes.NewBuffer(nil) + c := &mockCloser{} + closer := teeReaderCloser{ + io.TeeReader(buf, lw), + c, + } + + b := make([]byte, len(expected)) + _, err := closer.Read(b) + closer.Close() + + if expected != lw.String() { + t.Errorf("Expected %q, but received %q", expected, lw.String()) + } + + if err != nil { + t.Errorf("Expected 'nil', but received %v", err) + } + + if !c.closed { + t.Error("Expected 'true', but received 'false'") + } +} + +func TestLogWriter(t *testing.T) { + expected := "FOO" + lw := &logWriter{nil, bytes.NewBuffer(nil)} + lw.Write([]byte(expected)) + + if expected != lw.buf.String() { + t.Errorf("Expected %q, but received %q", expected, lw.buf.String()) + } +} + +func TestLogRequest(t *testing.T) { + cases := []struct { + Body io.ReadSeeker + ExpectBody []byte + LogLevel aws.LogLevelType + }{ + { + Body: aws.ReadSeekCloser(bytes.NewBuffer([]byte("body content"))), + ExpectBody: []byte("body content"), + }, + { + Body: aws.ReadSeekCloser(bytes.NewBuffer([]byte("body content"))), + LogLevel: aws.LogDebugWithHTTPBody, + ExpectBody: []byte("body content"), + }, + { + Body: bytes.NewReader([]byte("body content")), + ExpectBody: []byte("body content"), + }, + { + Body: bytes.NewReader([]byte("body content")), + LogLevel: aws.LogDebugWithHTTPBody, + ExpectBody: []byte("body content"), + }, + } + + for i, c := range cases { + logW := bytes.NewBuffer(nil) + req := request.New( + aws.Config{ + Credentials: credentials.AnonymousCredentials, + Logger: &bufLogger{w: logW}, + LogLevel: aws.LogLevel(c.LogLevel), + }, + metadata.ClientInfo{ + Endpoint: "https://mock-service.mock-region.amazonaws.com", + }, + testHandlers(), + nil, + &request.Operation{ + Name: "APIName", + HTTPMethod: "POST", + HTTPPath: "/", + }, + struct{}{}, nil, + ) + req.SetReaderBody(c.Body) + req.Build() + + logRequest(req) + + b, err := ioutil.ReadAll(req.HTTPRequest.Body) + if err != nil { + t.Fatalf("%d, expect to read SDK request Body", i) + } + + if e, a := c.ExpectBody, b; !reflect.DeepEqual(e, a) { + t.Errorf("%d, expect %v body, got %v", i, e, a) + } + } +} + +type bufLogger struct { + w *bytes.Buffer +} + +func (l *bufLogger) Log(args ...interface{}) { + fmt.Fprintln(l.w, args...) +} + +func testHandlers() request.Handlers { + var handlers request.Handlers + + handlers.Build.PushBackNamed(corehandlers.SDKVersionUserAgentHandler) + + return handlers +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/client/metadata/client_info.go b/vendor/github.com/aws/aws-sdk-go/aws/client/metadata/client_info.go index 4778056..920e9fd 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/client/metadata/client_info.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/client/metadata/client_info.go @@ -3,6 +3,7 @@ package metadata // ClientInfo wraps immutable data from the client.Client structure. type ClientInfo struct { ServiceName string + ServiceID string APIVersion string Endpoint string SigningName string diff --git a/vendor/github.com/aws/aws-sdk-go/aws/config.go b/vendor/github.com/aws/aws-sdk-go/aws/config.go index d1f31f1..5421b5d 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/config.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/config.go @@ -95,7 +95,7 @@ type Config struct { // recoverable failures. // // When nil or the value does not implement the request.Retryer interface, - // the request.DefaultRetryer will be used. + // the client.DefaultRetryer will be used. // // When both Retryer and MaxRetries are non-nil, the former is used and // the latter ignored. @@ -151,6 +151,15 @@ type Config struct { // with accelerate. S3UseAccelerate *bool + // S3DisableContentMD5Validation config option is temporarily disabled, + // For S3 GetObject API calls, #1837. + // + // Set this to `true` to disable the S3 service client from automatically + // adding the ContentMD5 to S3 Object Put and Upload API calls. This option + // will also disable the SDK from performing object ContentMD5 validation + // on GetObject API calls. + S3DisableContentMD5Validation *bool + // Set this to `true` to disable the EC2Metadata client from overriding the // default http.Client's Timeout. This is helpful if you do not want the // EC2Metadata client to create a new http.Client. This options is only @@ -168,7 +177,7 @@ type Config struct { // EC2MetadataDisableTimeoutOverride *bool - // Instructs the endpiont to be generated for a service client to + // Instructs the endpoint to be generated for a service client to // be the dual stack endpoint. The dual stack endpoint will support // both IPv4 and IPv6 addressing. // @@ -336,6 +345,15 @@ func (c *Config) WithS3Disable100Continue(disable bool) *Config { func (c *Config) WithS3UseAccelerate(enable bool) *Config { c.S3UseAccelerate = &enable return c + +} + +// WithS3DisableContentMD5Validation sets a config +// S3DisableContentMD5Validation value returning a Config pointer for chaining. +func (c *Config) WithS3DisableContentMD5Validation(enable bool) *Config { + c.S3DisableContentMD5Validation = &enable + return c + } // WithUseDualStack sets a config UseDualStack value returning a Config @@ -435,6 +453,10 @@ func mergeInConfig(dst *Config, other *Config) { dst.S3UseAccelerate = other.S3UseAccelerate } + if other.S3DisableContentMD5Validation != nil { + dst.S3DisableContentMD5Validation = other.S3DisableContentMD5Validation + } + if other.UseDualStack != nil { dst.UseDualStack = other.UseDualStack } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/context_1_6.go b/vendor/github.com/aws/aws-sdk-go/aws/context_1_6.go index e8cf93d..8fdda53 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/context_1_6.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/context_1_6.go @@ -4,9 +4,9 @@ package aws import "time" -// An emptyCtx is a copy of the the Go 1.7 context.emptyCtx type. This -// is copied to provide a 1.6 and 1.5 safe version of context that is compatible -// with Go 1.7's Context. +// An emptyCtx is a copy of the Go 1.7 context.emptyCtx type. This is copied to +// provide a 1.6 and 1.5 safe version of context that is compatible with Go +// 1.7's Context. // // An emptyCtx is never canceled, has no values, and has no deadline. It is not // struct{}, since vars of this type must have distinct addresses. diff --git a/vendor/github.com/aws/aws-sdk-go/aws/convert_types.go b/vendor/github.com/aws/aws-sdk-go/aws/convert_types.go index 3b73a7d..ff5d58e 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/convert_types.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/convert_types.go @@ -311,6 +311,24 @@ func TimeValue(v *time.Time) time.Time { return time.Time{} } +// SecondsTimeValue converts an int64 pointer to a time.Time value +// representing seconds since Epoch or time.Time{} if the pointer is nil. +func SecondsTimeValue(v *int64) time.Time { + if v != nil { + return time.Unix((*v / 1000), 0) + } + return time.Time{} +} + +// MillisecondsTimeValue converts an int64 pointer to a time.Time value +// representing milliseconds sinch Epoch or time.Time{} if the pointer is nil. +func MillisecondsTimeValue(v *int64) time.Time { + if v != nil { + return time.Unix(0, (*v * 1000000)) + } + return time.Time{} +} + // TimeUnixMilli returns a Unix timestamp in milliseconds from "January 1, 1970 UTC". // The result is undefined if the Unix time cannot be represented by an int64. // Which includes calling TimeUnixMilli on a zero Time is undefined. diff --git a/vendor/github.com/aws/aws-sdk-go/aws/convert_types_test.go b/vendor/github.com/aws/aws-sdk-go/aws/convert_types_test.go index df7a3e5..1a9461e 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/convert_types_test.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/convert_types_test.go @@ -1,10 +1,9 @@ package aws import ( + "reflect" "testing" "time" - - "github.com/stretchr/testify/assert" ) var testCasesStringSlice = [][]string{ @@ -18,14 +17,22 @@ func TestStringSlice(t *testing.T) { continue } out := StringSlice(in) - assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + if e, a := len(out), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } for i := range out { - assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx) + if e, a := in[i], *(out[i]); e != a { + t.Errorf("Unexpected value at idx %d", idx) + } } out2 := StringValueSlice(out) - assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) - assert.Equal(t, in, out2, "Unexpected value at idx %d", idx) + if e, a := len(out2), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } + if e, a := in, out2; !reflect.DeepEqual(e, a) { + t.Errorf("Unexpected value at idx %d", idx) + } } } @@ -39,22 +46,34 @@ func TestStringValueSlice(t *testing.T) { continue } out := StringValueSlice(in) - assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + if e, a := len(out), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } for i := range out { if in[i] == nil { - assert.Empty(t, out[i], "Unexpected value at idx %d", idx) + if out[i] != "" { + t.Errorf("Unexpected value at idx %d", idx) + } } else { - assert.Equal(t, *(in[i]), out[i], "Unexpected value at idx %d", idx) + if e, a := *(in[i]), out[i]; e != a { + t.Errorf("Unexpected value at idx %d", idx) + } } } out2 := StringSlice(out) - assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) + if e, a := len(out2), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } for i := range out2 { if in[i] == nil { - assert.Empty(t, *(out2[i]), "Unexpected value at idx %d", idx) + if *(out2[i]) != "" { + t.Errorf("Unexpected value at idx %d", idx) + } } else { - assert.Equal(t, in[i], out2[i], "Unexpected value at idx %d", idx) + if e, a := *in[i], *out2[i]; e != a { + t.Errorf("Unexpected value at idx %d", idx) + } } } } @@ -70,14 +89,22 @@ func TestStringMap(t *testing.T) { continue } out := StringMap(in) - assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + if e, a := len(out), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } for i := range out { - assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx) + if e, a := in[i], *(out[i]); e != a { + t.Errorf("Unexpected value at idx %d", idx) + } } out2 := StringValueMap(out) - assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) - assert.Equal(t, in, out2, "Unexpected value at idx %d", idx) + if e, a := len(out2), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } + if e, a := in, out2; !reflect.DeepEqual(e, a) { + t.Errorf("Unexpected value at idx %d", idx) + } } } @@ -91,14 +118,22 @@ func TestBoolSlice(t *testing.T) { continue } out := BoolSlice(in) - assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + if e, a := len(out), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } for i := range out { - assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx) + if e, a := in[i], *(out[i]); e != a { + t.Errorf("Unexpected value at idx %d", idx) + } } out2 := BoolValueSlice(out) - assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) - assert.Equal(t, in, out2, "Unexpected value at idx %d", idx) + if e, a := len(out2), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } + if e, a := in, out2; !reflect.DeepEqual(e, a) { + t.Errorf("Unexpected value at idx %d", idx) + } } } @@ -110,22 +145,34 @@ func TestBoolValueSlice(t *testing.T) { continue } out := BoolValueSlice(in) - assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + if e, a := len(out), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } for i := range out { if in[i] == nil { - assert.Empty(t, out[i], "Unexpected value at idx %d", idx) + if out[i] { + t.Errorf("Unexpected value at idx %d", idx) + } } else { - assert.Equal(t, *(in[i]), out[i], "Unexpected value at idx %d", idx) + if e, a := *(in[i]), out[i]; e != a { + t.Errorf("Unexpected value at idx %d", idx) + } } } out2 := BoolSlice(out) - assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) + if e, a := len(out2), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } for i := range out2 { if in[i] == nil { - assert.Empty(t, *(out2[i]), "Unexpected value at idx %d", idx) + if *(out2[i]) { + t.Errorf("Unexpected value at idx %d", idx) + } } else { - assert.Equal(t, in[i], out2[i], "Unexpected value at idx %d", idx) + if e, a := in[i], out2[i]; e != a { + t.Errorf("Unexpected value at idx %d", idx) + } } } } @@ -141,14 +188,22 @@ func TestBoolMap(t *testing.T) { continue } out := BoolMap(in) - assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + if e, a := len(out), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } for i := range out { - assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx) + if e, a := in[i], *(out[i]); e != a { + t.Errorf("Unexpected value at idx %d", idx) + } } out2 := BoolValueMap(out) - assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) - assert.Equal(t, in, out2, "Unexpected value at idx %d", idx) + if e, a := len(out2), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } + if e, a := in, out2; !reflect.DeepEqual(e, a) { + t.Errorf("Unexpected value at idx %d", idx) + } } } @@ -162,14 +217,22 @@ func TestIntSlice(t *testing.T) { continue } out := IntSlice(in) - assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + if e, a := len(out), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } for i := range out { - assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx) + if e, a := in[i], *(out[i]); e != a { + t.Errorf("Unexpected value at idx %d", idx) + } } out2 := IntValueSlice(out) - assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) - assert.Equal(t, in, out2, "Unexpected value at idx %d", idx) + if e, a := len(out2), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } + if e, a := in, out2; !reflect.DeepEqual(e, a) { + t.Errorf("Unexpected value at idx %d", idx) + } } } @@ -181,22 +244,34 @@ func TestIntValueSlice(t *testing.T) { continue } out := IntValueSlice(in) - assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + if e, a := len(out), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } for i := range out { if in[i] == nil { - assert.Empty(t, out[i], "Unexpected value at idx %d", idx) + if out[i] != 0 { + t.Errorf("Unexpected value at idx %d", idx) + } } else { - assert.Equal(t, *(in[i]), out[i], "Unexpected value at idx %d", idx) + if e, a := *(in[i]), out[i]; e != a { + t.Errorf("Unexpected value at idx %d", idx) + } } } out2 := IntSlice(out) - assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) + if e, a := len(out2), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } for i := range out2 { if in[i] == nil { - assert.Empty(t, *(out2[i]), "Unexpected value at idx %d", idx) + if *(out2[i]) != 0 { + t.Errorf("Unexpected value at idx %d", idx) + } } else { - assert.Equal(t, in[i], out2[i], "Unexpected value at idx %d", idx) + if e, a := in[i], out2[i]; e != a { + t.Errorf("Unexpected value at idx %d", idx) + } } } } @@ -212,14 +287,22 @@ func TestIntMap(t *testing.T) { continue } out := IntMap(in) - assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + if e, a := len(out), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } for i := range out { - assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx) + if e, a := in[i], *(out[i]); e != a { + t.Errorf("Unexpected value at idx %d", idx) + } } out2 := IntValueMap(out) - assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) - assert.Equal(t, in, out2, "Unexpected value at idx %d", idx) + if e, a := len(out2), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } + if e, a := in, out2; !reflect.DeepEqual(e, a) { + t.Errorf("Unexpected value at idx %d", idx) + } } } @@ -233,14 +316,22 @@ func TestInt64Slice(t *testing.T) { continue } out := Int64Slice(in) - assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + if e, a := len(out), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } for i := range out { - assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx) + if e, a := in[i], *(out[i]); e != a { + t.Errorf("Unexpected value at idx %d", idx) + } } out2 := Int64ValueSlice(out) - assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) - assert.Equal(t, in, out2, "Unexpected value at idx %d", idx) + if e, a := len(out2), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } + if e, a := in, out2; !reflect.DeepEqual(e, a) { + t.Errorf("Unexpected value at idx %d", idx) + } } } @@ -252,22 +343,34 @@ func TestInt64ValueSlice(t *testing.T) { continue } out := Int64ValueSlice(in) - assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + if e, a := len(out), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } for i := range out { if in[i] == nil { - assert.Empty(t, out[i], "Unexpected value at idx %d", idx) + if out[i] != 0 { + t.Errorf("Unexpected value at idx %d", idx) + } } else { - assert.Equal(t, *(in[i]), out[i], "Unexpected value at idx %d", idx) + if e, a := *(in[i]), out[i]; e != a { + t.Errorf("Unexpected value at idx %d", idx) + } } } out2 := Int64Slice(out) - assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) + if e, a := len(out2), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } for i := range out2 { if in[i] == nil { - assert.Empty(t, *(out2[i]), "Unexpected value at idx %d", idx) + if *(out2[i]) != 0 { + t.Errorf("Unexpected value at idx %d", idx) + } } else { - assert.Equal(t, in[i], out2[i], "Unexpected value at idx %d", idx) + if e, a := in[i], out2[i]; e != a { + t.Errorf("Unexpected value at idx %d", idx) + } } } } @@ -283,14 +386,22 @@ func TestInt64Map(t *testing.T) { continue } out := Int64Map(in) - assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + if e, a := len(out), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } for i := range out { - assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx) + if e, a := in[i], *(out[i]); e != a { + t.Errorf("Unexpected value at idx %d", idx) + } } out2 := Int64ValueMap(out) - assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) - assert.Equal(t, in, out2, "Unexpected value at idx %d", idx) + if e, a := len(out2), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } + if e, a := in, out2; !reflect.DeepEqual(e, a) { + t.Errorf("Unexpected value at idx %d", idx) + } } } @@ -304,14 +415,22 @@ func TestFloat64Slice(t *testing.T) { continue } out := Float64Slice(in) - assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + if e, a := len(out), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } for i := range out { - assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx) + if e, a := in[i], *(out[i]); e != a { + t.Errorf("Unexpected value at idx %d", idx) + } } out2 := Float64ValueSlice(out) - assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) - assert.Equal(t, in, out2, "Unexpected value at idx %d", idx) + if e, a := len(out2), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } + if e, a := in, out2; !reflect.DeepEqual(e, a) { + t.Errorf("Unexpected value at idx %d", idx) + } } } @@ -323,22 +442,34 @@ func TestFloat64ValueSlice(t *testing.T) { continue } out := Float64ValueSlice(in) - assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + if e, a := len(out), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } for i := range out { if in[i] == nil { - assert.Empty(t, out[i], "Unexpected value at idx %d", idx) + if out[i] != 0 { + t.Errorf("Unexpected value at idx %d", idx) + } } else { - assert.Equal(t, *(in[i]), out[i], "Unexpected value at idx %d", idx) + if e, a := *(in[i]), out[i]; e != a { + t.Errorf("Unexpected value at idx %d", idx) + } } } out2 := Float64Slice(out) - assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) + if e, a := len(out2), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } for i := range out2 { if in[i] == nil { - assert.Empty(t, *(out2[i]), "Unexpected value at idx %d", idx) + if *(out2[i]) != 0 { + t.Errorf("Unexpected value at idx %d", idx) + } } else { - assert.Equal(t, in[i], out2[i], "Unexpected value at idx %d", idx) + if e, a := in[i], out2[i]; e != a { + t.Errorf("Unexpected value at idx %d", idx) + } } } } @@ -354,14 +485,22 @@ func TestFloat64Map(t *testing.T) { continue } out := Float64Map(in) - assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + if e, a := len(out), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } for i := range out { - assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx) + if e, a := in[i], *(out[i]); e != a { + t.Errorf("Unexpected value at idx %d", idx) + } } out2 := Float64ValueMap(out) - assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) - assert.Equal(t, in, out2, "Unexpected value at idx %d", idx) + if e, a := len(out2), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } + if e, a := in, out2; !reflect.DeepEqual(e, a) { + t.Errorf("Unexpected value at idx %d", idx) + } } } @@ -375,14 +514,22 @@ func TestTimeSlice(t *testing.T) { continue } out := TimeSlice(in) - assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + if e, a := len(out), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } for i := range out { - assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx) + if e, a := in[i], *(out[i]); e != a { + t.Errorf("Unexpected value at idx %d", idx) + } } out2 := TimeValueSlice(out) - assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) - assert.Equal(t, in, out2, "Unexpected value at idx %d", idx) + if e, a := len(out2), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } + if e, a := in, out2; !reflect.DeepEqual(e, a) { + t.Errorf("Unexpected value at idx %d", idx) + } } } @@ -394,22 +541,34 @@ func TestTimeValueSlice(t *testing.T) { continue } out := TimeValueSlice(in) - assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + if e, a := len(out), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } for i := range out { if in[i] == nil { - assert.Empty(t, out[i], "Unexpected value at idx %d", idx) + if !out[i].IsZero() { + t.Errorf("Unexpected value at idx %d", idx) + } } else { - assert.Equal(t, *(in[i]), out[i], "Unexpected value at idx %d", idx) + if e, a := *(in[i]), out[i]; e != a { + t.Errorf("Unexpected value at idx %d", idx) + } } } out2 := TimeSlice(out) - assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) + if e, a := len(out2), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } for i := range out2 { if in[i] == nil { - assert.Empty(t, *(out2[i]), "Unexpected value at idx %d", idx) + if !(*(out2[i])).IsZero() { + t.Errorf("Unexpected value at idx %d", idx) + } } else { - assert.Equal(t, in[i], out2[i], "Unexpected value at idx %d", idx) + if e, a := in[i], out2[i]; e != a { + t.Errorf("Unexpected value at idx %d", idx) + } } } } @@ -425,13 +584,58 @@ func TestTimeMap(t *testing.T) { continue } out := TimeMap(in) - assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + if e, a := len(out), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } for i := range out { - assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx) + if e, a := in[i], *(out[i]); e != a { + t.Errorf("Unexpected value at idx %d", idx) + } } out2 := TimeValueMap(out) - assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) - assert.Equal(t, in, out2, "Unexpected value at idx %d", idx) + if e, a := len(out2), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } + if e, a := in, out2; !reflect.DeepEqual(e, a) { + t.Errorf("Unexpected value at idx %d", idx) + } + } +} + +type TimeValueTestCase struct { + in int64 + outSecs time.Time + outMillis time.Time +} + +var testCasesTimeValue = []TimeValueTestCase{ + { + in: int64(1501558289000), + outSecs: time.Unix(1501558289, 0), + outMillis: time.Unix(1501558289, 0), + }, + { + in: int64(1501558289001), + outSecs: time.Unix(1501558289, 0), + outMillis: time.Unix(1501558289, 1*1000000), + }, +} + +func TestSecondsTimeValue(t *testing.T) { + for idx, testCase := range testCasesTimeValue { + out := SecondsTimeValue(&testCase.in) + if e, a := testCase.outSecs, out; e != a { + t.Errorf("Unexpected value for time value at %d", idx) + } + } +} + +func TestMillisecondsTimeValue(t *testing.T) { + for idx, testCase := range testCasesTimeValue { + out := MillisecondsTimeValue(&testCase.in) + if e, a := testCase.outMillis, out; e != a { + t.Errorf("Unexpected value for time value at %d", idx) + } } } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers.go b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers.go index 25b461c..cfcddf3 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers.go @@ -3,12 +3,10 @@ package corehandlers import ( "bytes" "fmt" - "io" "io/ioutil" "net/http" "net/url" "regexp" - "runtime" "strconv" "time" @@ -36,18 +34,13 @@ var BuildContentLengthHandler = request.NamedHandler{Name: "core.BuildContentLen if slength := r.HTTPRequest.Header.Get("Content-Length"); slength != "" { length, _ = strconv.ParseInt(slength, 10, 64) } else { - switch body := r.Body.(type) { - case nil: - length = 0 - case lener: - length = int64(body.Len()) - case io.Seeker: - r.BodyStart, _ = body.Seek(0, 1) - end, _ := body.Seek(0, 2) - body.Seek(r.BodyStart, 0) // make sure to seek back to original location - length = end - r.BodyStart - default: - panic("Cannot get length of body, must provide `ContentLength`") + if r.Body != nil { + var err error + length, err = aws.SeekerLen(r.Body) + if err != nil { + r.Error = awserr.New(request.ErrCodeSerialization, "failed to get request body's length", err) + return + } } } @@ -60,13 +53,6 @@ var BuildContentLengthHandler = request.NamedHandler{Name: "core.BuildContentLen } }} -// SDKVersionUserAgentHandler is a request handler for adding the SDK Version to the user agent. -var SDKVersionUserAgentHandler = request.NamedHandler{ - Name: "core.SDKVersionUserAgentHandler", - Fn: request.MakeAddToUserAgentHandler(aws.SDKName, aws.SDKVersion, - runtime.Version(), runtime.GOOS, runtime.GOARCH), -} - var reStatusCode = regexp.MustCompile(`^(\d{3})`) // ValidateReqSigHandler is a request handler to ensure that the request's @@ -106,6 +92,22 @@ var SendHandler = request.NamedHandler{ sender = sendWithoutFollowRedirects } + if request.NoBody == r.HTTPRequest.Body { + // Strip off the request body if the NoBody reader was used as a + // place holder for a request body. This prevents the SDK from + // making requests with a request body when it would be invalid + // to do so. + // + // Use a shallow copy of the http.Request to ensure the race condition + // of transport on Body will not trigger + reqOrig, reqCopy := r.HTTPRequest, *r.HTTPRequest + reqCopy.Body = nil + r.HTTPRequest = &reqCopy + defer func() { + r.HTTPRequest = reqOrig + }() + } + var err error r.HTTPResponse, err = sender(r) if err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers_1_8_test.go b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers_1_8_test.go new file mode 100644 index 0000000..b47afc2 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers_1_8_test.go @@ -0,0 +1,64 @@ +// +build go1.8 + +package corehandlers_test + +import ( + "crypto/tls" + "net/http" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/credentials" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/aws/session" + "github.com/aws/aws-sdk-go/awstesting" + "github.com/aws/aws-sdk-go/service/s3" + "golang.org/x/net/http2" +) + +func TestSendHandler_HEADNoBody(t *testing.T) { + TLSBundleCertFile, TLSBundleKeyFile, TLSBundleCAFile, err := awstesting.CreateTLSBundleFiles() + if err != nil { + panic(err) + } + defer awstesting.CleanupTLSBundleFiles(TLSBundleCertFile, TLSBundleKeyFile, TLSBundleCAFile) + + endpoint, err := awstesting.CreateTLSServer(TLSBundleCertFile, TLSBundleKeyFile, nil) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + transport := http.DefaultTransport.(*http.Transport) + // test server's certificate is self-signed certificate + transport.TLSClientConfig = &tls.Config{InsecureSkipVerify: true} + http2.ConfigureTransport(transport) + + sess, err := session.NewSessionWithOptions(session.Options{ + Config: aws.Config{ + HTTPClient: &http.Client{}, + Endpoint: aws.String(endpoint), + Region: aws.String("mock-region"), + Credentials: credentials.AnonymousCredentials, + S3ForcePathStyle: aws.Bool(true), + }, + }) + + svc := s3.New(sess) + + req, _ := svc.HeadObjectRequest(&s3.HeadObjectInput{ + Bucket: aws.String("bucketname"), + Key: aws.String("keyname"), + }) + + if e, a := request.NoBody, req.HTTPRequest.Body; e != a { + t.Fatalf("expect %T request body, got %T", e, a) + } + + err = req.Send() + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + if e, a := http.StatusOK, req.HTTPResponse.StatusCode; e != a { + t.Errorf("expect %d status code, got %d", e, a) + } +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers_test.go b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers_test.go index fe7d3c9..1d715c9 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers_test.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers_test.go @@ -7,11 +7,10 @@ import ( "net/http" "net/http/httptest" "os" + "strings" "testing" "time" - "github.com/stretchr/testify/assert" - "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/corehandlers" @@ -32,7 +31,9 @@ func TestValidateEndpointHandler(t *testing.T) { req := svc.NewRequest(&request.Operation{Name: "Operation"}, nil, nil) err := req.Build() - assert.NoError(t, err) + if err != nil { + t.Errorf("expect no error, got %v", err) + } } func TestValidateEndpointHandlerErrorRegion(t *testing.T) { @@ -45,8 +46,12 @@ func TestValidateEndpointHandlerErrorRegion(t *testing.T) { req := svc.NewRequest(&request.Operation{Name: "Operation"}, nil, nil) err := req.Build() - assert.Error(t, err) - assert.Equal(t, aws.ErrMissingRegion, err) + if err == nil { + t.Errorf("expect error, got none") + } + if e, a := aws.ErrMissingRegion, err; e != a { + t.Errorf("expect %v to be %v", e, a) + } } type mockCredsProvider struct { @@ -82,18 +87,30 @@ func TestAfterRetryRefreshCreds(t *testing.T) { }) svc.Handlers.AfterRetry.PushBackNamed(corehandlers.AfterRetryHandler) - assert.True(t, svc.Config.Credentials.IsExpired(), "Expect to start out expired") - assert.False(t, credProvider.retrieveCalled) + if !svc.Config.Credentials.IsExpired() { + t.Errorf("Expect to start out expired") + } + if credProvider.retrieveCalled { + t.Errorf("expect not called") + } req := svc.NewRequest(&request.Operation{Name: "Operation"}, nil, nil) req.Send() - assert.True(t, svc.Config.Credentials.IsExpired()) - assert.False(t, credProvider.retrieveCalled) + if !svc.Config.Credentials.IsExpired() { + t.Errorf("Expect to start out expired") + } + if credProvider.retrieveCalled { + t.Errorf("expect not called") + } _, err := svc.Config.Credentials.Get() - assert.NoError(t, err) - assert.True(t, credProvider.retrieveCalled) + if err != nil { + t.Errorf("expect no error, got %v", err) + } + if !credProvider.retrieveCalled { + t.Errorf("expect not called") + } } func TestAfterRetryWithContextCanceled(t *testing.T) { @@ -202,8 +219,12 @@ func TestSendHandlerError(t *testing.T) { r.Send() - assert.Error(t, r.Error) - assert.NotNil(t, r.HTTPResponse) + if r.Error == nil { + t.Errorf("expect error, got none") + } + if r.HTTPResponse == nil { + t.Errorf("expect response, got none") + } } func TestSendWithoutFollowRedirects(t *testing.T) { @@ -273,31 +294,47 @@ func TestValidateReqSigHandler(t *testing.T) { corehandlers.ValidateReqSigHandler.Fn(c.Req) - assert.NoError(t, c.Req.Error, "%d, expect no error", i) - assert.Equal(t, c.Resign, resigned, "%d, expected resigning to match", i) + if c.Req.Error != nil { + t.Errorf("expect no error, got %v", c.Req.Error) + } + if e, a := c.Resign, resigned; e != a { + t.Errorf("%d, expect %v to be %v", i, e, a) + } } } func setupContentLengthTestServer(t *testing.T, hasContentLength bool, contentLength int64) *httptest.Server { server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { _, ok := r.Header["Content-Length"] - assert.Equal(t, hasContentLength, ok, "expect content length to be set, %t", hasContentLength) + if e, a := hasContentLength, ok; e != a { + t.Errorf("expect %v to be %v", e, a) + } if hasContentLength { - assert.Equal(t, contentLength, r.ContentLength) + if e, a := contentLength, r.ContentLength; e != a { + t.Errorf("expect %v to be %v", e, a) + } } b, err := ioutil.ReadAll(r.Body) - assert.NoError(t, err) + if err != nil { + t.Errorf("expect no error, got %v", err) + } r.Body.Close() authHeader := r.Header.Get("Authorization") if hasContentLength { - assert.Contains(t, authHeader, "content-length") + if e, a := "content-length", authHeader; !strings.Contains(a, e) { + t.Errorf("expect %v to be in %v", e, a) + } } else { - assert.NotContains(t, authHeader, "content-length") + if e, a := "content-length", authHeader; strings.Contains(a, e) { + t.Errorf("expect %v to not be in %v", e, a) + } } - assert.Equal(t, contentLength, int64(len(b))) + if e, a := contentLength, int64(len(b)); e != a { + t.Errorf("expect %v to be %v", e, a) + } })) return server @@ -316,7 +353,9 @@ func TestBuildContentLength_ZeroBody(t *testing.T) { Key: aws.String("keyname"), }) - assert.NoError(t, err) + if err != nil { + t.Errorf("expect no error, got %v", err) + } } func TestBuildContentLength_NegativeBody(t *testing.T) { @@ -334,7 +373,9 @@ func TestBuildContentLength_NegativeBody(t *testing.T) { req.HTTPRequest.Header.Set("Content-Length", "-1") - assert.NoError(t, req.Send()) + if req.Error != nil { + t.Errorf("expect no error, got %v", req.Error) + } } func TestBuildContentLength_WithBody(t *testing.T) { @@ -351,5 +392,7 @@ func TestBuildContentLength_WithBody(t *testing.T) { Body: bytes.NewReader(make([]byte, 1024)), }) - assert.NoError(t, err) + if err != nil { + t.Errorf("expect no error, got %v", err) + } } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/param_validator_test.go b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/param_validator_test.go index 66973ca..e1d8a08 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/param_validator_test.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/param_validator_test.go @@ -3,8 +3,7 @@ package corehandlers_test import ( "fmt" "testing" - - "github.com/stretchr/testify/assert" + "reflect" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" @@ -14,7 +13,6 @@ import ( "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/awstesting/unit" "github.com/aws/aws-sdk-go/service/kinesis" - "github.com/stretchr/testify/require" ) var testSvc = func() *client.Client { @@ -113,7 +111,9 @@ func TestNoErrors(t *testing.T) { req := testSvc.NewRequest(&request.Operation{}, input, nil) corehandlers.ValidateParametersHandler.Fn(req) - require.NoError(t, req.Error) + if req.Error != nil { + t.Fatalf("expect no error, got %v", req.Error) + } } func TestMissingRequiredParameters(t *testing.T) { @@ -121,17 +121,33 @@ func TestMissingRequiredParameters(t *testing.T) { req := testSvc.NewRequest(&request.Operation{}, input, nil) corehandlers.ValidateParametersHandler.Fn(req) - require.Error(t, req.Error) - assert.Equal(t, "InvalidParameter", req.Error.(awserr.Error).Code()) - assert.Equal(t, "3 validation error(s) found.", req.Error.(awserr.Error).Message()) + if req.Error == nil { + t.Fatalf("expect error") + } + if e, a := "InvalidParameter", req.Error.(awserr.Error).Code(); e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "3 validation error(s) found.", req.Error.(awserr.Error).Message(); e != a { + t.Errorf("expect %v, got %v", e, a) + } errs := req.Error.(awserr.BatchedErrors).OrigErrs() - assert.Len(t, errs, 3) - assert.Equal(t, "ParamRequiredError: missing required field, StructShape.RequiredList.", errs[0].Error()) - assert.Equal(t, "ParamRequiredError: missing required field, StructShape.RequiredMap.", errs[1].Error()) - assert.Equal(t, "ParamRequiredError: missing required field, StructShape.RequiredBool.", errs[2].Error()) + if e, a := 3, len(errs); e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "ParamRequiredError: missing required field, StructShape.RequiredList.", errs[0].Error(); e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "ParamRequiredError: missing required field, StructShape.RequiredMap.", errs[1].Error(); e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "ParamRequiredError: missing required field, StructShape.RequiredBool.", errs[2].Error(); e != a { + t.Errorf("expect %v, got %v", e, a) + } - assert.Equal(t, "InvalidParameter: 3 validation error(s) found.\n- missing required field, StructShape.RequiredList.\n- missing required field, StructShape.RequiredMap.\n- missing required field, StructShape.RequiredBool.\n", req.Error.Error()) + if e, a := "InvalidParameter: 3 validation error(s) found.\n- missing required field, StructShape.RequiredList.\n- missing required field, StructShape.RequiredMap.\n- missing required field, StructShape.RequiredBool.\n", req.Error.Error(); e != a { + t.Errorf("expect %v, got %v", e, a) + } } func TestNestedMissingRequiredParameters(t *testing.T) { @@ -148,15 +164,29 @@ func TestNestedMissingRequiredParameters(t *testing.T) { req := testSvc.NewRequest(&request.Operation{}, input, nil) corehandlers.ValidateParametersHandler.Fn(req) - require.Error(t, req.Error) - assert.Equal(t, "InvalidParameter", req.Error.(awserr.Error).Code()) - assert.Equal(t, "3 validation error(s) found.", req.Error.(awserr.Error).Message()) + if req.Error == nil { + t.Fatalf("expect error") + } + if e, a := "InvalidParameter", req.Error.(awserr.Error).Code(); e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "3 validation error(s) found.", req.Error.(awserr.Error).Message(); e != a { + t.Errorf("expect %v, got %v", e, a) + } errs := req.Error.(awserr.BatchedErrors).OrigErrs() - assert.Len(t, errs, 3) - assert.Equal(t, "ParamRequiredError: missing required field, StructShape.RequiredList[0].Name.", errs[0].Error()) - assert.Equal(t, "ParamRequiredError: missing required field, StructShape.RequiredMap[key2].Name.", errs[1].Error()) - assert.Equal(t, "ParamRequiredError: missing required field, StructShape.OptionalStruct.Name.", errs[2].Error()) + if e, a := 3, len(errs); e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "ParamRequiredError: missing required field, StructShape.RequiredList[0].Name.", errs[0].Error(); e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "ParamRequiredError: missing required field, StructShape.RequiredMap[key2].Name.", errs[1].Error(); e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "ParamRequiredError: missing required field, StructShape.OptionalStruct.Name.", errs[2].Error(); e != a { + t.Errorf("expect %v, got %v", e, a) + } } type testInput struct { @@ -226,7 +256,9 @@ func TestValidateFieldMinParameter(t *testing.T) { req := testSvc.NewRequest(&request.Operation{}, &c.in, nil) corehandlers.ValidateParametersHandler.Fn(req) - assert.Equal(t, c.err, req.Error, "%d case failed", i) + if e, a := c.err, req.Error; !reflect.DeepEqual(e,a) { + t.Errorf("%d, expect %v, got %v", i, e, a) + } } } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/user_agent.go b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/user_agent.go new file mode 100644 index 0000000..a15f496 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/user_agent.go @@ -0,0 +1,37 @@ +package corehandlers + +import ( + "os" + "runtime" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/request" +) + +// SDKVersionUserAgentHandler is a request handler for adding the SDK Version +// to the user agent. +var SDKVersionUserAgentHandler = request.NamedHandler{ + Name: "core.SDKVersionUserAgentHandler", + Fn: request.MakeAddToUserAgentHandler(aws.SDKName, aws.SDKVersion, + runtime.Version(), runtime.GOOS, runtime.GOARCH), +} + +const execEnvVar = `AWS_EXECUTION_ENV` +const execEnvUAKey = `exec_env` + +// AddHostExecEnvUserAgentHander is a request handler appending the SDK's +// execution environment to the user agent. +// +// If the environment variable AWS_EXECUTION_ENV is set, its value will be +// appended to the user agent string. +var AddHostExecEnvUserAgentHander = request.NamedHandler{ + Name: "core.AddHostExecEnvUserAgentHander", + Fn: func(r *request.Request) { + v := os.Getenv(execEnvVar) + if len(v) == 0 { + return + } + + request.AddToUserAgent(r, execEnvUAKey+"/"+v) + }, +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/user_agent_test.go b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/user_agent_test.go new file mode 100644 index 0000000..4f61835 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/user_agent_test.go @@ -0,0 +1,40 @@ +package corehandlers + +import ( + "net/http" + "os" + "testing" + + "github.com/aws/aws-sdk-go/aws/request" +) + +func TestAddHostExecEnvUserAgentHander(t *testing.T) { + cases := []struct { + ExecEnv string + Expect string + }{ + {ExecEnv: "Lambda", Expect: "exec_env/Lambda"}, + {ExecEnv: "", Expect: ""}, + {ExecEnv: "someThingCool", Expect: "exec_env/someThingCool"}, + } + + for i, c := range cases { + os.Clearenv() + os.Setenv(execEnvVar, c.ExecEnv) + + req := &request.Request{ + HTTPRequest: &http.Request{ + Header: http.Header{}, + }, + } + AddHostExecEnvUserAgentHander.Fn(req) + + if err := req.Error; err != nil { + t.Fatalf("%d, expect no error, got %v", i, err) + } + + if e, a := c.Expect, req.HTTPRequest.Header.Get("User-Agent"); e != a { + t.Errorf("%d, expect %v user agent, got %v", i, e, a) + } + } +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials.go index 42416fc..ed08699 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials.go @@ -178,7 +178,8 @@ func (e *Expiry) IsExpired() bool { type Credentials struct { creds Value forceRefresh bool - m sync.Mutex + + m sync.RWMutex provider Provider } @@ -201,6 +202,17 @@ func NewCredentials(provider Provider) *Credentials { // If Credentials.Expire() was called the credentials Value will be force // expired, and the next call to Get() will cause them to be refreshed. func (c *Credentials) Get() (Value, error) { + // Check the cached credentials first with just the read lock. + c.m.RLock() + if !c.isExpired() { + creds := c.creds + c.m.RUnlock() + return creds, nil + } + c.m.RUnlock() + + // Credentials are expired need to retrieve the credentials taking the full + // lock. c.m.Lock() defer c.m.Unlock() @@ -234,8 +246,8 @@ func (c *Credentials) Expire() { // If the Credentials were forced to be expired with Expire() this will // reflect that override. func (c *Credentials) IsExpired() bool { - c.m.Lock() - defer c.m.Unlock() + c.m.RLock() + defer c.m.RUnlock() return c.isExpired() } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials_bench_test.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials_bench_test.go new file mode 100644 index 0000000..01a5d63 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials_bench_test.go @@ -0,0 +1,90 @@ +// +build go1.9 + +package credentials + +import ( + "fmt" + "strconv" + "sync" + "testing" + "time" +) + +func BenchmarkCredentials_Get(b *testing.B) { + stub := &stubProvider{} + + cases := []int{1, 10, 100, 500, 1000, 10000} + + for _, c := range cases { + b.Run(strconv.Itoa(c), func(b *testing.B) { + creds := NewCredentials(stub) + var wg sync.WaitGroup + wg.Add(c) + for i := 0; i < c; i++ { + go func() { + for j := 0; j < b.N; j++ { + v, err := creds.Get() + if err != nil { + b.Fatalf("expect no error %v, %v", v, err) + } + } + wg.Done() + }() + } + b.ResetTimer() + + wg.Wait() + }) + } +} + +func BenchmarkCredentials_Get_Expire(b *testing.B) { + p := &blockProvider{} + + expRates := []int{10000, 1000, 100} + cases := []int{1, 10, 100, 500, 1000, 10000} + + for _, expRate := range expRates { + for _, c := range cases { + b.Run(fmt.Sprintf("%d-%d", expRate, c), func(b *testing.B) { + creds := NewCredentials(p) + var wg sync.WaitGroup + wg.Add(c) + for i := 0; i < c; i++ { + go func(id int) { + for j := 0; j < b.N; j++ { + v, err := creds.Get() + if err != nil { + b.Fatalf("expect no error %v, %v", v, err) + } + // periodically expire creds to cause rwlock + if id == 0 && j%expRate == 0 { + creds.Expire() + } + } + wg.Done() + }(i) + } + b.ResetTimer() + + wg.Wait() + }) + } + } +} + +type blockProvider struct { + creds Value + expired bool + err error +} + +func (s *blockProvider) Retrieve() (Value, error) { + s.expired = false + s.creds.ProviderName = "blockProvider" + time.Sleep(time.Millisecond) + return s.creds, s.err +} +func (s *blockProvider) IsExpired() bool { + return s.expired +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/shared_credentials_provider.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/shared_credentials_provider.go index 7fb7cbf..51e21e0 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/shared_credentials_provider.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/shared_credentials_provider.go @@ -3,11 +3,11 @@ package credentials import ( "fmt" "os" - "path/filepath" "github.com/go-ini/ini" "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/internal/shareddefaults" ) // SharedCredsProviderName provides a name of SharedCreds provider @@ -15,8 +15,6 @@ const SharedCredsProviderName = "SharedCredentialsProvider" var ( // ErrSharedCredentialsHomeNotFound is emitted when the user directory cannot be found. - // - // @readonly ErrSharedCredentialsHomeNotFound = awserr.New("UserHomeNotFound", "user home directory not found.", nil) ) @@ -117,22 +115,23 @@ func loadProfile(filename, profile string) (Value, error) { // // Will return an error if the user's home directory path cannot be found. func (p *SharedCredentialsProvider) filename() (string, error) { - if p.Filename == "" { - if p.Filename = os.Getenv("AWS_SHARED_CREDENTIALS_FILE"); p.Filename != "" { - return p.Filename, nil - } - - homeDir := os.Getenv("HOME") // *nix - if homeDir == "" { // Windows - homeDir = os.Getenv("USERPROFILE") - } - if homeDir == "" { - return "", ErrSharedCredentialsHomeNotFound - } - - p.Filename = filepath.Join(homeDir, ".aws", "credentials") + if len(p.Filename) != 0 { + return p.Filename, nil + } + + if p.Filename = os.Getenv("AWS_SHARED_CREDENTIALS_FILE"); len(p.Filename) != 0 { + return p.Filename, nil } + if home := shareddefaults.UserHomeDir(); len(home) == 0 { + // Backwards compatibility of home directly not found error being returned. + // This error is too verbose, failure when opening the file would of been + // a better error to return. + return "", ErrSharedCredentialsHomeNotFound + } + + p.Filename = shareddefaults.SharedCredentialsFilename() + return p.Filename, nil } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/shared_credentials_provider_test.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/shared_credentials_provider_test.go index 6b4093a..1eb45f2 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/shared_credentials_provider_test.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/shared_credentials_provider_test.go @@ -5,6 +5,7 @@ import ( "path/filepath" "testing" + "github.com/aws/aws-sdk-go/internal/shareddefaults" "github.com/stretchr/testify/assert" ) @@ -97,6 +98,25 @@ func TestSharedCredentialsProviderColonInCredFile(t *testing.T) { assert.Empty(t, creds.SessionToken, "Expect no token") } +func TestSharedCredentialsProvider_DefaultFilename(t *testing.T) { + os.Clearenv() + os.Setenv("USERPROFILE", "profile_dir") + os.Setenv("HOME", "home_dir") + + // default filename and profile + p := SharedCredentialsProvider{} + + filename, err := p.filename() + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + if e, a := shareddefaults.SharedCredentialsFilename(), filename; e != a { + t.Errorf("expect %q filename, got %q", e, a) + } +} + func BenchmarkSharedCredentialsProvider(b *testing.B) { os.Clearenv() diff --git a/vendor/github.com/aws/aws-sdk-go/aws/csm/doc.go b/vendor/github.com/aws/aws-sdk-go/aws/csm/doc.go new file mode 100644 index 0000000..152d785 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/csm/doc.go @@ -0,0 +1,46 @@ +// Package csm provides Client Side Monitoring (CSM) which enables sending metrics +// via UDP connection. Using the Start function will enable the reporting of +// metrics on a given port. If Start is called, with different parameters, again, +// a panic will occur. +// +// Pause can be called to pause any metrics publishing on a given port. Sessions +// that have had their handlers modified via InjectHandlers may still be used. +// However, the handlers will act as a no-op meaning no metrics will be published. +// +// Example: +// r, err := csm.Start("clientID", ":31000") +// if err != nil { +// panic(fmt.Errorf("failed starting CSM: %v", err)) +// } +// +// sess, err := session.NewSession(&aws.Config{}) +// if err != nil { +// panic(fmt.Errorf("failed loading session: %v", err)) +// } +// +// r.InjectHandlers(&sess.Handlers) +// +// client := s3.New(sess) +// resp, err := client.GetObject(&s3.GetObjectInput{ +// Bucket: aws.String("bucket"), +// Key: aws.String("key"), +// }) +// +// // Will pause monitoring +// r.Pause() +// resp, err = client.GetObject(&s3.GetObjectInput{ +// Bucket: aws.String("bucket"), +// Key: aws.String("key"), +// }) +// +// // Resume monitoring +// r.Continue() +// +// Start returns a Reporter that is used to enable or disable monitoring. If +// access to the Reporter is required later, calling Get will return the Reporter +// singleton. +// +// Example: +// r := csm.Get() +// r.Continue() +package csm diff --git a/vendor/github.com/aws/aws-sdk-go/aws/csm/enable.go b/vendor/github.com/aws/aws-sdk-go/aws/csm/enable.go new file mode 100644 index 0000000..2f0c6ea --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/csm/enable.go @@ -0,0 +1,67 @@ +package csm + +import ( + "fmt" + "sync" +) + +var ( + lock sync.Mutex +) + +// Client side metric handler names +const ( + APICallMetricHandlerName = "awscsm.SendAPICallMetric" + APICallAttemptMetricHandlerName = "awscsm.SendAPICallAttemptMetric" +) + +// Start will start the a long running go routine to capture +// client side metrics. Calling start multiple time will only +// start the metric listener once and will panic if a different +// client ID or port is passed in. +// +// Example: +// r, err := csm.Start("clientID", "127.0.0.1:8094") +// if err != nil { +// panic(fmt.Errorf("expected no error, but received %v", err)) +// } +// sess := session.NewSession() +// r.InjectHandlers(sess.Handlers) +// +// svc := s3.New(sess) +// out, err := svc.GetObject(&s3.GetObjectInput{ +// Bucket: aws.String("bucket"), +// Key: aws.String("key"), +// }) +func Start(clientID string, url string) (*Reporter, error) { + lock.Lock() + defer lock.Unlock() + + if sender == nil { + sender = newReporter(clientID, url) + } else { + if sender.clientID != clientID { + panic(fmt.Errorf("inconsistent client IDs. %q was expected, but received %q", sender.clientID, clientID)) + } + + if sender.url != url { + panic(fmt.Errorf("inconsistent URLs. %q was expected, but received %q", sender.url, url)) + } + } + + if err := connect(url); err != nil { + sender = nil + return nil, err + } + + return sender, nil +} + +// Get will return a reporter if one exists, if one does not exist, nil will +// be returned. +func Get() *Reporter { + lock.Lock() + defer lock.Unlock() + + return sender +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/csm/enable_test.go b/vendor/github.com/aws/aws-sdk-go/aws/csm/enable_test.go new file mode 100644 index 0000000..a7504d3 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/csm/enable_test.go @@ -0,0 +1,74 @@ +package csm + +import ( + "encoding/json" + "fmt" + "net" + "testing" +) + +func startUDPServer(done chan struct{}, fn func([]byte)) (string, error) { + addr, err := net.ResolveUDPAddr("udp", "127.0.0.1:0") + if err != nil { + return "", err + } + + conn, err := net.ListenUDP("udp", addr) + if err != nil { + return "", err + } + + buf := make([]byte, 1024) + go func() { + defer conn.Close() + + for { + select { + case <-done: + return + default: + } + + n, _, err := conn.ReadFromUDP(buf) + fn(buf[:n]) + + if err != nil { + panic(err) + } + } + }() + + return conn.LocalAddr().String(), nil +} + +func TestDifferentParams(t *testing.T) { + defer func() { + if r := recover(); r == nil { + t.Errorf("expected panic with different parameters") + } + }() + Start("clientID2", ":0") +} + +var MetricsCh = make(chan map[string]interface{}, 1) +var Done = make(chan struct{}) + +func init() { + url, err := startUDPServer(Done, func(b []byte) { + m := map[string]interface{}{} + if err := json.Unmarshal(b, &m); err != nil { + panic(fmt.Sprintf("expected no error, but received %v", err)) + } + + MetricsCh <- m + }) + + if err != nil { + panic(err) + } + + _, err = Start("clientID", url) + if err != nil { + panic(err) + } +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/csm/example_test.go b/vendor/github.com/aws/aws-sdk-go/aws/csm/example_test.go new file mode 100644 index 0000000..3da43dc --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/csm/example_test.go @@ -0,0 +1,40 @@ +package csm_test + +import ( + "fmt" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/csm" + "github.com/aws/aws-sdk-go/aws/session" + "github.com/aws/aws-sdk-go/service/s3" +) + +func ExampleStart() { + r, err := csm.Start("clientID", ":31000") + if err != nil { + panic(fmt.Errorf("failed starting CSM: %v", err)) + } + + sess, err := session.NewSession(&aws.Config{}) + if err != nil { + panic(fmt.Errorf("failed loading session: %v", err)) + } + + r.InjectHandlers(&sess.Handlers) + + client := s3.New(sess) + client.GetObject(&s3.GetObjectInput{ + Bucket: aws.String("bucket"), + Key: aws.String("key"), + }) + + // Pauses monitoring + r.Pause() + client.GetObject(&s3.GetObjectInput{ + Bucket: aws.String("bucket"), + Key: aws.String("key"), + }) + + // Resume monitoring + r.Continue() +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/csm/metric.go b/vendor/github.com/aws/aws-sdk-go/aws/csm/metric.go new file mode 100644 index 0000000..4b0d630 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/csm/metric.go @@ -0,0 +1,51 @@ +package csm + +import ( + "strconv" + "time" +) + +type metricTime time.Time + +func (t metricTime) MarshalJSON() ([]byte, error) { + ns := time.Duration(time.Time(t).UnixNano()) + return []byte(strconv.FormatInt(int64(ns/time.Millisecond), 10)), nil +} + +type metric struct { + ClientID *string `json:"ClientId,omitempty"` + API *string `json:"Api,omitempty"` + Service *string `json:"Service,omitempty"` + Timestamp *metricTime `json:"Timestamp,omitempty"` + Type *string `json:"Type,omitempty"` + Version *int `json:"Version,omitempty"` + + AttemptCount *int `json:"AttemptCount,omitempty"` + Latency *int `json:"Latency,omitempty"` + + Fqdn *string `json:"Fqdn,omitempty"` + UserAgent *string `json:"UserAgent,omitempty"` + AttemptLatency *int `json:"AttemptLatency,omitempty"` + + SessionToken *string `json:"SessionToken,omitempty"` + Region *string `json:"Region,omitempty"` + AccessKey *string `json:"AccessKey,omitempty"` + HTTPStatusCode *int `json:"HttpStatusCode,omitempty"` + XAmzID2 *string `json:"XAmzId2,omitempty"` + XAmzRequestID *string `json:"XAmznRequestId,omitempty"` + + AWSException *string `json:"AwsException,omitempty"` + AWSExceptionMessage *string `json:"AwsExceptionMessage,omitempty"` + SDKException *string `json:"SdkException,omitempty"` + SDKExceptionMessage *string `json:"SdkExceptionMessage,omitempty"` + + DestinationIP *string `json:"DestinationIp,omitempty"` + ConnectionReused *int `json:"ConnectionReused,omitempty"` + + AcquireConnectionLatency *int `json:"AcquireConnectionLatency,omitempty"` + ConnectLatency *int `json:"ConnectLatency,omitempty"` + RequestLatency *int `json:"RequestLatency,omitempty"` + DNSLatency *int `json:"DnsLatency,omitempty"` + TCPLatency *int `json:"TcpLatency,omitempty"` + SSLLatency *int `json:"SslLatency,omitempty"` +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/csm/metricChan.go b/vendor/github.com/aws/aws-sdk-go/aws/csm/metricChan.go new file mode 100644 index 0000000..514fc37 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/csm/metricChan.go @@ -0,0 +1,54 @@ +package csm + +import ( + "sync/atomic" +) + +const ( + runningEnum = iota + pausedEnum +) + +var ( + // MetricsChannelSize of metrics to hold in the channel + MetricsChannelSize = 100 +) + +type metricChan struct { + ch chan metric + paused int64 +} + +func newMetricChan(size int) metricChan { + return metricChan{ + ch: make(chan metric, size), + } +} + +func (ch *metricChan) Pause() { + atomic.StoreInt64(&ch.paused, pausedEnum) +} + +func (ch *metricChan) Continue() { + atomic.StoreInt64(&ch.paused, runningEnum) +} + +func (ch *metricChan) IsPaused() bool { + v := atomic.LoadInt64(&ch.paused) + return v == pausedEnum +} + +// Push will push metrics to the metric channel if the channel +// is not paused +func (ch *metricChan) Push(m metric) bool { + if ch.IsPaused() { + return false + } + + select { + case ch.ch <- m: + return true + default: + return false + } +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/csm/metricChan_test.go b/vendor/github.com/aws/aws-sdk-go/aws/csm/metricChan_test.go new file mode 100644 index 0000000..81bdb25 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/csm/metricChan_test.go @@ -0,0 +1,72 @@ +package csm + +import ( + "testing" +) + +func TestMetricChanPush(t *testing.T) { + ch := newMetricChan(5) + defer close(ch.ch) + + pushed := ch.Push(metric{}) + if !pushed { + t.Errorf("expected metrics to be pushed") + } + + if e, a := 1, len(ch.ch); e != a { + t.Errorf("expected %d, but received %d", e, a) + } +} + +func TestMetricChanPauseContinue(t *testing.T) { + ch := newMetricChan(5) + defer close(ch.ch) + ch.Pause() + + if !ch.IsPaused() { + t.Errorf("expected to be paused, but did not pause properly") + } + + ch.Continue() + if ch.IsPaused() { + t.Errorf("expected to be not paused, but did not continue properly") + } + + pushed := ch.Push(metric{}) + if !pushed { + t.Errorf("expected metrics to be pushed") + } + + if e, a := 1, len(ch.ch); e != a { + t.Errorf("expected %d, but received %d", e, a) + } +} + +func TestMetricChanPushWhenPaused(t *testing.T) { + ch := newMetricChan(5) + defer close(ch.ch) + ch.Pause() + + pushed := ch.Push(metric{}) + if pushed { + t.Errorf("expected metrics to not be pushed") + } + + if e, a := 0, len(ch.ch); e != a { + t.Errorf("expected %d, but received %d", e, a) + } +} + +func TestMetricChanNonBlocking(t *testing.T) { + ch := newMetricChan(0) + defer close(ch.ch) + + pushed := ch.Push(metric{}) + if pushed { + t.Errorf("expected metrics to be not pushed") + } + + if e, a := 0, len(ch.ch); e != a { + t.Errorf("expected %d, but received %d", e, a) + } +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/csm/reporter.go b/vendor/github.com/aws/aws-sdk-go/aws/csm/reporter.go new file mode 100644 index 0000000..1484c8f --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/csm/reporter.go @@ -0,0 +1,230 @@ +package csm + +import ( + "encoding/json" + "net" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/aws/request" +) + +const ( + // DefaultPort is used when no port is specified + DefaultPort = "31000" +) + +// Reporter will gather metrics of API requests made and +// send those metrics to the CSM endpoint. +type Reporter struct { + clientID string + url string + conn net.Conn + metricsCh metricChan + done chan struct{} +} + +var ( + sender *Reporter +) + +func connect(url string) error { + const network = "udp" + if err := sender.connect(network, url); err != nil { + return err + } + + if sender.done == nil { + sender.done = make(chan struct{}) + go sender.start() + } + + return nil +} + +func newReporter(clientID, url string) *Reporter { + return &Reporter{ + clientID: clientID, + url: url, + metricsCh: newMetricChan(MetricsChannelSize), + } +} + +func (rep *Reporter) sendAPICallAttemptMetric(r *request.Request) { + if rep == nil { + return + } + + now := time.Now() + creds, _ := r.Config.Credentials.Get() + + m := metric{ + ClientID: aws.String(rep.clientID), + API: aws.String(r.Operation.Name), + Service: aws.String(r.ClientInfo.ServiceID), + Timestamp: (*metricTime)(&now), + UserAgent: aws.String(r.HTTPRequest.Header.Get("User-Agent")), + Region: r.Config.Region, + Type: aws.String("ApiCallAttempt"), + Version: aws.Int(1), + + XAmzRequestID: aws.String(r.RequestID), + + AttemptCount: aws.Int(r.RetryCount + 1), + AttemptLatency: aws.Int(int(now.Sub(r.AttemptTime).Nanoseconds() / int64(time.Millisecond))), + AccessKey: aws.String(creds.AccessKeyID), + } + + if r.HTTPResponse != nil { + m.HTTPStatusCode = aws.Int(r.HTTPResponse.StatusCode) + } + + if r.Error != nil { + if awserr, ok := r.Error.(awserr.Error); ok { + setError(&m, awserr) + } + } + + rep.metricsCh.Push(m) +} + +func setError(m *metric, err awserr.Error) { + msg := err.Message() + code := err.Code() + + switch code { + case "RequestError", + "SerializationError", + request.CanceledErrorCode: + + m.SDKException = &code + m.SDKExceptionMessage = &msg + default: + m.AWSException = &code + m.AWSExceptionMessage = &msg + } +} + +func (rep *Reporter) sendAPICallMetric(r *request.Request) { + if rep == nil { + return + } + + now := time.Now() + m := metric{ + ClientID: aws.String(rep.clientID), + API: aws.String(r.Operation.Name), + Service: aws.String(r.ClientInfo.ServiceID), + Timestamp: (*metricTime)(&now), + Type: aws.String("ApiCall"), + AttemptCount: aws.Int(r.RetryCount + 1), + Latency: aws.Int(int(time.Now().Sub(r.Time) / time.Millisecond)), + XAmzRequestID: aws.String(r.RequestID), + } + + // TODO: Probably want to figure something out for logging dropped + // metrics + rep.metricsCh.Push(m) +} + +func (rep *Reporter) connect(network, url string) error { + if rep.conn != nil { + rep.conn.Close() + } + + conn, err := net.Dial(network, url) + if err != nil { + return awserr.New("UDPError", "Could not connect", err) + } + + rep.conn = conn + + return nil +} + +func (rep *Reporter) close() { + if rep.done != nil { + close(rep.done) + } + + rep.metricsCh.Pause() +} + +func (rep *Reporter) start() { + defer func() { + rep.metricsCh.Pause() + }() + + for { + select { + case <-rep.done: + rep.done = nil + return + case m := <-rep.metricsCh.ch: + // TODO: What to do with this error? Probably should just log + b, err := json.Marshal(m) + if err != nil { + continue + } + + rep.conn.Write(b) + } + } +} + +// Pause will pause the metric channel preventing any new metrics from +// being added. +func (rep *Reporter) Pause() { + lock.Lock() + defer lock.Unlock() + + if rep == nil { + return + } + + rep.close() +} + +// Continue will reopen the metric channel and allow for monitoring +// to be resumed. +func (rep *Reporter) Continue() { + lock.Lock() + defer lock.Unlock() + if rep == nil { + return + } + + if !rep.metricsCh.IsPaused() { + return + } + + rep.metricsCh.Continue() +} + +// InjectHandlers will will enable client side metrics and inject the proper +// handlers to handle how metrics are sent. +// +// Example: +// // Start must be called in order to inject the correct handlers +// r, err := csm.Start("clientID", "127.0.0.1:8094") +// if err != nil { +// panic(fmt.Errorf("expected no error, but received %v", err)) +// } +// +// sess := session.NewSession() +// r.InjectHandlers(&sess.Handlers) +// +// // create a new service client with our client side metric session +// svc := s3.New(sess) +func (rep *Reporter) InjectHandlers(handlers *request.Handlers) { + if rep == nil { + return + } + + apiCallHandler := request.NamedHandler{Name: APICallMetricHandlerName, Fn: rep.sendAPICallMetric} + handlers.Complete.PushFrontNamed(apiCallHandler) + + apiCallAttemptHandler := request.NamedHandler{Name: APICallAttemptMetricHandlerName, Fn: rep.sendAPICallAttemptMetric} + handlers.AfterRetry.PushFrontNamed(apiCallAttemptHandler) +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/csm/reporter_test.go b/vendor/github.com/aws/aws-sdk-go/aws/csm/reporter_test.go new file mode 100644 index 0000000..7e93479 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/csm/reporter_test.go @@ -0,0 +1,233 @@ +package csm_test + +import ( + "fmt" + "net" + "net/http" + "net/http/httptest" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/client" + "github.com/aws/aws-sdk-go/aws/client/metadata" + "github.com/aws/aws-sdk-go/aws/csm" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/aws/session" + "github.com/aws/aws-sdk-go/aws/signer/v4" + "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" +) + +func startUDPServer(done chan struct{}, fn func([]byte)) (string, error) { + addr, err := net.ResolveUDPAddr("udp", "127.0.0.1:0") + if err != nil { + return "", err + } + + conn, err := net.ListenUDP("udp", addr) + if err != nil { + return "", err + } + + buf := make([]byte, 1024) + i := 0 + go func() { + defer conn.Close() + for { + i++ + select { + case <-done: + return + default: + } + + n, _, err := conn.ReadFromUDP(buf) + fn(buf[:n]) + + if err != nil { + panic(err) + } + } + }() + + return conn.LocalAddr().String(), nil +} + +func TestReportingMetrics(t *testing.T) { + reporter := csm.Get() + if reporter == nil { + t.Errorf("expected non-nil reporter") + } + + sess := session.New() + sess.Handlers.Clear() + reporter.InjectHandlers(&sess.Handlers) + + md := metadata.ClientInfo{} + op := &request.Operation{} + r := request.New(*sess.Config, md, sess.Handlers, client.DefaultRetryer{NumMaxRetries: 0}, op, nil, nil) + sess.Handlers.Complete.Run(r) + m := <-csm.MetricsCh + + for k, v := range m { + switch k { + case "Timestamp": + if _, ok := v.(float64); !ok { + t.Errorf("expected a float value, but received %T", v) + } + case "Type": + if e, a := "ApiCall", v.(string); e != a { + t.Errorf("expected %q, but received %q", e, a) + } + } + } +} + +type mockService struct { + *client.Client +} + +type input struct{} +type output struct{} + +func (s *mockService) Request(i input) *request.Request { + op := &request.Operation{ + Name: "foo", + HTTPMethod: "POST", + HTTPPath: "/", + } + + o := output{} + req := s.NewRequest(op, &i, &o) + return req +} + +func BenchmarkWithCSM(b *testing.B) { + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.Write([]byte(fmt.Sprintf("{}"))) + })) + + cfg := aws.Config{ + Endpoint: aws.String(server.URL), + } + + sess := session.New(&cfg) + r := csm.Get() + + r.InjectHandlers(&sess.Handlers) + + c := sess.ClientConfig("id", &cfg) + + svc := mockService{ + client.New( + *c.Config, + metadata.ClientInfo{ + ServiceName: "service", + ServiceID: "id", + SigningName: "signing", + SigningRegion: "region", + Endpoint: server.URL, + APIVersion: "0", + JSONVersion: "1.1", + TargetPrefix: "prefix", + }, + c.Handlers, + ), + } + + svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) + svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) + svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) + svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) + svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) + + for i := 0; i < b.N; i++ { + req := svc.Request(input{}) + req.Send() + } +} + +func BenchmarkWithCSMNoUDPConnection(b *testing.B) { + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.Write([]byte(fmt.Sprintf("{}"))) + })) + + cfg := aws.Config{ + Endpoint: aws.String(server.URL), + } + + sess := session.New(&cfg) + r := csm.Get() + r.Pause() + r.InjectHandlers(&sess.Handlers) + defer r.Pause() + + c := sess.ClientConfig("id", &cfg) + + svc := mockService{ + client.New( + *c.Config, + metadata.ClientInfo{ + ServiceName: "service", + ServiceID: "id", + SigningName: "signing", + SigningRegion: "region", + Endpoint: server.URL, + APIVersion: "0", + JSONVersion: "1.1", + TargetPrefix: "prefix", + }, + c.Handlers, + ), + } + + svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) + svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) + svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) + svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) + svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) + + for i := 0; i < b.N; i++ { + req := svc.Request(input{}) + req.Send() + } +} + +func BenchmarkWithoutCSM(b *testing.B) { + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.Write([]byte(fmt.Sprintf("{}"))) + })) + + cfg := aws.Config{ + Endpoint: aws.String(server.URL), + } + sess := session.New(&cfg) + c := sess.ClientConfig("id", &cfg) + + svc := mockService{ + client.New( + *c.Config, + metadata.ClientInfo{ + ServiceName: "service", + ServiceID: "id", + SigningName: "signing", + SigningRegion: "region", + Endpoint: server.URL, + APIVersion: "0", + JSONVersion: "1.1", + TargetPrefix: "prefix", + }, + c.Handlers, + ), + } + + svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) + svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) + svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) + svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) + svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) + + for i := 0; i < b.N; i++ { + req := svc.Request(input{}) + req.Send() + } +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults.go b/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults.go index 07afe3b..3cf1036 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults.go @@ -9,6 +9,7 @@ package defaults import ( "fmt" + "net" "net/http" "net/url" "os" @@ -72,6 +73,7 @@ func Handlers() request.Handlers { handlers.Validate.PushBackNamed(corehandlers.ValidateEndpointHandler) handlers.Validate.AfterEachFn = request.HandlerListStopOnError handlers.Build.PushBackNamed(corehandlers.SDKVersionUserAgentHandler) + handlers.Build.PushBackNamed(corehandlers.AddHostExecEnvUserAgentHander) handlers.Build.AfterEachFn = request.HandlerListStopOnError handlers.Sign.PushBackNamed(corehandlers.BuildContentLengthHandler) handlers.Send.PushBackNamed(corehandlers.ValidateReqSigHandler) @@ -118,14 +120,43 @@ func RemoteCredProvider(cfg aws.Config, handlers request.Handlers) credentials.P return ec2RoleProvider(cfg, handlers) } +var lookupHostFn = net.LookupHost + +func isLoopbackHost(host string) (bool, error) { + ip := net.ParseIP(host) + if ip != nil { + return ip.IsLoopback(), nil + } + + // Host is not an ip, perform lookup + addrs, err := lookupHostFn(host) + if err != nil { + return false, err + } + for _, addr := range addrs { + if !net.ParseIP(addr).IsLoopback() { + return false, nil + } + } + + return true, nil +} + func localHTTPCredProvider(cfg aws.Config, handlers request.Handlers, u string) credentials.Provider { var errMsg string parsed, err := url.Parse(u) if err != nil { errMsg = fmt.Sprintf("invalid URL, %v", err) - } else if host := aws.URLHostname(parsed); !(host == "localhost" || host == "127.0.0.1") { - errMsg = fmt.Sprintf("invalid host address, %q, only localhost and 127.0.0.1 are valid.", host) + } else { + host := aws.URLHostname(parsed) + if len(host) == 0 { + errMsg = "unable to parse host from local HTTP cred provider URL" + } else if isLoopback, loopbackErr := isLoopbackHost(host); loopbackErr != nil { + errMsg = fmt.Sprintf("failed to resolve host %q, %v", host, loopbackErr) + } else if !isLoopback { + errMsg = fmt.Sprintf("invalid endpoint host, %q, only loopback hosts are allowed.", host) + } } if len(errMsg) > 0 { diff --git a/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults_test.go b/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults_test.go index d3e4a86..cb06468 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults_test.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults_test.go @@ -13,12 +13,40 @@ import ( ) func TestHTTPCredProvider(t *testing.T) { + origFn := lookupHostFn + defer func() { lookupHostFn = origFn }() + + lookupHostFn = func(host string) ([]string, error) { + m := map[string]struct { + Addrs []string + Err error + }{ + "localhost": {Addrs: []string{"::1", "127.0.0.1"}}, + "actuallylocal": {Addrs: []string{"127.0.0.2"}}, + "notlocal": {Addrs: []string{"::1", "127.0.0.1", "192.168.1.10"}}, + "www.example.com": {Addrs: []string{"10.10.10.10"}}, + } + + h, ok := m[host] + if !ok { + t.Fatalf("unknown host in test, %v", host) + return nil, fmt.Errorf("unknown host") + } + + return h.Addrs, h.Err + } + cases := []struct { Host string Fail bool }{ - {"localhost", false}, {"127.0.0.1", false}, - {"www.example.com", true}, {"169.254.170.2", true}, + {"localhost", false}, + {"actuallylocal", false}, + {"127.0.0.1", false}, + {"127.1.1.1", false}, + {"[::1]", false}, + {"www.example.com", true}, + {"169.254.170.2", true}, } defer os.Clearenv() diff --git a/vendor/github.com/aws/aws-sdk-go/aws/defaults/shared_config.go b/vendor/github.com/aws/aws-sdk-go/aws/defaults/shared_config.go new file mode 100644 index 0000000..ca0ee1d --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/defaults/shared_config.go @@ -0,0 +1,27 @@ +package defaults + +import ( + "github.com/aws/aws-sdk-go/internal/shareddefaults" +) + +// SharedCredentialsFilename returns the SDK's default file path +// for the shared credentials file. +// +// Builds the shared config file path based on the OS's platform. +// +// - Linux/Unix: $HOME/.aws/credentials +// - Windows: %USERPROFILE%\.aws\credentials +func SharedCredentialsFilename() string { + return shareddefaults.SharedCredentialsFilename() +} + +// SharedConfigFilename returns the SDK's default file path for +// the shared config file. +// +// Builds the shared config file path based on the OS's platform. +// +// - Linux/Unix: $HOME/.aws/config +// - Windows: %USERPROFILE%\.aws\config +func SharedConfigFilename() string { + return shareddefaults.SharedConfigFilename() +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/doc.go b/vendor/github.com/aws/aws-sdk-go/aws/doc.go new file mode 100644 index 0000000..4fcb616 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/doc.go @@ -0,0 +1,56 @@ +// Package aws provides the core SDK's utilities and shared types. Use this package's +// utilities to simplify setting and reading API operations parameters. +// +// Value and Pointer Conversion Utilities +// +// This package includes a helper conversion utility for each scalar type the SDK's +// API use. These utilities make getting a pointer of the scalar, and dereferencing +// a pointer easier. +// +// Each conversion utility comes in two forms. Value to Pointer and Pointer to Value. +// The Pointer to value will safely dereference the pointer and return its value. +// If the pointer was nil, the scalar's zero value will be returned. +// +// The value to pointer functions will be named after the scalar type. So get a +// *string from a string value use the "String" function. This makes it easy to +// to get pointer of a literal string value, because getting the address of a +// literal requires assigning the value to a variable first. +// +// var strPtr *string +// +// // Without the SDK's conversion functions +// str := "my string" +// strPtr = &str +// +// // With the SDK's conversion functions +// strPtr = aws.String("my string") +// +// // Convert *string to string value +// str = aws.StringValue(strPtr) +// +// In addition to scalars the aws package also includes conversion utilities for +// map and slice for commonly types used in API parameters. The map and slice +// conversion functions use similar naming pattern as the scalar conversion +// functions. +// +// var strPtrs []*string +// var strs []string = []string{"Go", "Gophers", "Go"} +// +// // Convert []string to []*string +// strPtrs = aws.StringSlice(strs) +// +// // Convert []*string to []string +// strs = aws.StringValueSlice(strPtrs) +// +// SDK Default HTTP Client +// +// The SDK will use the http.DefaultClient if a HTTP client is not provided to +// the SDK's Session, or service client constructor. This means that if the +// http.DefaultClient is modified by other components of your application the +// modifications will be picked up by the SDK as well. +// +// In some cases this might be intended, but it is a better practice to create +// a custom HTTP Client to share explicitly through your application. You can +// configure the SDK to use the custom HTTP Client by setting the HTTPClient +// value of the SDK's Config type when creating a Session or service client. +package aws diff --git a/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/api_test.go b/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/api_test.go index 35e7578..7dde1fb 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/api_test.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/api_test.go @@ -11,8 +11,6 @@ import ( "strings" "testing" - "github.com/stretchr/testify/assert" - "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/ec2metadata" @@ -71,8 +69,12 @@ func TestEndpoint(t *testing.T) { } req := c.NewRequest(op, nil, nil) - assert.Equal(t, "http://169.254.169.254/latest", req.ClientInfo.Endpoint) - assert.Equal(t, "http://169.254.169.254/latest/meta-data/testpath", req.HTTPRequest.URL.String()) + if e, a := "http://169.254.169.254/latest", req.ClientInfo.Endpoint; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "http://169.254.169.254/latest/meta-data/testpath", req.HTTPRequest.URL.String(); e != a { + t.Errorf("expect %v, got %v", e, a) + } } func TestGetMetadata(t *testing.T) { @@ -85,8 +87,12 @@ func TestGetMetadata(t *testing.T) { resp, err := c.GetMetadata("some/path") - assert.NoError(t, err) - assert.Equal(t, "success", resp) + if err != nil { + t.Errorf("expect no error, got %v", err) + } + if e, a := "success", resp; e != a { + t.Errorf("expect %v, got %v", e, a) + } } func TestGetUserData(t *testing.T) { @@ -99,8 +105,12 @@ func TestGetUserData(t *testing.T) { resp, err := c.GetUserData() - assert.NoError(t, err) - assert.Equal(t, "success", resp) + if err != nil { + t.Errorf("expect no error, got %v", err) + } + if e, a := "success", resp; e != a { + t.Errorf("expect %v, got %v", e, a) + } } func TestGetUserData_Error(t *testing.T) { @@ -126,12 +136,17 @@ func TestGetUserData_Error(t *testing.T) { c := ec2metadata.New(unit.Session, &aws.Config{Endpoint: aws.String(server.URL + "/latest")}) resp, err := c.GetUserData() - assert.Error(t, err) - assert.Empty(t, resp) + if err == nil { + t.Errorf("expect error") + } + if len(resp) != 0 { + t.Errorf("expect empty, got %v", resp) + } - aerr, ok := err.(awserr.Error) - assert.True(t, ok) - assert.Equal(t, "NotFoundError", aerr.Code()) + aerr := err.(awserr.Error) + if e, a := "NotFoundError", aerr.Code(); e != a { + t.Errorf("expect %v, got %v", e, a) + } } func TestGetRegion(t *testing.T) { @@ -144,8 +159,12 @@ func TestGetRegion(t *testing.T) { region, err := c.Region() - assert.NoError(t, err) - assert.Equal(t, "us-west-2", region) + if err != nil { + t.Errorf("expect no error, got %v", err) + } + if e, a := "us-west-2", region; e != a { + t.Errorf("expect %v, got %v", e, a) + } } func TestMetadataAvailable(t *testing.T) { @@ -156,9 +175,9 @@ func TestMetadataAvailable(t *testing.T) { defer server.Close() c := ec2metadata.New(unit.Session, &aws.Config{Endpoint: aws.String(server.URL + "/latest")}) - available := c.Available() - - assert.True(t, available) + if !c.Available() { + t.Errorf("expect available") + } } func TestMetadataIAMInfo_success(t *testing.T) { @@ -170,10 +189,18 @@ func TestMetadataIAMInfo_success(t *testing.T) { c := ec2metadata.New(unit.Session, &aws.Config{Endpoint: aws.String(server.URL + "/latest")}) iamInfo, err := c.IAMInfo() - assert.NoError(t, err) - assert.Equal(t, "Success", iamInfo.Code) - assert.Equal(t, "arn:aws:iam::123456789012:instance-profile/my-instance-profile", iamInfo.InstanceProfileArn) - assert.Equal(t, "AIPAABCDEFGHIJKLMN123", iamInfo.InstanceProfileID) + if err != nil { + t.Errorf("expect no error, got %v", err) + } + if e, a := "Success", iamInfo.Code; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "arn:aws:iam::123456789012:instance-profile/my-instance-profile", iamInfo.InstanceProfileArn; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "AIPAABCDEFGHIJKLMN123", iamInfo.InstanceProfileID; e != a { + t.Errorf("expect %v, got %v", e, a) + } } func TestMetadataIAMInfo_failure(t *testing.T) { @@ -185,10 +212,18 @@ func TestMetadataIAMInfo_failure(t *testing.T) { c := ec2metadata.New(unit.Session, &aws.Config{Endpoint: aws.String(server.URL + "/latest")}) iamInfo, err := c.IAMInfo() - assert.NotNil(t, err) - assert.Equal(t, "", iamInfo.Code) - assert.Equal(t, "", iamInfo.InstanceProfileArn) - assert.Equal(t, "", iamInfo.InstanceProfileID) + if err == nil { + t.Errorf("expect error") + } + if e, a := "", iamInfo.Code; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "", iamInfo.InstanceProfileArn; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "", iamInfo.InstanceProfileID; e != a { + t.Errorf("expect %v, got %v", e, a) + } } func TestMetadataNotAvailable(t *testing.T) { @@ -204,9 +239,9 @@ func TestMetadataNotAvailable(t *testing.T) { r.Retryable = aws.Bool(true) // network errors are retryable }) - available := c.Available() - - assert.False(t, available) + if c.Available() { + t.Errorf("expect not available") + } } func TestMetadataErrorResponse(t *testing.T) { @@ -222,8 +257,12 @@ func TestMetadataErrorResponse(t *testing.T) { }) data, err := c.GetMetadata("uri/path") - assert.Empty(t, data) - assert.Contains(t, err.Error(), "error message text") + if len(data) != 0 { + t.Errorf("expect empty, got %v", data) + } + if e, a := "error message text", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v to be in %v", e, a) + } } func TestEC2RoleProviderInstanceIdentity(t *testing.T) { @@ -235,8 +274,16 @@ func TestEC2RoleProviderInstanceIdentity(t *testing.T) { c := ec2metadata.New(unit.Session, &aws.Config{Endpoint: aws.String(server.URL + "/latest")}) doc, err := c.GetInstanceIdentityDocument() - assert.Nil(t, err, "Expect no error, %v", err) - assert.Equal(t, doc.AccountID, "123456789012") - assert.Equal(t, doc.AvailabilityZone, "us-east-1d") - assert.Equal(t, doc.Region, "us-east-1") + if err != nil { + t.Errorf("expect no error, got %v", err) + } + if e, a := doc.AccountID, "123456789012"; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := doc.AvailabilityZone, "us-east-1d"; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := doc.Region, "us-east-1"; e != a { + t.Errorf("expect %v, got %v", e, a) + } } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/service.go b/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/service.go index 5b4379d..ef5f732 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/service.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/service.go @@ -1,5 +1,10 @@ // Package ec2metadata provides the client for making API calls to the // EC2 Metadata service. +// +// This package's client can be disabled completely by setting the environment +// variable "AWS_EC2_METADATA_DISABLED=true". This environment variable set to +// true instructs the SDK to disable the EC2 Metadata client. The client cannot +// be used while the environemnt variable is set to true, (case insensitive). package ec2metadata import ( @@ -7,17 +12,21 @@ import ( "errors" "io" "net/http" + "os" + "strings" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/client" "github.com/aws/aws-sdk-go/aws/client/metadata" + "github.com/aws/aws-sdk-go/aws/corehandlers" "github.com/aws/aws-sdk-go/aws/request" ) // ServiceName is the name of the service. const ServiceName = "ec2metadata" +const disableServiceEnvVar = "AWS_EC2_METADATA_DISABLED" // A EC2Metadata is an EC2 Metadata service Client. type EC2Metadata struct { @@ -75,6 +84,21 @@ func NewClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio svc.Handlers.Validate.Clear() svc.Handlers.Validate.PushBack(validateEndpointHandler) + // Disable the EC2 Metadata service if the environment variable is set. + // This shortcirctes the service's functionality to always fail to send + // requests. + if strings.ToLower(os.Getenv(disableServiceEnvVar)) == "true" { + svc.Handlers.Send.SwapNamed(request.NamedHandler{ + Name: corehandlers.SendHandler.Name, + Fn: func(r *request.Request) { + r.Error = awserr.New( + request.CanceledErrorCode, + "EC2 IMDS access disabled via "+disableServiceEnvVar+" env var", + nil) + }, + }) + } + // Add additional options to the service config for _, option := range opts { option(svc.Client) diff --git a/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/service_test.go b/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/service_test.go index c2bc215..6902e0b 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/service_test.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/service_test.go @@ -3,21 +3,30 @@ package ec2metadata_test import ( "net/http" "net/http/httptest" + "os" + "strings" "sync" "testing" "time" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/ec2metadata" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/awstesting" "github.com/aws/aws-sdk-go/awstesting/unit" - "github.com/stretchr/testify/assert" ) func TestClientOverrideDefaultHTTPClientTimeout(t *testing.T) { svc := ec2metadata.New(unit.Session) - assert.NotEqual(t, http.DefaultClient, svc.Config.HTTPClient) - assert.Equal(t, 5*time.Second, svc.Config.HTTPClient.Timeout) + if e, a := http.DefaultClient, svc.Config.HTTPClient; e == a { + t.Errorf("expect %v, not to equal %v", e, a) + } + + if e, a := 5*time.Second, svc.Config.HTTPClient.Timeout; e != a { + t.Errorf("expect %v to be %v", e, a) + } } func TestClientNotOverrideDefaultHTTPClientTimeout(t *testing.T) { @@ -28,18 +37,25 @@ func TestClientNotOverrideDefaultHTTPClientTimeout(t *testing.T) { svc := ec2metadata.New(unit.Session) - assert.Equal(t, http.DefaultClient, svc.Config.HTTPClient) + if e, a := http.DefaultClient, svc.Config.HTTPClient; e != a { + t.Errorf("expect %v, got %v", e, a) + } - tr, ok := svc.Config.HTTPClient.Transport.(*http.Transport) - assert.True(t, ok) - assert.NotNil(t, tr) - assert.Nil(t, tr.Dial) + tr := svc.Config.HTTPClient.Transport.(*http.Transport) + if tr == nil { + t.Fatalf("expect transport not to be nil") + } + if tr.Dial != nil { + t.Errorf("expect dial to be nil, was not") + } } func TestClientDisableOverrideDefaultHTTPClientTimeout(t *testing.T) { svc := ec2metadata.New(unit.Session, aws.NewConfig().WithEC2MetadataDisableTimeoutOverride(true)) - assert.Equal(t, http.DefaultClient, svc.Config.HTTPClient) + if e, a := http.DefaultClient, svc.Config.HTTPClient; e != a { + t.Errorf("expect %v, got %v", e, a) + } } func TestClientOverrideDefaultHTTPClientTimeoutRace(t *testing.T) { @@ -63,6 +79,30 @@ func TestClientOverrideDefaultHTTPClientTimeoutRaceWithTransport(t *testing.T) { runEC2MetadataClients(t, cfg, 100) } +func TestClientDisableIMDS(t *testing.T) { + env := awstesting.StashEnv() + defer awstesting.PopEnv(env) + + os.Setenv("AWS_EC2_METADATA_DISABLED", "true") + + svc := ec2metadata.New(unit.Session) + resp, err := svc.Region() + if err == nil { + t.Fatalf("expect error, got none") + } + if len(resp) != 0 { + t.Errorf("expect no response, got %v", resp) + } + + aerr := err.(awserr.Error) + if e, a := request.CanceledErrorCode, aerr.Code(); e != a { + t.Errorf("expect %v error code, got %v", e, a) + } + if e, a := "AWS_EC2_METADATA_DISABLED", aerr.Message(); !strings.Contains(a, e) { + t.Errorf("expect %v in error message, got %v", e, a) + } +} + func runEC2MetadataClients(t *testing.T, cfg *aws.Config, atOnce int) { var wg sync.WaitGroup wg.Add(atOnce) @@ -70,7 +110,9 @@ func runEC2MetadataClients(t *testing.T, cfg *aws.Config, atOnce int) { go func() { svc := ec2metadata.New(unit.Session, cfg) _, err := svc.Region() - assert.NoError(t, err) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } wg.Done() }() } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go index 90558c4..c304327 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go @@ -24,6 +24,7 @@ const ( EuCentral1RegionID = "eu-central-1" // EU (Frankfurt). EuWest1RegionID = "eu-west-1" // EU (Ireland). EuWest2RegionID = "eu-west-2" // EU (London). + EuWest3RegionID = "eu-west-3" // EU (Paris). SaEast1RegionID = "sa-east-1" // South America (Sao Paulo). UsEast1RegionID = "us-east-1" // US East (N. Virginia). UsEast2RegionID = "us-east-2" // US East (Ohio). @@ -33,7 +34,8 @@ const ( // AWS China partition's regions. const ( - CnNorth1RegionID = "cn-north-1" // China (Beijing). + CnNorth1RegionID = "cn-north-1" // China (Beijing). + CnNorthwest1RegionID = "cn-northwest-1" // China (Ningxia). ) // AWS GovCloud (US) partition's regions. @@ -43,29 +45,41 @@ const ( // Service identifiers const ( + A4bServiceID = "a4b" // A4b. AcmServiceID = "acm" // Acm. + AcmPcaServiceID = "acm-pca" // AcmPca. + ApiMediatailorServiceID = "api.mediatailor" // ApiMediatailor. + ApiPricingServiceID = "api.pricing" // ApiPricing. ApigatewayServiceID = "apigateway" // Apigateway. ApplicationAutoscalingServiceID = "application-autoscaling" // ApplicationAutoscaling. Appstream2ServiceID = "appstream2" // Appstream2. + AthenaServiceID = "athena" // Athena. AutoscalingServiceID = "autoscaling" // Autoscaling. + AutoscalingPlansServiceID = "autoscaling-plans" // AutoscalingPlans. BatchServiceID = "batch" // Batch. BudgetsServiceID = "budgets" // Budgets. + CeServiceID = "ce" // Ce. + Cloud9ServiceID = "cloud9" // Cloud9. ClouddirectoryServiceID = "clouddirectory" // Clouddirectory. CloudformationServiceID = "cloudformation" // Cloudformation. CloudfrontServiceID = "cloudfront" // Cloudfront. CloudhsmServiceID = "cloudhsm" // Cloudhsm. + Cloudhsmv2ServiceID = "cloudhsmv2" // Cloudhsmv2. CloudsearchServiceID = "cloudsearch" // Cloudsearch. CloudtrailServiceID = "cloudtrail" // Cloudtrail. CodebuildServiceID = "codebuild" // Codebuild. CodecommitServiceID = "codecommit" // Codecommit. CodedeployServiceID = "codedeploy" // Codedeploy. CodepipelineServiceID = "codepipeline" // Codepipeline. + CodestarServiceID = "codestar" // Codestar. CognitoIdentityServiceID = "cognito-identity" // CognitoIdentity. CognitoIdpServiceID = "cognito-idp" // CognitoIdp. CognitoSyncServiceID = "cognito-sync" // CognitoSync. + ComprehendServiceID = "comprehend" // Comprehend. ConfigServiceID = "config" // Config. CurServiceID = "cur" // Cur. DatapipelineServiceID = "datapipeline" // Datapipeline. + DaxServiceID = "dax" // Dax. DevicefarmServiceID = "devicefarm" // Devicefarm. DirectconnectServiceID = "directconnect" // Directconnect. DiscoveryServiceID = "discovery" // Discovery. @@ -83,11 +97,16 @@ const ( ElasticmapreduceServiceID = "elasticmapreduce" // Elasticmapreduce. ElastictranscoderServiceID = "elastictranscoder" // Elastictranscoder. EmailServiceID = "email" // Email. + EntitlementMarketplaceServiceID = "entitlement.marketplace" // EntitlementMarketplace. EsServiceID = "es" // Es. EventsServiceID = "events" // Events. FirehoseServiceID = "firehose" // Firehose. + FmsServiceID = "fms" // Fms. GameliftServiceID = "gamelift" // Gamelift. GlacierServiceID = "glacier" // Glacier. + GlueServiceID = "glue" // Glue. + GreengrassServiceID = "greengrass" // Greengrass. + GuarddutyServiceID = "guardduty" // Guardduty. HealthServiceID = "health" // Health. IamServiceID = "iam" // Iam. ImportexportServiceID = "importexport" // Importexport. @@ -95,17 +114,24 @@ const ( IotServiceID = "iot" // Iot. KinesisServiceID = "kinesis" // Kinesis. KinesisanalyticsServiceID = "kinesisanalytics" // Kinesisanalytics. + KinesisvideoServiceID = "kinesisvideo" // Kinesisvideo. KmsServiceID = "kms" // Kms. LambdaServiceID = "lambda" // Lambda. LightsailServiceID = "lightsail" // Lightsail. LogsServiceID = "logs" // Logs. MachinelearningServiceID = "machinelearning" // Machinelearning. MarketplacecommerceanalyticsServiceID = "marketplacecommerceanalytics" // Marketplacecommerceanalytics. + MediaconvertServiceID = "mediaconvert" // Mediaconvert. + MedialiveServiceID = "medialive" // Medialive. + MediapackageServiceID = "mediapackage" // Mediapackage. + MediastoreServiceID = "mediastore" // Mediastore. MeteringMarketplaceServiceID = "metering.marketplace" // MeteringMarketplace. + MghServiceID = "mgh" // Mgh. MobileanalyticsServiceID = "mobileanalytics" // Mobileanalytics. ModelsLexServiceID = "models.lex" // ModelsLex. MonitoringServiceID = "monitoring" // Monitoring. MturkRequesterServiceID = "mturk-requester" // MturkRequester. + NeptuneServiceID = "neptune" // Neptune. OpsworksServiceID = "opsworks" // Opsworks. OpsworksCmServiceID = "opsworks-cm" // OpsworksCm. OrganizationsServiceID = "organizations" // Organizations. @@ -114,12 +140,18 @@ const ( RdsServiceID = "rds" // Rds. RedshiftServiceID = "redshift" // Redshift. RekognitionServiceID = "rekognition" // Rekognition. + ResourceGroupsServiceID = "resource-groups" // ResourceGroups. Route53ServiceID = "route53" // Route53. Route53domainsServiceID = "route53domains" // Route53domains. RuntimeLexServiceID = "runtime.lex" // RuntimeLex. + RuntimeSagemakerServiceID = "runtime.sagemaker" // RuntimeSagemaker. S3ServiceID = "s3" // S3. + SagemakerServiceID = "sagemaker" // Sagemaker. SdbServiceID = "sdb" // Sdb. + SecretsmanagerServiceID = "secretsmanager" // Secretsmanager. + ServerlessrepoServiceID = "serverlessrepo" // Serverlessrepo. ServicecatalogServiceID = "servicecatalog" // Servicecatalog. + ServicediscoveryServiceID = "servicediscovery" // Servicediscovery. ShieldServiceID = "shield" // Shield. SmsServiceID = "sms" // Sms. SnowballServiceID = "snowball" // Snowball. @@ -133,9 +165,11 @@ const ( SupportServiceID = "support" // Support. SwfServiceID = "swf" // Swf. TaggingServiceID = "tagging" // Tagging. + TranslateServiceID = "translate" // Translate. WafServiceID = "waf" // Waf. WafRegionalServiceID = "waf-regional" // WafRegional. WorkdocsServiceID = "workdocs" // Workdocs. + WorkmailServiceID = "workmail" // Workmail. WorkspacesServiceID = "workspaces" // Workspaces. XrayServiceID = "xray" // Xray. ) @@ -213,6 +247,9 @@ var awsPartition = partition{ "eu-west-2": region{ Description: "EU (London)", }, + "eu-west-3": region{ + Description: "EU (Paris)", + }, "sa-east-1": region{ Description: "South America (Sao Paulo)", }, @@ -230,6 +267,12 @@ var awsPartition = partition{ }, }, Services: services{ + "a4b": service{ + + Endpoints: endpoints{ + "us-east-1": endpoint{}, + }, + }, "acm": service{ Endpoints: endpoints{ @@ -242,6 +285,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -249,6 +293,43 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, + "acm-pca": service{ + Defaults: endpoint{ + Protocols: []string{"https"}, + }, + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, + }, + }, + "api.mediatailor": service{ + + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + }, + }, + "api.pricing": service{ + Defaults: endpoint{ + CredentialScope: credentialScope{ + Service: "pricing", + }, + }, + Endpoints: endpoints{ + "ap-south-1": endpoint{}, + "us-east-1": endpoint{}, + }, + }, "apigateway": service{ Endpoints: endpoints{ @@ -257,9 +338,12 @@ var awsPartition = partition{ "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, + "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, "us-west-1": endpoint{}, @@ -284,6 +368,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -305,6 +390,19 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, + "athena": service{ + + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "autoscaling": service{ Defaults: endpoint{ Protocols: []string{"http", "https"}, @@ -319,6 +417,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -326,10 +425,38 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, + "autoscaling-plans": service{ + Defaults: endpoint{ + Hostname: "autoscaling.{region}.amazonaws.com", + Protocols: []string{"http", "https"}, + CredentialScope: credentialScope{ + Service: "autoscaling-plans", + }, + }, + Endpoints: endpoints{ + "ap-southeast-1": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "batch": service{ Endpoints: endpoints{ - "us-east-1": endpoint{}, + "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, + "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "budgets": service{ @@ -345,11 +472,35 @@ var awsPartition = partition{ }, }, }, + "ce": service{ + PartitionEndpoint: "aws-global", + IsRegionalized: boxedFalse, + + Endpoints: endpoints{ + "aws-global": endpoint{ + Hostname: "ce.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + }, + }, + "cloud9": service{ + + Endpoints: endpoints{ + "ap-southeast-1": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "clouddirectory": service{ Endpoints: endpoints{ "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, + "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "us-east-1": endpoint{}, @@ -369,6 +520,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -405,6 +557,26 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, + "cloudhsmv2": service{ + Defaults: endpoint{ + CredentialScope: credentialScope{ + Service: "cloudhsm", + }, + }, + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "ap-south-1": endpoint{}, + "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "cloudsearch": service{ Endpoints: endpoints{ @@ -432,6 +604,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -443,22 +616,64 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, + "sa-east-1": endpoint{}, "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-2": endpoint{}, + "us-east-1-fips": endpoint{ + Hostname: "codebuild-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "us-east-2": endpoint{}, + "us-east-2-fips": endpoint{ + Hostname: "codebuild-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "us-west-1": endpoint{}, + "us-west-1-fips": endpoint{ + Hostname: "codebuild-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "us-west-2": endpoint{}, + "us-west-2-fips": endpoint{ + Hostname: "codebuild-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, }, }, "codecommit": service{ Endpoints: endpoints{ - "eu-west-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-2": endpoint{}, + "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, + "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "codedeploy": service{ @@ -473,6 +688,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -484,13 +700,36 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, + }, + }, + "codestar": service{ + + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, "us-west-2": endpoint{}, }, }, @@ -499,6 +738,8 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, + "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, @@ -513,6 +754,8 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, + "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, @@ -527,6 +770,8 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, + "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, @@ -536,6 +781,17 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, + "comprehend": service{ + Defaults: endpoint{ + Protocols: []string{"https"}, + }, + Endpoints: endpoints{ + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "config": service{ Endpoints: endpoints{ @@ -548,6 +804,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -571,6 +828,21 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, + "dax": service{ + + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "ap-south-1": endpoint{}, + "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "eu-west-1": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "devicefarm": service{ Endpoints: endpoints{ @@ -589,6 +861,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -614,6 +887,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -625,11 +899,18 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, + "sa-east-1": endpoint{}, "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, "us-west-2": endpoint{}, }, }, @@ -647,6 +928,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "local": endpoint{ Hostname: "localhost:8000", Protocols: []string{"http"}, @@ -675,6 +957,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -697,12 +980,16 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, + "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, "us-west-1": endpoint{}, @@ -713,12 +1000,16 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, + "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, "us-west-1": endpoint{}, @@ -737,6 +1028,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -756,6 +1048,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -766,16 +1059,19 @@ var awsPartition = partition{ "elasticfilesystem": service{ Endpoints: endpoints{ + "ap-northeast-2": endpoint{}, "ap-southeast-2": endpoint{}, + "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, + "us-west-1": endpoint{}, "us-west-2": endpoint{}, }, }, "elasticloadbalancing": service{ Defaults: endpoint{ - Protocols: []string{"http", "https"}, + Protocols: []string{"https"}, }, Endpoints: endpoints{ "ap-northeast-1": endpoint{}, @@ -787,6 +1083,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -811,6 +1108,7 @@ var awsPartition = partition{ }, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{ SSLCommonName: "{service}.{region}.{dnsSuffix}", @@ -841,6 +1139,16 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, + "entitlement.marketplace": service{ + Defaults: endpoint{ + CredentialScope: credentialScope{ + Service: "aws-marketplace", + }, + }, + Endpoints: endpoints{ + "us-east-1": endpoint{}, + }, + }, "es": service{ Endpoints: endpoints{ @@ -853,6 +1161,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -872,6 +1181,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -882,7 +1192,22 @@ var awsPartition = partition{ "firehose": service{ Endpoints: endpoints{ - "eu-west-1": endpoint{}, + "ap-northeast-1": endpoint{}, + "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, + }, + }, + "fms": service{ + Defaults: endpoint{ + Protocols: []string{"https"}, + }, + Endpoints: endpoints{ "us-east-1": endpoint{}, "us-west-2": endpoint{}, }, @@ -894,10 +1219,15 @@ var awsPartition = partition{ "ap-northeast-2": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, "us-west-2": endpoint{}, }, }, @@ -909,11 +1239,65 @@ var awsPartition = partition{ "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, "ap-south-1": endpoint{}, + "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, + }, + }, + "glue": service{ + + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, + "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, + }, + }, + "greengrass": service{ + IsRegionalized: boxedTrue, + Defaults: endpoint{ + Protocols: []string{"https"}, + }, + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "eu-central-1": endpoint{}, + "us-east-1": endpoint{}, + "us-west-2": endpoint{}, + }, + }, + "guardduty": service{ + IsRegionalized: boxedTrue, + Defaults: endpoint{ + Protocols: []string{"https"}, + }, + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, + "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, + "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, "us-west-1": endpoint{}, @@ -961,8 +1345,11 @@ var awsPartition = partition{ "ap-northeast-2": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-2": endpoint{}, + "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, "us-west-2": endpoint{}, }, }, @@ -975,6 +1362,7 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, "eu-central-1": endpoint{}, @@ -997,6 +1385,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -1012,6 +1401,16 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, + "kinesisvideo": service{ + + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "kms": service{ Endpoints: endpoints{ @@ -1024,6 +1423,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -1039,9 +1439,12 @@ var awsPartition = partition{ "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, + "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, "us-west-1": endpoint{}, @@ -1051,7 +1454,19 @@ var awsPartition = partition{ "lightsail": service{ Endpoints: endpoints{ - "us-east-1": endpoint{}, + "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, + "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, }, }, "logs": service{ @@ -1066,6 +1481,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -1086,6 +1502,63 @@ var awsPartition = partition{ "us-east-1": endpoint{}, }, }, + "mediaconvert": service{ + + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, + "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, + }, + }, + "medialive": service{ + + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-west-2": endpoint{}, + }, + }, + "mediapackage": service{ + + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "eu-west-3": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-west-2": endpoint{}, + }, + }, + "mediastore": service{ + + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "metering.marketplace": service{ Defaults: endpoint{ CredentialScope: credentialScope{ @@ -1102,6 +1575,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -1109,6 +1583,12 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, + "mgh": service{ + + Endpoints: endpoints{ + "us-west-2": endpoint{}, + }, + }, "mobileanalytics": service{ Endpoints: endpoints{ @@ -1122,7 +1602,9 @@ var awsPartition = partition{ }, }, Endpoints: endpoints{ + "eu-west-1": endpoint{}, "us-east-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "monitoring": service{ @@ -1139,6 +1621,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -1156,6 +1639,35 @@ var awsPartition = partition{ "us-east-1": endpoint{}, }, }, + "neptune": service{ + + Endpoints: endpoints{ + "eu-west-1": endpoint{ + Hostname: "rds.eu-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "eu-west-1", + }, + }, + "us-east-1": endpoint{ + Hostname: "rds.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "us-east-2": endpoint{ + Hostname: "rds.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "us-west-2": endpoint{ + Hostname: "rds.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + }, + }, "opsworks": service{ Endpoints: endpoints{ @@ -1164,9 +1676,11 @@ var awsPartition = partition{ "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -1177,9 +1691,15 @@ var awsPartition = partition{ "opsworks-cm": service{ Endpoints: endpoints{ - "eu-west-1": endpoint{}, - "us-east-1": endpoint{}, - "us-west-2": endpoint{}, + "ap-northeast-1": endpoint{}, + "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "organizations": service{ @@ -1208,10 +1728,21 @@ var awsPartition = partition{ "polly": service{ Endpoints: endpoints{ - "eu-west-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-2": endpoint{}, + "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, + "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "rds": service{ @@ -1226,6 +1757,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{ SSLCommonName: "{service}.{dnsSuffix}", @@ -1247,6 +1779,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -1257,9 +1790,31 @@ var awsPartition = partition{ "rekognition": service{ Endpoints: endpoints{ - "eu-west-1": endpoint{}, - "us-east-1": endpoint{}, - "us-west-2": endpoint{}, + "ap-northeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, + }, + }, + "resource-groups": service{ + + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, + "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "route53": service{ @@ -1288,7 +1843,19 @@ var awsPartition = partition{ }, }, Endpoints: endpoints{ + "eu-west-1": endpoint{}, "us-east-1": endpoint{}, + "us-west-2": endpoint{}, + }, + }, + "runtime.sagemaker": service{ + + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, }, }, "s3": service{ @@ -1303,26 +1870,27 @@ var awsPartition = partition{ }, Endpoints: endpoints{ "ap-northeast-1": endpoint{ - Hostname: "s3-ap-northeast-1.amazonaws.com", + Hostname: "s3.ap-northeast-1.amazonaws.com", SignatureVersions: []string{"s3", "s3v4"}, }, "ap-northeast-2": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{ - Hostname: "s3-ap-southeast-1.amazonaws.com", + Hostname: "s3.ap-southeast-1.amazonaws.com", SignatureVersions: []string{"s3", "s3v4"}, }, "ap-southeast-2": endpoint{ - Hostname: "s3-ap-southeast-2.amazonaws.com", + Hostname: "s3.ap-southeast-2.amazonaws.com", SignatureVersions: []string{"s3", "s3v4"}, }, "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{ - Hostname: "s3-eu-west-1.amazonaws.com", + Hostname: "s3.eu-west-1.amazonaws.com", SignatureVersions: []string{"s3", "s3v4"}, }, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "s3-external-1": endpoint{ Hostname: "s3-external-1.amazonaws.com", SignatureVersions: []string{"s3", "s3v4"}, @@ -1331,7 +1899,7 @@ var awsPartition = partition{ }, }, "sa-east-1": endpoint{ - Hostname: "s3-sa-east-1.amazonaws.com", + Hostname: "s3.sa-east-1.amazonaws.com", SignatureVersions: []string{"s3", "s3v4"}, }, "us-east-1": endpoint{ @@ -1340,15 +1908,25 @@ var awsPartition = partition{ }, "us-east-2": endpoint{}, "us-west-1": endpoint{ - Hostname: "s3-us-west-1.amazonaws.com", + Hostname: "s3.us-west-1.amazonaws.com", SignatureVersions: []string{"s3", "s3v4"}, }, "us-west-2": endpoint{ - Hostname: "s3-us-west-2.amazonaws.com", + Hostname: "s3.us-west-2.amazonaws.com", SignatureVersions: []string{"s3", "s3v4"}, }, }, }, + "sagemaker": service{ + + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "sdb": service{ Defaults: endpoint{ Protocols: []string{"http", "https"}, @@ -1367,21 +1945,103 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, + "secretsmanager": service{ + + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, + "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, + }, + }, + "serverlessrepo": service{ + Defaults: endpoint{ + Protocols: []string{"https"}, + }, + Endpoints: endpoints{ + "ap-northeast-1": endpoint{ + Protocols: []string{"https"}, + }, + "ap-northeast-2": endpoint{ + Protocols: []string{"https"}, + }, + "ap-south-1": endpoint{ + Protocols: []string{"https"}, + }, + "ap-southeast-1": endpoint{ + Protocols: []string{"https"}, + }, + "ap-southeast-2": endpoint{ + Protocols: []string{"https"}, + }, + "ca-central-1": endpoint{ + Protocols: []string{"https"}, + }, + "eu-central-1": endpoint{ + Protocols: []string{"https"}, + }, + "eu-west-1": endpoint{ + Protocols: []string{"https"}, + }, + "eu-west-2": endpoint{ + Protocols: []string{"https"}, + }, + "sa-east-1": endpoint{ + Protocols: []string{"https"}, + }, + "us-east-1": endpoint{ + Protocols: []string{"https"}, + }, + "us-east-2": endpoint{ + Protocols: []string{"https"}, + }, + "us-west-1": endpoint{ + Protocols: []string{"https"}, + }, + "us-west-2": endpoint{ + Protocols: []string{"https"}, + }, + }, + }, "servicecatalog": service{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, + "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, + "us-west-1": endpoint{}, "us-west-2": endpoint{}, }, }, + "servicediscovery": service{ + + Endpoints: endpoints{ + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "shield": service{ IsRegionalized: boxedFalse, Defaults: endpoint{ @@ -1395,19 +2055,36 @@ var awsPartition = partition{ "sms": service{ Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, + "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, + "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, + "sa-east-1": endpoint{}, "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "snowball": service{ Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, "ap-south-1": endpoint{}, + "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, + "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, "us-west-1": endpoint{}, @@ -1428,6 +2105,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -1450,6 +2128,11 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, + "fips-us-east-1": endpoint{}, + "fips-us-east-2": endpoint{}, + "fips-us-west-1": endpoint{}, + "fips-us-west-2": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{ SSLCommonName: "queue.{dnsSuffix}", @@ -1464,10 +2147,14 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -1479,10 +2166,16 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, + "us-west-1": endpoint{}, "us-west-2": endpoint{}, }, }, @@ -1491,12 +2184,14 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -1506,7 +2201,7 @@ var awsPartition = partition{ }, "streams.dynamodb": service{ Defaults: endpoint{ - Protocols: []string{"http", "http", "https", "https"}, + Protocols: []string{"http", "https"}, CredentialScope: credentialScope{ Service: "dynamodb", }, @@ -1521,6 +2216,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "local": endpoint{ Hostname: "localhost:8000", Protocols: []string{"http"}, @@ -1559,11 +2255,36 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, + "us-east-1-fips": endpoint{ + Hostname: "sts-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "us-east-2": endpoint{}, + "us-east-2-fips": endpoint{ + Hostname: "sts-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "us-west-1": endpoint{}, + "us-west-1-fips": endpoint{ + Hostname: "sts-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "us-west-2": endpoint{}, + "us-west-2-fips": endpoint{ + Hostname: "sts-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, }, }, "support": service{ @@ -1584,6 +2305,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -1603,6 +2325,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -1610,6 +2333,17 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, + "translate": service{ + Defaults: endpoint{ + Protocols: []string{"https"}, + }, + Endpoints: endpoints{ + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "waf": service{ PartitionEndpoint: "aws-global", IsRegionalized: boxedFalse, @@ -1627,8 +2361,12 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, "us-west-2": endpoint{}, }, }, @@ -1643,14 +2381,28 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, + "workmail": service{ + Defaults: endpoint{ + Protocols: []string{"https"}, + }, + Endpoints: endpoints{ + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "workspaces": service{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, + "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-west-2": endpoint{}, }, @@ -1663,8 +2415,10 @@ var awsPartition = partition{ "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -1699,30 +2453,62 @@ var awscnPartition = partition{ "cn-north-1": region{ Description: "China (Beijing)", }, + "cn-northwest-1": region{ + Description: "China (Ningxia)", + }, }, Services: services{ + "apigateway": service{ + + Endpoints: endpoints{ + "cn-north-1": endpoint{}, + }, + }, + "application-autoscaling": service{ + Defaults: endpoint{ + Hostname: "autoscaling.{region}.amazonaws.com", + Protocols: []string{"http", "https"}, + CredentialScope: credentialScope{ + Service: "application-autoscaling", + }, + }, + Endpoints: endpoints{ + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, + }, + }, "autoscaling": service{ Defaults: endpoint{ Protocols: []string{"http", "https"}, }, Endpoints: endpoints{ - "cn-north-1": endpoint{}, + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, }, }, "cloudformation": service{ Endpoints: endpoints{ - "cn-north-1": endpoint{}, + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, }, }, "cloudtrail": service{ Endpoints: endpoints{ - "cn-north-1": endpoint{}, + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, }, }, "codedeploy": service{ + Endpoints: endpoints{ + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, + }, + }, + "cognito-identity": service{ + Endpoints: endpoints{ "cn-north-1": endpoint{}, }, @@ -1730,13 +2516,15 @@ var awscnPartition = partition{ "config": service{ Endpoints: endpoints{ - "cn-north-1": endpoint{}, + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, }, }, "directconnect": service{ Endpoints: endpoints{ - "cn-north-1": endpoint{}, + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, }, }, "dynamodb": service{ @@ -1744,7 +2532,8 @@ var awscnPartition = partition{ Protocols: []string{"http", "https"}, }, Endpoints: endpoints{ - "cn-north-1": endpoint{}, + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, }, }, "ec2": service{ @@ -1752,7 +2541,8 @@ var awscnPartition = partition{ Protocols: []string{"http", "https"}, }, Endpoints: endpoints{ - "cn-north-1": endpoint{}, + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, }, }, "ec2metadata": service{ @@ -1766,24 +2556,41 @@ var awscnPartition = partition{ }, }, }, + "ecr": service{ + + Endpoints: endpoints{ + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, + }, + }, + "ecs": service{ + + Endpoints: endpoints{ + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, + }, + }, "elasticache": service{ Endpoints: endpoints{ - "cn-north-1": endpoint{}, + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, }, }, "elasticbeanstalk": service{ Endpoints: endpoints{ - "cn-north-1": endpoint{}, + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, }, }, "elasticloadbalancing": service{ Defaults: endpoint{ - Protocols: []string{"http", "https"}, + Protocols: []string{"https"}, }, Endpoints: endpoints{ - "cn-north-1": endpoint{}, + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, }, }, "elasticmapreduce": service{ @@ -1791,13 +2598,21 @@ var awscnPartition = partition{ Protocols: []string{"http", "https"}, }, Endpoints: endpoints{ - "cn-north-1": endpoint{}, + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, + }, + }, + "es": service{ + + Endpoints: endpoints{ + "cn-northwest-1": endpoint{}, }, }, "events": service{ Endpoints: endpoints{ - "cn-north-1": endpoint{}, + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, }, }, "glacier": service{ @@ -1805,7 +2620,8 @@ var awscnPartition = partition{ Protocols: []string{"http", "https"}, }, Endpoints: endpoints{ - "cn-north-1": endpoint{}, + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, }, }, "iam": service{ @@ -1821,8 +2637,25 @@ var awscnPartition = partition{ }, }, }, + "iot": service{ + Defaults: endpoint{ + CredentialScope: credentialScope{ + Service: "execute-api", + }, + }, + Endpoints: endpoints{ + "cn-north-1": endpoint{}, + }, + }, "kinesis": service{ + Endpoints: endpoints{ + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, + }, + }, + "lambda": service{ + Endpoints: endpoints{ "cn-north-1": endpoint{}, }, @@ -1830,7 +2663,8 @@ var awscnPartition = partition{ "logs": service{ Endpoints: endpoints{ - "cn-north-1": endpoint{}, + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, }, }, "monitoring": service{ @@ -1838,19 +2672,22 @@ var awscnPartition = partition{ Protocols: []string{"http", "https"}, }, Endpoints: endpoints{ - "cn-north-1": endpoint{}, + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, }, }, "rds": service{ Endpoints: endpoints{ - "cn-north-1": endpoint{}, + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, }, }, "redshift": service{ Endpoints: endpoints{ - "cn-north-1": endpoint{}, + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, }, }, "s3": service{ @@ -1858,6 +2695,20 @@ var awscnPartition = partition{ Protocols: []string{"http", "https"}, SignatureVersions: []string{"s3v4"}, }, + Endpoints: endpoints{ + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, + }, + }, + "sms": service{ + + Endpoints: endpoints{ + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, + }, + }, + "snowball": service{ + Endpoints: endpoints{ "cn-north-1": endpoint{}, }, @@ -1867,7 +2718,8 @@ var awscnPartition = partition{ Protocols: []string{"http", "https"}, }, Endpoints: endpoints{ - "cn-north-1": endpoint{}, + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, }, }, "sqs": service{ @@ -1876,7 +2728,15 @@ var awscnPartition = partition{ Protocols: []string{"http", "https"}, }, Endpoints: endpoints{ - "cn-north-1": endpoint{}, + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, + }, + }, + "ssm": service{ + + Endpoints: endpoints{ + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, }, }, "storagegateway": service{ @@ -1887,31 +2747,35 @@ var awscnPartition = partition{ }, "streams.dynamodb": service{ Defaults: endpoint{ - Protocols: []string{"http", "http", "https", "https"}, + Protocols: []string{"http", "https"}, CredentialScope: credentialScope{ Service: "dynamodb", }, }, Endpoints: endpoints{ - "cn-north-1": endpoint{}, + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, }, }, "sts": service{ Endpoints: endpoints{ - "cn-north-1": endpoint{}, + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, }, }, "swf": service{ Endpoints: endpoints{ - "cn-north-1": endpoint{}, + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, }, }, "tagging": service{ Endpoints: endpoints{ - "cn-north-1": endpoint{}, + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, }, }, }, @@ -1943,6 +2807,18 @@ var awsusgovPartition = partition{ }, }, Services: services{ + "acm": service{ + + Endpoints: endpoints{ + "us-gov-west-1": endpoint{}, + }, + }, + "apigateway": service{ + + Endpoints: endpoints{ + "us-gov-west-1": endpoint{}, + }, + }, "autoscaling": service{ Endpoints: endpoints{ @@ -1963,12 +2839,28 @@ var awsusgovPartition = partition{ "us-gov-west-1": endpoint{}, }, }, + "cloudhsmv2": service{ + Defaults: endpoint{ + CredentialScope: credentialScope{ + Service: "cloudhsm", + }, + }, + Endpoints: endpoints{ + "us-gov-west-1": endpoint{}, + }, + }, "cloudtrail": service{ Endpoints: endpoints{ "us-gov-west-1": endpoint{}, }, }, + "codedeploy": service{ + + Endpoints: endpoints{ + "us-gov-west-1": endpoint{}, + }, + }, "config": service{ Endpoints: endpoints{ @@ -1981,10 +2873,22 @@ var awsusgovPartition = partition{ "us-gov-west-1": endpoint{}, }, }, + "dms": service{ + + Endpoints: endpoints{ + "us-gov-west-1": endpoint{}, + }, + }, "dynamodb": service{ Endpoints: endpoints{ "us-gov-west-1": endpoint{}, + "us-gov-west-1-fips": endpoint{ + Hostname: "dynamodb.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, }, }, "ec2": service{ @@ -2004,12 +2908,30 @@ var awsusgovPartition = partition{ }, }, }, + "ecr": service{ + + Endpoints: endpoints{ + "us-gov-west-1": endpoint{}, + }, + }, + "ecs": service{ + + Endpoints: endpoints{ + "us-gov-west-1": endpoint{}, + }, + }, "elasticache": service{ Endpoints: endpoints{ "us-gov-west-1": endpoint{}, }, }, + "elasticbeanstalk": service{ + + Endpoints: endpoints{ + "us-gov-west-1": endpoint{}, + }, + }, "elasticloadbalancing": service{ Endpoints: endpoints{ @@ -2026,6 +2948,18 @@ var awsusgovPartition = partition{ }, }, }, + "es": service{ + + Endpoints: endpoints{ + "us-gov-west-1": endpoint{}, + }, + }, + "events": service{ + + Endpoints: endpoints{ + "us-gov-west-1": endpoint{}, + }, + }, "glacier": service{ Endpoints: endpoints{ @@ -2059,18 +2993,40 @@ var awsusgovPartition = partition{ "us-gov-west-1": endpoint{}, }, }, + "lambda": service{ + + Endpoints: endpoints{ + "us-gov-west-1": endpoint{}, + }, + }, "logs": service{ Endpoints: endpoints{ "us-gov-west-1": endpoint{}, }, }, + "metering.marketplace": service{ + Defaults: endpoint{ + CredentialScope: credentialScope{ + Service: "aws-marketplace", + }, + }, + Endpoints: endpoints{ + "us-gov-west-1": endpoint{}, + }, + }, "monitoring": service{ Endpoints: endpoints{ "us-gov-west-1": endpoint{}, }, }, + "polly": service{ + + Endpoints: endpoints{ + "us-gov-west-1": endpoint{}, + }, + }, "rds": service{ Endpoints: endpoints{ @@ -2083,6 +3039,12 @@ var awsusgovPartition = partition{ "us-gov-west-1": endpoint{}, }, }, + "rekognition": service{ + + Endpoints: endpoints{ + "us-gov-west-1": endpoint{}, + }, + }, "s3": service{ Defaults: endpoint{ SignatureVersions: []string{"s3", "s3v4"}, @@ -2095,11 +3057,17 @@ var awsusgovPartition = partition{ }, }, "us-gov-west-1": endpoint{ - Hostname: "s3-us-gov-west-1.amazonaws.com", + Hostname: "s3.us-gov-west-1.amazonaws.com", Protocols: []string{"http", "https"}, }, }, }, + "sms": service{ + + Endpoints: endpoints{ + "us-gov-west-1": endpoint{}, + }, + }, "snowball": service{ Endpoints: endpoints{ @@ -2123,6 +3091,18 @@ var awsusgovPartition = partition{ }, }, }, + "ssm": service{ + + Endpoints: endpoints{ + "us-gov-west-1": endpoint{}, + }, + }, + "storagegateway": service{ + + Endpoints: endpoints{ + "us-gov-west-1": endpoint{}, + }, + }, "streams.dynamodb": service{ Defaults: endpoint{ CredentialScope: credentialScope{ @@ -2131,6 +3111,12 @@ var awsusgovPartition = partition{ }, Endpoints: endpoints{ "us-gov-west-1": endpoint{}, + "us-gov-west-1-fips": endpoint{ + Hostname: "dynamodb.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, }, }, "sts": service{ @@ -2141,6 +3127,12 @@ var awsusgovPartition = partition{ }, "swf": service{ + Endpoints: endpoints{ + "us-gov-west-1": endpoint{}, + }, + }, + "tagging": service{ + Endpoints: endpoints{ "us-gov-west-1": endpoint{}, }, diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/doc.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/doc.go index a0e9bc4..84316b9 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/doc.go @@ -21,12 +21,12 @@ // partitions := resolver.(endpoints.EnumPartitions).Partitions() // // for _, p := range partitions { -// fmt.Println("Regions for", p.Name) +// fmt.Println("Regions for", p.ID()) // for id, _ := range p.Regions() { // fmt.Println("*", id) // } // -// fmt.Println("Services for", p.Name) +// fmt.Println("Services for", p.ID()) // for id, _ := range p.Services() { // fmt.Println("*", id) // } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go index 9c3eedb..e29c095 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go @@ -206,10 +206,11 @@ func (p Partition) EndpointFor(service, region string, opts ...func(*Options)) ( // enumerating over the regions in a partition. func (p Partition) Regions() map[string]Region { rs := map[string]Region{} - for id := range p.p.Regions { + for id, r := range p.p.Regions { rs[id] = Region{ - id: id, - p: p.p, + id: id, + desc: r.Description, + p: p.p, } } @@ -240,6 +241,10 @@ type Region struct { // ID returns the region's identifier. func (r Region) ID() string { return r.id } +// Description returns the region's description. The region description +// is free text, it can be empty, and it may change between SDK releases. +func (r Region) Description() string { return r.desc } + // ResolveEndpoint resolves an endpoint from the context of the region given // a service. See Partition.EndpointFor for usage and errors that can be returned. func (r Region) ResolveEndpoint(service string, opts ...func(*Options)) (ResolvedEndpoint, error) { @@ -284,10 +289,11 @@ func (s Service) ResolveEndpoint(region string, opts ...func(*Options)) (Resolve func (s Service) Regions() map[string]Region { rs := map[string]Region{} for id := range s.p.Services[s.id].Endpoints { - if _, ok := s.p.Regions[id]; ok { + if r, ok := s.p.Regions[id]; ok { rs[id] = Region{ - id: id, - p: s.p, + id: id, + desc: r.Description, + p: s.p, } } } @@ -347,6 +353,10 @@ type ResolvedEndpoint struct { // The service name that should be used for signing requests. SigningName string + // States that the signing name for this endpoint was derived from metadata + // passed in, but was not explicitly modeled. + SigningNameDerived bool + // The signing method that should be used for signing requests. SigningMethod string } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints_test.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints_test.go index 9c0e09d..de0e530 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints_test.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints_test.go @@ -65,6 +65,10 @@ func TestEnumRegionServices(t *testing.T) { t.Errorf("expect %q region ID, got %q", e, a) } + if a, e := r.Description(), "region description"; a != e { + t.Errorf("expect %q region Description, got %q", e, a) + } + ss := r.Services() if a, e := len(ss), 1; a != e { t.Errorf("expect %d services for us-east-1, got %d", e, a) @@ -291,6 +295,9 @@ func TestRegionsForService(t *testing.T) { if _, ok := expect[id]; !ok { t.Errorf("expect %s region to be found", id) } + if a, e := r.Description(), expect[id].desc; a != e { + t.Errorf("expect %q region Description, got %q", e, a) + } } } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model.go index 13d968a..ff6f76d 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model.go @@ -226,16 +226,20 @@ func (e endpoint) resolve(service, region, dnsSuffix string, defs []endpoint, op if len(signingRegion) == 0 { signingRegion = region } + signingName := e.CredentialScope.Service + var signingNameDerived bool if len(signingName) == 0 { signingName = service + signingNameDerived = true } return ResolvedEndpoint{ - URL: u, - SigningRegion: signingRegion, - SigningName: signingName, - SigningMethod: getByPriority(e.SignatureVersions, signerPriority, defaultSigner), + URL: u, + SigningRegion: signingRegion, + SigningName: signingName, + SigningNameDerived: signingNameDerived, + SigningMethod: getByPriority(e.SignatureVersions, signerPriority, defaultSigner), } } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model_test.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model_test.go index 1385cb4..0b8b006 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model_test.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model_test.go @@ -2,10 +2,9 @@ package endpoints import ( "encoding/json" + "reflect" "regexp" "testing" - - "github.com/stretchr/testify/assert" ) func TestUnmarshalRegionRegex(t *testing.T) { @@ -16,12 +15,18 @@ func TestUnmarshalRegionRegex(t *testing.T) { p := partition{} err := json.Unmarshal(input, &p) - assert.NoError(t, err) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } expectRegexp, err := regexp.Compile(`^(us|eu|ap|sa|ca)\-\w+\-\d+$`) - assert.NoError(t, err) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } - assert.Equal(t, expectRegexp.String(), p.RegionRegex.Regexp.String()) + if e, a := expectRegexp.String(), p.RegionRegex.Regexp.String(); e != a { + t.Errorf("expect %v, got %v", e, a) + } } func TestUnmarshalRegion(t *testing.T) { @@ -37,16 +42,28 @@ func TestUnmarshalRegion(t *testing.T) { rs := regions{} err := json.Unmarshal(input, &rs) - assert.NoError(t, err) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } - assert.Len(t, rs, 2) + if e, a := 2, len(rs); e != a { + t.Errorf("expect %v len, got %v", e, a) + } r, ok := rs["aws-global"] - assert.True(t, ok) - assert.Equal(t, "AWS partition-global endpoint", r.Description) + if !ok { + t.Errorf("expect found, was not") + } + if e, a := "AWS partition-global endpoint", r.Description; e != a { + t.Errorf("expect %v, got %v", e, a) + } r, ok = rs["us-east-1"] - assert.True(t, ok) - assert.Equal(t, "US East (N. Virginia)", r.Description) + if !ok { + t.Errorf("expect found, was not") + } + if e, a := "US East (N. Virginia)", r.Description; e != a { + t.Errorf("expect %v, got %v", e, a) + } } func TestUnmarshalServices(t *testing.T) { @@ -75,23 +92,45 @@ func TestUnmarshalServices(t *testing.T) { ss := services{} err := json.Unmarshal(input, &ss) - assert.NoError(t, err) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } - assert.Len(t, ss, 3) + if e, a := 3, len(ss); e != a { + t.Errorf("expect %v len, got %v", e, a) + } s, ok := ss["acm"] - assert.True(t, ok) - assert.Len(t, s.Endpoints, 1) - assert.Equal(t, boxedBoolUnset, s.IsRegionalized) + if !ok { + t.Errorf("expect found, was not") + } + if e, a := 1, len(s.Endpoints); e != a { + t.Errorf("expect %v len, got %v", e, a) + } + if e, a := boxedBoolUnset, s.IsRegionalized; e != a { + t.Errorf("expect %v, got %v", e, a) + } s, ok = ss["apigateway"] - assert.True(t, ok) - assert.Len(t, s.Endpoints, 2) - assert.Equal(t, boxedTrue, s.IsRegionalized) + if !ok { + t.Errorf("expect found, was not") + } + if e, a := 2, len(s.Endpoints); e != a { + t.Errorf("expect %v len, got %v", e, a) + } + if e, a := boxedTrue, s.IsRegionalized; e != a { + t.Errorf("expect %v, got %v", e, a) + } s, ok = ss["notRegionalized"] - assert.True(t, ok) - assert.Len(t, s.Endpoints, 2) - assert.Equal(t, boxedFalse, s.IsRegionalized) + if !ok { + t.Errorf("expect found, was not") + } + if e, a := 2, len(s.Endpoints); e != a { + t.Errorf("expect %v len, got %v", e, a) + } + if e, a := boxedFalse, s.IsRegionalized; e != a { + t.Errorf("expect %v, got %v", e, a) + } } func TestUnmarshalEndpoints(t *testing.T) { @@ -115,16 +154,32 @@ func TestUnmarshalEndpoints(t *testing.T) { es := endpoints{} err := json.Unmarshal(inputs, &es) - assert.NoError(t, err) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } - assert.Len(t, es, 2) + if e, a := 2, len(es); e != a { + t.Errorf("expect %v len, got %v", e, a) + } s, ok := es["aws-global"] - assert.True(t, ok) - assert.Equal(t, "cloudfront.amazonaws.com", s.Hostname) - assert.Equal(t, []string{"http", "https"}, s.Protocols) - assert.Equal(t, []string{"v4"}, s.SignatureVersions) - assert.Equal(t, credentialScope{"us-east-1", "serviceName"}, s.CredentialScope) - assert.Equal(t, "commonName", s.SSLCommonName) + if !ok { + t.Errorf("expect found, was not") + } + if e, a := "cloudfront.amazonaws.com", s.Hostname; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := []string{"http", "https"}, s.Protocols; !reflect.DeepEqual(e, a) { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := []string{"v4"}, s.SignatureVersions; !reflect.DeepEqual(e, a) { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := (credentialScope{"us-east-1", "serviceName"}), s.CredentialScope; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "commonName", s.SSLCommonName; e != a { + t.Errorf("expect %v, got %v", e, a) + } } func TestEndpointResolve(t *testing.T) { @@ -155,10 +210,18 @@ func TestEndpointResolve(t *testing.T) { defs, Options{}, ) - assert.Equal(t, "https://service.region.dnsSuffix", resolved.URL) - assert.Equal(t, "signing_service", resolved.SigningName) - assert.Equal(t, "signing_region", resolved.SigningRegion) - assert.Equal(t, "v4", resolved.SigningMethod) + if e, a := "https://service.region.dnsSuffix", resolved.URL; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "signing_service", resolved.SigningName; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "signing_region", resolved.SigningRegion; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "v4", resolved.SigningMethod; e != a { + t.Errorf("expect %v, got %v", e, a) + } } func TestEndpointMergeIn(t *testing.T) { @@ -185,7 +248,9 @@ func TestEndpointMergeIn(t *testing.T) { }, }) - assert.Equal(t, expected, actual) + if e, a := expected, actual; !reflect.DeepEqual(e, a) { + t.Errorf("expect %v, got %v", e, a) + } } var testPartitions = partitions{ @@ -213,6 +278,11 @@ var testPartitions = partitions{ Services: services{ "s3": service{}, "service1": service{ + Defaults: endpoint{ + CredentialScope: credentialScope{ + Service: "service1", + }, + }, Endpoints: endpoints{ "us-east-1": {}, "us-west-2": { @@ -221,7 +291,13 @@ var testPartitions = partitions{ }, }, }, - "service2": service{}, + "service2": service{ + Defaults: endpoint{ + CredentialScope: credentialScope{ + Service: "service2", + }, + }, + }, "httpService": service{ Defaults: endpoint{ Protocols: []string{"http"}, @@ -246,109 +322,220 @@ var testPartitions = partitions{ func TestResolveEndpoint(t *testing.T) { resolved, err := testPartitions.EndpointFor("service2", "us-west-2") - assert.NoError(t, err) - assert.Equal(t, "https://service2.us-west-2.amazonaws.com", resolved.URL) - assert.Equal(t, "us-west-2", resolved.SigningRegion) - assert.Equal(t, "service2", resolved.SigningName) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + if e, a := "https://service2.us-west-2.amazonaws.com", resolved.URL; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "us-west-2", resolved.SigningRegion; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "service2", resolved.SigningName; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if resolved.SigningNameDerived { + t.Errorf("expect the signing name not to be derived, but was") + } } func TestResolveEndpoint_DisableSSL(t *testing.T) { resolved, err := testPartitions.EndpointFor("service2", "us-west-2", DisableSSLOption) - assert.NoError(t, err) - assert.Equal(t, "http://service2.us-west-2.amazonaws.com", resolved.URL) - assert.Equal(t, "us-west-2", resolved.SigningRegion) - assert.Equal(t, "service2", resolved.SigningName) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + if e, a := "http://service2.us-west-2.amazonaws.com", resolved.URL; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "us-west-2", resolved.SigningRegion; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "service2", resolved.SigningName; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if resolved.SigningNameDerived { + t.Errorf("expect the signing name not to be derived, but was") + } } func TestResolveEndpoint_UseDualStack(t *testing.T) { resolved, err := testPartitions.EndpointFor("service1", "us-west-2", UseDualStackOption) - assert.NoError(t, err) - assert.Equal(t, "https://service1.dualstack.us-west-2.amazonaws.com", resolved.URL) - assert.Equal(t, "us-west-2", resolved.SigningRegion) - assert.Equal(t, "service1", resolved.SigningName) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + if e, a := "https://service1.dualstack.us-west-2.amazonaws.com", resolved.URL; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "us-west-2", resolved.SigningRegion; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "service1", resolved.SigningName; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if resolved.SigningNameDerived { + t.Errorf("expect the signing name not to be derived, but was") + } } func TestResolveEndpoint_HTTPProtocol(t *testing.T) { resolved, err := testPartitions.EndpointFor("httpService", "us-west-2") - assert.NoError(t, err) - assert.Equal(t, "http://httpService.us-west-2.amazonaws.com", resolved.URL) - assert.Equal(t, "us-west-2", resolved.SigningRegion) - assert.Equal(t, "httpService", resolved.SigningName) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + if e, a := "http://httpService.us-west-2.amazonaws.com", resolved.URL; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "us-west-2", resolved.SigningRegion; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "httpService", resolved.SigningName; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if !resolved.SigningNameDerived { + t.Errorf("expect the signing name to be derived") + } } func TestResolveEndpoint_UnknownService(t *testing.T) { _, err := testPartitions.EndpointFor("unknownservice", "us-west-2") - assert.Error(t, err) + if err == nil { + t.Errorf("expect error, got none") + } _, ok := err.(UnknownServiceError) - assert.True(t, ok, "expect error to be UnknownServiceError") + if !ok { + t.Errorf("expect error to be UnknownServiceError") + } } func TestResolveEndpoint_ResolveUnknownService(t *testing.T) { resolved, err := testPartitions.EndpointFor("unknown-service", "us-region-1", ResolveUnknownServiceOption) - assert.NoError(t, err) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } - assert.Equal(t, "https://unknown-service.us-region-1.amazonaws.com", resolved.URL) - assert.Equal(t, "us-region-1", resolved.SigningRegion) - assert.Equal(t, "unknown-service", resolved.SigningName) + if e, a := "https://unknown-service.us-region-1.amazonaws.com", resolved.URL; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "us-region-1", resolved.SigningRegion; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "unknown-service", resolved.SigningName; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if !resolved.SigningNameDerived { + t.Errorf("expect the signing name to be derived") + } } func TestResolveEndpoint_UnknownMatchedRegion(t *testing.T) { resolved, err := testPartitions.EndpointFor("service2", "us-region-1") - assert.NoError(t, err) - assert.Equal(t, "https://service2.us-region-1.amazonaws.com", resolved.URL) - assert.Equal(t, "us-region-1", resolved.SigningRegion) - assert.Equal(t, "service2", resolved.SigningName) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + if e, a := "https://service2.us-region-1.amazonaws.com", resolved.URL; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "us-region-1", resolved.SigningRegion; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "service2", resolved.SigningName; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if resolved.SigningNameDerived { + t.Errorf("expect the signing name not to be derived, but was") + } } func TestResolveEndpoint_UnknownRegion(t *testing.T) { resolved, err := testPartitions.EndpointFor("service2", "unknownregion") - assert.NoError(t, err) - assert.Equal(t, "https://service2.unknownregion.amazonaws.com", resolved.URL) - assert.Equal(t, "unknownregion", resolved.SigningRegion) - assert.Equal(t, "service2", resolved.SigningName) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + if e, a := "https://service2.unknownregion.amazonaws.com", resolved.URL; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "unknownregion", resolved.SigningRegion; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "service2", resolved.SigningName; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if resolved.SigningNameDerived { + t.Errorf("expect the signing name not to be derived, but was") + } } func TestResolveEndpoint_StrictPartitionUnknownEndpoint(t *testing.T) { _, err := testPartitions[0].EndpointFor("service2", "unknownregion", StrictMatchingOption) - assert.Error(t, err) + if err == nil { + t.Errorf("expect error, got none") + } _, ok := err.(UnknownEndpointError) - assert.True(t, ok, "expect error to be UnknownEndpointError") + if !ok { + t.Errorf("expect error to be UnknownEndpointError") + } } func TestResolveEndpoint_StrictPartitionsUnknownEndpoint(t *testing.T) { _, err := testPartitions.EndpointFor("service2", "us-region-1", StrictMatchingOption) - assert.Error(t, err) + if err == nil { + t.Errorf("expect error, got none") + } _, ok := err.(UnknownEndpointError) - assert.True(t, ok, "expect error to be UnknownEndpointError") + if !ok { + t.Errorf("expect error to be UnknownEndpointError") + } } func TestResolveEndpoint_NotRegionalized(t *testing.T) { resolved, err := testPartitions.EndpointFor("globalService", "us-west-2") - assert.NoError(t, err) - assert.Equal(t, "https://globalService.amazonaws.com", resolved.URL) - assert.Equal(t, "us-east-1", resolved.SigningRegion) - assert.Equal(t, "globalService", resolved.SigningName) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + if e, a := "https://globalService.amazonaws.com", resolved.URL; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "us-east-1", resolved.SigningRegion; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "globalService", resolved.SigningName; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if !resolved.SigningNameDerived { + t.Errorf("expect the signing name to be derived") + } } func TestResolveEndpoint_AwsGlobal(t *testing.T) { resolved, err := testPartitions.EndpointFor("globalService", "aws-global") - assert.NoError(t, err) - assert.Equal(t, "https://globalService.amazonaws.com", resolved.URL) - assert.Equal(t, "us-east-1", resolved.SigningRegion) - assert.Equal(t, "globalService", resolved.SigningName) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + if e, a := "https://globalService.amazonaws.com", resolved.URL; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "us-east-1", resolved.SigningRegion; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "globalService", resolved.SigningName; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if !resolved.SigningNameDerived { + t.Errorf("expect the signing name to be derived") + } } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/logger.go b/vendor/github.com/aws/aws-sdk-go/aws/logger.go index db87188..6ed15b2 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/logger.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/logger.go @@ -26,14 +26,14 @@ func (l *LogLevelType) Value() LogLevelType { // Matches returns true if the v LogLevel is enabled by this LogLevel. Should be // used with logging sub levels. Is safe to use on nil value LogLevelTypes. If -// LogLevel is nill, will default to LogOff comparison. +// LogLevel is nil, will default to LogOff comparison. func (l *LogLevelType) Matches(v LogLevelType) bool { c := l.Value() return c&v == v } // AtLeast returns true if this LogLevel is at least high enough to satisfies v. -// Is safe to use on nil value LogLevelTypes. If LogLevel is nill, will default +// Is safe to use on nil value LogLevelTypes. If LogLevel is nil, will default // to LogOff comparison. func (l *LogLevelType) AtLeast(v LogLevelType) bool { c := l.Value() @@ -71,6 +71,12 @@ const ( // LogDebugWithRequestErrors states the SDK should log when service requests fail // to build, send, validate, or unmarshal. LogDebugWithRequestErrors + + // LogDebugWithEventStreamBody states the SDK should log EventStream + // request and response bodys. This should be used to log the EventStream + // wire unmarshaled message content of requests and responses made while + // using the SDK Will also enable LogDebug. + LogDebugWithEventStreamBody ) // A Logger is a minimalistic interface for the SDK to log messages to. Should diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error.go b/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error.go index 10fc8cb..271da43 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error.go @@ -1,4 +1,4 @@ -// +build !appengine +// +build !appengine,!plan9 package request diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error_appengine.go b/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error_other.go similarity index 84% rename from vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error_appengine.go rename to vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error_other.go index 996196e..daf9eca 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error_appengine.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error_other.go @@ -1,4 +1,4 @@ -// +build appengine +// +build appengine plan9 package request diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error_appengine_test.go b/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error_other_test.go similarity index 80% rename from vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error_appengine_test.go rename to vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error_other_test.go index 29660da..aba8eb4 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error_appengine_test.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error_other_test.go @@ -1,4 +1,4 @@ -// +build appengine +// +build appengine plan9 package request_test diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error_test.go b/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error_test.go index f02c507..bb5f6bd 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error_test.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error_test.go @@ -1,4 +1,4 @@ -// +build !appengine +// +build !appengine,!plan9 package request_test diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/handlers.go b/vendor/github.com/aws/aws-sdk-go/aws/request/handlers.go index 6c14336..605a72d 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/handlers.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/handlers.go @@ -14,6 +14,7 @@ type Handlers struct { Send HandlerList ValidateResponse HandlerList Unmarshal HandlerList + UnmarshalStream HandlerList UnmarshalMeta HandlerList UnmarshalError HandlerList Retry HandlerList @@ -30,6 +31,7 @@ func (h *Handlers) Copy() Handlers { Send: h.Send.copy(), ValidateResponse: h.ValidateResponse.copy(), Unmarshal: h.Unmarshal.copy(), + UnmarshalStream: h.UnmarshalStream.copy(), UnmarshalError: h.UnmarshalError.copy(), UnmarshalMeta: h.UnmarshalMeta.copy(), Retry: h.Retry.copy(), @@ -45,6 +47,7 @@ func (h *Handlers) Clear() { h.Send.Clear() h.Sign.Clear() h.Unmarshal.Clear() + h.UnmarshalStream.Clear() h.UnmarshalMeta.Clear() h.UnmarshalError.Clear() h.ValidateResponse.Clear() @@ -158,6 +161,52 @@ func (l *HandlerList) RemoveByName(name string) { } } +// SwapNamed will swap out any existing handlers with the same name as the +// passed in NamedHandler returning true if handlers were swapped. False is +// returned otherwise. +func (l *HandlerList) SwapNamed(n NamedHandler) (swapped bool) { + for i := 0; i < len(l.list); i++ { + if l.list[i].Name == n.Name { + l.list[i].Fn = n.Fn + swapped = true + } + } + + return swapped +} + +// Swap will swap out all handlers matching the name passed in. The matched +// handlers will be swapped in. True is returned if the handlers were swapped. +func (l *HandlerList) Swap(name string, replace NamedHandler) bool { + var swapped bool + + for i := 0; i < len(l.list); i++ { + if l.list[i].Name == name { + l.list[i] = replace + swapped = true + } + } + + return swapped +} + +// SetBackNamed will replace the named handler if it exists in the handler list. +// If the handler does not exist the handler will be added to the end of the list. +func (l *HandlerList) SetBackNamed(n NamedHandler) { + if !l.SwapNamed(n) { + l.PushBackNamed(n) + } +} + +// SetFrontNamed will replace the named handler if it exists in the handler list. +// If the handler does not exist the handler will be added to the beginning of +// the list. +func (l *HandlerList) SetFrontNamed(n NamedHandler) { + if !l.SwapNamed(n) { + l.PushFrontNamed(n) + } +} + // Run executes all handlers in the list with a given request object. func (l *HandlerList) Run(r *Request) { for i, h := range l.list { diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/handlers_test.go b/vendor/github.com/aws/aws-sdk-go/aws/request/handlers_test.go index e375a99..b2da558 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/handlers_test.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/handlers_test.go @@ -1,10 +1,9 @@ package request_test import ( + "reflect" "testing" - "github.com/stretchr/testify/assert" - "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/awstesting/unit" @@ -20,8 +19,12 @@ func TestHandlerList(t *testing.T) { r.Data = s }) l.Run(r) - assert.Equal(t, "a", s) - assert.Equal(t, "a", r.Data) + if e, a := "a", s; e != a { + t.Errorf("expect %q update got %q", e, a) + } + if e, a := "a", r.Data.(string); e != a { + t.Errorf("expect %q data update got %q", e, a) + } } func TestMultipleHandlers(t *testing.T) { @@ -43,9 +46,110 @@ func TestNamedHandlers(t *testing.T) { l.PushBackNamed(named) l.PushBackNamed(named2) l.PushBack(func(r *request.Request) {}) - assert.Equal(t, 4, l.Len()) + if e, a := 4, l.Len(); e != a { + t.Errorf("expect %d list length, got %d", e, a) + } l.Remove(named) - assert.Equal(t, 2, l.Len()) + if e, a := 2, l.Len(); e != a { + t.Errorf("expect %d list length, got %d", e, a) + } +} + +func TestSwapHandlers(t *testing.T) { + firstHandlerCalled := 0 + swappedOutHandlerCalled := 0 + swappedInHandlerCalled := 0 + + l := request.HandlerList{} + named := request.NamedHandler{Name: "Name", Fn: func(r *request.Request) { + firstHandlerCalled++ + }} + named2 := request.NamedHandler{Name: "SwapOutName", Fn: func(r *request.Request) { + swappedOutHandlerCalled++ + }} + l.PushBackNamed(named) + l.PushBackNamed(named2) + l.PushBackNamed(named) + + l.SwapNamed(request.NamedHandler{Name: "SwapOutName", Fn: func(r *request.Request) { + swappedInHandlerCalled++ + }}) + + l.Run(&request.Request{}) + + if e, a := 2, firstHandlerCalled; e != a { + t.Errorf("expect first handler to be called %d, was called %d times", e, a) + } + if n := swappedOutHandlerCalled; n != 0 { + t.Errorf("expect swapped out handler to not be called, was called %d times", n) + } + if e, a := 1, swappedInHandlerCalled; e != a { + t.Errorf("expect swapped in handler to be called %d, was called %d times", e, a) + } +} + +func TestSetBackNamed_Exists(t *testing.T) { + firstHandlerCalled := 0 + swappedOutHandlerCalled := 0 + swappedInHandlerCalled := 0 + + l := request.HandlerList{} + named := request.NamedHandler{Name: "Name", Fn: func(r *request.Request) { + firstHandlerCalled++ + }} + named2 := request.NamedHandler{Name: "SwapOutName", Fn: func(r *request.Request) { + swappedOutHandlerCalled++ + }} + l.PushBackNamed(named) + l.PushBackNamed(named2) + + l.SetBackNamed(request.NamedHandler{Name: "SwapOutName", Fn: func(r *request.Request) { + swappedInHandlerCalled++ + }}) + + l.Run(&request.Request{}) + + if e, a := 1, firstHandlerCalled; e != a { + t.Errorf("expect first handler to be called %d, was called %d times", e, a) + } + if n := swappedOutHandlerCalled; n != 0 { + t.Errorf("expect swapped out handler to not be called, was called %d times", n) + } + if e, a := 1, swappedInHandlerCalled; e != a { + t.Errorf("expect swapped in handler to be called %d, was called %d times", e, a) + } +} + +func TestSetBackNamed_NotExists(t *testing.T) { + firstHandlerCalled := 0 + secondHandlerCalled := 0 + swappedInHandlerCalled := 0 + + l := request.HandlerList{} + named := request.NamedHandler{Name: "Name", Fn: func(r *request.Request) { + firstHandlerCalled++ + }} + named2 := request.NamedHandler{Name: "OtherName", Fn: func(r *request.Request) { + secondHandlerCalled++ + }} + l.PushBackNamed(named) + l.PushBackNamed(named2) + + l.SetBackNamed(request.NamedHandler{Name: "SwapOutName", Fn: func(r *request.Request) { + swappedInHandlerCalled++ + }}) + + l.Run(&request.Request{}) + + if e, a := 1, firstHandlerCalled; e != a { + t.Errorf("expect first handler to be called %d, was called %d times", e, a) + } + if e, a := 1, secondHandlerCalled; e != a { + t.Errorf("expect second handler to be called %d, was called %d times", e, a) + } + if e, a := 1, swappedInHandlerCalled; e != a { + t.Errorf("expect swapped in handler to be called %d, was called %d times", e, a) + } } func TestLoggedHandlers(t *testing.T) { @@ -63,7 +167,10 @@ func TestLoggedHandlers(t *testing.T) { l.PushBackNamed(named2) l.Run(&request.Request{Config: cfg}) - assert.Equal(t, expectedHandlers, loggedHandlers) + if !reflect.DeepEqual(expectedHandlers, loggedHandlers) { + t.Errorf("expect handlers executed %v to match logged handlers, %v", + expectedHandlers, loggedHandlers) + } } func TestStopHandlers(t *testing.T) { @@ -81,11 +188,13 @@ func TestStopHandlers(t *testing.T) { called++ }}) l.PushBackNamed(request.NamedHandler{Name: "name3", Fn: func(r *request.Request) { - assert.Fail(t, "third handler should not be called") + t.Fatalf("third handler should not be called") }}) l.Run(&request.Request{}) - assert.Equal(t, 2, called, "Expect only two handlers to be called") + if e, a := 2, called; e != a { + t.Errorf("expect %d handlers called, got %d", e, a) + } } func BenchmarkNewRequest(b *testing.B) { diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/offset_reader.go b/vendor/github.com/aws/aws-sdk-go/aws/request/offset_reader.go index 02f07f4..b0c2ef4 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/offset_reader.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/offset_reader.go @@ -3,6 +3,8 @@ package request import ( "io" "sync" + + "github.com/aws/aws-sdk-go/internal/sdkio" ) // offsetReader is a thread-safe io.ReadCloser to prevent racing @@ -15,7 +17,7 @@ type offsetReader struct { func newOffsetReader(buf io.ReadSeeker, offset int64) *offsetReader { reader := &offsetReader{} - buf.Seek(offset, 0) + buf.Seek(offset, sdkio.SeekStart) reader.buf = buf return reader diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/offset_reader_test.go b/vendor/github.com/aws/aws-sdk-go/aws/request/offset_reader_test.go index 01856e3..e5ec043 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/offset_reader_test.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/offset_reader_test.go @@ -8,6 +8,7 @@ import ( "testing" "time" + "github.com/aws/aws-sdk-go/internal/sdkio" "github.com/stretchr/testify/assert" ) @@ -28,15 +29,15 @@ func TestOffsetReaderSeek(t *testing.T) { buf := []byte("testData") reader := newOffsetReader(bytes.NewReader(buf), 0) - orig, err := reader.Seek(0, 1) + orig, err := reader.Seek(0, sdkio.SeekCurrent) assert.NoError(t, err) assert.Equal(t, int64(0), orig) - n, err := reader.Seek(0, 2) + n, err := reader.Seek(0, sdkio.SeekEnd) assert.NoError(t, err) assert.Equal(t, int64(len(buf)), n) - n, err = reader.Seek(orig, 0) + n, err = reader.Seek(orig, sdkio.SeekStart) assert.NoError(t, err) assert.Equal(t, int64(0), n) } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request.go index 4f4f112..211411f 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/request.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/request.go @@ -14,6 +14,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/client/metadata" + "github.com/aws/aws-sdk-go/internal/sdkio" ) const ( @@ -24,10 +25,14 @@ const ( // ErrCodeRead is an error that is returned during HTTP reads. ErrCodeRead = "ReadError" - // ErrCodeResponseTimeout is the connection timeout error that is recieved + // ErrCodeResponseTimeout is the connection timeout error that is received // during body reads. ErrCodeResponseTimeout = "ResponseTimeout" + // ErrCodeInvalidPresignExpire is returned when the expire time provided to + // presign is invalid + ErrCodeInvalidPresignExpire = "InvalidPresignExpireError" + // CanceledErrorCode is the error code that will be returned by an // API request that was canceled. Requests given a aws.Context may // return this error when canceled. @@ -41,8 +46,8 @@ type Request struct { Handlers Handlers Retryer + AttemptTime time.Time Time time.Time - ExpireTime time.Duration Operation *Operation HTTPRequest *http.Request HTTPResponse *http.Response @@ -60,6 +65,11 @@ type Request struct { LastSignedAt time.Time DisableFollowRedirects bool + // A value greater than 0 instructs the request to be signed as Presigned URL + // You should not set this field directly. Instead use Request's + // Presign or PresignRequest methods. + ExpireTime time.Duration + context aws.Context built bool @@ -104,12 +114,15 @@ func New(cfg aws.Config, clientInfo metadata.ClientInfo, handlers Handlers, err = awserr.New("InvalidEndpointURL", "invalid endpoint uri", err) } + SanitizeHostForHeader(httpReq) + r := &Request{ Config: cfg, ClientInfo: clientInfo, Handlers: handlers.Copy(), Retryer: retryer, + AttemptTime: time.Now(), Time: time.Now(), ExpireTime: 0, Operation: operation, @@ -214,6 +227,9 @@ func (r *Request) SetContext(ctx aws.Context) { // WillRetry returns if the request's can be retried. func (r *Request) WillRetry() bool { + if !aws.IsReaderSeekable(r.Body) && r.HTTPRequest.Body != NoBody { + return false + } return r.Error != nil && aws.BoolValue(r.Retryable) && r.RetryCount < r.MaxRetries() } @@ -245,39 +261,70 @@ func (r *Request) SetStringBody(s string) { // SetReaderBody will set the request's body reader. func (r *Request) SetReaderBody(reader io.ReadSeeker) { r.Body = reader + r.BodyStart, _ = reader.Seek(0, sdkio.SeekCurrent) // Get the Bodies current offset. r.ResetBody() } // Presign returns the request's signed URL. Error will be returned // if the signing fails. -func (r *Request) Presign(expireTime time.Duration) (string, error) { - r.ExpireTime = expireTime +// +// It is invalid to create a presigned URL with a expire duration 0 or less. An +// error is returned if expire duration is 0 or less. +func (r *Request) Presign(expire time.Duration) (string, error) { + r = r.copy() + + // Presign requires all headers be hoisted. There is no way to retrieve + // the signed headers not hoisted without this. Making the presigned URL + // useless. r.NotHoist = false + u, _, err := getPresignedURL(r, expire) + return u, err +} + +// PresignRequest behaves just like presign, with the addition of returning a +// set of headers that were signed. +// +// It is invalid to create a presigned URL with a expire duration 0 or less. An +// error is returned if expire duration is 0 or less. +// +// Returns the URL string for the API operation with signature in the query string, +// and the HTTP headers that were included in the signature. These headers must +// be included in any HTTP request made with the presigned URL. +// +// To prevent hoisting any headers to the query string set NotHoist to true on +// this Request value prior to calling PresignRequest. +func (r *Request) PresignRequest(expire time.Duration) (string, http.Header, error) { + r = r.copy() + return getPresignedURL(r, expire) +} + +// IsPresigned returns true if the request represents a presigned API url. +func (r *Request) IsPresigned() bool { + return r.ExpireTime != 0 +} + +func getPresignedURL(r *Request, expire time.Duration) (string, http.Header, error) { + if expire <= 0 { + return "", nil, awserr.New( + ErrCodeInvalidPresignExpire, + "presigned URL requires an expire duration greater than 0", + nil, + ) + } + + r.ExpireTime = expire + if r.Operation.BeforePresignFn != nil { - r = r.copy() - err := r.Operation.BeforePresignFn(r) - if err != nil { - return "", err + if err := r.Operation.BeforePresignFn(r); err != nil { + return "", nil, err } } - r.Sign() - if r.Error != nil { - return "", r.Error + if err := r.Sign(); err != nil { + return "", nil, err } - return r.HTTPRequest.URL.String(), nil -} -// PresignRequest behaves just like presign, but hoists all headers and signs them. -// Also returns the signed hash back to the user -func (r *Request) PresignRequest(expireTime time.Duration) (string, http.Header, error) { - r.ExpireTime = expireTime - r.NotHoist = true - r.Sign() - if r.Error != nil { - return "", nil, r.Error - } return r.HTTPRequest.URL.String(), r.SignedHeaderVals, nil } @@ -297,7 +344,7 @@ func debugLogReqError(r *Request, stage string, retrying bool, err error) { // Build will build the request's object so it can be signed and sent // to the service. Build will also validate all the request's parameters. -// Anny additional build Handlers set on this request will be run +// Any additional build Handlers set on this request will be run // in the order they were set. // // The request will only be built once. Multiple calls to build will have @@ -338,10 +385,7 @@ func (r *Request) Sign() error { return r.Error } -// ResetBody rewinds the request body backto its starting position, and -// set's the HTTP Request body reference. When the body is read prior -// to being sent in the HTTP request it will need to be rewound. -func (r *Request) ResetBody() { +func (r *Request) getNextRequestBody() (io.ReadCloser, error) { if r.safeBody != nil { r.safeBody.Close() } @@ -361,16 +405,16 @@ func (r *Request) ResetBody() { // of the SDK if they used that field. // // Related golang/go#18257 - l, err := computeBodyLength(r.Body) + l, err := aws.SeekerLen(r.Body) if err != nil { - r.Error = awserr.New(ErrCodeSerialization, "failed to compute request body size", err) - return + return nil, awserr.New(ErrCodeSerialization, "failed to compute request body size", err) } + var body io.ReadCloser if l == 0 { - r.HTTPRequest.Body = noBodyReader + body = NoBody } else if l > 0 { - r.HTTPRequest.Body = r.safeBody + body = r.safeBody } else { // Hack to prevent sending bodies for methods where the body // should be ignored by the server. Sending bodies on these @@ -379,50 +423,17 @@ func (r *Request) ResetBody() { // Transfer-Encoding: chunked bodies for these methods. // // This would only happen if a aws.ReaderSeekerCloser was used with - // a io.Reader that was not also an io.Seeker. + // a io.Reader that was not also an io.Seeker, or did not implement + // Len() method. switch r.Operation.HTTPMethod { case "GET", "HEAD", "DELETE": - r.HTTPRequest.Body = noBodyReader + body = NoBody default: - r.HTTPRequest.Body = r.safeBody + body = r.safeBody } } -} - -// Attempts to compute the length of the body of the reader using the -// io.Seeker interface. If the value is not seekable because of being -// a ReaderSeekerCloser without an unerlying Seeker -1 will be returned. -// If no error occurs the length of the body will be returned. -func computeBodyLength(r io.ReadSeeker) (int64, error) { - seekable := true - // Determine if the seeker is actually seekable. ReaderSeekerCloser - // hides the fact that a io.Readers might not actually be seekable. - switch v := r.(type) { - case aws.ReaderSeekerCloser: - seekable = v.IsSeeker() - case *aws.ReaderSeekerCloser: - seekable = v.IsSeeker() - } - if !seekable { - return -1, nil - } - - curOffset, err := r.Seek(0, 1) - if err != nil { - return 0, err - } - - endOffset, err := r.Seek(0, 2) - if err != nil { - return 0, err - } - _, err = r.Seek(curOffset, 0) - if err != nil { - return 0, err - } - - return endOffset - curOffset, nil + return body, nil } // GetBody will return an io.ReadSeeker of the Request's underlying @@ -452,6 +463,7 @@ func (r *Request) Send() error { }() for { + r.AttemptTime = time.Now() if aws.BoolValue(r.Retryable) { if r.Config.LogLevel.Matches(aws.LogDebugWithRequestRetries) { r.Config.Logger.Log(fmt.Sprintf("DEBUG: Retrying Request %s/%s, attempt %d", @@ -488,7 +500,7 @@ func (r *Request) Send() error { r.Handlers.Retry.Run(r) r.Handlers.AfterRetry.Run(r) if r.Error != nil { - debugLogReqError(r, "Send Request", false, r.Error) + debugLogReqError(r, "Send Request", false, err) return r.Error } debugLogReqError(r, "Send Request", true, err) @@ -497,12 +509,13 @@ func (r *Request) Send() error { r.Handlers.UnmarshalMeta.Run(r) r.Handlers.ValidateResponse.Run(r) if r.Error != nil { - err := r.Error r.Handlers.UnmarshalError.Run(r) + err := r.Error + r.Handlers.Retry.Run(r) r.Handlers.AfterRetry.Run(r) if r.Error != nil { - debugLogReqError(r, "Validate Response", false, r.Error) + debugLogReqError(r, "Validate Response", false, err) return r.Error } debugLogReqError(r, "Validate Response", true, err) @@ -515,7 +528,7 @@ func (r *Request) Send() error { r.Handlers.Retry.Run(r) r.Handlers.AfterRetry.Run(r) if r.Error != nil { - debugLogReqError(r, "Unmarshal Response", false, r.Error) + debugLogReqError(r, "Unmarshal Response", false, err) return r.Error } debugLogReqError(r, "Unmarshal Response", true, err) @@ -573,3 +586,72 @@ func shouldRetryCancel(r *Request) bool { errStr != "net/http: request canceled while waiting for connection") } + +// SanitizeHostForHeader removes default port from host and updates request.Host +func SanitizeHostForHeader(r *http.Request) { + host := getHost(r) + port := portOnly(host) + if port != "" && isDefaultPort(r.URL.Scheme, port) { + r.Host = stripPort(host) + } +} + +// Returns host from request +func getHost(r *http.Request) string { + if r.Host != "" { + return r.Host + } + + return r.URL.Host +} + +// Hostname returns u.Host, without any port number. +// +// If Host is an IPv6 literal with a port number, Hostname returns the +// IPv6 literal without the square brackets. IPv6 literals may include +// a zone identifier. +// +// Copied from the Go 1.8 standard library (net/url) +func stripPort(hostport string) string { + colon := strings.IndexByte(hostport, ':') + if colon == -1 { + return hostport + } + if i := strings.IndexByte(hostport, ']'); i != -1 { + return strings.TrimPrefix(hostport[:i], "[") + } + return hostport[:colon] +} + +// Port returns the port part of u.Host, without the leading colon. +// If u.Host doesn't contain a port, Port returns an empty string. +// +// Copied from the Go 1.8 standard library (net/url) +func portOnly(hostport string) string { + colon := strings.IndexByte(hostport, ':') + if colon == -1 { + return "" + } + if i := strings.Index(hostport, "]:"); i != -1 { + return hostport[i+len("]:"):] + } + if strings.Contains(hostport, "]") { + return "" + } + return hostport[colon+len(":"):] +} + +// Returns true if the specified URI is using the standard port +// (i.e. port 80 for HTTP URIs or 443 for HTTPS URIs) +func isDefaultPort(scheme, port string) bool { + if port == "" { + return true + } + + lowerCaseScheme := strings.ToLower(scheme) + if (lowerCaseScheme == "http" && port == "80") || (lowerCaseScheme == "https" && port == "443") { + return true + } + + return false +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_7.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_7.go index 1323af9..869b97a 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_7.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_7.go @@ -16,6 +16,24 @@ func (noBody) Read([]byte) (int, error) { return 0, io.EOF } func (noBody) Close() error { return nil } func (noBody) WriteTo(io.Writer) (int64, error) { return 0, nil } -// Is an empty reader that will trigger the Go HTTP client to not include +// NoBody is an empty reader that will trigger the Go HTTP client to not include // and body in the HTTP request. -var noBodyReader = noBody{} +var NoBody = noBody{} + +// ResetBody rewinds the request body back to its starting position, and +// set's the HTTP Request body reference. When the body is read prior +// to being sent in the HTTP request it will need to be rewound. +// +// ResetBody will automatically be called by the SDK's build handler, but if +// the request is being used directly ResetBody must be called before the request +// is Sent. SetStringBody, SetBufferBody, and SetReaderBody will automatically +// call ResetBody. +func (r *Request) ResetBody() { + body, err := r.getNextRequestBody() + if err != nil { + r.Error = err + return + } + + r.HTTPRequest.Body = body +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_8.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_8.go index 8b963f4..c32fc69 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_8.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_8.go @@ -2,8 +2,32 @@ package request -import "net/http" +import ( + "net/http" +) -// Is a http.NoBody reader instructing Go HTTP client to not include +// NoBody is a http.NoBody reader instructing Go HTTP client to not include // and body in the HTTP request. -var noBodyReader = http.NoBody +var NoBody = http.NoBody + +// ResetBody rewinds the request body back to its starting position, and +// set's the HTTP Request body reference. When the body is read prior +// to being sent in the HTTP request it will need to be rewound. +// +// ResetBody will automatically be called by the SDK's build handler, but if +// the request is being used directly ResetBody must be called before the request +// is Sent. SetStringBody, SetBufferBody, and SetReaderBody will automatically +// call ResetBody. +// +// Will also set the Go 1.8's http.Request.GetBody member to allow retrying +// PUT/POST redirects. +func (r *Request) ResetBody() { + body, err := r.getNextRequestBody() + if err != nil { + r.Error = err + return + } + + r.HTTPRequest.Body = body + r.HTTPRequest.GetBody = r.getNextRequestBody +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_8_test.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_8_test.go index 6a3aba6..8f3b0f0 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_8_test.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_8_test.go @@ -1,15 +1,23 @@ // +build go1.8 -package request +package request_test import ( + "bytes" + "io" "net/http" + "net/http/httptest" "strings" "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/awstesting" + "github.com/aws/aws-sdk-go/awstesting/unit" ) func TestResetBody_WithEmptyBody(t *testing.T) { - r := Request{ + r := request.Request{ HTTPRequest: &http.Request{}, } @@ -23,3 +31,55 @@ func TestResetBody_WithEmptyBody(t *testing.T) { r.HTTPRequest.Body) } } + +func TestRequest_FollowPUTRedirects(t *testing.T) { + const bodySize = 1024 + + redirectHit := 0 + endpointHit := 0 + + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + switch r.URL.Path { + case "/redirect-me": + u := *r.URL + u.Path = "/endpoint" + w.Header().Set("Location", u.String()) + w.WriteHeader(307) + redirectHit++ + case "/endpoint": + b := bytes.Buffer{} + io.Copy(&b, r.Body) + r.Body.Close() + if e, a := bodySize, b.Len(); e != a { + t.Fatalf("expect %d body size, got %d", e, a) + } + endpointHit++ + default: + t.Fatalf("unexpected endpoint used, %q", r.URL.String()) + } + })) + + svc := awstesting.NewClient(&aws.Config{ + Region: unit.Session.Config.Region, + DisableSSL: aws.Bool(true), + Endpoint: aws.String(server.URL), + }) + + req := svc.NewRequest(&request.Operation{ + Name: "Operation", + HTTPMethod: "PUT", + HTTPPath: "/redirect-me", + }, &struct{}{}, &struct{}{}) + req.SetReaderBody(bytes.NewReader(make([]byte, bodySize))) + + err := req.Send() + if err != nil { + t.Errorf("expect no error, got %v", err) + } + if e, a := 1, redirectHit; e != a { + t.Errorf("expect %d redirect hits, got %d", e, a) + } + if e, a := 1, endpointHit; e != a { + t.Errorf("expect %d endpoint hits, got %d", e, a) + } +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination.go index 59de673..a633ed5 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination.go @@ -35,8 +35,12 @@ type Pagination struct { // NewRequest should always be built from the same API operations. It is // undefined if different API operations are returned on subsequent calls. NewRequest func() (*Request, error) + // EndPageOnSameToken, when enabled, will allow the paginator to stop on + // token that are the same as its previous tokens. + EndPageOnSameToken bool started bool + prevTokens []interface{} nextTokens []interface{} err error @@ -49,7 +53,15 @@ type Pagination struct { // // Will always return true if Next has not been called yet. func (p *Pagination) HasNextPage() bool { - return !(p.started && len(p.nextTokens) == 0) + if !p.started { + return true + } + + hasNextPage := len(p.nextTokens) != 0 + if p.EndPageOnSameToken { + return hasNextPage && !awsutil.DeepEqual(p.nextTokens, p.prevTokens) + } + return hasNextPage } // Err returns the error Pagination encountered when retrieving the next page. @@ -96,6 +108,7 @@ func (p *Pagination) Next() bool { return false } + p.prevTokens = p.nextTokens p.nextTokens = req.nextPageTokens() p.curPage = req.Data @@ -142,13 +155,28 @@ func (r *Request) nextPageTokens() []interface{} { tokens := []interface{}{} tokenAdded := false for _, outToken := range r.Operation.OutputTokens { - v, _ := awsutil.ValuesAtPath(r.Data, outToken) - if len(v) > 0 { - tokens = append(tokens, v[0]) - tokenAdded = true - } else { + vs, _ := awsutil.ValuesAtPath(r.Data, outToken) + if len(vs) == 0 { tokens = append(tokens, nil) + continue + } + v := vs[0] + + switch tv := v.(type) { + case *string: + if len(aws.StringValue(tv)) == 0 { + tokens = append(tokens, nil) + continue + } + case string: + if len(tv) == 0 { + tokens = append(tokens, nil) + continue + } } + + tokenAdded = true + tokens = append(tokens, v) } if !tokenAdded { return nil diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination_test.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination_test.go index 73a95ba..03aed30 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination_test.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination_test.go @@ -454,78 +454,122 @@ func TestPaginationWithContextNilInput(t *testing.T) { } } -type testPageInput struct { - NextToken string -} -type testPageOutput struct { - Value string - NextToken *string -} - func TestPagination_Standalone(t *testing.T) { - expect := []struct { - Value, PrevToken, NextToken string - }{ - {"FirstValue", "InitalToken", "FirstToken"}, - {"SecondValue", "FirstToken", "SecondToken"}, - {"ThirdValue", "SecondToken", ""}, + type testPageInput struct { + NextToken *string + } + type testPageOutput struct { + Value *string + NextToken *string } - input := testPageInput{ - NextToken: expect[0].PrevToken, + type testCase struct { + Value, PrevToken, NextToken *string } - c := awstesting.NewClient() - i := 0 - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - r := c.NewRequest( - &request.Operation{ - Name: "Operation", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - }, - }, - &input, &testPageOutput{}, - ) - // Setup handlers for testing - r.Handlers.Clear() - r.Handlers.Build.PushBack(func(req *request.Request) { - in := req.Params.(*testPageInput) - if e, a := expect[i].PrevToken, in.NextToken; e != a { - t.Errorf("%d, expect NextToken input %q, got %q", i, e, a) - } - }) - r.Handlers.Unmarshal.PushBack(func(req *request.Request) { - out := &testPageOutput{ - Value: expect[i].Value, - } - if len(expect[i].NextToken) > 0 { - out.NextToken = aws.String(expect[i].NextToken) - } - req.Data = out - }) - return r, nil - }, + type testCaseList struct { + StopOnSameToken bool + Cases []testCase } - for p.Next() { - data := p.Page().(*testPageOutput) + cases := []testCaseList{ + { + Cases: []testCase{ + testCase{aws.String("FirstValue"), aws.String("InitalToken"), aws.String("FirstToken")}, + testCase{aws.String("SecondValue"), aws.String("FirstToken"), aws.String("SecondToken")}, + testCase{aws.String("ThirdValue"), aws.String("SecondToken"), nil}, + }, + StopOnSameToken: false, + }, + { + Cases: []testCase{ + testCase{aws.String("FirstValue"), aws.String("InitalToken"), aws.String("FirstToken")}, + testCase{aws.String("SecondValue"), aws.String("FirstToken"), aws.String("SecondToken")}, + testCase{aws.String("ThirdValue"), aws.String("SecondToken"), aws.String("")}, + }, + StopOnSameToken: false, + }, + { + Cases: []testCase{ + testCase{aws.String("FirstValue"), aws.String("InitalToken"), aws.String("FirstToken")}, + testCase{aws.String("SecondValue"), aws.String("FirstToken"), aws.String("SecondToken")}, + testCase{nil, aws.String("SecondToken"), aws.String("SecondToken")}, + }, + StopOnSameToken: true, + }, + { + Cases: []testCase{ + testCase{aws.String("FirstValue"), aws.String("InitalToken"), aws.String("FirstToken")}, + testCase{aws.String("SecondValue"), aws.String("FirstToken"), aws.String("SecondToken")}, + testCase{aws.String("SecondValue"), aws.String("SecondToken"), aws.String("SecondToken")}, + }, + StopOnSameToken: true, + }, + } - if e, a := expect[i].Value, data.Value; e != a { - t.Errorf("%d, expect Value to be %q, got %q", i, e, a) + for _, testcase := range cases { + c := testcase.Cases + input := testPageInput{ + NextToken: c[0].PrevToken, } - if e, a := expect[i].NextToken, aws.StringValue(data.NextToken); e != a { - t.Errorf("%d, expect NextToken to be %q, got %q", i, e, a) + + svc := awstesting.NewClient() + i := 0 + p := request.Pagination{ + EndPageOnSameToken: testcase.StopOnSameToken, + NewRequest: func() (*request.Request, error) { + r := svc.NewRequest( + &request.Operation{ + Name: "Operation", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + }, + }, + &input, &testPageOutput{}, + ) + // Setup handlers for testing + r.Handlers.Clear() + r.Handlers.Build.PushBack(func(req *request.Request) { + if e, a := len(c), i+1; a > e { + t.Fatalf("expect no more than %d requests, got %d", e, a) + } + in := req.Params.(*testPageInput) + if e, a := aws.StringValue(c[i].PrevToken), aws.StringValue(in.NextToken); e != a { + t.Errorf("%d, expect NextToken input %q, got %q", i, e, a) + } + }) + r.Handlers.Unmarshal.PushBack(func(req *request.Request) { + out := &testPageOutput{ + Value: c[i].Value, + } + if c[i].NextToken != nil { + next := *c[i].NextToken + out.NextToken = aws.String(next) + } + req.Data = out + }) + return r, nil + }, } - i++ - } - if e, a := len(expect), i; e != a { - t.Errorf("expected to process %d pages, did %d", e, a) - } - if err := p.Err(); err != nil { - t.Fatalf("%d, expected no error, got %v", i, err) + for p.Next() { + data := p.Page().(*testPageOutput) + + if e, a := aws.StringValue(c[i].Value), aws.StringValue(data.Value); e != a { + t.Errorf("%d, expect Value to be %q, got %q", i, e, a) + } + if e, a := aws.StringValue(c[i].NextToken), aws.StringValue(data.NextToken); e != a { + t.Errorf("%d, expect NextToken to be %q, got %q", i, e, a) + } + + i++ + } + if e, a := len(c), i; e != a { + t.Errorf("expected to process %d pages, did %d", e, a) + } + if err := p.Err(); err != nil { + t.Fatalf("%d, expected no error, got %v", i, err) + } } } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request_resetbody_test.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request_resetbody_test.go index 4efc505..d7845b7 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/request_resetbody_test.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/request_resetbody_test.go @@ -2,6 +2,7 @@ package request import ( "bytes" + "io" "net/http" "strings" "testing" @@ -25,21 +26,70 @@ func TestResetBody_WithBodyContents(t *testing.T) { } } -func TestResetBody_ExcludeUnseekableBodyByMethod(t *testing.T) { +type mockReader struct{} + +func (mockReader) Read([]byte) (int, error) { + return 0, io.EOF +} + +func TestResetBody_ExcludeEmptyUnseekableBodyByMethod(t *testing.T) { cases := []struct { Method string + Body io.ReadSeeker IsNoBody bool }{ - {"GET", true}, - {"HEAD", true}, - {"DELETE", true}, - {"PUT", false}, - {"PATCH", false}, - {"POST", false}, + { + Method: "GET", + IsNoBody: true, + Body: aws.ReadSeekCloser(mockReader{}), + }, + { + Method: "HEAD", + IsNoBody: true, + Body: aws.ReadSeekCloser(mockReader{}), + }, + { + Method: "DELETE", + IsNoBody: true, + Body: aws.ReadSeekCloser(mockReader{}), + }, + { + Method: "PUT", + IsNoBody: false, + Body: aws.ReadSeekCloser(mockReader{}), + }, + { + Method: "PATCH", + IsNoBody: false, + Body: aws.ReadSeekCloser(mockReader{}), + }, + { + Method: "POST", + IsNoBody: false, + Body: aws.ReadSeekCloser(mockReader{}), + }, + { + Method: "GET", + IsNoBody: false, + Body: aws.ReadSeekCloser(bytes.NewBuffer([]byte("abc"))), + }, + { + Method: "GET", + IsNoBody: true, + Body: aws.ReadSeekCloser(bytes.NewBuffer(nil)), + }, + { + Method: "POST", + IsNoBody: false, + Body: aws.ReadSeekCloser(bytes.NewBuffer([]byte("abc"))), + }, + { + Method: "POST", + IsNoBody: true, + Body: aws.ReadSeekCloser(bytes.NewBuffer(nil)), + }, } - reader := aws.ReadSeekCloser(bytes.NewBuffer([]byte("abc"))) - for i, c := range cases { r := Request{ HTTPRequest: &http.Request{}, @@ -47,10 +97,9 @@ func TestResetBody_ExcludeUnseekableBodyByMethod(t *testing.T) { HTTPMethod: c.Method, }, } + r.SetReaderBody(c.Body) - r.SetReaderBody(reader) - - if a, e := r.HTTPRequest.Body == noBodyReader, c.IsNoBody; a != e { + if a, e := r.HTTPRequest.Body == NoBody, c.IsNoBody; a != e { t.Errorf("%d, expect body to be set to noBody(%t), but was %t", i, e, a) } } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request_test.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request_test.go index c741b5e..0e4cef0 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/request_test.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/request_test.go @@ -3,15 +3,16 @@ package request_test import ( "bytes" "encoding/json" - "errors" "fmt" "io" "io/ioutil" "net/http" "net/http/httptest" + "net/url" "reflect" "runtime" "strconv" + "strings" "testing" "time" @@ -21,6 +22,7 @@ import ( "github.com/aws/aws-sdk-go/aws/client/metadata" "github.com/aws/aws-sdk-go/aws/corehandlers" "github.com/aws/aws-sdk-go/aws/credentials" + "github.com/aws/aws-sdk-go/aws/defaults" "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/aws/signer/v4" "github.com/aws/aws-sdk-go/awstesting" @@ -81,7 +83,7 @@ func TestRequestRecoverRetry5xx(t *testing.T) { reqNum := 0 reqs := []http.Response{ {StatusCode: 500, Body: body(`{"__type":"UnknownError","message":"An error occurred."}`)}, - {StatusCode: 501, Body: body(`{"__type":"UnknownError","message":"An error occurred."}`)}, + {StatusCode: 502, Body: body(`{"__type":"UnknownError","message":"An error occurred."}`)}, {StatusCode: 200, Body: body(`{"data":"valid"}`)}, } @@ -113,7 +115,8 @@ func TestRequestRecoverRetry4xxRetryable(t *testing.T) { reqNum := 0 reqs := []http.Response{ {StatusCode: 400, Body: body(`{"__type":"Throttling","message":"Rate exceeded."}`)}, - {StatusCode: 429, Body: body(`{"__type":"ProvisionedThroughputExceededException","message":"Rate exceeded."}`)}, + {StatusCode: 400, Body: body(`{"__type":"ProvisionedThroughputExceededException","message":"Rate exceeded."}`)}, + {StatusCode: 429, Body: body(`{"__type":"FooException","message":"Rate exceeded."}`)}, {StatusCode: 200, Body: body(`{"data":"valid"}`)}, } @@ -132,7 +135,7 @@ func TestRequestRecoverRetry4xxRetryable(t *testing.T) { if err != nil { t.Fatalf("expect no error, but got %v", err) } - if e, a := 2, int(r.RetryCount); e != a { + if e, a := 3, int(r.RetryCount); e != a { t.Errorf("expect %d retry count, got %d", e, a) } if e, a := "valid", out.Data; e != a { @@ -718,7 +721,9 @@ func TestEnforceShouldRetryCheck(t *testing.T) { client := &http.Client{Transport: tp} server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - time.Sleep(5 * time.Millisecond) + // This server should wait forever. Requests will timeout and the SDK should + // attempt to retry. + select {} })) retryer := &testRetryer{} @@ -762,31 +767,355 @@ func (reader *errReader) Close() error { return nil } -func TestLoggerNotIgnoringErrors(t *testing.T) { - s := awstesting.NewClient(&aws.Config{ - Region: aws.String("mock-region"), - MaxRetries: aws.Int(0), +func TestIsNoBodyReader(t *testing.T) { + cases := []struct { + reader io.ReadCloser + expect bool + }{ + {ioutil.NopCloser(bytes.NewReader([]byte("abc"))), false}, + {ioutil.NopCloser(bytes.NewReader(nil)), false}, + {nil, false}, + {request.NoBody, true}, + } + + for i, c := range cases { + if e, a := c.expect, request.NoBody == c.reader; e != a { + t.Errorf("%d, expect %t match, but was %t", i, e, a) + } + } +} + +func TestRequest_TemporaryRetry(t *testing.T) { + done := make(chan struct{}) + + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Length", "1024") + w.WriteHeader(http.StatusOK) + + w.Write(make([]byte, 100)) + + f := w.(http.Flusher) + f.Flush() + + <-done + })) + + client := &http.Client{ + Timeout: 100 * time.Millisecond, + } + + svc := awstesting.NewClient(&aws.Config{ + Region: unit.Session.Config.Region, + MaxRetries: aws.Int(1), + HTTPClient: client, DisableSSL: aws.Bool(true), - LogLevel: aws.LogLevel(aws.LogDebugWithHTTPBody), + Endpoint: aws.String(server.URL), }) + req := svc.NewRequest(&request.Operation{ + Name: "name", HTTPMethod: "GET", HTTPPath: "/path", + }, &struct{}{}, &struct{}{}) + + req.Handlers.Unmarshal.PushBack(func(r *request.Request) { + defer req.HTTPResponse.Body.Close() + _, err := io.Copy(ioutil.Discard, req.HTTPResponse.Body) + r.Error = awserr.New(request.ErrCodeSerialization, "error", err) + }) + + err := req.Send() + if err == nil { + t.Errorf("expect error, got none") + } + close(done) + + aerr := err.(awserr.Error) + if e, a := request.ErrCodeSerialization, aerr.Code(); e != a { + t.Errorf("expect %q error code, got %q", e, a) + } + + if e, a := 1, req.RetryCount; e != a { + t.Errorf("expect %d retries, got %d", e, a) + } + + type temporary interface { + Temporary() bool + } + + terr := aerr.OrigErr().(temporary) + if !terr.Temporary() { + t.Errorf("expect temporary error, was not") + } +} + +func TestRequest_Presign(t *testing.T) { + presign := func(r *request.Request, expire time.Duration) (string, http.Header, error) { + u, err := r.Presign(expire) + return u, nil, err + } + presignRequest := func(r *request.Request, expire time.Duration) (string, http.Header, error) { + return r.PresignRequest(expire) + } + mustParseURL := func(v string) *url.URL { + u, err := url.Parse(v) + if err != nil { + panic(err) + } + return u + } + + cases := []struct { + Expire time.Duration + PresignFn func(*request.Request, time.Duration) (string, http.Header, error) + SignerFn func(*request.Request) + URL string + Header http.Header + Err string + }{ + { + PresignFn: presign, + Err: request.ErrCodeInvalidPresignExpire, + }, + { + PresignFn: presignRequest, + Err: request.ErrCodeInvalidPresignExpire, + }, + { + Expire: -1, + PresignFn: presign, + Err: request.ErrCodeInvalidPresignExpire, + }, + { + // Presign clear NotHoist + Expire: 1 * time.Minute, + PresignFn: func(r *request.Request, dur time.Duration) (string, http.Header, error) { + r.NotHoist = true + return presign(r, dur) + }, + SignerFn: func(r *request.Request) { + r.HTTPRequest.URL = mustParseURL("https://endpoint/presignedURL") + if r.NotHoist { + r.Error = fmt.Errorf("expect NotHoist to be cleared") + } + }, + URL: "https://endpoint/presignedURL", + }, + { + // PresignRequest does not clear NotHoist + Expire: 1 * time.Minute, + PresignFn: func(r *request.Request, dur time.Duration) (string, http.Header, error) { + r.NotHoist = true + return presignRequest(r, dur) + }, + SignerFn: func(r *request.Request) { + r.HTTPRequest.URL = mustParseURL("https://endpoint/presignedURL") + if !r.NotHoist { + r.Error = fmt.Errorf("expect NotHoist not to be cleared") + } + }, + URL: "https://endpoint/presignedURL", + }, + { + // PresignRequest returns signed headers + Expire: 1 * time.Minute, + PresignFn: presignRequest, + SignerFn: func(r *request.Request) { + r.HTTPRequest.URL = mustParseURL("https://endpoint/presignedURL") + r.HTTPRequest.Header.Set("UnsigndHeader", "abc") + r.SignedHeaderVals = http.Header{ + "X-Amzn-Header": []string{"abc", "123"}, + "X-Amzn-Header2": []string{"efg", "456"}, + } + }, + URL: "https://endpoint/presignedURL", + Header: http.Header{ + "X-Amzn-Header": []string{"abc", "123"}, + "X-Amzn-Header2": []string{"efg", "456"}, + }, + }, + } + + svc := awstesting.NewClient() + svc.Handlers.Clear() + for i, c := range cases { + req := svc.NewRequest(&request.Operation{ + Name: "name", HTTPMethod: "GET", HTTPPath: "/path", + }, &struct{}{}, &struct{}{}) + req.Handlers.Sign.PushBack(c.SignerFn) + + u, h, err := c.PresignFn(req, c.Expire) + if len(c.Err) != 0 { + if e, a := c.Err, err.Error(); !strings.Contains(a, e) { + t.Errorf("%d, expect %v to be in %v", i, e, a) + } + continue + } else if err != nil { + t.Errorf("%d, expect no error, got %v", i, err) + continue + } + if e, a := c.URL, u; e != a { + t.Errorf("%d, expect %v URL, got %v", i, e, a) + } + if e, a := c.Header, h; !reflect.DeepEqual(e, a) { + t.Errorf("%d, expect %v header got %v", i, e, a) + } + } +} + +func TestNew_EndpointWithDefaultPort(t *testing.T) { + endpoint := "https://estest.us-east-1.es.amazonaws.com:443" + expectedRequestHost := "estest.us-east-1.es.amazonaws.com" + + r := request.New( + aws.Config{}, + metadata.ClientInfo{Endpoint: endpoint}, + defaults.Handlers(), + client.DefaultRetryer{}, + &request.Operation{}, + nil, + nil, + ) + + if h := r.HTTPRequest.Host; h != expectedRequestHost { + t.Errorf("expect %v host, got %q", expectedRequestHost, h) + } +} + +func TestSanitizeHostForHeader(t *testing.T) { + cases := []struct { + url string + expectedRequestHost string + }{ + {"https://estest.us-east-1.es.amazonaws.com:443", "estest.us-east-1.es.amazonaws.com"}, + {"https://estest.us-east-1.es.amazonaws.com", "estest.us-east-1.es.amazonaws.com"}, + {"https://localhost:9200", "localhost:9200"}, + {"http://localhost:80", "localhost"}, + {"http://localhost:8080", "localhost:8080"}, + } + + for _, c := range cases { + r, _ := http.NewRequest("GET", c.url, nil) + request.SanitizeHostForHeader(r) + + if h := r.Host; h != c.expectedRequestHost { + t.Errorf("expect %v host, got %q", c.expectedRequestHost, h) + } + } +} + +func TestRequestWillRetry_ByBody(t *testing.T) { + svc := awstesting.NewClient() + + cases := []struct { + WillRetry bool + HTTPMethod string + Body io.ReadSeeker + IsReqNoBody bool + }{ + { + WillRetry: true, + HTTPMethod: "GET", + Body: bytes.NewReader([]byte{}), + IsReqNoBody: true, + }, + { + WillRetry: true, + HTTPMethod: "GET", + Body: bytes.NewReader(nil), + IsReqNoBody: true, + }, + { + WillRetry: true, + HTTPMethod: "POST", + Body: bytes.NewReader([]byte("abc123")), + }, + { + WillRetry: true, + HTTPMethod: "POST", + Body: aws.ReadSeekCloser(bytes.NewReader([]byte("abc123"))), + }, + { + WillRetry: true, + HTTPMethod: "GET", + Body: aws.ReadSeekCloser(bytes.NewBuffer(nil)), + IsReqNoBody: true, + }, + { + WillRetry: true, + HTTPMethod: "POST", + Body: aws.ReadSeekCloser(bytes.NewBuffer(nil)), + IsReqNoBody: true, + }, + { + WillRetry: false, + HTTPMethod: "POST", + Body: aws.ReadSeekCloser(bytes.NewBuffer([]byte("abc123"))), + }, + } + + for i, c := range cases { + req := svc.NewRequest(&request.Operation{ + Name: "Operation", + HTTPMethod: c.HTTPMethod, + HTTPPath: "/", + }, nil, nil) + req.SetReaderBody(c.Body) + req.Build() + + req.Error = fmt.Errorf("some error") + req.Retryable = aws.Bool(true) + req.HTTPResponse = &http.Response{ + StatusCode: 500, + } + + if e, a := c.IsReqNoBody, request.NoBody == req.HTTPRequest.Body; e != a { + t.Errorf("%d, expect request to be no body, %t, got %t, %T", i, e, a, req.HTTPRequest.Body) + } + + if e, a := c.WillRetry, req.WillRetry(); e != a { + t.Errorf("%d, expect %t willRetry, got %t", i, e, a) + } + + if req.Error == nil { + t.Fatalf("%d, expect error, got none", i) + } + if e, a := "some error", req.Error.Error(); !strings.Contains(a, e) { + t.Errorf("%d, expect %q error in %q", i, e, a) + } + if e, a := 0, req.RetryCount; e != a { + t.Errorf("%d, expect retry count to be %d, got %d", i, e, a) + } + } +} + +func Test501NotRetrying(t *testing.T) { + reqNum := 0 + reqs := []http.Response{ + {StatusCode: 500, Body: body(`{"__type":"UnknownError","message":"An error occurred."}`)}, + {StatusCode: 501, Body: body(`{"__type":"NotImplemented","message":"An error occurred."}`)}, + {StatusCode: 200, Body: body(`{"data":"valid"}`)}, + } + + s := awstesting.NewClient(aws.NewConfig().WithMaxRetries(10)) s.Handlers.Validate.Clear() - s.Handlers.Send.Clear() + s.Handlers.Unmarshal.PushBack(unmarshal) + s.Handlers.UnmarshalError.PushBack(unmarshalError) + s.Handlers.Send.Clear() // mock sending s.Handlers.Send.PushBack(func(r *request.Request) { - r.HTTPResponse = &http.Response{StatusCode: 200, Body: &errReader{errors.New("Foo error")}} + r.HTTPResponse = &reqs[reqNum] + reqNum++ }) - s.AddDebugHandlers() - out := &testData{} r := s.NewRequest(&request.Operation{Name: "Operation"}, nil, out) err := r.Send() if err == nil { - t.Error("expected error, but got nil") + t.Fatal("expect error, but got none") } - if aerr, ok := err.(awserr.Error); !ok { - t.Errorf("expected awserr.Error, but got different error, %v", err) - } else if aerr.Code() != request.ErrCodeRead { - t.Errorf("expected %q, but received %q", request.ErrCodeRead, aerr.Code()) + aerr := err.(awserr.Error) + if e, a := "NotImplemented", aerr.Code(); e != a { + t.Errorf("expected error code %q, but received %q", e, a) + } + if e, a := 1, int(r.RetryCount); e != a { + t.Errorf("expect %d retry count, got %d", e, a) } } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/retryer.go b/vendor/github.com/aws/aws-sdk-go/aws/request/retryer.go index 7af81de..f35fef2 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/retryer.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/retryer.go @@ -8,7 +8,7 @@ import ( ) // Retryer is an interface to control retry logic for a given service. -// The default implementation used by most services is the service.DefaultRetryer +// The default implementation used by most services is the client.DefaultRetryer // structure, which contains basic retry logic using exponential backoff. type Retryer interface { RetryRules(*Request) time.Duration @@ -38,7 +38,6 @@ var throttleCodes = map[string]struct{}{ "ThrottlingException": {}, "RequestLimitExceeded": {}, "RequestThrottled": {}, - "LimitExceededException": {}, // Deleting 10+ DynamoDb tables at once "TooManyRequestsException": {}, // Lambda functions "PriorRequestNotComplete": {}, // Route53 } @@ -71,8 +70,12 @@ func isCodeExpiredCreds(code string) bool { } var validParentCodes = map[string]struct{}{ - ErrCodeSerialization: struct{}{}, - ErrCodeRead: struct{}{}, + ErrCodeSerialization: {}, + ErrCodeRead: {}, +} + +type temporaryError interface { + Temporary() bool } func isNestedErrorRetryable(parentErr awserr.Error) bool { @@ -93,6 +96,10 @@ func isNestedErrorRetryable(parentErr awserr.Error) bool { return isCodeRetryable(aerr.Code()) } + if t, ok := err.(temporaryError); ok { + return t.Temporary() + } + return isErrConnectionReset(err) } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/retryer_test.go b/vendor/github.com/aws/aws-sdk-go/aws/request/retryer_test.go index b1926e3..a878748 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/retryer_test.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/retryer_test.go @@ -1,10 +1,10 @@ package request import ( + "errors" + "fmt" "testing" - "github.com/stretchr/testify/assert" - "github.com/aws/aws-sdk-go/aws/awserr" ) @@ -12,5 +12,51 @@ func TestRequestThrottling(t *testing.T) { req := Request{} req.Error = awserr.New("Throttling", "", nil) - assert.True(t, req.IsErrorThrottle()) + if e, a := true, req.IsErrorThrottle(); e != a { + t.Errorf("expect %t to be throttled, was %t", e, a) + } +} + +type mockTempError bool + +func (e mockTempError) Error() string { + return fmt.Sprintf("mock temporary error: %t", e.Temporary()) +} +func (e mockTempError) Temporary() bool { + return bool(e) +} + +func TestIsErrorRetryable(t *testing.T) { + cases := []struct { + Err error + IsTemp bool + }{ + { + Err: awserr.New(ErrCodeSerialization, "temporary error", mockTempError(true)), + IsTemp: true, + }, + { + Err: awserr.New(ErrCodeSerialization, "temporary error", mockTempError(false)), + IsTemp: false, + }, + { + Err: awserr.New(ErrCodeSerialization, "some error", errors.New("blah")), + IsTemp: false, + }, + { + Err: awserr.New("SomeError", "some error", nil), + IsTemp: false, + }, + { + Err: awserr.New("RequestError", "some error", nil), + IsTemp: true, + }, + } + + for i, c := range cases { + retryable := IsErrorRetryable(c.Err) + if e, a := c.IsTemp, retryable; e != a { + t.Errorf("%d, expect %t temporary error, got %t", i, e, a) + } + } } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/validation.go b/vendor/github.com/aws/aws-sdk-go/aws/request/validation.go index 2520286..4012462 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/validation.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/validation.go @@ -220,7 +220,7 @@ type ErrParamMinLen struct { func NewErrParamMinLen(field string, min int) *ErrParamMinLen { return &ErrParamMinLen{ errInvalidParam: errInvalidParam{ - code: ParamMinValueErrCode, + code: ParamMinLenErrCode, field: field, msg: fmt.Sprintf("minimum field size of %v", min), }, diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/waiter.go b/vendor/github.com/aws/aws-sdk-go/aws/request/waiter.go index 854b085..4601f88 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/waiter.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/waiter.go @@ -66,8 +66,8 @@ func WithWaiterRequestOptions(opts ...Option) WaiterOption { } } -// A Waiter provides the functionality to performing blocking call which will -// wait for an resource state to be satisfied a service. +// A Waiter provides the functionality to perform a blocking call which will +// wait for a resource state to be satisfied by a service. // // This type should not be used directly. The API operations provided in the // service packages prefixed with "WaitUntil" should be used instead. @@ -79,8 +79,9 @@ type Waiter struct { MaxAttempts int Delay WaiterDelay - RequestOptions []Option - NewRequest func([]Option) (*Request, error) + RequestOptions []Option + NewRequest func([]Option) (*Request, error) + SleepWithContext func(aws.Context, time.Duration) error } // ApplyOptions updates the waiter with the list of waiter options provided. @@ -195,8 +196,15 @@ func (w Waiter) WaitWithContext(ctx aws.Context) error { if sleepFn := req.Config.SleepDelay; sleepFn != nil { // Support SleepDelay for backwards compatibility and testing sleepFn(delay) - } else if err := aws.SleepWithContext(ctx, delay); err != nil { - return awserr.New(CanceledErrorCode, "waiter context canceled", err) + } else { + sleepCtxFn := w.SleepWithContext + if sleepCtxFn == nil { + sleepCtxFn = aws.SleepWithContext + } + + if err := sleepCtxFn(ctx, delay); err != nil { + return awserr.New(CanceledErrorCode, "waiter context canceled", err) + } } } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/waiter_test.go b/vendor/github.com/aws/aws-sdk-go/aws/request/waiter_test.go index f49901b..db0f92d 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/waiter_test.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/waiter_test.go @@ -100,8 +100,9 @@ func TestWaiterPathAll(t *testing.T) { }) w := request.Waiter{ - MaxAttempts: 10, - Delay: request.ConstantWaiterDelay(0), + MaxAttempts: 10, + Delay: request.ConstantWaiterDelay(0), + SleepWithContext: aws.SleepWithContext, Acceptors: []request.WaiterAcceptor{ { State: request.SuccessWaiterState, @@ -164,8 +165,9 @@ func TestWaiterPath(t *testing.T) { }) w := request.Waiter{ - MaxAttempts: 10, - Delay: request.ConstantWaiterDelay(0), + MaxAttempts: 10, + Delay: request.ConstantWaiterDelay(0), + SleepWithContext: aws.SleepWithContext, Acceptors: []request.WaiterAcceptor{ { State: request.SuccessWaiterState, @@ -228,8 +230,9 @@ func TestWaiterFailure(t *testing.T) { }) w := request.Waiter{ - MaxAttempts: 10, - Delay: request.ConstantWaiterDelay(0), + MaxAttempts: 10, + Delay: request.ConstantWaiterDelay(0), + SleepWithContext: aws.SleepWithContext, Acceptors: []request.WaiterAcceptor{ { State: request.SuccessWaiterState, @@ -321,8 +324,9 @@ func TestWaiterError(t *testing.T) { }) w := request.Waiter{ - MaxAttempts: 10, - Delay: request.ConstantWaiterDelay(0), + MaxAttempts: 10, + Delay: request.ConstantWaiterDelay(0), + SleepWithContext: aws.SleepWithContext, Acceptors: []request.WaiterAcceptor{ { State: request.SuccessWaiterState, @@ -389,8 +393,9 @@ func TestWaiterStatus(t *testing.T) { }) w := request.Waiter{ - MaxAttempts: 10, - Delay: request.ConstantWaiterDelay(0), + MaxAttempts: 10, + Delay: request.ConstantWaiterDelay(0), + SleepWithContext: aws.SleepWithContext, Acceptors: []request.WaiterAcceptor{ { State: request.SuccessWaiterState, @@ -447,9 +452,10 @@ func TestWaiter_WithContextCanceled(t *testing.T) { reqCount := 0 w := request.Waiter{ - Name: "TestWaiter", - MaxAttempts: 10, - Delay: request.ConstantWaiterDelay(1 * time.Millisecond), + Name: "TestWaiter", + MaxAttempts: 10, + Delay: request.ConstantWaiterDelay(1 * time.Millisecond), + SleepWithContext: aws.SleepWithContext, Acceptors: []request.WaiterAcceptor{ { State: request.SuccessWaiterState, @@ -475,6 +481,16 @@ func TestWaiter_WithContextCanceled(t *testing.T) { }, } + w.SleepWithContext = func(c aws.Context, delay time.Duration) error { + context := c.(*awstesting.FakeContext) + select { + case <-context.DoneCh: + return context.Err() + default: + return nil + } + } + err := w.WaitWithContext(ctx) if err == nil { @@ -498,9 +514,10 @@ func TestWaiter_WithContext(t *testing.T) { statuses := []int{http.StatusNotFound, http.StatusOK} w := request.Waiter{ - Name: "TestWaiter", - MaxAttempts: 10, - Delay: request.ConstantWaiterDelay(1 * time.Millisecond), + Name: "TestWaiter", + MaxAttempts: 10, + Delay: request.ConstantWaiterDelay(1 * time.Millisecond), + SleepWithContext: aws.SleepWithContext, Acceptors: []request.WaiterAcceptor{ { State: request.SuccessWaiterState, @@ -543,9 +560,10 @@ func TestWaiter_AttemptsExpires(t *testing.T) { reqCount := 0 w := request.Waiter{ - Name: "TestWaiter", - MaxAttempts: 2, - Delay: request.ConstantWaiterDelay(1 * time.Millisecond), + Name: "TestWaiter", + MaxAttempts: 2, + Delay: request.ConstantWaiterDelay(1 * time.Millisecond), + SleepWithContext: aws.SleepWithContext, Acceptors: []request.WaiterAcceptor{ { State: request.SuccessWaiterState, diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/custom_ca_bundle_test.go b/vendor/github.com/aws/aws-sdk-go/aws/session/custom_ca_bundle_test.go index 8a5a3a0..a89c0af 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/session/custom_ca_bundle_test.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/session/custom_ca_bundle_test.go @@ -2,158 +2,166 @@ package session import ( "bytes" - "crypto/tls" - "io/ioutil" + "fmt" "net" "net/http" - "net/http/httptest" "os" + "strings" "testing" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/credentials" - "github.com/stretchr/testify/assert" + "github.com/aws/aws-sdk-go/awstesting" ) -func createTLSServer(cert, key []byte, done <-chan struct{}) (*httptest.Server, error) { - c, err := tls.X509KeyPair(cert, key) - if err != nil { - return nil, err - } - - s := httptest.NewUnstartedServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - w.WriteHeader(http.StatusOK) - })) - s.TLS = &tls.Config{ - Certificates: []tls.Certificate{c}, - } - s.TLS.BuildNameToCertificate() - s.StartTLS() +var TLSBundleCertFile string +var TLSBundleKeyFile string +var TLSBundleCAFile string - go func() { - <-done - s.Close() - }() +func TestMain(m *testing.M) { + var err error - return s, nil -} - -func setupTestCAFile(b []byte) (string, error) { - bundleFile, err := ioutil.TempFile(os.TempDir(), "aws-sdk-go-session-test") + TLSBundleCertFile, TLSBundleKeyFile, TLSBundleCAFile, err = awstesting.CreateTLSBundleFiles() if err != nil { - return "", err + panic(err) } - _, err = bundleFile.Write(b) + fmt.Println("TestMain", TLSBundleCertFile, TLSBundleKeyFile) + + code := m.Run() + + err = awstesting.CleanupTLSBundleFiles(TLSBundleCertFile, TLSBundleKeyFile, TLSBundleCAFile) if err != nil { - return "", err + panic(err) } - defer bundleFile.Close() - return bundleFile.Name(), nil + os.Exit(code) } func TestNewSession_WithCustomCABundle_Env(t *testing.T) { oldEnv := initSessionTestEnv() - defer popEnv(oldEnv) - - done := make(chan struct{}) - server, err := createTLSServer(testTLSBundleCert, testTLSBundleKey, done) - assert.NoError(t, err) + defer awstesting.PopEnv(oldEnv) - // Write bundle to file - caFilename, err := setupTestCAFile(testTLSBundleCA) - defer func() { - os.Remove(caFilename) - }() - assert.NoError(t, err) + endpoint, err := awstesting.CreateTLSServer(TLSBundleCertFile, TLSBundleKeyFile, nil) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } - os.Setenv("AWS_CA_BUNDLE", caFilename) + os.Setenv("AWS_CA_BUNDLE", TLSBundleCAFile) s, err := NewSession(&aws.Config{ HTTPClient: &http.Client{}, - Endpoint: aws.String(server.URL), + Endpoint: aws.String(endpoint), Region: aws.String("mock-region"), Credentials: credentials.AnonymousCredentials, }) - assert.NoError(t, err) - assert.NotNil(t, s) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + if s == nil { + t.Fatalf("expect session to be created, got none") + } req, _ := http.NewRequest("GET", *s.Config.Endpoint, nil) resp, err := s.Config.HTTPClient.Do(req) - assert.NoError(t, err) - - assert.Equal(t, http.StatusOK, resp.StatusCode) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + if e, a := http.StatusOK, resp.StatusCode; e != a { + t.Errorf("expect %d status code, got %d", e, a) + } } func TestNewSession_WithCustomCABundle_EnvNotExists(t *testing.T) { oldEnv := initSessionTestEnv() - defer popEnv(oldEnv) + defer awstesting.PopEnv(oldEnv) os.Setenv("AWS_CA_BUNDLE", "file-not-exists") s, err := NewSession() - assert.Error(t, err) - assert.Equal(t, "LoadCustomCABundleError", err.(awserr.Error).Code()) - assert.Nil(t, s) + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "LoadCustomCABundleError", err.(awserr.Error).Code(); e != a { + t.Errorf("expect %s error code, got %s", e, a) + } + if s != nil { + t.Errorf("expect nil session, got %v", s) + } } func TestNewSession_WithCustomCABundle_Option(t *testing.T) { oldEnv := initSessionTestEnv() - defer popEnv(oldEnv) + defer awstesting.PopEnv(oldEnv) - done := make(chan struct{}) - server, err := createTLSServer(testTLSBundleCert, testTLSBundleKey, done) - assert.NoError(t, err) + endpoint, err := awstesting.CreateTLSServer(TLSBundleCertFile, TLSBundleKeyFile, nil) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } s, err := NewSessionWithOptions(Options{ Config: aws.Config{ HTTPClient: &http.Client{}, - Endpoint: aws.String(server.URL), + Endpoint: aws.String(endpoint), Region: aws.String("mock-region"), Credentials: credentials.AnonymousCredentials, }, - CustomCABundle: bytes.NewReader(testTLSBundleCA), + CustomCABundle: bytes.NewReader(awstesting.TLSBundleCA), }) - assert.NoError(t, err) - assert.NotNil(t, s) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + if s == nil { + t.Fatalf("expect session to be created, got none") + } req, _ := http.NewRequest("GET", *s.Config.Endpoint, nil) resp, err := s.Config.HTTPClient.Do(req) - assert.NoError(t, err) - - assert.Equal(t, http.StatusOK, resp.StatusCode) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + if e, a := http.StatusOK, resp.StatusCode; e != a { + t.Errorf("expect %d status code, got %d", e, a) + } } func TestNewSession_WithCustomCABundle_OptionPriority(t *testing.T) { oldEnv := initSessionTestEnv() - defer popEnv(oldEnv) + defer awstesting.PopEnv(oldEnv) - done := make(chan struct{}) - server, err := createTLSServer(testTLSBundleCert, testTLSBundleKey, done) - assert.NoError(t, err) + endpoint, err := awstesting.CreateTLSServer(TLSBundleCertFile, TLSBundleKeyFile, nil) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } os.Setenv("AWS_CA_BUNDLE", "file-not-exists") s, err := NewSessionWithOptions(Options{ Config: aws.Config{ HTTPClient: &http.Client{}, - Endpoint: aws.String(server.URL), + Endpoint: aws.String(endpoint), Region: aws.String("mock-region"), Credentials: credentials.AnonymousCredentials, }, - CustomCABundle: bytes.NewReader(testTLSBundleCA), + CustomCABundle: bytes.NewReader(awstesting.TLSBundleCA), }) - assert.NoError(t, err) - assert.NotNil(t, s) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + if s == nil { + t.Fatalf("expect session to be created, got none") + } req, _ := http.NewRequest("GET", *s.Config.Endpoint, nil) resp, err := s.Config.HTTPClient.Do(req) - assert.NoError(t, err) - - assert.Equal(t, http.StatusOK, resp.StatusCode) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + if e, a := http.StatusOK, resp.StatusCode; e != a { + t.Errorf("expect %d status code, got %d", e, a) + } } type mockRoundTripper struct{} @@ -164,7 +172,7 @@ func (m *mockRoundTripper) RoundTrip(r *http.Request) (*http.Response, error) { func TestNewSession_WithCustomCABundle_UnsupportedTransport(t *testing.T) { oldEnv := initSessionTestEnv() - defer popEnv(oldEnv) + defer awstesting.PopEnv(oldEnv) s, err := NewSessionWithOptions(Options{ Config: aws.Config{ @@ -172,25 +180,35 @@ func TestNewSession_WithCustomCABundle_UnsupportedTransport(t *testing.T) { Transport: &mockRoundTripper{}, }, }, - CustomCABundle: bytes.NewReader(testTLSBundleCA), + CustomCABundle: bytes.NewReader(awstesting.TLSBundleCA), }) - assert.Error(t, err) - assert.Equal(t, "LoadCustomCABundleError", err.(awserr.Error).Code()) - assert.Contains(t, err.(awserr.Error).Message(), "transport unsupported type") - assert.Nil(t, s) + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "LoadCustomCABundleError", err.(awserr.Error).Code(); e != a { + t.Errorf("expect %s error code, got %s", e, a) + } + if s != nil { + t.Errorf("expect nil session, got %v", s) + } + aerrMsg := err.(awserr.Error).Message() + if e, a := "transport unsupported type", aerrMsg; !strings.Contains(a, e) { + t.Errorf("expect %s to be in %s", e, a) + } } func TestNewSession_WithCustomCABundle_TransportSet(t *testing.T) { oldEnv := initSessionTestEnv() - defer popEnv(oldEnv) + defer awstesting.PopEnv(oldEnv) - done := make(chan struct{}) - server, err := createTLSServer(testTLSBundleCert, testTLSBundleKey, done) - assert.NoError(t, err) + endpoint, err := awstesting.CreateTLSServer(TLSBundleCertFile, TLSBundleKeyFile, nil) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } s, err := NewSessionWithOptions(Options{ Config: aws.Config{ - Endpoint: aws.String(server.URL), + Endpoint: aws.String(endpoint), Region: aws.String("mock-region"), Credentials: credentials.AnonymousCredentials, HTTPClient: &http.Client{ @@ -205,115 +223,21 @@ func TestNewSession_WithCustomCABundle_TransportSet(t *testing.T) { }, }, }, - CustomCABundle: bytes.NewReader(testTLSBundleCA), + CustomCABundle: bytes.NewReader(awstesting.TLSBundleCA), }) - assert.NoError(t, err) - assert.NotNil(t, s) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + if s == nil { + t.Fatalf("expect session to be created, got none") + } req, _ := http.NewRequest("GET", *s.Config.Endpoint, nil) resp, err := s.Config.HTTPClient.Do(req) - assert.NoError(t, err) - - assert.Equal(t, http.StatusOK, resp.StatusCode) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + if e, a := http.StatusOK, resp.StatusCode; e != a { + t.Errorf("expect %d status code, got %d", e, a) + } } - -/* Cert generation steps -# Create the CA key -openssl genrsa -des3 -out ca.key 1024 - -# Create the CA Cert -openssl req -new -sha256 -x509 -days 3650 \ - -subj "/C=GO/ST=Gopher/O=Testing ROOT CA" \ - -key ca.key -out ca.crt - -# Create config -cat > csr_details.txt <<-EOF - -[req] -default_bits = 1024 -prompt = no -default_md = sha256 -req_extensions = SAN -distinguished_name = dn - -[ dn ] -C=GO -ST=Gopher -O=Testing Certificate -OU=Testing IP - -[SAN] -subjectAltName = IP:127.0.0.1 -EOF - -# Create certificate signing request -openssl req -new -sha256 -nodes -newkey rsa:1024 \ - -config <( cat csr_details.txt ) \ - -keyout ia.key -out ia.csr - -# Create a signed certificate -openssl x509 -req -days 3650 \ - -CAcreateserial \ - -extfile <( cat csr_details.txt ) \ - -extensions SAN \ - -CA ca.crt -CAkey ca.key -in ia.csr -out ia.crt - -# Verify -openssl req -noout -text -in ia.csr -openssl x509 -noout -text -in ia.crt -*/ -var ( - // ca.crt - testTLSBundleCA = []byte(`-----BEGIN CERTIFICATE----- -MIICiTCCAfKgAwIBAgIJAJ5X1olt05XjMA0GCSqGSIb3DQEBCwUAMDgxCzAJBgNV -BAYTAkdPMQ8wDQYDVQQIEwZHb3BoZXIxGDAWBgNVBAoTD1Rlc3RpbmcgUk9PVCBD -QTAeFw0xNzAzMDkwMDAyMDZaFw0yNzAzMDcwMDAyMDZaMDgxCzAJBgNVBAYTAkdP -MQ8wDQYDVQQIEwZHb3BoZXIxGDAWBgNVBAoTD1Rlc3RpbmcgUk9PVCBDQTCBnzAN -BgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAw/8DN+t9XQR60jx42rsQ2WE2Dx85rb3n -GQxnKZZLNddsT8rDyxJNP18aFalbRbFlyln5fxWxZIblu9Xkm/HRhOpbSimSqo1y -uDx21NVZ1YsOvXpHby71jx3gPrrhSc/t/zikhi++6D/C6m1CiIGuiJ0GBiJxtrub -UBMXT0QtI2ECAwEAAaOBmjCBlzAdBgNVHQ4EFgQU8XG3X/YHBA6T04kdEkq6+4GV -YykwaAYDVR0jBGEwX4AU8XG3X/YHBA6T04kdEkq6+4GVYymhPKQ6MDgxCzAJBgNV -BAYTAkdPMQ8wDQYDVQQIEwZHb3BoZXIxGDAWBgNVBAoTD1Rlc3RpbmcgUk9PVCBD -QYIJAJ5X1olt05XjMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADgYEAeILv -z49+uxmPcfOZzonuOloRcpdvyjiXblYxbzz6ch8GsE7Q886FTZbvwbgLhzdwSVgG -G8WHkodDUsymVepdqAamS3f8PdCUk8xIk9mop8LgaB9Ns0/TssxDvMr3sOD2Grb3 -xyWymTWMcj6uCiEBKtnUp4rPiefcvCRYZ17/hLE= ------END CERTIFICATE----- -`) - - // ai.crt - testTLSBundleCert = []byte(`-----BEGIN CERTIFICATE----- -MIICGjCCAYOgAwIBAgIJAIIu+NOoxxM0MA0GCSqGSIb3DQEBBQUAMDgxCzAJBgNV -BAYTAkdPMQ8wDQYDVQQIEwZHb3BoZXIxGDAWBgNVBAoTD1Rlc3RpbmcgUk9PVCBD -QTAeFw0xNzAzMDkwMDAzMTRaFw0yNzAzMDcwMDAzMTRaMFExCzAJBgNVBAYTAkdP -MQ8wDQYDVQQIDAZHb3BoZXIxHDAaBgNVBAoME1Rlc3RpbmcgQ2VydGlmaWNhdGUx -EzARBgNVBAsMClRlc3RpbmcgSVAwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGB -AN1hWHeioo/nASvbrjwCQzXCiWiEzGkw353NxsAB54/NqDL3LXNATtiSJu8kJBrm -Ah12IFLtWLGXjGjjYlHbQWnOR6awveeXnQZukJyRWh7m/Qlt9Ho0CgZE1U+832ac -5GWVldNxW1Lz4I+W9/ehzqe8I80RS6eLEKfUFXGiW+9RAgMBAAGjEzARMA8GA1Ud -EQQIMAaHBH8AAAEwDQYJKoZIhvcNAQEFBQADgYEAdF4WQHfVdPCbgv9sxgJjcR1H -Hgw9rZ47gO1IiIhzglnLXQ6QuemRiHeYFg4kjcYBk1DJguxzDTGnUwhUXOibAB+S -zssmrkdYYvn9aUhjc3XK3tjAoDpsPpeBeTBamuUKDHoH/dNRXxerZ8vu6uPR3Pgs -5v/KCV6IAEcvNyOXMPo= ------END CERTIFICATE----- -`) - - // ai.key - testTLSBundleKey = []byte(`-----BEGIN RSA PRIVATE KEY----- -MIICXAIBAAKBgQDdYVh3oqKP5wEr2648AkM1wolohMxpMN+dzcbAAeePzagy9y1z -QE7YkibvJCQa5gIddiBS7Vixl4xo42JR20FpzkemsL3nl50GbpCckVoe5v0JbfR6 -NAoGRNVPvN9mnORllZXTcVtS8+CPlvf3oc6nvCPNEUunixCn1BVxolvvUQIDAQAB -AoGBAMISrcirddGrlLZLLrKC1ULS2T0cdkqdQtwHYn4+7S5+/z42vMx1iumHLsSk -rVY7X41OWkX4trFxhvEIrc/O48bo2zw78P7flTxHy14uxXnllU8cLThE29SlUU7j -AVBNxJZMsXMlS/DowwD4CjFe+x4Pu9wZcReF2Z9ntzMpySABAkEA+iWoJCPE2JpS -y78q3HYYgpNY3gF3JqQ0SI/zTNkb3YyEIUffEYq0Y9pK13HjKtdsSuX4osTIhQkS -+UgRp6tCAQJBAOKPYTfQ2FX8ijgUpHZRuEAVaxASAS0UATiLgzXxLvOh/VC2at5x -wjOX6sD65pPz/0D8Qj52Cq6Q1TQ+377SDVECQAIy0od+yPweXxvrUjUd1JlRMjbB -TIrKZqs8mKbUQapw0bh5KTy+O1elU4MRPS3jNtBxtP25PQnuSnxmZcFTgAECQFzg -DiiFcsn9FuRagfkHExMiNJuH5feGxeFaP9WzI144v9GAllrOI6Bm3JNzx2ZLlg4b -20Qju8lIEj6yr6JYFaECQHM1VSojGRKpOl9Ox/R4yYSA9RV5Gyn00/aJNxVYyPD5 -i3acL2joQm2kLD/LO8paJ4+iQdRXCOMMIpjxSNjGQjQ= ------END RSA PRIVATE KEY----- -`) -) diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/doc.go b/vendor/github.com/aws/aws-sdk-go/aws/session/doc.go index 2fe35e7..ea7b886 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/session/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/session/doc.go @@ -124,9 +124,8 @@ file (~/.aws/config) and shared credentials file (~/.aws/credentials). Both files have the same format. If both config files are present the configuration from both files will be -read. The Session will be created from configuration values from the shared -credentials file (~/.aws/credentials) over those in the shared credentials -file (~/.aws/config). +read. The Session will be created from configuration values from the shared +credentials file (~/.aws/credentials) over those in the shared config file (~/.aws/config). Credentials are the values the SDK should use for authenticating requests with AWS Services. They arfrom a configuration file will need to include both diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go b/vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go index e6278a7..82e04d7 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go @@ -2,12 +2,15 @@ package session import ( "os" - "path/filepath" "strconv" "github.com/aws/aws-sdk-go/aws/credentials" + "github.com/aws/aws-sdk-go/aws/defaults" ) +// EnvProviderName provides a name of the provider when config is loaded from environment. +const EnvProviderName = "EnvConfigCredentials" + // envConfig is a collection of environment values the SDK will read // setup config from. All environment values are optional. But some values // such as credentials require multiple values to be complete or the values @@ -77,7 +80,7 @@ type envConfig struct { SharedConfigFile string // Sets the path to a custom Credentials Authroity (CA) Bundle PEM file - // that the SDK will use instead of the the system's root CA bundle. + // that the SDK will use instead of the system's root CA bundle. // Only use this if you want to configure the SDK to use a custom set // of CAs. // @@ -93,9 +96,23 @@ type envConfig struct { // // AWS_CA_BUNDLE=$HOME/my_custom_ca_bundle CustomCABundle string + + csmEnabled string + CSMEnabled bool + CSMPort string + CSMClientID string } var ( + csmEnabledEnvKey = []string{ + "AWS_CSM_ENABLED", + } + csmPortEnvKey = []string{ + "AWS_CSM_PORT", + } + csmClientIDEnvKey = []string{ + "AWS_CSM_CLIENT_ID", + } credAccessEnvKey = []string{ "AWS_ACCESS_KEY_ID", "AWS_ACCESS_KEY", @@ -116,6 +133,12 @@ var ( "AWS_PROFILE", "AWS_DEFAULT_PROFILE", // Only read if AWS_SDK_LOAD_CONFIG is also set } + sharedCredsFileEnvKey = []string{ + "AWS_SHARED_CREDENTIALS_FILE", + } + sharedConfigFileEnvKey = []string{ + "AWS_CONFIG_FILE", + } ) // loadEnvConfig retrieves the SDK's environment configuration. @@ -148,11 +171,17 @@ func envConfigLoad(enableSharedConfig bool) envConfig { setFromEnvVal(&cfg.Creds.SecretAccessKey, credSecretEnvKey) setFromEnvVal(&cfg.Creds.SessionToken, credSessionEnvKey) + // CSM environment variables + setFromEnvVal(&cfg.csmEnabled, csmEnabledEnvKey) + setFromEnvVal(&cfg.CSMPort, csmPortEnvKey) + setFromEnvVal(&cfg.CSMClientID, csmClientIDEnvKey) + cfg.CSMEnabled = len(cfg.csmEnabled) > 0 + // Require logical grouping of credentials if len(cfg.Creds.AccessKeyID) == 0 || len(cfg.Creds.SecretAccessKey) == 0 { cfg.Creds = credentials.Value{} } else { - cfg.Creds.ProviderName = "EnvConfigCredentials" + cfg.Creds.ProviderName = EnvProviderName } regionKeys := regionEnvKeys @@ -165,8 +194,15 @@ func envConfigLoad(enableSharedConfig bool) envConfig { setFromEnvVal(&cfg.Region, regionKeys) setFromEnvVal(&cfg.Profile, profileKeys) - cfg.SharedCredentialsFile = sharedCredentialsFilename() - cfg.SharedConfigFile = sharedConfigFilename() + setFromEnvVal(&cfg.SharedCredentialsFile, sharedCredsFileEnvKey) + setFromEnvVal(&cfg.SharedConfigFile, sharedConfigFileEnvKey) + + if len(cfg.SharedCredentialsFile) == 0 { + cfg.SharedCredentialsFile = defaults.SharedCredentialsFilename() + } + if len(cfg.SharedConfigFile) == 0 { + cfg.SharedConfigFile = defaults.SharedConfigFilename() + } cfg.CustomCABundle = os.Getenv("AWS_CA_BUNDLE") @@ -181,28 +217,3 @@ func setFromEnvVal(dst *string, keys []string) { } } } - -func sharedCredentialsFilename() string { - if name := os.Getenv("AWS_SHARED_CREDENTIALS_FILE"); len(name) > 0 { - return name - } - - return filepath.Join(userHomeDir(), ".aws", "credentials") -} - -func sharedConfigFilename() string { - if name := os.Getenv("AWS_CONFIG_FILE"); len(name) > 0 { - return name - } - - return filepath.Join(userHomeDir(), ".aws", "config") -} - -func userHomeDir() string { - homeDir := os.Getenv("HOME") // *nix - if len(homeDir) == 0 { // windows - homeDir = os.Getenv("USERPROFILE") - } - - return homeDir -} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/env_config_test.go b/vendor/github.com/aws/aws-sdk-go/aws/session/env_config_test.go index 162a710..3a0b646 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/session/env_config_test.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/session/env_config_test.go @@ -2,17 +2,17 @@ package session import ( "os" - "path/filepath" - "strings" + "reflect" "testing" "github.com/aws/aws-sdk-go/aws/credentials" - "github.com/stretchr/testify/assert" + "github.com/aws/aws-sdk-go/awstesting" + "github.com/aws/aws-sdk-go/internal/shareddefaults" ) func TestLoadEnvConfig_Creds(t *testing.T) { - env := stashEnv() - defer popEnv(env) + env := awstesting.StashEnv() + defer awstesting.PopEnv(env) cases := []struct { Env map[string]string @@ -83,26 +83,32 @@ func TestLoadEnvConfig_Creds(t *testing.T) { } cfg := loadEnvConfig() - assert.Equal(t, c.Val, cfg.Creds) + if !reflect.DeepEqual(c.Val, cfg.Creds) { + t.Errorf("expect credentials to match.\n%s", + awstesting.SprintExpectActual(c.Val, cfg.Creds)) + } } } func TestLoadEnvConfig(t *testing.T) { - env := stashEnv() - defer popEnv(env) + env := awstesting.StashEnv() + defer awstesting.PopEnv(env) cases := []struct { Env map[string]string - Region, Profile string - CustomCABundle string UseSharedConfigCall bool + Config envConfig }{ { Env: map[string]string{ "AWS_REGION": "region", "AWS_PROFILE": "profile", }, - Region: "region", Profile: "profile", + Config: envConfig{ + Region: "region", Profile: "profile", + SharedCredentialsFile: shareddefaults.SharedCredentialsFilename(), + SharedConfigFile: shareddefaults.SharedConfigFilename(), + }, }, { Env: map[string]string{ @@ -111,7 +117,11 @@ func TestLoadEnvConfig(t *testing.T) { "AWS_PROFILE": "profile", "AWS_DEFAULT_PROFILE": "default_profile", }, - Region: "region", Profile: "profile", + Config: envConfig{ + Region: "region", Profile: "profile", + SharedCredentialsFile: shareddefaults.SharedCredentialsFilename(), + SharedConfigFile: shareddefaults.SharedConfigFilename(), + }, }, { Env: map[string]string{ @@ -121,13 +131,22 @@ func TestLoadEnvConfig(t *testing.T) { "AWS_DEFAULT_PROFILE": "default_profile", "AWS_SDK_LOAD_CONFIG": "1", }, - Region: "region", Profile: "profile", + Config: envConfig{ + Region: "region", Profile: "profile", + EnableSharedConfig: true, + SharedCredentialsFile: shareddefaults.SharedCredentialsFilename(), + SharedConfigFile: shareddefaults.SharedConfigFilename(), + }, }, { Env: map[string]string{ "AWS_DEFAULT_REGION": "default_region", "AWS_DEFAULT_PROFILE": "default_profile", }, + Config: envConfig{ + SharedCredentialsFile: shareddefaults.SharedCredentialsFilename(), + SharedConfigFile: shareddefaults.SharedConfigFilename(), + }, }, { Env: map[string]string{ @@ -135,14 +154,24 @@ func TestLoadEnvConfig(t *testing.T) { "AWS_DEFAULT_PROFILE": "default_profile", "AWS_SDK_LOAD_CONFIG": "1", }, - Region: "default_region", Profile: "default_profile", + Config: envConfig{ + Region: "default_region", Profile: "default_profile", + EnableSharedConfig: true, + SharedCredentialsFile: shareddefaults.SharedCredentialsFilename(), + SharedConfigFile: shareddefaults.SharedConfigFilename(), + }, }, { Env: map[string]string{ "AWS_REGION": "region", "AWS_PROFILE": "profile", }, - Region: "region", Profile: "profile", + Config: envConfig{ + Region: "region", Profile: "profile", + EnableSharedConfig: true, + SharedCredentialsFile: shareddefaults.SharedCredentialsFilename(), + SharedConfigFile: shareddefaults.SharedConfigFilename(), + }, UseSharedConfigCall: true, }, { @@ -152,7 +181,12 @@ func TestLoadEnvConfig(t *testing.T) { "AWS_PROFILE": "profile", "AWS_DEFAULT_PROFILE": "default_profile", }, - Region: "region", Profile: "profile", + Config: envConfig{ + Region: "region", Profile: "profile", + EnableSharedConfig: true, + SharedCredentialsFile: shareddefaults.SharedCredentialsFilename(), + SharedConfigFile: shareddefaults.SharedConfigFilename(), + }, UseSharedConfigCall: true, }, { @@ -163,7 +197,12 @@ func TestLoadEnvConfig(t *testing.T) { "AWS_DEFAULT_PROFILE": "default_profile", "AWS_SDK_LOAD_CONFIG": "1", }, - Region: "region", Profile: "profile", + Config: envConfig{ + Region: "region", Profile: "profile", + EnableSharedConfig: true, + SharedCredentialsFile: shareddefaults.SharedCredentialsFilename(), + SharedConfigFile: shareddefaults.SharedConfigFilename(), + }, UseSharedConfigCall: true, }, { @@ -171,7 +210,12 @@ func TestLoadEnvConfig(t *testing.T) { "AWS_DEFAULT_REGION": "default_region", "AWS_DEFAULT_PROFILE": "default_profile", }, - Region: "default_region", Profile: "default_profile", + Config: envConfig{ + Region: "default_region", Profile: "default_profile", + EnableSharedConfig: true, + SharedCredentialsFile: shareddefaults.SharedCredentialsFilename(), + SharedConfigFile: shareddefaults.SharedConfigFilename(), + }, UseSharedConfigCall: true, }, { @@ -180,22 +224,46 @@ func TestLoadEnvConfig(t *testing.T) { "AWS_DEFAULT_PROFILE": "default_profile", "AWS_SDK_LOAD_CONFIG": "1", }, - Region: "default_region", Profile: "default_profile", + Config: envConfig{ + Region: "default_region", Profile: "default_profile", + EnableSharedConfig: true, + SharedCredentialsFile: shareddefaults.SharedCredentialsFilename(), + SharedConfigFile: shareddefaults.SharedConfigFilename(), + }, UseSharedConfigCall: true, }, { Env: map[string]string{ "AWS_CA_BUNDLE": "custom_ca_bundle", }, - CustomCABundle: "custom_ca_bundle", + Config: envConfig{ + CustomCABundle: "custom_ca_bundle", + SharedCredentialsFile: shareddefaults.SharedCredentialsFilename(), + SharedConfigFile: shareddefaults.SharedConfigFilename(), + }, }, { Env: map[string]string{ "AWS_CA_BUNDLE": "custom_ca_bundle", }, - CustomCABundle: "custom_ca_bundle", + Config: envConfig{ + CustomCABundle: "custom_ca_bundle", + EnableSharedConfig: true, + SharedCredentialsFile: shareddefaults.SharedCredentialsFilename(), + SharedConfigFile: shareddefaults.SharedConfigFilename(), + }, UseSharedConfigCall: true, }, + { + Env: map[string]string{ + "AWS_SHARED_CREDENTIALS_FILE": "/path/to/credentials/file", + "AWS_CONFIG_FILE": "/path/to/config/file", + }, + Config: envConfig{ + SharedCredentialsFile: "/path/to/credentials/file", + SharedConfigFile: "/path/to/config/file", + }, + }, } for _, c := range cases { @@ -212,55 +280,16 @@ func TestLoadEnvConfig(t *testing.T) { cfg = loadEnvConfig() } - assert.Equal(t, c.Region, cfg.Region) - assert.Equal(t, c.Profile, cfg.Profile) - assert.Equal(t, c.CustomCABundle, cfg.CustomCABundle) + if !reflect.DeepEqual(c.Config, cfg) { + t.Errorf("expect config to match.\n%s", + awstesting.SprintExpectActual(c.Config, cfg)) + } } } -func TestSharedCredsFilename(t *testing.T) { - env := stashEnv() - defer popEnv(env) - - os.Setenv("USERPROFILE", "profile_dir") - expect := filepath.Join("profile_dir", ".aws", "credentials") - name := sharedCredentialsFilename() - assert.Equal(t, expect, name) - - os.Setenv("HOME", "home_dir") - expect = filepath.Join("home_dir", ".aws", "credentials") - name = sharedCredentialsFilename() - assert.Equal(t, expect, name) - - expect = filepath.Join("path/to/credentials/file") - os.Setenv("AWS_SHARED_CREDENTIALS_FILE", expect) - name = sharedCredentialsFilename() - assert.Equal(t, expect, name) -} - -func TestSharedConfigFilename(t *testing.T) { - env := stashEnv() - defer popEnv(env) - - os.Setenv("USERPROFILE", "profile_dir") - expect := filepath.Join("profile_dir", ".aws", "config") - name := sharedConfigFilename() - assert.Equal(t, expect, name) - - os.Setenv("HOME", "home_dir") - expect = filepath.Join("home_dir", ".aws", "config") - name = sharedConfigFilename() - assert.Equal(t, expect, name) - - expect = filepath.Join("path/to/config/file") - os.Setenv("AWS_CONFIG_FILE", expect) - name = sharedConfigFilename() - assert.Equal(t, expect, name) -} - func TestSetEnvValue(t *testing.T) { - env := stashEnv() - defer popEnv(env) + env := awstesting.StashEnv() + defer awstesting.PopEnv(env) os.Setenv("empty_key", "") os.Setenv("second_key", "2") @@ -271,21 +300,7 @@ func TestSetEnvValue(t *testing.T) { "empty_key", "first_key", "second_key", "third_key", }) - assert.Equal(t, "2", dst) -} - -func stashEnv() []string { - env := os.Environ() - os.Clearenv() - - return env -} - -func popEnv(env []string) { - os.Clearenv() - - for _, e := range env { - p := strings.SplitN(e, "=", 2) - os.Setenv(p[0], p[1]) + if e, a := "2", dst; e != a { + t.Errorf("expect %s value from environment, got %s", e, a) } } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/session.go b/vendor/github.com/aws/aws-sdk-go/aws/session/session.go index 4792d3a..51f3055 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/session/session.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/session/session.go @@ -15,6 +15,7 @@ import ( "github.com/aws/aws-sdk-go/aws/corehandlers" "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/aws/credentials/stscreds" + "github.com/aws/aws-sdk-go/aws/csm" "github.com/aws/aws-sdk-go/aws/defaults" "github.com/aws/aws-sdk-go/aws/endpoints" "github.com/aws/aws-sdk-go/aws/request" @@ -26,7 +27,7 @@ import ( // Sessions are safe to create service clients concurrently, but it is not safe // to mutate the Session concurrently. // -// The Session satisfies the service client's client.ClientConfigProvider. +// The Session satisfies the service client's client.ConfigProvider. type Session struct { Config *aws.Config Handlers request.Handlers @@ -58,7 +59,12 @@ func New(cfgs ...*aws.Config) *Session { envCfg := loadEnvConfig() if envCfg.EnableSharedConfig { - s, err := newSession(Options{}, envCfg, cfgs...) + var cfg aws.Config + cfg.MergeIn(cfgs...) + s, err := NewSessionWithOptions(Options{ + Config: cfg, + SharedConfigState: SharedConfigEnable, + }) if err != nil { // Old session.New expected all errors to be discovered when // a request is made, and would report the errors then. This @@ -76,10 +82,16 @@ func New(cfgs ...*aws.Config) *Session { r.Error = err }) } + return s } - return deprecatedNewSession(cfgs...) + s := deprecatedNewSession(cfgs...) + if envCfg.CSMEnabled { + enableCSM(&s.Handlers, envCfg.CSMClientID, envCfg.CSMPort, s.Config.Logger) + } + + return s } // NewSession returns a new Session created from SDK defaults, config files, @@ -155,6 +167,10 @@ type Options struct { // and enable or disable the shared config functionality. SharedConfigState SharedConfigState + // Ordered list of files the session will load configuration from. + // It will override environment variable AWS_SHARED_CREDENTIALS_FILE, AWS_CONFIG_FILE. + SharedConfigFiles []string + // When the SDK's shared config is configured to assume a role with MFA // this option is required in order to provide the mechanism that will // retrieve the MFA token. There is no default value for this field. If @@ -291,10 +307,22 @@ func deprecatedNewSession(cfgs ...*aws.Config) *Session { } initHandlers(s) - return s } +func enableCSM(handlers *request.Handlers, clientID string, port string, logger aws.Logger) { + logger.Log("Enabling CSM") + if len(port) == 0 { + port = csm.DefaultPort + } + + r, err := csm.Start(clientID, "127.0.0.1:"+port) + if err != nil { + return + } + r.InjectHandlers(handlers) +} + func newSession(opts Options, envCfg envConfig, cfgs ...*aws.Config) (*Session, error) { cfg := defaults.Config() handlers := defaults.Handlers() @@ -304,13 +332,18 @@ func newSession(opts Options, envCfg envConfig, cfgs ...*aws.Config) (*Session, userCfg := &aws.Config{} userCfg.MergeIn(cfgs...) - // Order config files will be loaded in with later files overwriting + // Ordered config files will be loaded in with later files overwriting // previous config file values. - cfgFiles := []string{envCfg.SharedConfigFile, envCfg.SharedCredentialsFile} - if !envCfg.EnableSharedConfig { - // The shared config file (~/.aws/config) is only loaded if instructed - // to load via the envConfig.EnableSharedConfig (AWS_SDK_LOAD_CONFIG). - cfgFiles = cfgFiles[1:] + var cfgFiles []string + if opts.SharedConfigFiles != nil { + cfgFiles = opts.SharedConfigFiles + } else { + cfgFiles = []string{envCfg.SharedConfigFile, envCfg.SharedCredentialsFile} + if !envCfg.EnableSharedConfig { + // The shared config file (~/.aws/config) is only loaded if instructed + // to load via the envConfig.EnableSharedConfig (AWS_SDK_LOAD_CONFIG). + cfgFiles = cfgFiles[1:] + } } // Load additional config from file(s) @@ -329,6 +362,9 @@ func newSession(opts Options, envCfg envConfig, cfgs ...*aws.Config) (*Session, } initHandlers(s) + if envCfg.CSMEnabled { + enableCSM(&s.Handlers, envCfg.CSMClientID, envCfg.CSMPort, s.Config.Logger) + } // Setup HTTP client with custom cert bundle if enabled if opts.CustomCABundle != nil { @@ -557,11 +593,12 @@ func (s *Session) clientConfigWithErr(serviceName string, cfgs ...*aws.Config) ( } return client.Config{ - Config: s.Config, - Handlers: s.Handlers, - Endpoint: resolved.URL, - SigningRegion: resolved.SigningRegion, - SigningName: resolved.SigningName, + Config: s.Config, + Handlers: s.Handlers, + Endpoint: resolved.URL, + SigningRegion: resolved.SigningRegion, + SigningNameDerived: resolved.SigningNameDerived, + SigningName: resolved.SigningName, }, err } @@ -581,10 +618,11 @@ func (s *Session) ClientConfigNoResolveEndpoint(cfgs ...*aws.Config) client.Conf } return client.Config{ - Config: s.Config, - Handlers: s.Handlers, - Endpoint: resolved.URL, - SigningRegion: resolved.SigningRegion, - SigningName: resolved.SigningName, + Config: s.Config, + Handlers: s.Handlers, + Endpoint: resolved.URL, + SigningRegion: resolved.SigningRegion, + SigningNameDerived: resolved.SigningNameDerived, + SigningName: resolved.SigningName, } } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/session_test.go b/vendor/github.com/aws/aws-sdk-go/aws/session/session_test.go index 877af02..9612b31 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/session/session_test.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/session/session_test.go @@ -14,12 +14,14 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/aws/defaults" + "github.com/aws/aws-sdk-go/aws/endpoints" + "github.com/aws/aws-sdk-go/awstesting" "github.com/aws/aws-sdk-go/service/s3" ) func TestNewDefaultSession(t *testing.T) { oldEnv := initSessionTestEnv() - defer popEnv(oldEnv) + defer awstesting.PopEnv(oldEnv) s := New(&aws.Config{Region: aws.String("region")}) @@ -31,7 +33,7 @@ func TestNewDefaultSession(t *testing.T) { func TestNew_WithCustomCreds(t *testing.T) { oldEnv := initSessionTestEnv() - defer popEnv(oldEnv) + defer awstesting.PopEnv(oldEnv) customCreds := credentials.NewStaticCredentials("AKID", "SECRET", "TOKEN") s := New(&aws.Config{Credentials: customCreds}) @@ -49,7 +51,7 @@ func (w mockLogger) Log(args ...interface{}) { func TestNew_WithSessionLoadError(t *testing.T) { oldEnv := initSessionTestEnv() - defer popEnv(oldEnv) + defer awstesting.PopEnv(oldEnv) os.Setenv("AWS_SDK_LOAD_CONFIG", "1") os.Setenv("AWS_CONFIG_FILE", testConfigFilename) @@ -72,7 +74,7 @@ func TestNew_WithSessionLoadError(t *testing.T) { func TestSessionCopy(t *testing.T) { oldEnv := initSessionTestEnv() - defer popEnv(oldEnv) + defer awstesting.PopEnv(oldEnv) os.Setenv("AWS_REGION", "orig_region") @@ -88,19 +90,36 @@ func TestSessionCopy(t *testing.T) { } func TestSessionClientConfig(t *testing.T) { - s, err := NewSession(&aws.Config{Region: aws.String("orig_region")}) + s, err := NewSession(&aws.Config{ + Credentials: credentials.AnonymousCredentials, + Region: aws.String("orig_region"), + EndpointResolver: endpoints.ResolverFunc( + func(service, region string, opts ...func(*endpoints.Options)) (endpoints.ResolvedEndpoint, error) { + if e, a := "mock-service", service; e != a { + t.Errorf("expect %q service, got %q", e, a) + } + if e, a := "other-region", region; e != a { + t.Errorf("expect %q region, got %q", e, a) + } + return endpoints.ResolvedEndpoint{ + URL: "https://" + service + "." + region + ".amazonaws.com", + SigningRegion: region, + }, nil + }, + ), + }) assert.NoError(t, err) - cfg := s.ClientConfig("s3", &aws.Config{Region: aws.String("us-west-2")}) + cfg := s.ClientConfig("mock-service", &aws.Config{Region: aws.String("other-region")}) - assert.Equal(t, "https://s3-us-west-2.amazonaws.com", cfg.Endpoint) - assert.Equal(t, "us-west-2", cfg.SigningRegion) - assert.Equal(t, "us-west-2", *cfg.Config.Region) + assert.Equal(t, "https://mock-service.other-region.amazonaws.com", cfg.Endpoint) + assert.Equal(t, "other-region", cfg.SigningRegion) + assert.Equal(t, "other-region", *cfg.Config.Region) } func TestNewSession_NoCredentials(t *testing.T) { oldEnv := initSessionTestEnv() - defer popEnv(oldEnv) + defer awstesting.PopEnv(oldEnv) s, err := NewSession() assert.NoError(t, err) @@ -111,7 +130,7 @@ func TestNewSession_NoCredentials(t *testing.T) { func TestNewSessionWithOptions_OverrideProfile(t *testing.T) { oldEnv := initSessionTestEnv() - defer popEnv(oldEnv) + defer awstesting.PopEnv(oldEnv) os.Setenv("AWS_SDK_LOAD_CONFIG", "1") os.Setenv("AWS_SHARED_CREDENTIALS_FILE", testConfigFilename) @@ -134,7 +153,7 @@ func TestNewSessionWithOptions_OverrideProfile(t *testing.T) { func TestNewSessionWithOptions_OverrideSharedConfigEnable(t *testing.T) { oldEnv := initSessionTestEnv() - defer popEnv(oldEnv) + defer awstesting.PopEnv(oldEnv) os.Setenv("AWS_SDK_LOAD_CONFIG", "0") os.Setenv("AWS_SHARED_CREDENTIALS_FILE", testConfigFilename) @@ -157,7 +176,7 @@ func TestNewSessionWithOptions_OverrideSharedConfigEnable(t *testing.T) { func TestNewSessionWithOptions_OverrideSharedConfigDisable(t *testing.T) { oldEnv := initSessionTestEnv() - defer popEnv(oldEnv) + defer awstesting.PopEnv(oldEnv) os.Setenv("AWS_SDK_LOAD_CONFIG", "1") os.Setenv("AWS_SHARED_CREDENTIALS_FILE", testConfigFilename) @@ -178,6 +197,29 @@ func TestNewSessionWithOptions_OverrideSharedConfigDisable(t *testing.T) { assert.Contains(t, creds.ProviderName, "SharedConfigCredentials") } +func TestNewSessionWithOptions_OverrideSharedConfigFiles(t *testing.T) { + oldEnv := initSessionTestEnv() + defer awstesting.PopEnv(oldEnv) + + os.Setenv("AWS_SDK_LOAD_CONFIG", "1") + os.Setenv("AWS_SHARED_CREDENTIALS_FILE", testConfigFilename) + os.Setenv("AWS_PROFILE", "config_file_load_order") + + s, err := NewSessionWithOptions(Options{ + SharedConfigFiles: []string{testConfigOtherFilename}, + }) + assert.NoError(t, err) + + assert.Equal(t, "shared_config_other_region", *s.Config.Region) + + creds, err := s.Config.Credentials.Get() + assert.NoError(t, err) + assert.Equal(t, "shared_config_other_akid", creds.AccessKeyID) + assert.Equal(t, "shared_config_other_secret", creds.SecretAccessKey) + assert.Empty(t, creds.SessionToken) + assert.Contains(t, creds.ProviderName, "SharedConfigCredentials") +} + func TestNewSessionWithOptions_Overrides(t *testing.T) { cases := []struct { InEnvs map[string]string @@ -235,7 +277,7 @@ func TestNewSessionWithOptions_Overrides(t *testing.T) { for _, c := range cases { oldEnv := initSessionTestEnv() - defer popEnv(oldEnv) + defer awstesting.PopEnv(oldEnv) for k, v := range c.InEnvs { os.Setenv(k, v) @@ -279,7 +321,7 @@ const assumeRoleRespMsg = ` func TestSesisonAssumeRole(t *testing.T) { oldEnv := initSessionTestEnv() - defer popEnv(oldEnv) + defer awstesting.PopEnv(oldEnv) os.Setenv("AWS_REGION", "us-east-1") os.Setenv("AWS_SDK_LOAD_CONFIG", "1") @@ -302,7 +344,7 @@ func TestSesisonAssumeRole(t *testing.T) { func TestSessionAssumeRole_WithMFA(t *testing.T) { oldEnv := initSessionTestEnv() - defer popEnv(oldEnv) + defer awstesting.PopEnv(oldEnv) os.Setenv("AWS_REGION", "us-east-1") os.Setenv("AWS_SDK_LOAD_CONFIG", "1") @@ -345,7 +387,7 @@ func TestSessionAssumeRole_WithMFA(t *testing.T) { func TestSessionAssumeRole_WithMFA_NoTokenProvider(t *testing.T) { oldEnv := initSessionTestEnv() - defer popEnv(oldEnv) + defer awstesting.PopEnv(oldEnv) os.Setenv("AWS_REGION", "us-east-1") os.Setenv("AWS_SDK_LOAD_CONFIG", "1") @@ -363,7 +405,7 @@ func TestSessionAssumeRole_DisableSharedConfig(t *testing.T) { // Backwards compatibility with Shared config disabled // assume role should not be built into the config. oldEnv := initSessionTestEnv() - defer popEnv(oldEnv) + defer awstesting.PopEnv(oldEnv) os.Setenv("AWS_SDK_LOAD_CONFIG", "0") os.Setenv("AWS_SHARED_CREDENTIALS_FILE", testConfigFilename) @@ -383,7 +425,7 @@ func TestSessionAssumeRole_InvalidSourceProfile(t *testing.T) { // Backwards compatibility with Shared config disabled // assume role should not be built into the config. oldEnv := initSessionTestEnv() - defer popEnv(oldEnv) + defer awstesting.PopEnv(oldEnv) os.Setenv("AWS_SDK_LOAD_CONFIG", "1") os.Setenv("AWS_SHARED_CREDENTIALS_FILE", testConfigFilename) @@ -396,7 +438,7 @@ func TestSessionAssumeRole_InvalidSourceProfile(t *testing.T) { } func initSessionTestEnv() (oldEnv []string) { - oldEnv = stashEnv() + oldEnv = awstesting.StashEnv() os.Setenv("AWS_CONFIG_FILE", "file_not_exists") os.Setenv("AWS_SHARED_CREDENTIALS_FILE", "file_not_exists") diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/shared_config.go b/vendor/github.com/aws/aws-sdk-go/aws/session/shared_config.go index b58076f..09c8e5b 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/session/shared_config.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/session/shared_config.go @@ -113,7 +113,7 @@ func loadSharedConfigIniFiles(filenames []string) ([]sharedConfigFile, error) { f, err := ini.Load(b) if err != nil { - return nil, SharedConfigLoadError{Filename: filename} + return nil, SharedConfigLoadError{Filename: filename, Err: err} } files = append(files, sharedConfigFile{ diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/testdata/shared_config b/vendor/github.com/aws/aws-sdk-go/aws/session/testdata/shared_config deleted file mode 100644 index 8705608..0000000 --- a/vendor/github.com/aws/aws-sdk-go/aws/session/testdata/shared_config +++ /dev/null @@ -1,65 +0,0 @@ -[default] -s3 = - unsupported_key=123 - other_unsupported=abc - -region = default_region - -[profile alt_profile_name] -region = alt_profile_name_region - -[short_profile_name_first] -region = short_profile_name_first_short - -[profile short_profile_name_first] -region = short_profile_name_first_alt - -[partial_creds] -aws_access_key_id = partial_creds_akid - -[complete_creds] -aws_access_key_id = complete_creds_akid -aws_secret_access_key = complete_creds_secret - -[complete_creds_with_token] -aws_access_key_id = complete_creds_with_token_akid -aws_secret_access_key = complete_creds_with_token_secret -aws_session_token = complete_creds_with_token_token - -[full_profile] -aws_access_key_id = full_profile_akid -aws_secret_access_key = full_profile_secret -region = full_profile_region - -[config_file_load_order] -region = shared_config_region -aws_access_key_id = shared_config_akid -aws_secret_access_key = shared_config_secret - -[partial_assume_role] -role_arn = partial_assume_role_role_arn - -[assume_role] -role_arn = assume_role_role_arn -source_profile = complete_creds - -[assume_role_w_mfa] -role_arn = assume_role_role_arn -source_profile = complete_creds -mfa_serial = 0123456789 - -[assume_role_invalid_source_profile] -role_arn = assume_role_invalid_source_profile_role_arn -source_profile = profile_not_exists - -[assume_role_w_creds] -role_arn = assume_role_w_creds_role_arn -source_profile = assume_role_w_creds -external_id = 1234 -role_session_name = assume_role_w_creds_session_name -aws_access_key_id = assume_role_w_creds_akid -aws_secret_access_key = assume_role_w_creds_secret - -[assume_role_wo_creds] -role_arn = assume_role_wo_creds_role_arn -source_profile = assume_role_wo_creds diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/testdata/shared_config_invalid_ini b/vendor/github.com/aws/aws-sdk-go/aws/session/testdata/shared_config_invalid_ini deleted file mode 100644 index 4db0389..0000000 --- a/vendor/github.com/aws/aws-sdk-go/aws/session/testdata/shared_config_invalid_ini +++ /dev/null @@ -1 +0,0 @@ -[profile_nam diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/testdata/shared_config_other b/vendor/github.com/aws/aws-sdk-go/aws/session/testdata/shared_config_other deleted file mode 100644 index 615831b..0000000 --- a/vendor/github.com/aws/aws-sdk-go/aws/session/testdata/shared_config_other +++ /dev/null @@ -1,17 +0,0 @@ -[default] -region = default_region - -[partial_creds] -aws_access_key_id = AKID - -[profile alt_profile_name] -region = alt_profile_name_region - -[creds_from_credentials] -aws_access_key_id = creds_from_config_akid -aws_secret_access_key = creds_from_config_secret - -[config_file_load_order] -region = shared_config_other_region -aws_access_key_id = shared_config_other_akid -aws_secret_access_key = shared_config_other_secret diff --git a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/functional_1_5_test.go b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/functional_1_5_test.go index 2d4621c..2e591c2 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/functional_1_5_test.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/functional_1_5_test.go @@ -10,7 +10,6 @@ import ( "github.com/aws/aws-sdk-go/aws/signer/v4" "github.com/aws/aws-sdk-go/awstesting/unit" - "github.com/stretchr/testify/assert" ) func TestStandaloneSign(t *testing.T) { @@ -22,7 +21,9 @@ func TestStandaloneSign(t *testing.T) { c.SubDomain, c.Region, c.Service) req, err := http.NewRequest("GET", host, nil) - assert.NoError(t, err) + if err != nil { + t.Errorf("expected no error, but received %v", err) + } // URL.EscapedPath() will be used by the signer to get the // escaped form of the request's URI path. @@ -30,12 +31,20 @@ func TestStandaloneSign(t *testing.T) { req.URL.RawQuery = c.OrigQuery _, err = signer.Sign(req, nil, c.Service, c.Region, time.Unix(0, 0)) - assert.NoError(t, err) + if err != nil { + t.Errorf("expected no error, but received %v", err) + } actual := req.Header.Get("Authorization") - assert.Equal(t, c.ExpSig, actual) - assert.Equal(t, c.OrigURI, req.URL.Path) - assert.Equal(t, c.EscapedURI, req.URL.EscapedPath()) + if e, a := c.ExpSig, actual; e != a { + t.Errorf("expected %v, but recieved %v", e, a) + } + if e, a := c.OrigURI, req.URL.Path; e != a { + t.Errorf("expected %v, but recieved %v", e, a) + } + if e, a := c.EscapedURI, req.URL.EscapedPath(); e != a { + t.Errorf("expected %v, but recieved %v", e, a) + } } } @@ -48,7 +57,9 @@ func TestStandaloneSign_RawPath(t *testing.T) { c.SubDomain, c.Region, c.Service) req, err := http.NewRequest("GET", host, nil) - assert.NoError(t, err) + if err != nil { + t.Errorf("expected no error, but received %v", err) + } // URL.EscapedPath() will be used by the signer to get the // escaped form of the request's URI path. @@ -57,11 +68,19 @@ func TestStandaloneSign_RawPath(t *testing.T) { req.URL.RawQuery = c.OrigQuery _, err = signer.Sign(req, nil, c.Service, c.Region, time.Unix(0, 0)) - assert.NoError(t, err) + if err != nil { + t.Errorf("expected no error, but received %v", err) + } actual := req.Header.Get("Authorization") - assert.Equal(t, c.ExpSig, actual) - assert.Equal(t, c.OrigURI, req.URL.Path) - assert.Equal(t, c.EscapedURI, req.URL.EscapedPath()) + if e, a := c.ExpSig, actual; e != a { + t.Errorf("expected %v, but recieved %v", e, a) + } + if e, a := c.OrigURI, req.URL.Path; e != a { + t.Errorf("expected %v, but recieved %v", e, a) + } + if e, a := c.EscapedURI, req.URL.EscapedPath(); e != a { + t.Errorf("expected %v, but recieved %v", e, a) + } } } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/functional_test.go b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/functional_test.go index 9b6b0be..93d664b 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/functional_test.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/functional_test.go @@ -3,6 +3,8 @@ package v4_test import ( "net/http" "net/url" + "reflect" + "strings" "testing" "time" @@ -10,7 +12,6 @@ import ( "github.com/aws/aws-sdk-go/aws/signer/v4" "github.com/aws/aws-sdk-go/awstesting/unit" "github.com/aws/aws-sdk-go/service/s3" - "github.com/stretchr/testify/assert" ) var standaloneSignCases = []struct { @@ -40,24 +41,43 @@ func TestPresignHandler(t *testing.T) { req.Time = time.Unix(0, 0) urlstr, err := req.Presign(5 * time.Minute) - assert.NoError(t, err) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } expectedHost := "bucket.s3.mock-region.amazonaws.com" expectedDate := "19700101T000000Z" expectedHeaders := "content-disposition;host;x-amz-acl" - expectedSig := "2d76a414208c0eac2a23ef9c834db9635ecd5a0fbb447a00ad191f82d854f55b" + expectedSig := "a46583256431b09eb45ba4af2e6286d96a9835ed13721023dc8076dfdcb90fcb" expectedCred := "AKID/19700101/mock-region/s3/aws4_request" u, _ := url.Parse(urlstr) urlQ := u.Query() - assert.Equal(t, expectedHost, u.Host) - assert.Equal(t, expectedSig, urlQ.Get("X-Amz-Signature")) - assert.Equal(t, expectedCred, urlQ.Get("X-Amz-Credential")) - assert.Equal(t, expectedHeaders, urlQ.Get("X-Amz-SignedHeaders")) - assert.Equal(t, expectedDate, urlQ.Get("X-Amz-Date")) - assert.Equal(t, "300", urlQ.Get("X-Amz-Expires")) - - assert.NotContains(t, urlstr, "+") // + encoded as %20 + if e, a := expectedHost, u.Host; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := expectedSig, urlQ.Get("X-Amz-Signature"); e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := expectedCred, urlQ.Get("X-Amz-Credential"); e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := expectedHeaders, urlQ.Get("X-Amz-SignedHeaders"); e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := expectedDate, urlQ.Get("X-Amz-Date"); e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "300", urlQ.Get("X-Amz-Expires"); e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "UNSIGNED-PAYLOAD", urlQ.Get("X-Amz-Content-Sha256"); e != a { + t.Errorf("expect %v, got %v", e, a) + } + + if e, a := "+", urlstr; strings.Contains(a, e) { // + encoded as %20 + t.Errorf("expect %v not to be in %v", e, a) + } } func TestPresignRequest(t *testing.T) { @@ -71,30 +91,50 @@ func TestPresignRequest(t *testing.T) { req.Time = time.Unix(0, 0) urlstr, headers, err := req.PresignRequest(5 * time.Minute) - assert.NoError(t, err) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } expectedHost := "bucket.s3.mock-region.amazonaws.com" expectedDate := "19700101T000000Z" - expectedHeaders := "content-disposition;host;x-amz-acl;x-amz-content-sha256" - expectedSig := "a5b2b500dfbf2eab5b4f55bec3e3752e04536ea1d5c047aa93bc9f1130a72cd2" + expectedHeaders := "content-disposition;host;x-amz-acl" + expectedSig := "a46583256431b09eb45ba4af2e6286d96a9835ed13721023dc8076dfdcb90fcb" expectedCred := "AKID/19700101/mock-region/s3/aws4_request" expectedHeaderMap := http.Header{ - "x-amz-acl": []string{"public-read"}, - "content-disposition": []string{"a+b c$d"}, - "x-amz-content-sha256": []string{"UNSIGNED-PAYLOAD"}, + "x-amz-acl": []string{"public-read"}, + "content-disposition": []string{"a+b c$d"}, } u, _ := url.Parse(urlstr) urlQ := u.Query() - assert.Equal(t, expectedHost, u.Host) - assert.Equal(t, expectedSig, urlQ.Get("X-Amz-Signature")) - assert.Equal(t, expectedCred, urlQ.Get("X-Amz-Credential")) - assert.Equal(t, expectedHeaders, urlQ.Get("X-Amz-SignedHeaders")) - assert.Equal(t, expectedDate, urlQ.Get("X-Amz-Date")) - assert.Equal(t, expectedHeaderMap, headers) - assert.Equal(t, "300", urlQ.Get("X-Amz-Expires")) - - assert.NotContains(t, urlstr, "+") // + encoded as %20 + if e, a := expectedHost, u.Host; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := expectedSig, urlQ.Get("X-Amz-Signature"); e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := expectedCred, urlQ.Get("X-Amz-Credential"); e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := expectedHeaders, urlQ.Get("X-Amz-SignedHeaders"); e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := expectedDate, urlQ.Get("X-Amz-Date"); e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := expectedHeaderMap, headers; !reflect.DeepEqual(e, a) { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "300", urlQ.Get("X-Amz-Expires"); e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "UNSIGNED-PAYLOAD", urlQ.Get("X-Amz-Content-Sha256"); e != a { + t.Errorf("expect %v, got %v", e, a) + } + + if e, a := "+", urlstr; strings.Contains(a, e) { // + encoded as %20 + t.Errorf("expect %v not to be in %v", e, a) + } } func TestStandaloneSign_CustomURIEscape(t *testing.T) { @@ -107,14 +147,108 @@ func TestStandaloneSign_CustomURIEscape(t *testing.T) { host := "https://subdomain.us-east-1.es.amazonaws.com" req, err := http.NewRequest("GET", host, nil) - assert.NoError(t, err) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } req.URL.Path = `/log-*/_search` req.URL.Opaque = "//subdomain.us-east-1.es.amazonaws.com/log-%2A/_search" _, err = signer.Sign(req, nil, "es", "us-east-1", time.Unix(0, 0)) - assert.NoError(t, err) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } actual := req.Header.Get("Authorization") - assert.Equal(t, expectSig, actual) + if e, a := expectSig, actual; e != a { + t.Errorf("expect %v, got %v", e, a) + } +} + +func TestStandaloneSign_WithPort(t *testing.T) { + + cases := []struct { + description string + url string + expectedSig string + }{ + { + "default HTTPS port", + "https://estest.us-east-1.es.amazonaws.com:443/_search", + "AWS4-HMAC-SHA256 Credential=AKID/19700101/us-east-1/es/aws4_request, SignedHeaders=host;x-amz-date;x-amz-security-token, Signature=e573fc9aa3a156b720976419319be98fb2824a3abc2ddd895ecb1d1611c6a82d", + }, + { + "default HTTP port", + "http://example.com:80/_search", + "AWS4-HMAC-SHA256 Credential=AKID/19700101/us-east-1/es/aws4_request, SignedHeaders=host;x-amz-date;x-amz-security-token, Signature=54ebe60c4ae03a40948b849e13c333523235f38002e2807059c64a9a8c7cb951", + }, + { + "non-standard HTTP port", + "http://example.com:9200/_search", + "AWS4-HMAC-SHA256 Credential=AKID/19700101/us-east-1/es/aws4_request, SignedHeaders=host;x-amz-date;x-amz-security-token, Signature=cd9d926a460f8d3b58b57beadbd87666dc667e014c0afaa4cea37b2867f51b4f", + }, + { + "non-standard HTTPS port", + "https://example.com:9200/_search", + "AWS4-HMAC-SHA256 Credential=AKID/19700101/us-east-1/es/aws4_request, SignedHeaders=host;x-amz-date;x-amz-security-token, Signature=cd9d926a460f8d3b58b57beadbd87666dc667e014c0afaa4cea37b2867f51b4f", + }, + } + + for _, c := range cases { + signer := v4.NewSigner(unit.Session.Config.Credentials) + req, _ := http.NewRequest("GET", c.url, nil) + _, err := signer.Sign(req, nil, "es", "us-east-1", time.Unix(0, 0)) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + actual := req.Header.Get("Authorization") + if e, a := c.expectedSig, actual; e != a { + t.Errorf("%s, expect %v, got %v", c.description, e, a) + } + } +} + +func TestStandalonePresign_WithPort(t *testing.T) { + + cases := []struct { + description string + url string + expectedSig string + }{ + { + "default HTTPS port", + "https://estest.us-east-1.es.amazonaws.com:443/_search", + "0abcf61a351063441296febf4b485734d780634fba8cf1e7d9769315c35255d6", + }, + { + "default HTTP port", + "http://example.com:80/_search", + "fce9976dd6c849c21adfa6d3f3e9eefc651d0e4a2ccd740d43efddcccfdc8179", + }, + { + "non-standard HTTP port", + "http://example.com:9200/_search", + "f33c25a81c735e42bef35ed5e9f720c43940562e3e616ff0777bf6dde75249b0", + }, + { + "non-standard HTTPS port", + "https://example.com:9200/_search", + "f33c25a81c735e42bef35ed5e9f720c43940562e3e616ff0777bf6dde75249b0", + }, + } + + for _, c := range cases { + signer := v4.NewSigner(unit.Session.Config.Credentials) + req, _ := http.NewRequest("GET", c.url, nil) + _, err := signer.Presign(req, nil, "es", "us-east-1", 5 * time.Minute, time.Unix(0, 0)) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + actual := req.URL.Query().Get("X-Amz-Signature") + if e, a := c.expectedSig, actual; e != a { + t.Errorf("%s, expect %v, got %v", c.description, e, a) + } + } } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/header_rules_test.go b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/header_rules_test.go index 7dfddc8..f4be951 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/header_rules_test.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/header_rules_test.go @@ -2,8 +2,6 @@ package v4 import ( "testing" - - "github.com/stretchr/testify/assert" ) func TestRuleCheckWhitelist(t *testing.T) { @@ -13,8 +11,12 @@ func TestRuleCheckWhitelist(t *testing.T) { }, } - assert.True(t, w.IsValid("Cache-Control")) - assert.False(t, w.IsValid("Cache-")) + if !w.IsValid("Cache-Control") { + t.Error("expected true value") + } + if w.IsValid("Cache-") { + t.Error("expected false value") + } } func TestRuleCheckBlacklist(t *testing.T) { @@ -24,16 +26,26 @@ func TestRuleCheckBlacklist(t *testing.T) { }, } - assert.False(t, b.IsValid("Cache-Control")) - assert.True(t, b.IsValid("Cache-")) + if b.IsValid("Cache-Control") { + t.Error("expected false value") + } + if !b.IsValid("Cache-") { + t.Error("expected true value") + } } func TestRuleCheckPattern(t *testing.T) { p := patterns{"X-Amz-Meta-"} - assert.True(t, p.IsValid("X-Amz-Meta-")) - assert.True(t, p.IsValid("X-Amz-Meta-Star")) - assert.False(t, p.IsValid("Cache-")) + if !p.IsValid("X-Amz-Meta-") { + t.Error("expected true value") + } + if !p.IsValid("X-Amz-Meta-Star") { + t.Error("expected true value") + } + if p.IsValid("Cache-") { + t.Error("expected false value") + } } func TestRuleComplexWhitelist(t *testing.T) { @@ -50,8 +62,16 @@ func TestRuleComplexWhitelist(t *testing.T) { inclusiveRules{patterns{"X-Amz-"}, blacklist{w}}, } - assert.True(t, r.IsValid("X-Amz-Blah")) - assert.False(t, r.IsValid("X-Amz-Meta-")) - assert.False(t, r.IsValid("X-Amz-Meta-Star")) - assert.False(t, r.IsValid("Cache-Control")) + if !r.IsValid("X-Amz-Blah") { + t.Error("expected true value") + } + if r.IsValid("X-Amz-Meta-") { + t.Error("expected false value") + } + if r.IsValid("X-Amz-Meta-Star") { + t.Error("expected false value") + } + if r.IsValid("Cache-Control") { + t.Error("expected false value") + } } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go index 434ac87..6e46376 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go @@ -45,7 +45,7 @@ // If signing a request intended for HTTP2 server, and you're using Go 1.6.2 // through 1.7.4 you should use the URL.RawPath as the pre-escaped form of the // request URL. https://github.com/golang/go/issues/16847 points to a bug in -// Go pre 1.8 that failes to make HTTP2 requests using absolute URL in the HTTP +// Go pre 1.8 that fails to make HTTP2 requests using absolute URL in the HTTP // message. URL.Opaque generally will force Go to make requests with absolute URL. // URL.RawPath does not do this, but RawPath must be a valid escaping of Path // or url.EscapedPath will ignore the RawPath escaping. @@ -55,7 +55,6 @@ package v4 import ( - "bytes" "crypto/hmac" "crypto/sha256" "encoding/hex" @@ -72,6 +71,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/internal/sdkio" "github.com/aws/aws-sdk-go/private/protocol/rest" ) @@ -269,7 +269,7 @@ type signingCtx struct { // "X-Amz-Content-Sha256" header with a precomputed value. The signer will // only compute the hash if the request header value is empty. func (v4 Signer) Sign(r *http.Request, body io.ReadSeeker, service, region string, signTime time.Time) (http.Header, error) { - return v4.signWithBody(r, body, service, region, 0, signTime) + return v4.signWithBody(r, body, service, region, 0, false, signTime) } // Presign signs AWS v4 requests with the provided body, service name, region @@ -303,10 +303,10 @@ func (v4 Signer) Sign(r *http.Request, body io.ReadSeeker, service, region strin // presigned request's signature you can set the "X-Amz-Content-Sha256" // HTTP header and that will be included in the request's signature. func (v4 Signer) Presign(r *http.Request, body io.ReadSeeker, service, region string, exp time.Duration, signTime time.Time) (http.Header, error) { - return v4.signWithBody(r, body, service, region, exp, signTime) + return v4.signWithBody(r, body, service, region, exp, true, signTime) } -func (v4 Signer) signWithBody(r *http.Request, body io.ReadSeeker, service, region string, exp time.Duration, signTime time.Time) (http.Header, error) { +func (v4 Signer) signWithBody(r *http.Request, body io.ReadSeeker, service, region string, exp time.Duration, isPresign bool, signTime time.Time) (http.Header, error) { currentTimeFn := v4.currentTimeFn if currentTimeFn == nil { currentTimeFn = time.Now @@ -318,7 +318,7 @@ func (v4 Signer) signWithBody(r *http.Request, body io.ReadSeeker, service, regi Query: r.URL.Query(), Time: signTime, ExpireTime: exp, - isPresign: exp != 0, + isPresign: isPresign, ServiceName: service, Region: region, DisableURIPathEscaping: v4.DisableURIPathEscaping, @@ -340,8 +340,11 @@ func (v4 Signer) signWithBody(r *http.Request, body io.ReadSeeker, service, regi return http.Header{}, err } + ctx.sanitizeHostForHeader() ctx.assignAmzQueryValues() - ctx.build(v4.DisableHeaderHoisting) + if err := ctx.build(v4.DisableHeaderHoisting); err != nil { + return nil, err + } // If the request is not presigned the body should be attached to it. This // prevents the confusion of wanting to send a signed request without @@ -364,6 +367,10 @@ func (v4 Signer) signWithBody(r *http.Request, body io.ReadSeeker, service, regi return ctx.SignedHeaderVals, nil } +func (ctx *signingCtx) sanitizeHostForHeader() { + request.SanitizeHostForHeader(ctx.Request) +} + func (ctx *signingCtx) handlePresignRemoval() { if !ctx.isPresign { return @@ -402,7 +409,7 @@ var SignRequestHandler = request.NamedHandler{ } // SignSDKRequest signs an AWS request with the V4 signature. This -// request handler is bested used only with the SDK's built in service client's +// request handler should only be used with the SDK's built in service client's // API operation requests. // // This function should not be used on its on its own, but in conjunction with @@ -468,7 +475,7 @@ func signSDKRequestWithCurrTime(req *request.Request, curTimeFn func() time.Time } signedHeaders, err := v4.signWithBody(req.HTTPRequest, req.GetBody(), - name, region, req.ExpireTime, signingTime, + name, region, req.ExpireTime, req.ExpireTime > 0, signingTime, ) if err != nil { req.Error = err @@ -499,10 +506,14 @@ func (v4 *Signer) logSigningInfo(ctx *signingCtx) { v4.Logger.Log(msg) } -func (ctx *signingCtx) build(disableHeaderHoisting bool) { +func (ctx *signingCtx) build(disableHeaderHoisting bool) error { ctx.buildTime() // no depends ctx.buildCredentialString() // no depends + if err := ctx.buildBodyDigest(); err != nil { + return err + } + unsignedHeaders := ctx.Request.Header if ctx.isPresign { if !disableHeaderHoisting { @@ -514,7 +525,6 @@ func (ctx *signingCtx) build(disableHeaderHoisting bool) { } } - ctx.buildBodyDigest() ctx.buildCanonicalHeaders(ignoredHeaders, unsignedHeaders) ctx.buildCanonicalString() // depends on canon headers / signed headers ctx.buildStringToSign() // depends on canon string @@ -530,6 +540,8 @@ func (ctx *signingCtx) build(disableHeaderHoisting bool) { } ctx.Request.Header.Set("Authorization", strings.Join(parts, ", ")) } + + return nil } func (ctx *signingCtx) buildTime() { @@ -604,14 +616,18 @@ func (ctx *signingCtx) buildCanonicalHeaders(r rule, header http.Header) { headerValues := make([]string, len(headers)) for i, k := range headers { if k == "host" { - headerValues[i] = "host:" + ctx.Request.URL.Host + if ctx.Request.Host != "" { + headerValues[i] = "host:" + ctx.Request.Host + } else { + headerValues[i] = "host:" + ctx.Request.URL.Host + } } else { headerValues[i] = k + ":" + strings.Join(ctx.SignedHeaderVals[k], ",") } } - - ctx.canonicalHeaders = strings.Join(stripExcessSpaces(headerValues), "\n") + stripExcessSpaces(headerValues) + ctx.canonicalHeaders = strings.Join(headerValues, "\n") } func (ctx *signingCtx) buildCanonicalString() { @@ -652,7 +668,7 @@ func (ctx *signingCtx) buildSignature() { ctx.signature = hex.EncodeToString(signature) } -func (ctx *signingCtx) buildBodyDigest() { +func (ctx *signingCtx) buildBodyDigest() error { hash := ctx.Request.Header.Get("X-Amz-Content-Sha256") if hash == "" { if ctx.unsignedPayload || (ctx.isPresign && ctx.ServiceName == "s3") { @@ -660,6 +676,9 @@ func (ctx *signingCtx) buildBodyDigest() { } else if ctx.Body == nil { hash = emptyStringSHA256 } else { + if !aws.IsReaderSeekable(ctx.Body) { + return fmt.Errorf("cannot use unseekable request body %T, for signed request with body", ctx.Body) + } hash = hex.EncodeToString(makeSha256Reader(ctx.Body)) } if ctx.unsignedPayload || ctx.ServiceName == "s3" || ctx.ServiceName == "glacier" { @@ -667,6 +686,8 @@ func (ctx *signingCtx) buildBodyDigest() { } } ctx.bodyDigest = hash + + return nil } // isRequestSigned returns if the request is currently signed or presigned @@ -706,56 +727,53 @@ func makeSha256(data []byte) []byte { func makeSha256Reader(reader io.ReadSeeker) []byte { hash := sha256.New() - start, _ := reader.Seek(0, 1) - defer reader.Seek(start, 0) + start, _ := reader.Seek(0, sdkio.SeekCurrent) + defer reader.Seek(start, sdkio.SeekStart) io.Copy(hash, reader) return hash.Sum(nil) } -const doubleSpaces = " " +const doubleSpace = " " -var doubleSpaceBytes = []byte(doubleSpaces) - -func stripExcessSpaces(headerVals []string) []string { - vals := make([]string, len(headerVals)) - for i, str := range headerVals { - // Trim leading and trailing spaces - trimmed := strings.TrimSpace(str) +// stripExcessSpaces will rewrite the passed in slice's string values to not +// contain muliple side-by-side spaces. +func stripExcessSpaces(vals []string) { + var j, k, l, m, spaces int + for i, str := range vals { + // Trim trailing spaces + for j = len(str) - 1; j >= 0 && str[j] == ' '; j-- { + } - idx := strings.Index(trimmed, doubleSpaces) - var buf []byte - for idx > -1 { - // Multiple adjacent spaces found - if buf == nil { - // first time create the buffer - buf = []byte(trimmed) - } + // Trim leading spaces + for k = 0; k < j && str[k] == ' '; k++ { + } + str = str[k : j+1] - stripToIdx := -1 - for j := idx + 1; j < len(buf); j++ { - if buf[j] != ' ' { - buf = append(buf[:idx+1], buf[j:]...) - stripToIdx = j - break - } - } + // Strip multiple spaces. + j = strings.Index(str, doubleSpace) + if j < 0 { + vals[i] = str + continue + } - if stripToIdx >= 0 { - idx = bytes.Index(buf[stripToIdx:], doubleSpaceBytes) - if idx >= 0 { - idx += stripToIdx + buf := []byte(str) + for k, m, l = j, j, len(buf); k < l; k++ { + if buf[k] == ' ' { + if spaces == 0 { + // First space. + buf[m] = buf[k] + m++ } + spaces++ } else { - idx = -1 + // End of multiple spaces. + spaces = 0 + buf[m] = buf[k] + m++ } } - if buf != nil { - vals[i] = string(buf) - } else { - vals[i] = trimmed - } + vals[i] = string(buf[:m]) } - return vals } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4_test.go b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4_test.go index 72763fd..16bc737 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4_test.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4_test.go @@ -6,12 +6,12 @@ import ( "io/ioutil" "net/http" "net/http/httptest" + "reflect" + "strconv" "strings" "testing" "time" - "github.com/stretchr/testify/assert" - "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/aws/request" @@ -20,45 +20,84 @@ import ( func TestStripExcessHeaders(t *testing.T) { vals := []string{ + "", "123", "1 2 3", + "1 2 3 ", " 1 2 3", "1 2 3", "1 23", "1 2 3", "1 2 ", " 1 2 ", + "12 3", + "12 3 1", + "12 3 1", + "12 3 1abc123", } expected := []string{ + "", "123", "1 2 3", "1 2 3", "1 2 3", + "1 2 3", "1 23", "1 2 3", "1 2", "1 2", + "12 3", + "12 3 1", + "12 3 1", + "12 3 1abc123", } - newVals := stripExcessSpaces(vals) - for i := 0; i < len(newVals); i++ { - assert.Equal(t, expected[i], newVals[i], "test: %d", i) + stripExcessSpaces(vals) + for i := 0; i < len(vals); i++ { + if e, a := expected[i], vals[i]; e != a { + t.Errorf("%d, expect %v, got %v", i, e, a) + } } } func buildRequest(serviceName, region, body string) (*http.Request, io.ReadSeeker) { - endpoint := "https://" + serviceName + "." + region + ".amazonaws.com" reader := strings.NewReader(body) - req, _ := http.NewRequest("POST", endpoint, reader) + return buildRequestWithBodyReader(serviceName, region, reader) +} + +func buildRequestWithBodyReader(serviceName, region string, body io.Reader) (*http.Request, io.ReadSeeker) { + var bodyLen int + + type lenner interface { + Len() int + } + if lr, ok := body.(lenner); ok { + bodyLen = lr.Len() + } + + endpoint := "https://" + serviceName + "." + region + ".amazonaws.com" + req, _ := http.NewRequest("POST", endpoint, body) req.URL.Opaque = "//example.org/bucket/key-._~,!@#$%^&*()" - req.Header.Add("X-Amz-Target", "prefix.Operation") - req.Header.Add("Content-Type", "application/x-amz-json-1.0") - req.Header.Add("Content-Length", string(len(body))) - req.Header.Add("X-Amz-Meta-Other-Header", "some-value=!@#$%^&* (+)") + req.Header.Set("X-Amz-Target", "prefix.Operation") + req.Header.Set("Content-Type", "application/x-amz-json-1.0") + + if bodyLen > 0 { + req.Header.Set("Content-Length", strconv.Itoa(bodyLen)) + } + + req.Header.Set("X-Amz-Meta-Other-Header", "some-value=!@#$%^&* (+)") req.Header.Add("X-Amz-Meta-Other-Header_With_Underscore", "some-value=!@#$%^&* (+)") req.Header.Add("X-amz-Meta-Other-Header_With_Underscore", "some-value=!@#$%^&* (+)") - return req, reader + + var seeker io.ReadSeeker + if sr, ok := body.(io.ReadSeeker); ok { + seeker = sr + } else { + seeker = aws.ReadSeekCloser(body) + } + + return req, seeker } func buildSigner() Signer { @@ -88,17 +127,29 @@ func TestPresignRequest(t *testing.T) { expectedDate := "19700101T000000Z" expectedHeaders := "content-length;content-type;host;x-amz-meta-other-header;x-amz-meta-other-header_with_underscore" - expectedSig := "ea7856749041f727690c580569738282e99c79355fe0d8f125d3b5535d2ece83" + expectedSig := "122f0b9e091e4ba84286097e2b3404a1f1f4c4aad479adda95b7dff0ccbe5581" expectedCred := "AKID/19700101/us-east-1/dynamodb/aws4_request" expectedTarget := "prefix.Operation" q := req.URL.Query() - assert.Equal(t, expectedSig, q.Get("X-Amz-Signature")) - assert.Equal(t, expectedCred, q.Get("X-Amz-Credential")) - assert.Equal(t, expectedHeaders, q.Get("X-Amz-SignedHeaders")) - assert.Equal(t, expectedDate, q.Get("X-Amz-Date")) - assert.Empty(t, q.Get("X-Amz-Meta-Other-Header")) - assert.Equal(t, expectedTarget, q.Get("X-Amz-Target")) + if e, a := expectedSig, q.Get("X-Amz-Signature"); e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := expectedCred, q.Get("X-Amz-Credential"); e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := expectedHeaders, q.Get("X-Amz-SignedHeaders"); e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := expectedDate, q.Get("X-Amz-Date"); e != a { + t.Errorf("expect %v, got %v", e, a) + } + if a := q.Get("X-Amz-Meta-Other-Header"); len(a) != 0 { + t.Errorf("expect %v to be empty", a) + } + if e, a := expectedTarget, q.Get("X-Amz-Target"); e != a { + t.Errorf("expect %v, got %v", e, a) + } } func TestPresignBodyWithArrayRequest(t *testing.T) { @@ -110,17 +161,29 @@ func TestPresignBodyWithArrayRequest(t *testing.T) { expectedDate := "19700101T000000Z" expectedHeaders := "content-length;content-type;host;x-amz-meta-other-header;x-amz-meta-other-header_with_underscore" - expectedSig := "fef6002062400bbf526d70f1a6456abc0fb2e213fe1416012737eebd42a62924" + expectedSig := "e3ac55addee8711b76c6d608d762cff285fe8b627a057f8b5ec9268cf82c08b1" expectedCred := "AKID/19700101/us-east-1/dynamodb/aws4_request" expectedTarget := "prefix.Operation" q := req.URL.Query() - assert.Equal(t, expectedSig, q.Get("X-Amz-Signature")) - assert.Equal(t, expectedCred, q.Get("X-Amz-Credential")) - assert.Equal(t, expectedHeaders, q.Get("X-Amz-SignedHeaders")) - assert.Equal(t, expectedDate, q.Get("X-Amz-Date")) - assert.Empty(t, q.Get("X-Amz-Meta-Other-Header")) - assert.Equal(t, expectedTarget, q.Get("X-Amz-Target")) + if e, a := expectedSig, q.Get("X-Amz-Signature"); e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := expectedCred, q.Get("X-Amz-Credential"); e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := expectedHeaders, q.Get("X-Amz-SignedHeaders"); e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := expectedDate, q.Get("X-Amz-Date"); e != a { + t.Errorf("expect %v, got %v", e, a) + } + if a := q.Get("X-Amz-Meta-Other-Header"); len(a) != 0 { + t.Errorf("expect %v to be empty, was not", a) + } + if e, a := expectedTarget, q.Get("X-Amz-Target"); e != a { + t.Errorf("expect %v, got %v", e, a) + } } func TestSignRequest(t *testing.T) { @@ -129,11 +192,15 @@ func TestSignRequest(t *testing.T) { signer.Sign(req, body, "dynamodb", "us-east-1", time.Unix(0, 0)) expectedDate := "19700101T000000Z" - expectedSig := "AWS4-HMAC-SHA256 Credential=AKID/19700101/us-east-1/dynamodb/aws4_request, SignedHeaders=content-length;content-type;host;x-amz-date;x-amz-meta-other-header;x-amz-meta-other-header_with_underscore;x-amz-security-token;x-amz-target, Signature=ea766cabd2ec977d955a3c2bae1ae54f4515d70752f2207618396f20aa85bd21" + expectedSig := "AWS4-HMAC-SHA256 Credential=AKID/19700101/us-east-1/dynamodb/aws4_request, SignedHeaders=content-length;content-type;host;x-amz-date;x-amz-meta-other-header;x-amz-meta-other-header_with_underscore;x-amz-security-token;x-amz-target, Signature=a518299330494908a70222cec6899f6f32f297f8595f6df1776d998936652ad9" q := req.Header - assert.Equal(t, expectedSig, q.Get("Authorization")) - assert.Equal(t, expectedDate, q.Get("X-Amz-Date")) + if e, a := expectedSig, q.Get("Authorization"); e != a { + t.Errorf("expect\n%v\nactual\n%v\n", e, a) + } + if e, a := expectedDate, q.Get("X-Amz-Date"); e != a { + t.Errorf("expect\n%v\nactual\n%v\n", e, a) + } } func TestSignBodyS3(t *testing.T) { @@ -141,7 +208,9 @@ func TestSignBodyS3(t *testing.T) { signer := buildSigner() signer.Sign(req, body, "s3", "us-east-1", time.Now()) hash := req.Header.Get("X-Amz-Content-Sha256") - assert.Equal(t, "2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824", hash) + if e, a := "2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824", hash; e != a { + t.Errorf("expect %v, got %v", e, a) + } } func TestSignBodyGlacier(t *testing.T) { @@ -149,7 +218,9 @@ func TestSignBodyGlacier(t *testing.T) { signer := buildSigner() signer.Sign(req, body, "glacier", "us-east-1", time.Now()) hash := req.Header.Get("X-Amz-Content-Sha256") - assert.Equal(t, "2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824", hash) + if e, a := "2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824", hash; e != a { + t.Errorf("expect %v, got %v", e, a) + } } func TestPresignEmptyBodyS3(t *testing.T) { @@ -157,7 +228,56 @@ func TestPresignEmptyBodyS3(t *testing.T) { signer := buildSigner() signer.Presign(req, body, "s3", "us-east-1", 5*time.Minute, time.Now()) hash := req.Header.Get("X-Amz-Content-Sha256") - assert.Equal(t, "UNSIGNED-PAYLOAD", hash) + if e, a := "UNSIGNED-PAYLOAD", hash; e != a { + t.Errorf("expect %v, got %v", e, a) + } +} + +func TestSignUnseekableBody(t *testing.T) { + req, body := buildRequestWithBodyReader("mock-service", "mock-region", bytes.NewBuffer([]byte("hello"))) + signer := buildSigner() + _, err := signer.Sign(req, body, "mock-service", "mock-region", time.Now()) + if err == nil { + t.Fatalf("expect error signing request") + } + + if e, a := "unseekable request body", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %q to be in %q", e, a) + } +} + +func TestSignUnsignedPayloadUnseekableBody(t *testing.T) { + req, body := buildRequestWithBodyReader("mock-service", "mock-region", bytes.NewBuffer([]byte("hello"))) + + signer := buildSigner() + signer.UnsignedPayload = true + + _, err := signer.Sign(req, body, "mock-service", "mock-region", time.Now()) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + hash := req.Header.Get("X-Amz-Content-Sha256") + if e, a := "UNSIGNED-PAYLOAD", hash; e != a { + t.Errorf("expect %v, got %v", e, a) + } +} + +func TestSignPreComputedHashUnseekableBody(t *testing.T) { + req, body := buildRequestWithBodyReader("mock-service", "mock-region", bytes.NewBuffer([]byte("hello"))) + + signer := buildSigner() + + req.Header.Set("X-Amz-Content-Sha256", "some-content-sha256") + _, err := signer.Sign(req, body, "mock-service", "mock-region", time.Now()) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + hash := req.Header.Get("X-Amz-Content-Sha256") + if e, a := "some-content-sha256", hash; e != a { + t.Errorf("expect %v, got %v", e, a) + } } func TestSignPrecomputedBodyChecksum(t *testing.T) { @@ -166,7 +286,9 @@ func TestSignPrecomputedBodyChecksum(t *testing.T) { signer := buildSigner() signer.Sign(req, body, "dynamodb", "us-east-1", time.Now()) hash := req.Header.Get("X-Amz-Content-Sha256") - assert.Equal(t, "PRECOMPUTED", hash) + if e, a := "PRECOMPUTED", hash; e != a { + t.Errorf("expect %v, got %v", e, a) + } } func TestAnonymousCredentials(t *testing.T) { @@ -183,14 +305,26 @@ func TestAnonymousCredentials(t *testing.T) { SignSDKRequest(r) urlQ := r.HTTPRequest.URL.Query() - assert.Empty(t, urlQ.Get("X-Amz-Signature")) - assert.Empty(t, urlQ.Get("X-Amz-Credential")) - assert.Empty(t, urlQ.Get("X-Amz-SignedHeaders")) - assert.Empty(t, urlQ.Get("X-Amz-Date")) + if a := urlQ.Get("X-Amz-Signature"); len(a) != 0 { + t.Errorf("expect %v to be empty, was not", a) + } + if a := urlQ.Get("X-Amz-Credential"); len(a) != 0 { + t.Errorf("expect %v to be empty, was not", a) + } + if a := urlQ.Get("X-Amz-SignedHeaders"); len(a) != 0 { + t.Errorf("expect %v to be empty, was not", a) + } + if a := urlQ.Get("X-Amz-Date"); len(a) != 0 { + t.Errorf("expect %v to be empty, was not", a) + } hQ := r.HTTPRequest.Header - assert.Empty(t, hQ.Get("Authorization")) - assert.Empty(t, hQ.Get("X-Amz-Date")) + if a := hQ.Get("Authorization"); len(a) != 0 { + t.Errorf("expect %v to be empty, was not", a) + } + if a := hQ.Get("X-Amz-Date"); len(a) != 0 { + t.Errorf("expect %v to be empty, was not", a) + } } func TestIgnoreResignRequestWithValidCreds(t *testing.T) { @@ -216,7 +350,9 @@ func TestIgnoreResignRequestWithValidCreds(t *testing.T) { // when it is resigned. return time.Now().Add(1 * time.Second) }) - assert.NotEqual(t, sig, r.HTTPRequest.Header.Get("Authorization")) + if e, a := sig, r.HTTPRequest.Header.Get("Authorization"); e == a { + t.Errorf("expect %v to be %v, but was not", e, a) + } } func TestIgnorePreResignRequestWithValidCreds(t *testing.T) { @@ -243,7 +379,9 @@ func TestIgnorePreResignRequestWithValidCreds(t *testing.T) { // when it is resigned. return time.Now().Add(1 * time.Second) }) - assert.NotEqual(t, sig, r.HTTPRequest.URL.Query().Get("X-Amz-Signature")) + if e, a := sig, r.HTTPRequest.URL.Query().Get("X-Amz-Signature"); e == a { + t.Errorf("expect %v to be %v, but was not", e, a) + } } func TestResignRequestExpiredCreds(t *testing.T) { @@ -267,8 +405,12 @@ func TestResignRequestExpiredCreds(t *testing.T) { break } } - assert.NotEmpty(t, origSignedHeaders) - assert.NotContains(t, origSignedHeaders, "authorization") + if a := origSignedHeaders; len(a) == 0 { + t.Errorf("expect not to be empty, but was") + } + if e, a := origSignedHeaders, "authorization"; strings.Contains(a, e) { + t.Errorf("expect %v to not be in %v, but was", e, a) + } origSignedAt := r.LastSignedAt creds.Expire() @@ -279,7 +421,9 @@ func TestResignRequestExpiredCreds(t *testing.T) { return time.Now().Add(1 * time.Second) }) updatedQuerySig := r.HTTPRequest.Header.Get("Authorization") - assert.NotEqual(t, querySig, updatedQuerySig) + if e, a := querySig, updatedQuerySig; e == a { + t.Errorf("expect %v to be %v, was not", e, a) + } var updatedSignedHeaders string for _, p := range strings.Split(updatedQuerySig, ", ") { @@ -288,9 +432,15 @@ func TestResignRequestExpiredCreds(t *testing.T) { break } } - assert.NotEmpty(t, updatedSignedHeaders) - assert.NotContains(t, updatedQuerySig, "authorization") - assert.NotEqual(t, origSignedAt, r.LastSignedAt) + if a := updatedSignedHeaders; len(a) == 0 { + t.Errorf("expect not to be empty, but was") + } + if e, a := updatedQuerySig, "authorization"; strings.Contains(a, e) { + t.Errorf("expect %v to not be in %v, but was", e, a) + } + if e, a := origSignedAt, r.LastSignedAt; e == a { + t.Errorf("expect %v to be %v, was not", e, a) + } } func TestPreResignRequestExpiredCreds(t *testing.T) { @@ -315,7 +465,9 @@ func TestPreResignRequestExpiredCreds(t *testing.T) { SignSDKRequest(r) querySig := r.HTTPRequest.URL.Query().Get("X-Amz-Signature") signedHeaders := r.HTTPRequest.URL.Query().Get("X-Amz-SignedHeaders") - assert.NotEmpty(t, signedHeaders) + if a := signedHeaders; len(a) == 0 { + t.Errorf("expect not to be empty, but was") + } origSignedAt := r.LastSignedAt creds.Expire() @@ -324,11 +476,19 @@ func TestPreResignRequestExpiredCreds(t *testing.T) { // Simulate the request occurred 15 minutes in the past return time.Now().Add(-48 * time.Hour) }) - assert.NotEqual(t, querySig, r.HTTPRequest.URL.Query().Get("X-Amz-Signature")) + if e, a := querySig, r.HTTPRequest.URL.Query().Get("X-Amz-Signature"); e == a { + t.Errorf("expect %v to be %v, was not", e, a) + } resignedHeaders := r.HTTPRequest.URL.Query().Get("X-Amz-SignedHeaders") - assert.Equal(t, signedHeaders, resignedHeaders) - assert.NotContains(t, signedHeaders, "x-amz-signedHeaders") - assert.NotEqual(t, origSignedAt, r.LastSignedAt) + if e, a := signedHeaders, resignedHeaders; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := signedHeaders, "x-amz-signedHeaders"; strings.Contains(a, e) { + t.Errorf("expect %v to not be in %v, but was", e, a) + } + if e, a := origSignedAt, r.LastSignedAt; e == a { + t.Errorf("expect %v to be %v, was not", e, a) + } } func TestResignRequestExpiredRequest(t *testing.T) { @@ -352,8 +512,12 @@ func TestResignRequestExpiredRequest(t *testing.T) { // Simulate the request occurred 15 minutes in the past return time.Now().Add(15 * time.Minute) }) - assert.NotEqual(t, querySig, r.HTTPRequest.Header.Get("Authorization")) - assert.NotEqual(t, origSignedAt, r.LastSignedAt) + if e, a := querySig, r.HTTPRequest.Header.Get("Authorization"); e == a { + t.Errorf("expect %v to be %v, was not", e, a) + } + if e, a := origSignedAt, r.LastSignedAt; e == a { + t.Errorf("expect %v to be %v, was not", e, a) + } } func TestSignWithRequestBody(t *testing.T) { @@ -365,19 +529,29 @@ func TestSignWithRequestBody(t *testing.T) { server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { b, err := ioutil.ReadAll(r.Body) r.Body.Close() - assert.NoError(t, err) - assert.Equal(t, expectBody, b) + if err != nil { + t.Errorf("expect no error, got %v", err) + } + if e, a := expectBody, b; !reflect.DeepEqual(e, a) { + t.Errorf("expect %v, got %v", e, a) + } w.WriteHeader(http.StatusOK) })) req, err := http.NewRequest("POST", server.URL, nil) _, err = signer.Sign(req, bytes.NewReader(expectBody), "service", "region", time.Now()) - assert.NoError(t, err) + if err != nil { + t.Errorf("expect not no error, got %v", err) + } resp, err := http.DefaultClient.Do(req) - assert.NoError(t, err) - assert.Equal(t, http.StatusOK, resp.StatusCode) + if err != nil { + t.Errorf("expect not no error, got %v", err) + } + if e, a := http.StatusOK, resp.StatusCode; e != a { + t.Errorf("expect %v, got %v", e, a) + } } func TestSignWithRequestBody_Overwrite(t *testing.T) { @@ -389,8 +563,12 @@ func TestSignWithRequestBody_Overwrite(t *testing.T) { server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { b, err := ioutil.ReadAll(r.Body) r.Body.Close() - assert.NoError(t, err) - assert.Equal(t, len(expectBody), len(b)) + if err != nil { + t.Errorf("expect not no error, got %v", err) + } + if e, a := len(expectBody), len(b); e != a { + t.Errorf("expect %v, got %v", e, a) + } w.WriteHeader(http.StatusOK) })) @@ -399,11 +577,17 @@ func TestSignWithRequestBody_Overwrite(t *testing.T) { _, err = signer.Sign(req, nil, "service", "region", time.Now()) req.ContentLength = 0 - assert.NoError(t, err) + if err != nil { + t.Errorf("expect not no error, got %v", err) + } resp, err := http.DefaultClient.Do(req) - assert.NoError(t, err) - assert.Equal(t, http.StatusOK, resp.StatusCode) + if err != nil { + t.Errorf("expect not no error, got %v", err) + } + if e, a := http.StatusOK, resp.StatusCode; e != a { + t.Errorf("expect %v, got %v", e, a) + } } func TestBuildCanonicalRequest(t *testing.T) { @@ -421,7 +605,9 @@ func TestBuildCanonicalRequest(t *testing.T) { ctx.buildCanonicalString() expected := "https://example.org/bucket/key-._~,!@#$%^&*()?Foo=z&Foo=o&Foo=m&Foo=a" - assert.Equal(t, expected, ctx.Request.URL.String()) + if e, a := expected, ctx.Request.URL.String(); e != a { + t.Errorf("expect %v, got %v", e, a) + } } func TestSignWithBody_ReplaceRequestBody(t *testing.T) { @@ -463,7 +649,27 @@ func TestSignWithBody_NoReplaceRequestBody(t *testing.T) { } if req.Body != origBody { - t.Errorf("expeect request body to not be chagned") + t.Errorf("expect request body to not be chagned") + } +} + +func TestRequestHost(t *testing.T) { + req, body := buildRequest("dynamodb", "us-east-1", "{}") + req.URL.RawQuery = "Foo=z&Foo=o&Foo=m&Foo=a" + req.Host = "myhost" + ctx := &signingCtx{ + ServiceName: "dynamodb", + Region: "us-east-1", + Request: req, + Body: body, + Query: req.URL.Query(), + Time: time.Now(), + ExpireTime: 5 * time.Second, + } + + ctx.buildCanonicalHeaders(ignoredHeaders, ctx.Request.Header) + if !strings.Contains(ctx.canonicalHeaders, "host:"+req.Host) { + t.Errorf("canonical host header invalid") } } @@ -483,15 +689,29 @@ func BenchmarkSignRequest(b *testing.B) { } } -func BenchmarkStripExcessSpaces(b *testing.B) { - vals := []string{ - `AWS4-HMAC-SHA256 Credential=AKIDFAKEIDFAKEID/20160628/us-west-2/s3/aws4_request, SignedHeaders=host;x-amz-date, Signature=1234567890abcdef1234567890abcdef1234567890abcdef`, - `123 321 123 321`, - ` 123 321 123 321 `, - } +var stripExcessSpaceCases = []string{ + `AWS4-HMAC-SHA256 Credential=AKIDFAKEIDFAKEID/20160628/us-west-2/s3/aws4_request, SignedHeaders=host;x-amz-date, Signature=1234567890abcdef1234567890abcdef1234567890abcdef`, + `123 321 123 321`, + ` 123 321 123 321 `, + ` 123 321 123 321 `, + "123", + "1 2 3", + " 1 2 3", + "1 2 3", + "1 23", + "1 2 3", + "1 2 ", + " 1 2 ", + "12 3", + "12 3 1", + "12 3 1", + "12 3 1abc123", +} - b.ResetTimer() +func BenchmarkStripExcessSpaces(b *testing.B) { for i := 0; i < b.N; i++ { - stripExcessSpaces(vals) + // Make sure to start with a copy of the cases + cases := append([]string{}, stripExcessSpaceCases...) + stripExcessSpaces(cases) } } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/types.go b/vendor/github.com/aws/aws-sdk-go/aws/types.go index 0e2d864..8b6f234 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/types.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/types.go @@ -3,6 +3,8 @@ package aws import ( "io" "sync" + + "github.com/aws/aws-sdk-go/internal/sdkio" ) // ReadSeekCloser wraps a io.Reader returning a ReaderSeekerCloser. Should @@ -22,6 +24,22 @@ type ReaderSeekerCloser struct { r io.Reader } +// IsReaderSeekable returns if the underlying reader type can be seeked. A +// io.Reader might not actually be seekable if it is the ReaderSeekerCloser +// type. +func IsReaderSeekable(r io.Reader) bool { + switch v := r.(type) { + case ReaderSeekerCloser: + return v.IsSeeker() + case *ReaderSeekerCloser: + return v.IsSeeker() + case io.ReadSeeker: + return true + default: + return false + } +} + // Read reads from the reader up to size of p. The number of bytes read, and // error if it occurred will be returned. // @@ -56,6 +74,71 @@ func (r ReaderSeekerCloser) IsSeeker() bool { return ok } +// HasLen returns the length of the underlying reader if the value implements +// the Len() int method. +func (r ReaderSeekerCloser) HasLen() (int, bool) { + type lenner interface { + Len() int + } + + if lr, ok := r.r.(lenner); ok { + return lr.Len(), true + } + + return 0, false +} + +// GetLen returns the length of the bytes remaining in the underlying reader. +// Checks first for Len(), then io.Seeker to determine the size of the +// underlying reader. +// +// Will return -1 if the length cannot be determined. +func (r ReaderSeekerCloser) GetLen() (int64, error) { + if l, ok := r.HasLen(); ok { + return int64(l), nil + } + + if s, ok := r.r.(io.Seeker); ok { + return seekerLen(s) + } + + return -1, nil +} + +// SeekerLen attempts to get the number of bytes remaining at the seeker's +// current position. Returns the number of bytes remaining or error. +func SeekerLen(s io.Seeker) (int64, error) { + // Determine if the seeker is actually seekable. ReaderSeekerCloser + // hides the fact that a io.Readers might not actually be seekable. + switch v := s.(type) { + case ReaderSeekerCloser: + return v.GetLen() + case *ReaderSeekerCloser: + return v.GetLen() + } + + return seekerLen(s) +} + +func seekerLen(s io.Seeker) (int64, error) { + curOffset, err := s.Seek(0, sdkio.SeekCurrent) + if err != nil { + return 0, err + } + + endOffset, err := s.Seek(0, sdkio.SeekEnd) + if err != nil { + return 0, err + } + + _, err = s.Seek(curOffset, sdkio.SeekStart) + if err != nil { + return 0, err + } + + return endOffset - curOffset, nil +} + // Close closes the ReaderSeekerCloser. // // If the ReaderSeekerCloser is not an io.Closer nothing will be done. diff --git a/vendor/github.com/aws/aws-sdk-go/aws/types_test.go b/vendor/github.com/aws/aws-sdk-go/aws/types_test.go index a7cd93b..e399ef5 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/types_test.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/types_test.go @@ -1,32 +1,49 @@ package aws import ( + "bytes" "math/rand" "testing" - - "github.com/stretchr/testify/assert" ) func TestWriteAtBuffer(t *testing.T) { b := &WriteAtBuffer{} n, err := b.WriteAt([]byte{1}, 0) - assert.NoError(t, err) - assert.Equal(t, 1, n) + if err != nil { + t.Errorf("expected no error, but received %v", err) + } + if e, a := 1, n; e != a { + t.Errorf("expected %d, but recieved %d", e, a) + } n, err = b.WriteAt([]byte{1, 1, 1}, 5) - assert.NoError(t, err) - assert.Equal(t, 3, n) + if err != nil { + t.Errorf("expected no error, but received %v", err) + } + if e, a := 3, n; e != a { + t.Errorf("expected %d, but recieved %d", e, a) + } n, err = b.WriteAt([]byte{2}, 1) - assert.NoError(t, err) - assert.Equal(t, 1, n) + if err != nil { + t.Errorf("expected no error, but received %v", err) + } + if e, a := 1, n; e != a { + t.Errorf("expected %d, but recieved %d", e, a) + } n, err = b.WriteAt([]byte{3}, 2) - assert.NoError(t, err) - assert.Equal(t, 1, n) + if err != nil { + t.Errorf("expected no error, but received %v", err) + } + if e, a := 1, n; e != a { + t.Errorf("expected %d, but received %d", e, a) + } - assert.Equal(t, []byte{1, 2, 3, 0, 0, 1, 1, 1}, b.Bytes()) + if !bytes.Equal([]byte{1, 2, 3, 0, 0, 1, 1, 1}, b.Bytes()) { + t.Errorf("expected %v, but received %v", []byte{1, 2, 3, 0, 0, 1, 1, 1}, b.Bytes()) + } } func BenchmarkWriteAtBuffer(b *testing.B) { diff --git a/vendor/github.com/aws/aws-sdk-go/aws/version.go b/vendor/github.com/aws/aws-sdk-go/aws/version.go index eeb6467..8b04328 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/version.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/version.go @@ -5,4 +5,4 @@ package aws const SDKName = "aws-sdk-go" // SDKVersion is the version of this SDK -const SDKVersion = "1.8.19" +const SDKVersion = "1.14.3" diff --git a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/Godeps/Readme b/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/Godeps/Readme deleted file mode 100644 index 4cdaa53..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/Godeps/Readme +++ /dev/null @@ -1,5 +0,0 @@ -This directory tree is generated automatically by godep. - -Please do not edit. - -See https://github.com/tools/godep for more information. diff --git a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/gen/gen.go b/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/gen/gen.go deleted file mode 100644 index 286d4bf..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/gen/gen.go +++ /dev/null @@ -1,200 +0,0 @@ -// +build go1.5,deprecated - -package main - -import ( - "bytes" - "go/format" - "io" - "os" - "path/filepath" - "sort" - "strings" - "text/template" - - "github.com/aws/aws-sdk-go/private/model/api" -) - -type pkg struct { - oldAPI *api.API - newAPI *api.API - shapes map[string]*shapentry - operations map[string]*opentry -} - -type shapentry struct { - oldShape *api.Shape - newShape *api.Shape -} - -type opentry struct { - oldName string - newName string -} - -type packageRenames struct { - Shapes map[string]string - Operations map[string]string - Fields map[string]string -} - -var exportMap = map[string]*packageRenames{} - -func generateRenames(w io.Writer) error { - tmpl, err := template.New("renames").Parse(t) - if err != nil { - return err - } - - out := bytes.NewBuffer(nil) - if err = tmpl.Execute(out, exportMap); err != nil { - return err - } - - b, err := format.Source(bytes.TrimSpace(out.Bytes())) - if err != nil { - return err - } - - _, err = io.Copy(w, bytes.NewReader(b)) - return err -} - -const t = ` -package rename - -// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. - -var renamedPackages = map[string]*packageRenames{ - {{ range $key, $entry := . }}"{{ $key }}": &packageRenames{ - operations: map[string]string{ - {{ range $old, $new := $entry.Operations }}"{{ $old }}": "{{ $new }}", - {{ end }} - }, - shapes: map[string]string{ - {{ range $old, $new := $entry.Shapes }}"{{ $old }}": "{{ $new }}", - {{ end }} - }, - fields: map[string]string{ - {{ range $old, $new := $entry.Fields }}"{{ $old }}": "{{ $new }}", - {{ end }} - }, - }, - {{ end }} -} -` - -func (p *pkg) buildRenames() { - pkgName := "github.com/aws/aws-sdk-go/service/" + p.oldAPI.PackageName() - if exportMap[pkgName] == nil { - exportMap[pkgName] = &packageRenames{map[string]string{}, map[string]string{}, map[string]string{}} - } - ifacename := "github.com/aws/aws-sdk-go/service/" + p.oldAPI.PackageName() + "/" + - p.oldAPI.InterfacePackageName() - if exportMap[ifacename] == nil { - exportMap[ifacename] = &packageRenames{map[string]string{}, map[string]string{}, map[string]string{}} - } - - for _, entry := range p.operations { - if entry.oldName != entry.newName { - pkgNames := []string{pkgName, ifacename} - for _, p := range pkgNames { - exportMap[p].Operations[entry.oldName] = entry.newName - exportMap[p].Operations[entry.oldName+"Request"] = entry.newName + "Request" - exportMap[p].Operations[entry.oldName+"Pages"] = entry.newName + "Pages" - } - } - } - - for _, entry := range p.shapes { - if entry.oldShape.Type == "structure" { - if entry.oldShape.ShapeName != entry.newShape.ShapeName { - exportMap[pkgName].Shapes[entry.oldShape.ShapeName] = entry.newShape.ShapeName - } - - for _, n := range entry.oldShape.MemberNames() { - for _, m := range entry.newShape.MemberNames() { - if n != m && strings.ToLower(n) == strings.ToLower(m) { - exportMap[pkgName].Fields[n] = m - } - } - } - } - } -} - -func load(file string) *pkg { - p := &pkg{&api.API{}, &api.API{}, map[string]*shapentry{}, map[string]*opentry{}} - - p.oldAPI.Attach(file) - p.oldAPI.Setup() - - p.newAPI.Attach(file) - p.newAPI.Setup() - - for _, name := range p.oldAPI.OperationNames() { - p.operations[strings.ToLower(name)] = &opentry{oldName: name} - } - - for _, name := range p.newAPI.OperationNames() { - p.operations[strings.ToLower(name)].newName = name - } - - for _, shape := range p.oldAPI.ShapeList() { - p.shapes[strings.ToLower(shape.ShapeName)] = &shapentry{oldShape: shape} - } - - for _, shape := range p.newAPI.ShapeList() { - if _, ok := p.shapes[strings.ToLower(shape.ShapeName)]; !ok { - panic("missing shape " + shape.ShapeName) - } - p.shapes[strings.ToLower(shape.ShapeName)].newShape = shape - } - - return p -} - -var excludeServices = map[string]struct{}{ - "simpledb": {}, - "importexport": {}, -} - -func main() { - files, _ := filepath.Glob("../../apis/*/*/api-2.json") - - sort.Strings(files) - - // Remove old API versions from list - m := map[string]bool{} - for i := range files { - idx := len(files) - 1 - i - parts := strings.Split(files[idx], string(filepath.Separator)) - svc := parts[len(parts)-3] // service name is 2nd-to-last component - - if m[svc] { - files[idx] = "" // wipe this one out if we already saw the service - } - m[svc] = true - } - - for i := range files { - file := files[i] - if file == "" { // empty file - continue - } - - if g := load(file); g != nil { - if _, ok := excludeServices[g.oldAPI.PackageName()]; !ok { - g.buildRenames() - } - } - } - - outfile, err := os.Create("rename/renames.go") - if err != nil { - panic(err) - } - if err := generateRenames(outfile); err != nil { - panic(err) - } -} diff --git a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/rename/rename.go b/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/rename/rename.go deleted file mode 100644 index 234ae7c..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/rename/rename.go +++ /dev/null @@ -1,116 +0,0 @@ -// +build go1.5,deprecated - -package rename - -import ( - "bytes" - "flag" - "fmt" - "go/format" - "go/parser" - "go/token" - "go/types" - "io/ioutil" - - "golang.org/x/tools/go/loader" -) - -var dryRun = flag.Bool("dryrun", false, "Dry run") -var verbose = flag.Bool("verbose", false, "Verbose") - -type packageRenames struct { - operations map[string]string - shapes map[string]string - fields map[string]string -} - -type renamer struct { - *loader.Program - files map[*token.File]bool -} - -// ParsePathsFromArgs parses arguments from command line and looks at import -// paths to rename objects. -func ParsePathsFromArgs() { - flag.Parse() - for _, dir := range flag.Args() { - var conf loader.Config - conf.ParserMode = parser.ParseComments - conf.ImportWithTests(dir) - prog, err := conf.Load() - if err != nil { - panic(err) - } - - r := renamer{prog, map[*token.File]bool{}} - r.parse() - if !*dryRun { - r.write() - } - } -} - -func (r *renamer) dryInfo() string { - if *dryRun { - return "[DRY-RUN]" - } - return "[!]" -} - -func (r *renamer) printf(msg string, args ...interface{}) { - if *verbose { - fmt.Printf(msg, args...) - } -} - -func (r *renamer) parse() { - for _, pkg := range r.InitialPackages() { - r.parseUses(pkg) - } -} - -func (r *renamer) write() { - for _, pkg := range r.InitialPackages() { - for _, f := range pkg.Files { - tokenFile := r.Fset.File(f.Pos()) - if r.files[tokenFile] { - var buf bytes.Buffer - format.Node(&buf, r.Fset, f) - if err := ioutil.WriteFile(tokenFile.Name(), buf.Bytes(), 0644); err != nil { - panic(err) - } - } - } - } -} - -func (r *renamer) parseUses(pkg *loader.PackageInfo) { - for k, v := range pkg.Uses { - if v.Pkg() != nil { - pkgPath := v.Pkg().Path() - if renames, ok := renamedPackages[pkgPath]; ok { - name := k.Name - switch t := v.(type) { - case *types.Func: - if newName, ok := renames.operations[t.Name()]; ok && newName != name { - r.printf("%s Rename [OPERATION]: %q -> %q\n", r.dryInfo(), name, newName) - r.files[r.Fset.File(k.Pos())] = true - k.Name = newName - } - case *types.TypeName: - if newName, ok := renames.shapes[name]; ok && newName != name { - r.printf("%s Rename [SHAPE]: %q -> %q\n", r.dryInfo(), t.Name(), newName) - r.files[r.Fset.File(k.Pos())] = true - k.Name = newName - } - case *types.Var: - if newName, ok := renames.fields[name]; ok && newName != name { - r.printf("%s Rename [FIELD]: %q -> %q\n", r.dryInfo(), t.Name(), newName) - r.files[r.Fset.File(k.Pos())] = true - k.Name = newName - } - } - } - } - } -} diff --git a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/rename/renames.go b/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/rename/renames.go deleted file mode 100644 index 55c7b4e..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/rename/renames.go +++ /dev/null @@ -1,2120 +0,0 @@ -// +build go1.5,deprecated - -package rename - -// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. - -var renamedPackages = map[string]*packageRenames{ - "github.com/aws/aws-sdk-go/service/autoscaling": { - operations: map[string]string{}, - shapes: map[string]string{ - "EBS": "Ebs", - }, - fields: map[string]string{ - "ActivityID": "ActivityId", - "ActivityIDs": "ActivityIds", - "AssociatePublicIPAddress": "AssociatePublicIpAddress", - "ClassicLinkVPCID": "ClassicLinkVPCId", - "EBS": "Ebs", - "EBSOptimized": "EbsOptimized", - "IAMInstanceProfile": "IamInstanceProfile", - "IOPS": "Iops", - "ImageID": "ImageId", - "InstanceID": "InstanceId", - "InstanceIDs": "InstanceIds", - "KernelID": "KernelId", - "RAMDiskID": "RamdiskId", - "ResourceID": "ResourceId", - "SnapshotID": "SnapshotId", - }, - }, - "github.com/aws/aws-sdk-go/service/autoscaling/autoscalingiface": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{}, - }, - "github.com/aws/aws-sdk-go/service/cloudformation": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{ - "EventID": "EventId", - "LogicalResourceID": "LogicalResourceId", - "PhysicalResourceID": "PhysicalResourceId", - "StackID": "StackId", - "URL": "Url", - "UniqueID": "UniqueId", - }, - }, - "github.com/aws/aws-sdk-go/service/cloudformation/cloudformationiface": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{}, - }, - "github.com/aws/aws-sdk-go/service/cloudfront": { - operations: map[string]string{}, - shapes: map[string]string{ - "KeyPairIDs": "KeyPairIds", - }, - fields: map[string]string{ - "AWSAccountNumber": "AwsAccountNumber", - "DistributionID": "DistributionId", - "IAMCertificateID": "IAMCertificateId", - "ID": "Id", - "KeyPairIDs": "KeyPairIds", - "S3CanonicalUserID": "S3CanonicalUserId", - "TargetOriginID": "TargetOriginId", - }, - }, - "github.com/aws/aws-sdk-go/service/cloudfront/cloudfrontiface": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{}, - }, - "github.com/aws/aws-sdk-go/service/cloudhsm": { - operations: map[string]string{ - "CreateHAPG": "CreateHapg", - "CreateHAPGPages": "CreateHapgPages", - "CreateHAPGRequest": "CreateHapgRequest", - "CreateHSM": "CreateHsm", - "CreateHSMPages": "CreateHsmPages", - "CreateHSMRequest": "CreateHsmRequest", - "DeleteHAPG": "DeleteHapg", - "DeleteHAPGPages": "DeleteHapgPages", - "DeleteHAPGRequest": "DeleteHapgRequest", - "DeleteHSM": "DeleteHsm", - "DeleteHSMPages": "DeleteHsmPages", - "DeleteHSMRequest": "DeleteHsmRequest", - "DescribeHAPG": "DescribeHapg", - "DescribeHAPGPages": "DescribeHapgPages", - "DescribeHAPGRequest": "DescribeHapgRequest", - "DescribeHSM": "DescribeHsm", - "DescribeHSMPages": "DescribeHsmPages", - "DescribeHSMRequest": "DescribeHsmRequest", - "ListHSMs": "ListHsms", - "ListHSMsPages": "ListHsmsPages", - "ListHSMsRequest": "ListHsmsRequest", - "ModifyHAPG": "ModifyHapg", - "ModifyHAPGPages": "ModifyHapgPages", - "ModifyHAPGRequest": "ModifyHapgRequest", - "ModifyHSM": "ModifyHsm", - "ModifyHSMPages": "ModifyHsmPages", - "ModifyHSMRequest": "ModifyHsmRequest", - }, - shapes: map[string]string{ - "CreateHAPGInput": "CreateHapgInput", - "CreateHAPGOutput": "CreateHapgOutput", - "CreateHSMInput": "CreateHsmInput", - "CreateHSMOutput": "CreateHsmOutput", - "DeleteHAPGInput": "DeleteHapgInput", - "DeleteHAPGOutput": "DeleteHapgOutput", - "DeleteHSMInput": "DeleteHsmInput", - "DeleteHSMOutput": "DeleteHsmOutput", - "DescribeHAPGInput": "DescribeHapgInput", - "DescribeHAPGOutput": "DescribeHapgOutput", - "DescribeHSMInput": "DescribeHsmInput", - "DescribeHSMOutput": "DescribeHsmOutput", - "ListHSMsInput": "ListHsmsInput", - "ListHSMsOutput": "ListHsmsOutput", - "ModifyHAPGInput": "ModifyHapgInput", - "ModifyHAPGOutput": "ModifyHapgOutput", - "ModifyHSMInput": "ModifyHsmInput", - "ModifyHSMOutput": "ModifyHsmOutput", - }, - fields: map[string]string{ - "ClientARN": "ClientArn", - "ENIID": "EniId", - "ENIIP": "EniIp", - "ExternalID": "ExternalId", - "HAPGARN": "HapgArn", - "HAPGList": "HapgList", - "HAPGSerial": "HapgSerial", - "HSMARN": "HsmArn", - "HSMList": "HsmList", - "HSMSerialNumber": "HsmSerialNumber", - "HSMType": "HsmType", - "HSMsLastActionFailed": "HsmsLastActionFailed", - "HSMsPendingDeletion": "HsmsPendingDeletion", - "HSMsPendingRegistration": "HsmsPendingRegistration", - "IAMRoleARN": "IamRoleArn", - "SSHKey": "SshKey", - "SSHKeyLastUpdated": "SshKeyLastUpdated", - "SSHPublicKey": "SshPublicKey", - "ServerCertURI": "ServerCertUri", - "SubnetID": "SubnetId", - "SyslogIP": "SyslogIp", - "VPCID": "VpcId", - }, - }, - "github.com/aws/aws-sdk-go/service/cloudhsm/cloudhsmiface": { - operations: map[string]string{ - "CreateHAPG": "CreateHapg", - "CreateHAPGPages": "CreateHapgPages", - "CreateHAPGRequest": "CreateHapgRequest", - "CreateHSM": "CreateHsm", - "CreateHSMPages": "CreateHsmPages", - "CreateHSMRequest": "CreateHsmRequest", - "DeleteHAPG": "DeleteHapg", - "DeleteHAPGPages": "DeleteHapgPages", - "DeleteHAPGRequest": "DeleteHapgRequest", - "DeleteHSM": "DeleteHsm", - "DeleteHSMPages": "DeleteHsmPages", - "DeleteHSMRequest": "DeleteHsmRequest", - "DescribeHAPG": "DescribeHapg", - "DescribeHAPGPages": "DescribeHapgPages", - "DescribeHAPGRequest": "DescribeHapgRequest", - "DescribeHSM": "DescribeHsm", - "DescribeHSMPages": "DescribeHsmPages", - "DescribeHSMRequest": "DescribeHsmRequest", - "ListHSMs": "ListHsms", - "ListHSMsPages": "ListHsmsPages", - "ListHSMsRequest": "ListHsmsRequest", - "ModifyHAPG": "ModifyHapg", - "ModifyHAPGPages": "ModifyHapgPages", - "ModifyHAPGRequest": "ModifyHapgRequest", - "ModifyHSM": "ModifyHsm", - "ModifyHSMPages": "ModifyHsmPages", - "ModifyHSMRequest": "ModifyHsmRequest", - }, - shapes: map[string]string{}, - fields: map[string]string{}, - }, - "github.com/aws/aws-sdk-go/service/cloudsearch": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{ - "DomainID": "DomainId", - }, - }, - "github.com/aws/aws-sdk-go/service/cloudsearch/cloudsearchiface": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{}, - }, - "github.com/aws/aws-sdk-go/service/cloudsearchdomain": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{ - "ID": "Id", - "RID": "Rid", - "TimeMS": "Timems", - }, - }, - "github.com/aws/aws-sdk-go/service/cloudsearchdomain/cloudsearchdomainiface": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{}, - }, - "github.com/aws/aws-sdk-go/service/cloudtrail": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{ - "CloudWatchLogsLogGroupARN": "CloudWatchLogsLogGroupArn", - "CloudWatchLogsRoleARN": "CloudWatchLogsRoleArn", - "EventID": "EventId", - "SNSTopicName": "SnsTopicName", - }, - }, - "github.com/aws/aws-sdk-go/service/cloudtrail/cloudtrailiface": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{}, - }, - "github.com/aws/aws-sdk-go/service/cloudwatch": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{ - "AlarmARN": "AlarmArn", - }, - }, - "github.com/aws/aws-sdk-go/service/cloudwatch/cloudwatchiface": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{}, - }, - "github.com/aws/aws-sdk-go/service/cloudwatchlogs": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{ - "ARN": "Arn", - "DestinationARN": "DestinationArn", - "EventID": "EventId", - "RoleARN": "RoleArn", - "TargetARN": "TargetArn", - }, - }, - "github.com/aws/aws-sdk-go/service/cloudwatchlogs/cloudwatchlogsiface": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{}, - }, - "github.com/aws/aws-sdk-go/service/codecommit": { - operations: map[string]string{}, - shapes: map[string]string{ - "RepositoryNameIDPair": "RepositoryNameIdPair", - }, - fields: map[string]string{ - "ARN": "Arn", - "AccountID": "AccountId", - "CloneURLHTTP": "CloneUrlHttp", - "CloneURLSSH": "CloneUrlSsh", - "CommitID": "CommitId", - "RepositoryID": "RepositoryId", - }, - }, - "github.com/aws/aws-sdk-go/service/codecommit/codecommitiface": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{}, - }, - "github.com/aws/aws-sdk-go/service/codedeploy": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{ - "ApplicationID": "ApplicationId", - "CommitID": "CommitId", - "DeploymentConfigID": "DeploymentConfigId", - "DeploymentGroupID": "DeploymentGroupId", - "DeploymentID": "DeploymentId", - "DeploymentIDs": "DeploymentIds", - "EC2TagFilters": "Ec2TagFilters", - "IAMUserARN": "IamUserArn", - "InstanceARN": "InstanceArn", - "InstanceID": "InstanceId", - "ServiceRoleARN": "ServiceRoleArn", - }, - }, - "github.com/aws/aws-sdk-go/service/codedeploy/codedeployiface": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{}, - }, - "github.com/aws/aws-sdk-go/service/codepipeline": { - operations: map[string]string{}, - shapes: map[string]string{ - "ActionTypeID": "ActionTypeId", - }, - fields: map[string]string{ - "AccessKeyID": "AccessKeyId", - "AccountID": "AccountId", - "ActionTypeID": "ActionTypeId", - "ClientID": "ClientId", - "EntityURL": "EntityUrl", - "EntityURLTemplate": "EntityUrlTemplate", - "ExecutionURLTemplate": "ExecutionUrlTemplate", - "ExternalExecutionID": "ExternalExecutionId", - "ExternalExecutionURL": "ExternalExecutionUrl", - "ID": "Id", - "JobID": "JobId", - "PipelineExecutionID": "PipelineExecutionId", - "RevisionChangeID": "RevisionChangeId", - "RevisionID": "RevisionId", - "RevisionURL": "RevisionUrl", - "RevisionURLTemplate": "RevisionUrlTemplate", - "RoleARN": "RoleArn", - "ThirdPartyConfigurationURL": "ThirdPartyConfigurationUrl", - }, - }, - "github.com/aws/aws-sdk-go/service/codepipeline/codepipelineiface": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{}, - }, - "github.com/aws/aws-sdk-go/service/cognitoidentity": { - operations: map[string]string{ - "GetID": "GetId", - "GetIDPages": "GetIdPages", - "GetIDRequest": "GetIdRequest", - "GetOpenIDToken": "GetOpenIdToken", - "GetOpenIDTokenForDeveloperIdentity": "GetOpenIdTokenForDeveloperIdentity", - "GetOpenIDTokenForDeveloperIdentityPages": "GetOpenIdTokenForDeveloperIdentityPages", - "GetOpenIDTokenForDeveloperIdentityRequest": "GetOpenIdTokenForDeveloperIdentityRequest", - "GetOpenIDTokenPages": "GetOpenIdTokenPages", - "GetOpenIDTokenRequest": "GetOpenIdTokenRequest", - }, - shapes: map[string]string{ - "GetIDInput": "GetIdInput", - "GetIDOutput": "GetIdOutput", - "GetOpenIDTokenForDeveloperIdentityInput": "GetOpenIdTokenForDeveloperIdentityInput", - "GetOpenIDTokenForDeveloperIdentityOutput": "GetOpenIdTokenForDeveloperIdentityOutput", - "GetOpenIDTokenInput": "GetOpenIdTokenInput", - "GetOpenIDTokenOutput": "GetOpenIdTokenOutput", - "UnprocessedIdentityID": "UnprocessedIdentityId", - }, - fields: map[string]string{ - "AccessKeyID": "AccessKeyId", - "AccountID": "AccountId", - "IdentityID": "IdentityId", - "IdentityIDsToDelete": "IdentityIdsToDelete", - "IdentityPoolID": "IdentityPoolId", - "OpenIDConnectProviderARNs": "OpenIdConnectProviderARNs", - "UnprocessedIdentityIDs": "UnprocessedIdentityIds", - }, - }, - "github.com/aws/aws-sdk-go/service/cognitoidentity/cognitoidentityiface": { - operations: map[string]string{ - "GetID": "GetId", - "GetIDPages": "GetIdPages", - "GetIDRequest": "GetIdRequest", - "GetOpenIDToken": "GetOpenIdToken", - "GetOpenIDTokenForDeveloperIdentity": "GetOpenIdTokenForDeveloperIdentity", - "GetOpenIDTokenForDeveloperIdentityPages": "GetOpenIdTokenForDeveloperIdentityPages", - "GetOpenIDTokenForDeveloperIdentityRequest": "GetOpenIdTokenForDeveloperIdentityRequest", - "GetOpenIDTokenPages": "GetOpenIdTokenPages", - "GetOpenIDTokenRequest": "GetOpenIdTokenRequest", - }, - shapes: map[string]string{}, - fields: map[string]string{}, - }, - "github.com/aws/aws-sdk-go/service/cognitosync": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{ - "ApplicationARNs": "ApplicationArns", - "DeviceID": "DeviceId", - "IdentityID": "IdentityId", - "IdentityPoolID": "IdentityPoolId", - "RoleARN": "RoleArn", - }, - }, - "github.com/aws/aws-sdk-go/service/cognitosync/cognitosynciface": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{}, - }, - "github.com/aws/aws-sdk-go/service/configservice": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{ - "ARN": "Arn", - "AccountID": "AccountId", - "ConfigSnapshotID": "ConfigSnapshotId", - "ConfigurationStateID": "ConfigurationStateId", - "ResourceID": "ResourceId", - "SNSTopicARN": "SnsTopicARN", - }, - }, - "github.com/aws/aws-sdk-go/service/configservice/configserviceiface": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{}, - }, - "github.com/aws/aws-sdk-go/service/datapipeline": { - operations: map[string]string{}, - shapes: map[string]string{ - "PipelineIDName": "PipelineIdName", - }, - fields: map[string]string{ - "AttemptID": "AttemptId", - "ErrorID": "ErrorId", - "ID": "Id", - "IDs": "Ids", - "ObjectID": "ObjectId", - "ObjectIDs": "ObjectIds", - "PipelineID": "PipelineId", - "PipelineIDList": "PipelineIdList", - "PipelineIDs": "PipelineIds", - "TaskID": "TaskId", - "TaskRunnerID": "TaskrunnerId", - "UniqueID": "UniqueId", - }, - }, - "github.com/aws/aws-sdk-go/service/datapipeline/datapipelineiface": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{}, - }, - "github.com/aws/aws-sdk-go/service/devicefarm": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{ - "ARN": "Arn", - "AWSAccountNumber": "AwsAccountNumber", - "AppARN": "AppArn", - "CPU": "Cpu", - "DevicePoolARN": "DevicePoolArn", - "ExtraDataPackageARN": "ExtraDataPackageArn", - "NetworkProfileARN": "NetworkProfileArn", - "ProjectARN": "ProjectArn", - "TestPackageARN": "TestPackageArn", - "URL": "Url", - }, - }, - "github.com/aws/aws-sdk-go/service/devicefarm/devicefarmiface": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{}, - }, - "github.com/aws/aws-sdk-go/service/directconnect": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{ - "ASN": "Asn", - "CIDR": "Cidr", - "ConnectionID": "ConnectionId", - "InterconnectID": "InterconnectId", - "VLAN": "Vlan", - "VirtualGatewayID": "VirtualGatewayId", - "VirtualInterfaceID": "VirtualInterfaceId", - }, - }, - "github.com/aws/aws-sdk-go/service/directconnect/directconnectiface": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{}, - }, - "github.com/aws/aws-sdk-go/service/directoryservice": { - operations: map[string]string{ - "DisableSSO": "DisableSso", - "DisableSSOPages": "DisableSsoPages", - "DisableSSORequest": "DisableSsoRequest", - "EnableSSO": "EnableSso", - "EnableSSOPages": "EnableSsoPages", - "EnableSSORequest": "EnableSsoRequest", - }, - shapes: map[string]string{ - "DirectoryVPCSettings": "DirectoryVpcSettings", - "DirectoryVPCSettingsDescription": "DirectoryVpcSettingsDescription", - "DisableSSOInput": "DisableSsoInput", - "DisableSSOOutput": "DisableSsoOutput", - "EnableSSOInput": "EnableSsoInput", - "EnableSSOOutput": "EnableSsoOutput", - }, - fields: map[string]string{ - "AccessURL": "AccessUrl", - "ComputerID": "ComputerId", - "ConnectIPs": "ConnectIps", - "CustomerDNSIPs": "CustomerDnsIps", - "DNSIPAddrs": "DnsIpAddrs", - "DirectoryID": "DirectoryId", - "DirectoryIDs": "DirectoryIds", - "SSOEnabled": "SsoEnabled", - "SecurityGroupID": "SecurityGroupId", - "SnapshotID": "SnapshotId", - "SnapshotIDs": "SnapshotIds", - "SubnetIDs": "SubnetIds", - "VPCID": "VpcId", - "VPCSettings": "VpcSettings", - }, - }, - "github.com/aws/aws-sdk-go/service/directoryservice/directoryserviceiface": { - operations: map[string]string{ - "DisableSSO": "DisableSso", - "DisableSSOPages": "DisableSsoPages", - "DisableSSORequest": "DisableSsoRequest", - "EnableSSO": "EnableSso", - "EnableSSOPages": "EnableSsoPages", - "EnableSSORequest": "EnableSsoRequest", - }, - shapes: map[string]string{}, - fields: map[string]string{}, - }, - "github.com/aws/aws-sdk-go/service/dynamodb": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{ - "IndexARN": "IndexArn", - "LatestStreamARN": "LatestStreamArn", - "TableARN": "TableArn", - }, - }, - "github.com/aws/aws-sdk-go/service/dynamodb/dynamodbiface": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{}, - }, - "github.com/aws/aws-sdk-go/service/dynamodbstreams": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{ - "AWSRegion": "AwsRegion", - "DynamoDB": "Dynamodb", - "ExclusiveStartShardID": "ExclusiveStartShardId", - "ExclusiveStartStreamARN": "ExclusiveStartStreamArn", - "LastEvaluatedShardID": "LastEvaluatedShardId", - "LastEvaluatedStreamARN": "LastEvaluatedStreamArn", - "ParentShardID": "ParentShardId", - "ShardID": "ShardId", - "StreamARN": "StreamArn", - }, - }, - "github.com/aws/aws-sdk-go/service/dynamodbstreams/dynamodbstreamsiface": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{}, - }, - "github.com/aws/aws-sdk-go/service/ec2": { - operations: map[string]string{ - "AcceptVPCPeeringConnection": "AcceptVpcPeeringConnection", - "AcceptVPCPeeringConnectionPages": "AcceptVpcPeeringConnectionPages", - "AcceptVPCPeeringConnectionRequest": "AcceptVpcPeeringConnectionRequest", - "AssignPrivateIPAddresses": "AssignPrivateIpAddresses", - "AssignPrivateIPAddressesPages": "AssignPrivateIpAddressesPages", - "AssignPrivateIPAddressesRequest": "AssignPrivateIpAddressesRequest", - "AssociateDHCPOptions": "AssociateDhcpOptions", - "AssociateDHCPOptionsPages": "AssociateDhcpOptionsPages", - "AssociateDHCPOptionsRequest": "AssociateDhcpOptionsRequest", - "AttachClassicLinkVPC": "AttachClassicLinkVpc", - "AttachClassicLinkVPCPages": "AttachClassicLinkVpcPages", - "AttachClassicLinkVPCRequest": "AttachClassicLinkVpcRequest", - "AttachVPNGateway": "AttachVpnGateway", - "AttachVPNGatewayPages": "AttachVpnGatewayPages", - "AttachVPNGatewayRequest": "AttachVpnGatewayRequest", - "CreateDHCPOptions": "CreateDhcpOptions", - "CreateDHCPOptionsPages": "CreateDhcpOptionsPages", - "CreateDHCPOptionsRequest": "CreateDhcpOptionsRequest", - "CreateNetworkACL": "CreateNetworkAcl", - "CreateNetworkACLEntry": "CreateNetworkAclEntry", - "CreateNetworkACLEntryPages": "CreateNetworkAclEntryPages", - "CreateNetworkACLEntryRequest": "CreateNetworkAclEntryRequest", - "CreateNetworkACLPages": "CreateNetworkAclPages", - "CreateNetworkACLRequest": "CreateNetworkAclRequest", - "CreateVPC": "CreateVpc", - "CreateVPCEndpoint": "CreateVpcEndpoint", - "CreateVPCEndpointPages": "CreateVpcEndpointPages", - "CreateVPCEndpointRequest": "CreateVpcEndpointRequest", - "CreateVPCPages": "CreateVpcPages", - "CreateVPCPeeringConnection": "CreateVpcPeeringConnection", - "CreateVPCPeeringConnectionPages": "CreateVpcPeeringConnectionPages", - "CreateVPCPeeringConnectionRequest": "CreateVpcPeeringConnectionRequest", - "CreateVPCRequest": "CreateVpcRequest", - "CreateVPNConnection": "CreateVpnConnection", - "CreateVPNConnectionPages": "CreateVpnConnectionPages", - "CreateVPNConnectionRequest": "CreateVpnConnectionRequest", - "CreateVPNConnectionRoute": "CreateVpnConnectionRoute", - "CreateVPNConnectionRoutePages": "CreateVpnConnectionRoutePages", - "CreateVPNConnectionRouteRequest": "CreateVpnConnectionRouteRequest", - "CreateVPNGateway": "CreateVpnGateway", - "CreateVPNGatewayPages": "CreateVpnGatewayPages", - "CreateVPNGatewayRequest": "CreateVpnGatewayRequest", - "DeleteDHCPOptions": "DeleteDhcpOptions", - "DeleteDHCPOptionsPages": "DeleteDhcpOptionsPages", - "DeleteDHCPOptionsRequest": "DeleteDhcpOptionsRequest", - "DeleteNetworkACL": "DeleteNetworkAcl", - "DeleteNetworkACLEntry": "DeleteNetworkAclEntry", - "DeleteNetworkACLEntryPages": "DeleteNetworkAclEntryPages", - "DeleteNetworkACLEntryRequest": "DeleteNetworkAclEntryRequest", - "DeleteNetworkACLPages": "DeleteNetworkAclPages", - "DeleteNetworkACLRequest": "DeleteNetworkAclRequest", - "DeleteVPC": "DeleteVpc", - "DeleteVPCEndpoints": "DeleteVpcEndpoints", - "DeleteVPCEndpointsPages": "DeleteVpcEndpointsPages", - "DeleteVPCEndpointsRequest": "DeleteVpcEndpointsRequest", - "DeleteVPCPages": "DeleteVpcPages", - "DeleteVPCPeeringConnection": "DeleteVpcPeeringConnection", - "DeleteVPCPeeringConnectionPages": "DeleteVpcPeeringConnectionPages", - "DeleteVPCPeeringConnectionRequest": "DeleteVpcPeeringConnectionRequest", - "DeleteVPCRequest": "DeleteVpcRequest", - "DeleteVPNConnection": "DeleteVpnConnection", - "DeleteVPNConnectionPages": "DeleteVpnConnectionPages", - "DeleteVPNConnectionRequest": "DeleteVpnConnectionRequest", - "DeleteVPNConnectionRoute": "DeleteVpnConnectionRoute", - "DeleteVPNConnectionRoutePages": "DeleteVpnConnectionRoutePages", - "DeleteVPNConnectionRouteRequest": "DeleteVpnConnectionRouteRequest", - "DeleteVPNGateway": "DeleteVpnGateway", - "DeleteVPNGatewayPages": "DeleteVpnGatewayPages", - "DeleteVPNGatewayRequest": "DeleteVpnGatewayRequest", - "DescribeDHCPOptions": "DescribeDhcpOptions", - "DescribeDHCPOptionsPages": "DescribeDhcpOptionsPages", - "DescribeDHCPOptionsRequest": "DescribeDhcpOptionsRequest", - "DescribeNetworkACLs": "DescribeNetworkAcls", - "DescribeNetworkACLsPages": "DescribeNetworkAclsPages", - "DescribeNetworkACLsRequest": "DescribeNetworkAclsRequest", - "DescribeVPCAttribute": "DescribeVpcAttribute", - "DescribeVPCAttributePages": "DescribeVpcAttributePages", - "DescribeVPCAttributeRequest": "DescribeVpcAttributeRequest", - "DescribeVPCClassicLink": "DescribeVpcClassicLink", - "DescribeVPCClassicLinkPages": "DescribeVpcClassicLinkPages", - "DescribeVPCClassicLinkRequest": "DescribeVpcClassicLinkRequest", - "DescribeVPCEndpointServices": "DescribeVpcEndpointServices", - "DescribeVPCEndpointServicesPages": "DescribeVpcEndpointServicesPages", - "DescribeVPCEndpointServicesRequest": "DescribeVpcEndpointServicesRequest", - "DescribeVPCEndpoints": "DescribeVpcEndpoints", - "DescribeVPCEndpointsPages": "DescribeVpcEndpointsPages", - "DescribeVPCEndpointsRequest": "DescribeVpcEndpointsRequest", - "DescribeVPCPeeringConnections": "DescribeVpcPeeringConnections", - "DescribeVPCPeeringConnectionsPages": "DescribeVpcPeeringConnectionsPages", - "DescribeVPCPeeringConnectionsRequest": "DescribeVpcPeeringConnectionsRequest", - "DescribeVPCs": "DescribeVpcs", - "DescribeVPCsPages": "DescribeVpcsPages", - "DescribeVPCsRequest": "DescribeVpcsRequest", - "DescribeVPNConnections": "DescribeVpnConnections", - "DescribeVPNConnectionsPages": "DescribeVpnConnectionsPages", - "DescribeVPNConnectionsRequest": "DescribeVpnConnectionsRequest", - "DescribeVPNGateways": "DescribeVpnGateways", - "DescribeVPNGatewaysPages": "DescribeVpnGatewaysPages", - "DescribeVPNGatewaysRequest": "DescribeVpnGatewaysRequest", - "DetachClassicLinkVPC": "DetachClassicLinkVpc", - "DetachClassicLinkVPCPages": "DetachClassicLinkVpcPages", - "DetachClassicLinkVPCRequest": "DetachClassicLinkVpcRequest", - "DetachVPNGateway": "DetachVpnGateway", - "DetachVPNGatewayPages": "DetachVpnGatewayPages", - "DetachVPNGatewayRequest": "DetachVpnGatewayRequest", - "DisableVGWRoutePropagation": "DisableVgwRoutePropagation", - "DisableVGWRoutePropagationPages": "DisableVgwRoutePropagationPages", - "DisableVGWRoutePropagationRequest": "DisableVgwRoutePropagationRequest", - "DisableVPCClassicLink": "DisableVpcClassicLink", - "DisableVPCClassicLinkPages": "DisableVpcClassicLinkPages", - "DisableVPCClassicLinkRequest": "DisableVpcClassicLinkRequest", - "EnableVGWRoutePropagation": "EnableVgwRoutePropagation", - "EnableVGWRoutePropagationPages": "EnableVgwRoutePropagationPages", - "EnableVGWRoutePropagationRequest": "EnableVgwRoutePropagationRequest", - "EnableVPCClassicLink": "EnableVpcClassicLink", - "EnableVPCClassicLinkPages": "EnableVpcClassicLinkPages", - "EnableVPCClassicLinkRequest": "EnableVpcClassicLinkRequest", - "ModifyVPCAttribute": "ModifyVpcAttribute", - "ModifyVPCAttributePages": "ModifyVpcAttributePages", - "ModifyVPCAttributeRequest": "ModifyVpcAttributeRequest", - "ModifyVPCEndpoint": "ModifyVpcEndpoint", - "ModifyVPCEndpointPages": "ModifyVpcEndpointPages", - "ModifyVPCEndpointRequest": "ModifyVpcEndpointRequest", - "MoveAddressToVPC": "MoveAddressToVpc", - "MoveAddressToVPCPages": "MoveAddressToVpcPages", - "MoveAddressToVPCRequest": "MoveAddressToVpcRequest", - "RejectVPCPeeringConnection": "RejectVpcPeeringConnection", - "RejectVPCPeeringConnectionPages": "RejectVpcPeeringConnectionPages", - "RejectVPCPeeringConnectionRequest": "RejectVpcPeeringConnectionRequest", - "ReplaceNetworkACLAssociation": "ReplaceNetworkAclAssociation", - "ReplaceNetworkACLAssociationPages": "ReplaceNetworkAclAssociationPages", - "ReplaceNetworkACLAssociationRequest": "ReplaceNetworkAclAssociationRequest", - "ReplaceNetworkACLEntry": "ReplaceNetworkAclEntry", - "ReplaceNetworkACLEntryPages": "ReplaceNetworkAclEntryPages", - "ReplaceNetworkACLEntryRequest": "ReplaceNetworkAclEntryRequest", - "UnassignPrivateIPAddresses": "UnassignPrivateIpAddresses", - "UnassignPrivateIPAddressesPages": "UnassignPrivateIpAddressesPages", - "UnassignPrivateIPAddressesRequest": "UnassignPrivateIpAddressesRequest", - }, - shapes: map[string]string{ - "AcceptVPCPeeringConnectionInput": "AcceptVpcPeeringConnectionInput", - "AcceptVPCPeeringConnectionOutput": "AcceptVpcPeeringConnectionOutput", - "AssignPrivateIPAddressesInput": "AssignPrivateIpAddressesInput", - "AssignPrivateIPAddressesOutput": "AssignPrivateIpAddressesOutput", - "AssociateDHCPOptionsInput": "AssociateDhcpOptionsInput", - "AssociateDHCPOptionsOutput": "AssociateDhcpOptionsOutput", - "AttachClassicLinkVPCInput": "AttachClassicLinkVpcInput", - "AttachClassicLinkVPCOutput": "AttachClassicLinkVpcOutput", - "AttachVPNGatewayInput": "AttachVpnGatewayInput", - "AttachVPNGatewayOutput": "AttachVpnGatewayOutput", - "CreateDHCPOptionsInput": "CreateDhcpOptionsInput", - "CreateDHCPOptionsOutput": "CreateDhcpOptionsOutput", - "CreateNetworkACLEntryInput": "CreateNetworkAclEntryInput", - "CreateNetworkACLEntryOutput": "CreateNetworkAclEntryOutput", - "CreateNetworkACLInput": "CreateNetworkAclInput", - "CreateNetworkACLOutput": "CreateNetworkAclOutput", - "CreateVPCEndpointInput": "CreateVpcEndpointInput", - "CreateVPCEndpointOutput": "CreateVpcEndpointOutput", - "CreateVPCInput": "CreateVpcInput", - "CreateVPCOutput": "CreateVpcOutput", - "CreateVPCPeeringConnectionInput": "CreateVpcPeeringConnectionInput", - "CreateVPCPeeringConnectionOutput": "CreateVpcPeeringConnectionOutput", - "CreateVPNConnectionInput": "CreateVpnConnectionInput", - "CreateVPNConnectionOutput": "CreateVpnConnectionOutput", - "CreateVPNConnectionRouteInput": "CreateVpnConnectionRouteInput", - "CreateVPNConnectionRouteOutput": "CreateVpnConnectionRouteOutput", - "CreateVPNGatewayInput": "CreateVpnGatewayInput", - "CreateVPNGatewayOutput": "CreateVpnGatewayOutput", - "DHCPConfiguration": "DhcpConfiguration", - "DHCPOptions": "DhcpOptions", - "DeleteDHCPOptionsInput": "DeleteDhcpOptionsInput", - "DeleteDHCPOptionsOutput": "DeleteDhcpOptionsOutput", - "DeleteNetworkACLEntryInput": "DeleteNetworkAclEntryInput", - "DeleteNetworkACLEntryOutput": "DeleteNetworkAclEntryOutput", - "DeleteNetworkACLInput": "DeleteNetworkAclInput", - "DeleteNetworkACLOutput": "DeleteNetworkAclOutput", - "DeleteVPCEndpointsInput": "DeleteVpcEndpointsInput", - "DeleteVPCEndpointsOutput": "DeleteVpcEndpointsOutput", - "DeleteVPCInput": "DeleteVpcInput", - "DeleteVPCOutput": "DeleteVpcOutput", - "DeleteVPCPeeringConnectionInput": "DeleteVpcPeeringConnectionInput", - "DeleteVPCPeeringConnectionOutput": "DeleteVpcPeeringConnectionOutput", - "DeleteVPNConnectionInput": "DeleteVpnConnectionInput", - "DeleteVPNConnectionOutput": "DeleteVpnConnectionOutput", - "DeleteVPNConnectionRouteInput": "DeleteVpnConnectionRouteInput", - "DeleteVPNConnectionRouteOutput": "DeleteVpnConnectionRouteOutput", - "DeleteVPNGatewayInput": "DeleteVpnGatewayInput", - "DeleteVPNGatewayOutput": "DeleteVpnGatewayOutput", - "DescribeDHCPOptionsInput": "DescribeDhcpOptionsInput", - "DescribeDHCPOptionsOutput": "DescribeDhcpOptionsOutput", - "DescribeNetworkACLsInput": "DescribeNetworkAclsInput", - "DescribeNetworkACLsOutput": "DescribeNetworkAclsOutput", - "DescribeVPCAttributeInput": "DescribeVpcAttributeInput", - "DescribeVPCAttributeOutput": "DescribeVpcAttributeOutput", - "DescribeVPCClassicLinkInput": "DescribeVpcClassicLinkInput", - "DescribeVPCClassicLinkOutput": "DescribeVpcClassicLinkOutput", - "DescribeVPCEndpointServicesInput": "DescribeVpcEndpointServicesInput", - "DescribeVPCEndpointServicesOutput": "DescribeVpcEndpointServicesOutput", - "DescribeVPCEndpointsInput": "DescribeVpcEndpointsInput", - "DescribeVPCEndpointsOutput": "DescribeVpcEndpointsOutput", - "DescribeVPCPeeringConnectionsInput": "DescribeVpcPeeringConnectionsInput", - "DescribeVPCPeeringConnectionsOutput": "DescribeVpcPeeringConnectionsOutput", - "DescribeVPCsInput": "DescribeVpcsInput", - "DescribeVPCsOutput": "DescribeVpcsOutput", - "DescribeVPNConnectionsInput": "DescribeVpnConnectionsInput", - "DescribeVPNConnectionsOutput": "DescribeVpnConnectionsOutput", - "DescribeVPNGatewaysInput": "DescribeVpnGatewaysInput", - "DescribeVPNGatewaysOutput": "DescribeVpnGatewaysOutput", - "DetachClassicLinkVPCInput": "DetachClassicLinkVpcInput", - "DetachClassicLinkVPCOutput": "DetachClassicLinkVpcOutput", - "DetachVPNGatewayInput": "DetachVpnGatewayInput", - "DetachVPNGatewayOutput": "DetachVpnGatewayOutput", - "DisableVGWRoutePropagationInput": "DisableVgwRoutePropagationInput", - "DisableVGWRoutePropagationOutput": "DisableVgwRoutePropagationOutput", - "DisableVPCClassicLinkInput": "DisableVpcClassicLinkInput", - "DisableVPCClassicLinkOutput": "DisableVpcClassicLinkOutput", - "EBSBlockDevice": "EbsBlockDevice", - "EBSInstanceBlockDevice": "EbsInstanceBlockDevice", - "EBSInstanceBlockDeviceSpecification": "EbsInstanceBlockDeviceSpecification", - "EnableVGWRoutePropagationInput": "EnableVgwRoutePropagationInput", - "EnableVGWRoutePropagationOutput": "EnableVgwRoutePropagationOutput", - "EnableVPCClassicLinkInput": "EnableVpcClassicLinkInput", - "EnableVPCClassicLinkOutput": "EnableVpcClassicLinkOutput", - "IAMInstanceProfile": "IamInstanceProfile", - "IAMInstanceProfileSpecification": "IamInstanceProfileSpecification", - "ICMPTypeCode": "IcmpTypeCode", - "IPPermission": "IpPermission", - "IPRange": "IpRange", - "InstancePrivateIPAddress": "InstancePrivateIpAddress", - "ModifyVPCAttributeInput": "ModifyVpcAttributeInput", - "ModifyVPCAttributeOutput": "ModifyVpcAttributeOutput", - "ModifyVPCEndpointInput": "ModifyVpcEndpointInput", - "ModifyVPCEndpointOutput": "ModifyVpcEndpointOutput", - "MoveAddressToVPCInput": "MoveAddressToVpcInput", - "MoveAddressToVPCOutput": "MoveAddressToVpcOutput", - "NetworkACL": "NetworkAcl", - "NetworkACLAssociation": "NetworkAclAssociation", - "NetworkACLEntry": "NetworkAclEntry", - "NetworkInterfacePrivateIPAddress": "NetworkInterfacePrivateIpAddress", - "NewDHCPConfiguration": "NewDhcpConfiguration", - "PrefixListID": "PrefixListId", - "PrivateIPAddressSpecification": "PrivateIpAddressSpecification", - "PropagatingVGW": "PropagatingVgw", - "RejectVPCPeeringConnectionInput": "RejectVpcPeeringConnectionInput", - "RejectVPCPeeringConnectionOutput": "RejectVpcPeeringConnectionOutput", - "ReplaceNetworkACLAssociationInput": "ReplaceNetworkAclAssociationInput", - "ReplaceNetworkACLAssociationOutput": "ReplaceNetworkAclAssociationOutput", - "ReplaceNetworkACLEntryInput": "ReplaceNetworkAclEntryInput", - "ReplaceNetworkACLEntryOutput": "ReplaceNetworkAclEntryOutput", - "ReservedInstancesID": "ReservedInstancesId", - "UnassignPrivateIPAddressesInput": "UnassignPrivateIpAddressesInput", - "UnassignPrivateIPAddressesOutput": "UnassignPrivateIpAddressesOutput", - "UserIDGroupPair": "UserIdGroupPair", - "VGWTelemetry": "VgwTelemetry", - "VPC": "Vpc", - "VPCAttachment": "VpcAttachment", - "VPCClassicLink": "VpcClassicLink", - "VPCEndpoint": "VpcEndpoint", - "VPCPeeringConnection": "VpcPeeringConnection", - "VPCPeeringConnectionStateReason": "VpcPeeringConnectionStateReason", - "VPCPeeringConnectionVPCInfo": "VpcPeeringConnectionVpcInfo", - "VPNConnection": "VpnConnection", - "VPNConnectionOptions": "VpnConnectionOptions", - "VPNConnectionOptionsSpecification": "VpnConnectionOptionsSpecification", - "VPNGateway": "VpnGateway", - "VPNStaticRoute": "VpnStaticRoute", - }, - fields: map[string]string{ - "AMILaunchIndex": "AmiLaunchIndex", - "ARN": "Arn", - "AWSAccessKeyID": "AWSAccessKeyId", - "AccepterVPCInfo": "AccepterVpcInfo", - "AddRouteTableIDs": "AddRouteTableIds", - "AllocationID": "AllocationId", - "AllocationIDs": "AllocationIds", - "AssociatePublicIPAddress": "AssociatePublicIpAddress", - "AssociationID": "AssociationId", - "AttachmentID": "AttachmentId", - "AvailableIPAddressCount": "AvailableIpAddressCount", - "BGPASN": "BgpAsn", - "BundleID": "BundleId", - "BundleIDs": "BundleIds", - "CIDRBlock": "CidrBlock", - "CIDRIP": "CidrIp", - "CIDRs": "Cidrs", - "ConversionTaskID": "ConversionTaskId", - "ConversionTaskIDs": "ConversionTaskIds", - "CustomerGatewayID": "CustomerGatewayId", - "CustomerGatewayIDs": "CustomerGatewayIds", - "DHCPConfigurations": "DhcpConfigurations", - "DHCPOptions": "DhcpOptions", - "DHCPOptionsID": "DhcpOptionsId", - "DHCPOptionsIDs": "DhcpOptionsIds", - "DefaultForAZ": "DefaultForAz", - "DeliverLogsPermissionARN": "DeliverLogsPermissionArn", - "DestinationCIDRBlock": "DestinationCidrBlock", - "DestinationPrefixListID": "DestinationPrefixListId", - "DisableAPITermination": "DisableApiTermination", - "EBS": "Ebs", - "EBSOptimized": "EbsOptimized", - "EnableDNSHostnames": "EnableDnsHostnames", - "EnableDNSSupport": "EnableDnsSupport", - "EventID": "EventId", - "ExportTaskID": "ExportTaskId", - "ExportTaskIDs": "ExportTaskIds", - "FlowLogID": "FlowLogId", - "FlowLogIDs": "FlowLogIds", - "GatewayID": "GatewayId", - "GroupID": "GroupId", - "GroupIDs": "GroupIds", - "IAMFleetRole": "IamFleetRole", - "IAMInstanceProfile": "IamInstanceProfile", - "ICMPTypeCode": "IcmpTypeCode", - "ID": "Id", - "IOPS": "Iops", - "IPAddress": "IpAddress", - "IPOwnerID": "IpOwnerId", - "IPPermissions": "IpPermissions", - "IPPermissionsEgress": "IpPermissionsEgress", - "IPProtocol": "IpProtocol", - "IPRanges": "IpRanges", - "ImageID": "ImageId", - "ImageIDs": "ImageIds", - "ImportManifestURL": "ImportManifestUrl", - "ImportTaskID": "ImportTaskId", - "ImportTaskIDs": "ImportTaskIds", - "InstanceID": "InstanceId", - "InstanceIDs": "InstanceIds", - "InstanceOwnerID": "InstanceOwnerId", - "InternetGatewayID": "InternetGatewayId", - "InternetGatewayIDs": "InternetGatewayIds", - "KMSKeyID": "KmsKeyId", - "KernelID": "KernelId", - "MACAddress": "MacAddress", - "MapPublicIPOnLaunch": "MapPublicIpOnLaunch", - "NetworkACL": "NetworkAcl", - "NetworkACLAssociationID": "NetworkAclAssociationId", - "NetworkACLID": "NetworkAclId", - "NetworkACLIDs": "NetworkAclIds", - "NetworkACLs": "NetworkAcls", - "NetworkInterfaceID": "NetworkInterfaceId", - "NetworkInterfaceIDs": "NetworkInterfaceIds", - "NetworkInterfaceOwnerID": "NetworkInterfaceOwnerId", - "NewAssociationID": "NewAssociationId", - "OutsideIPAddress": "OutsideIpAddress", - "OwnerID": "OwnerId", - "OwnerIDs": "OwnerIds", - "PeerOwnerID": "PeerOwnerId", - "PeerVPCID": "PeerVpcId", - "PrefixListID": "PrefixListId", - "PrefixListIDs": "PrefixListIds", - "PresignedURL": "PresignedUrl", - "PrivateDNSName": "PrivateDnsName", - "PrivateIPAddress": "PrivateIpAddress", - "PrivateIPAddresses": "PrivateIpAddresses", - "ProductCodeID": "ProductCodeId", - "PropagatingVGWs": "PropagatingVgws", - "PublicDNSName": "PublicDnsName", - "PublicIP": "PublicIp", - "PublicIPAddress": "PublicIpAddress", - "PublicIPs": "PublicIps", - "RAMDisk": "Ramdisk", - "RAMDiskID": "RamdiskId", - "RemoveRouteTableIDs": "RemoveRouteTableIds", - "RequesterID": "RequesterId", - "RequesterVPCInfo": "RequesterVpcInfo", - "ReservationID": "ReservationId", - "ReservedInstancesID": "ReservedInstancesId", - "ReservedInstancesIDs": "ReservedInstancesIds", - "ReservedInstancesListingID": "ReservedInstancesListingId", - "ReservedInstancesModificationID": "ReservedInstancesModificationId", - "ReservedInstancesModificationIDs": "ReservedInstancesModificationIds", - "ReservedInstancesOfferingID": "ReservedInstancesOfferingId", - "ReservedInstancesOfferingIDs": "ReservedInstancesOfferingIds", - "ResourceID": "ResourceId", - "ResourceIDs": "ResourceIds", - "RestorableByUserIDs": "RestorableByUserIds", - "RouteTableAssociationID": "RouteTableAssociationId", - "RouteTableID": "RouteTableId", - "RouteTableIDs": "RouteTableIds", - "SRIOVNetSupport": "SriovNetSupport", - "SecondaryPrivateIPAddressCount": "SecondaryPrivateIpAddressCount", - "SecurityGroupIDs": "SecurityGroupIds", - "SnapshotID": "SnapshotId", - "SnapshotIDs": "SnapshotIds", - "SourceImageID": "SourceImageId", - "SourceSecurityGroupOwnerID": "SourceSecurityGroupOwnerId", - "SourceSnapshotID": "SourceSnapshotId", - "SpotFleetRequestID": "SpotFleetRequestId", - "SpotFleetRequestIDs": "SpotFleetRequestIds", - "SpotInstanceRequestID": "SpotInstanceRequestId", - "SpotInstanceRequestIDs": "SpotInstanceRequestIds", - "SubnetID": "SubnetId", - "SubnetIDs": "SubnetIds", - "URL": "Url", - "UserID": "UserId", - "UserIDGroupPairs": "UserIdGroupPairs", - "UserIDs": "UserIds", - "VGWTelemetry": "VgwTelemetry", - "VPC": "Vpc", - "VPCAttachment": "VpcAttachment", - "VPCAttachments": "VpcAttachments", - "VPCEndpoint": "VpcEndpoint", - "VPCEndpointID": "VpcEndpointId", - "VPCEndpointIDs": "VpcEndpointIds", - "VPCEndpoints": "VpcEndpoints", - "VPCID": "VpcId", - "VPCIDs": "VpcIds", - "VPCPeeringConnection": "VpcPeeringConnection", - "VPCPeeringConnectionID": "VpcPeeringConnectionId", - "VPCPeeringConnectionIDs": "VpcPeeringConnectionIds", - "VPCPeeringConnections": "VpcPeeringConnections", - "VPCs": "Vpcs", - "VPNConnection": "VpnConnection", - "VPNConnectionID": "VpnConnectionId", - "VPNConnectionIDs": "VpnConnectionIds", - "VPNConnections": "VpnConnections", - "VPNGateway": "VpnGateway", - "VPNGatewayID": "VpnGatewayId", - "VPNGatewayIDs": "VpnGatewayIds", - "VPNGateways": "VpnGateways", - "VolumeID": "VolumeId", - "VolumeIDs": "VolumeIds", - }, - }, - "github.com/aws/aws-sdk-go/service/ec2/ec2iface": { - operations: map[string]string{ - "AcceptVPCPeeringConnection": "AcceptVpcPeeringConnection", - "AcceptVPCPeeringConnectionPages": "AcceptVpcPeeringConnectionPages", - "AcceptVPCPeeringConnectionRequest": "AcceptVpcPeeringConnectionRequest", - "AssignPrivateIPAddresses": "AssignPrivateIpAddresses", - "AssignPrivateIPAddressesPages": "AssignPrivateIpAddressesPages", - "AssignPrivateIPAddressesRequest": "AssignPrivateIpAddressesRequest", - "AssociateDHCPOptions": "AssociateDhcpOptions", - "AssociateDHCPOptionsPages": "AssociateDhcpOptionsPages", - "AssociateDHCPOptionsRequest": "AssociateDhcpOptionsRequest", - "AttachClassicLinkVPC": "AttachClassicLinkVpc", - "AttachClassicLinkVPCPages": "AttachClassicLinkVpcPages", - "AttachClassicLinkVPCRequest": "AttachClassicLinkVpcRequest", - "AttachVPNGateway": "AttachVpnGateway", - "AttachVPNGatewayPages": "AttachVpnGatewayPages", - "AttachVPNGatewayRequest": "AttachVpnGatewayRequest", - "CreateDHCPOptions": "CreateDhcpOptions", - "CreateDHCPOptionsPages": "CreateDhcpOptionsPages", - "CreateDHCPOptionsRequest": "CreateDhcpOptionsRequest", - "CreateNetworkACL": "CreateNetworkAcl", - "CreateNetworkACLEntry": "CreateNetworkAclEntry", - "CreateNetworkACLEntryPages": "CreateNetworkAclEntryPages", - "CreateNetworkACLEntryRequest": "CreateNetworkAclEntryRequest", - "CreateNetworkACLPages": "CreateNetworkAclPages", - "CreateNetworkACLRequest": "CreateNetworkAclRequest", - "CreateVPC": "CreateVpc", - "CreateVPCEndpoint": "CreateVpcEndpoint", - "CreateVPCEndpointPages": "CreateVpcEndpointPages", - "CreateVPCEndpointRequest": "CreateVpcEndpointRequest", - "CreateVPCPages": "CreateVpcPages", - "CreateVPCPeeringConnection": "CreateVpcPeeringConnection", - "CreateVPCPeeringConnectionPages": "CreateVpcPeeringConnectionPages", - "CreateVPCPeeringConnectionRequest": "CreateVpcPeeringConnectionRequest", - "CreateVPCRequest": "CreateVpcRequest", - "CreateVPNConnection": "CreateVpnConnection", - "CreateVPNConnectionPages": "CreateVpnConnectionPages", - "CreateVPNConnectionRequest": "CreateVpnConnectionRequest", - "CreateVPNConnectionRoute": "CreateVpnConnectionRoute", - "CreateVPNConnectionRoutePages": "CreateVpnConnectionRoutePages", - "CreateVPNConnectionRouteRequest": "CreateVpnConnectionRouteRequest", - "CreateVPNGateway": "CreateVpnGateway", - "CreateVPNGatewayPages": "CreateVpnGatewayPages", - "CreateVPNGatewayRequest": "CreateVpnGatewayRequest", - "DeleteDHCPOptions": "DeleteDhcpOptions", - "DeleteDHCPOptionsPages": "DeleteDhcpOptionsPages", - "DeleteDHCPOptionsRequest": "DeleteDhcpOptionsRequest", - "DeleteNetworkACL": "DeleteNetworkAcl", - "DeleteNetworkACLEntry": "DeleteNetworkAclEntry", - "DeleteNetworkACLEntryPages": "DeleteNetworkAclEntryPages", - "DeleteNetworkACLEntryRequest": "DeleteNetworkAclEntryRequest", - "DeleteNetworkACLPages": "DeleteNetworkAclPages", - "DeleteNetworkACLRequest": "DeleteNetworkAclRequest", - "DeleteVPC": "DeleteVpc", - "DeleteVPCEndpoints": "DeleteVpcEndpoints", - "DeleteVPCEndpointsPages": "DeleteVpcEndpointsPages", - "DeleteVPCEndpointsRequest": "DeleteVpcEndpointsRequest", - "DeleteVPCPages": "DeleteVpcPages", - "DeleteVPCPeeringConnection": "DeleteVpcPeeringConnection", - "DeleteVPCPeeringConnectionPages": "DeleteVpcPeeringConnectionPages", - "DeleteVPCPeeringConnectionRequest": "DeleteVpcPeeringConnectionRequest", - "DeleteVPCRequest": "DeleteVpcRequest", - "DeleteVPNConnection": "DeleteVpnConnection", - "DeleteVPNConnectionPages": "DeleteVpnConnectionPages", - "DeleteVPNConnectionRequest": "DeleteVpnConnectionRequest", - "DeleteVPNConnectionRoute": "DeleteVpnConnectionRoute", - "DeleteVPNConnectionRoutePages": "DeleteVpnConnectionRoutePages", - "DeleteVPNConnectionRouteRequest": "DeleteVpnConnectionRouteRequest", - "DeleteVPNGateway": "DeleteVpnGateway", - "DeleteVPNGatewayPages": "DeleteVpnGatewayPages", - "DeleteVPNGatewayRequest": "DeleteVpnGatewayRequest", - "DescribeDHCPOptions": "DescribeDhcpOptions", - "DescribeDHCPOptionsPages": "DescribeDhcpOptionsPages", - "DescribeDHCPOptionsRequest": "DescribeDhcpOptionsRequest", - "DescribeNetworkACLs": "DescribeNetworkAcls", - "DescribeNetworkACLsPages": "DescribeNetworkAclsPages", - "DescribeNetworkACLsRequest": "DescribeNetworkAclsRequest", - "DescribeVPCAttribute": "DescribeVpcAttribute", - "DescribeVPCAttributePages": "DescribeVpcAttributePages", - "DescribeVPCAttributeRequest": "DescribeVpcAttributeRequest", - "DescribeVPCClassicLink": "DescribeVpcClassicLink", - "DescribeVPCClassicLinkPages": "DescribeVpcClassicLinkPages", - "DescribeVPCClassicLinkRequest": "DescribeVpcClassicLinkRequest", - "DescribeVPCEndpointServices": "DescribeVpcEndpointServices", - "DescribeVPCEndpointServicesPages": "DescribeVpcEndpointServicesPages", - "DescribeVPCEndpointServicesRequest": "DescribeVpcEndpointServicesRequest", - "DescribeVPCEndpoints": "DescribeVpcEndpoints", - "DescribeVPCEndpointsPages": "DescribeVpcEndpointsPages", - "DescribeVPCEndpointsRequest": "DescribeVpcEndpointsRequest", - "DescribeVPCPeeringConnections": "DescribeVpcPeeringConnections", - "DescribeVPCPeeringConnectionsPages": "DescribeVpcPeeringConnectionsPages", - "DescribeVPCPeeringConnectionsRequest": "DescribeVpcPeeringConnectionsRequest", - "DescribeVPCs": "DescribeVpcs", - "DescribeVPCsPages": "DescribeVpcsPages", - "DescribeVPCsRequest": "DescribeVpcsRequest", - "DescribeVPNConnections": "DescribeVpnConnections", - "DescribeVPNConnectionsPages": "DescribeVpnConnectionsPages", - "DescribeVPNConnectionsRequest": "DescribeVpnConnectionsRequest", - "DescribeVPNGateways": "DescribeVpnGateways", - "DescribeVPNGatewaysPages": "DescribeVpnGatewaysPages", - "DescribeVPNGatewaysRequest": "DescribeVpnGatewaysRequest", - "DetachClassicLinkVPC": "DetachClassicLinkVpc", - "DetachClassicLinkVPCPages": "DetachClassicLinkVpcPages", - "DetachClassicLinkVPCRequest": "DetachClassicLinkVpcRequest", - "DetachVPNGateway": "DetachVpnGateway", - "DetachVPNGatewayPages": "DetachVpnGatewayPages", - "DetachVPNGatewayRequest": "DetachVpnGatewayRequest", - "DisableVGWRoutePropagation": "DisableVgwRoutePropagation", - "DisableVGWRoutePropagationPages": "DisableVgwRoutePropagationPages", - "DisableVGWRoutePropagationRequest": "DisableVgwRoutePropagationRequest", - "DisableVPCClassicLink": "DisableVpcClassicLink", - "DisableVPCClassicLinkPages": "DisableVpcClassicLinkPages", - "DisableVPCClassicLinkRequest": "DisableVpcClassicLinkRequest", - "EnableVGWRoutePropagation": "EnableVgwRoutePropagation", - "EnableVGWRoutePropagationPages": "EnableVgwRoutePropagationPages", - "EnableVGWRoutePropagationRequest": "EnableVgwRoutePropagationRequest", - "EnableVPCClassicLink": "EnableVpcClassicLink", - "EnableVPCClassicLinkPages": "EnableVpcClassicLinkPages", - "EnableVPCClassicLinkRequest": "EnableVpcClassicLinkRequest", - "ModifyVPCAttribute": "ModifyVpcAttribute", - "ModifyVPCAttributePages": "ModifyVpcAttributePages", - "ModifyVPCAttributeRequest": "ModifyVpcAttributeRequest", - "ModifyVPCEndpoint": "ModifyVpcEndpoint", - "ModifyVPCEndpointPages": "ModifyVpcEndpointPages", - "ModifyVPCEndpointRequest": "ModifyVpcEndpointRequest", - "MoveAddressToVPC": "MoveAddressToVpc", - "MoveAddressToVPCPages": "MoveAddressToVpcPages", - "MoveAddressToVPCRequest": "MoveAddressToVpcRequest", - "RejectVPCPeeringConnection": "RejectVpcPeeringConnection", - "RejectVPCPeeringConnectionPages": "RejectVpcPeeringConnectionPages", - "RejectVPCPeeringConnectionRequest": "RejectVpcPeeringConnectionRequest", - "ReplaceNetworkACLAssociation": "ReplaceNetworkAclAssociation", - "ReplaceNetworkACLAssociationPages": "ReplaceNetworkAclAssociationPages", - "ReplaceNetworkACLAssociationRequest": "ReplaceNetworkAclAssociationRequest", - "ReplaceNetworkACLEntry": "ReplaceNetworkAclEntry", - "ReplaceNetworkACLEntryPages": "ReplaceNetworkAclEntryPages", - "ReplaceNetworkACLEntryRequest": "ReplaceNetworkAclEntryRequest", - "UnassignPrivateIPAddresses": "UnassignPrivateIpAddresses", - "UnassignPrivateIPAddressesPages": "UnassignPrivateIpAddressesPages", - "UnassignPrivateIPAddressesRequest": "UnassignPrivateIpAddressesRequest", - }, - shapes: map[string]string{}, - fields: map[string]string{}, - }, - "github.com/aws/aws-sdk-go/service/ecs": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{ - "ARN": "Arn", - "CPU": "Cpu", - "ClusterARN": "ClusterArn", - "ClusterARNs": "ClusterArns", - "ContainerARN": "ContainerArn", - "ContainerInstanceARN": "ContainerInstanceArn", - "ContainerInstanceARNs": "ContainerInstanceArns", - "EC2InstanceID": "Ec2InstanceId", - "ID": "Id", - "RoleARN": "RoleArn", - "ServiceARN": "ServiceArn", - "ServiceARNs": "ServiceArns", - "TaskARN": "TaskArn", - "TaskARNs": "TaskArns", - "TaskDefinitionARN": "TaskDefinitionArn", - "TaskDefinitionARNs": "TaskDefinitionArns", - }, - }, - "github.com/aws/aws-sdk-go/service/ecs/ecsiface": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{}, - }, - "github.com/aws/aws-sdk-go/service/efs": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{ - "FileSystemID": "FileSystemId", - "IPAddress": "IpAddress", - "MountTargetID": "MountTargetId", - "NetworkInterfaceID": "NetworkInterfaceId", - "OwnerID": "OwnerId", - "SubnetID": "SubnetId", - }, - }, - "github.com/aws/aws-sdk-go/service/efs/efsiface": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{}, - }, - "github.com/aws/aws-sdk-go/service/elasticache": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{ - "CacheClusterID": "CacheClusterId", - "CacheNodeID": "CacheNodeId", - "CacheNodeIDsToReboot": "CacheNodeIdsToReboot", - "CacheNodeIDsToRemove": "CacheNodeIdsToRemove", - "EC2SecurityGroupOwnerID": "EC2SecurityGroupOwnerId", - "NodeGroupID": "NodeGroupId", - "NotificationTopicARN": "NotificationTopicArn", - "OwnerID": "OwnerId", - "PrimaryClusterID": "PrimaryClusterId", - "ReplicationGroupID": "ReplicationGroupId", - "ReservedCacheNodeID": "ReservedCacheNodeId", - "ReservedCacheNodesOfferingID": "ReservedCacheNodesOfferingId", - "SecurityGroupID": "SecurityGroupId", - "SecurityGroupIDs": "SecurityGroupIds", - "SnapshotARNs": "SnapshotArns", - "SnapshottingClusterID": "SnapshottingClusterId", - "SourceCacheNodeID": "SourceCacheNodeId", - "SubnetIDs": "SubnetIds", - "TopicARN": "TopicArn", - "VPCID": "VpcId", - }, - }, - "github.com/aws/aws-sdk-go/service/elasticache/elasticacheiface": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{}, - }, - "github.com/aws/aws-sdk-go/service/elasticbeanstalk": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{ - "DestinationEnvironmentID": "DestinationEnvironmentId", - "EC2InstanceID": "Ec2InstanceId", - "EnvironmentID": "EnvironmentId", - "EnvironmentIDs": "EnvironmentIds", - "ID": "Id", - "OK": "Ok", - "RequestID": "RequestId", - "SourceEnvironmentID": "SourceEnvironmentId", - }, - }, - "github.com/aws/aws-sdk-go/service/elasticbeanstalk/elasticbeanstalkiface": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{}, - }, - "github.com/aws/aws-sdk-go/service/elastictranscoder": { - operations: map[string]string{}, - shapes: map[string]string{ - "HLSContentProtection": "HlsContentProtection", - "PlayReadyDRM": "PlayReadyDrm", - }, - fields: map[string]string{ - "ARN": "Arn", - "AWSKMSKeyARN": "AwsKmsKeyArn", - "HLSContentProtection": "HlsContentProtection", - "ID": "Id", - "KeyID": "KeyId", - "KeyMD5": "KeyMd5", - "LicenseAcquisitionURL": "LicenseAcquisitionUrl", - "PipelineID": "PipelineId", - "PlayReadyDRM": "PlayReadyDrm", - "PresetID": "PresetId", - "PresetWatermarkID": "PresetWatermarkId", - }, - }, - "github.com/aws/aws-sdk-go/service/elastictranscoder/elastictranscoderiface": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{}, - }, - "github.com/aws/aws-sdk-go/service/elb": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{ - "InstanceID": "InstanceId", - "SSLCertificateID": "SSLCertificateId", - "VPCID": "VPCId", - }, - }, - "github.com/aws/aws-sdk-go/service/elb/elbiface": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{}, - }, - "github.com/aws/aws-sdk-go/service/emr": { - operations: map[string]string{}, - shapes: map[string]string{ - "EC2InstanceAttributes": "Ec2InstanceAttributes", - "HadoopJARStepConfig": "HadoopJarStepConfig", - }, - fields: map[string]string{ - "AMIVersion": "AmiVersion", - "ClusterID": "ClusterId", - "EC2AvailabilityZone": "Ec2AvailabilityZone", - "EC2InstanceAttributes": "Ec2InstanceAttributes", - "EC2InstanceID": "Ec2InstanceId", - "EC2InstanceIDsToTerminate": "EC2InstanceIdsToTerminate", - "EC2KeyName": "Ec2KeyName", - "EC2SubnetID": "Ec2SubnetId", - "EMRManagedMasterSecurityGroup": "EmrManagedMasterSecurityGroup", - "EMRManagedSlaveSecurityGroup": "EmrManagedSlaveSecurityGroup", - "HadoopJARStep": "HadoopJarStep", - "IAMInstanceProfile": "IamInstanceProfile", - "ID": "Id", - "InstanceGroupID": "InstanceGroupId", - "InstanceGroupIDs": "InstanceGroupIds", - "JAR": "Jar", - "JobFlowID": "JobFlowId", - "JobFlowIDs": "JobFlowIds", - "LogURI": "LogUri", - "MasterInstanceID": "MasterInstanceId", - "MasterPublicDNSName": "MasterPublicDnsName", - "PrivateDNSName": "PrivateDnsName", - "PrivateIPAddress": "PrivateIpAddress", - "PublicDNSName": "PublicDnsName", - "PublicIPAddress": "PublicIpAddress", - "RequestedAMIVersion": "RequestedAmiVersion", - "ResourceID": "ResourceId", - "RunningAMIVersion": "RunningAmiVersion", - "StepID": "StepId", - "StepIDs": "StepIds", - }, - }, - "github.com/aws/aws-sdk-go/service/emr/emriface": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{}, - }, - "github.com/aws/aws-sdk-go/service/glacier": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{ - "AccountID": "AccountId", - "ArchiveID": "ArchiveId", - "JobID": "JobId", - "LockID": "LockId", - "MultipartUploadID": "MultipartUploadId", - "UploadID": "UploadId", - }, - }, - "github.com/aws/aws-sdk-go/service/glacier/glacieriface": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{}, - }, - "github.com/aws/aws-sdk-go/service/iam": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{ - "ARN": "Arn", - "AccessKeyID": "AccessKeyId", - "CertificateID": "CertificateId", - "DefaultVersionID": "DefaultVersionId", - "GroupID": "GroupId", - "InstanceProfileID": "InstanceProfileId", - "OpenIDConnectProviderARN": "OpenIDConnectProviderArn", - "PolicyARN": "PolicyArn", - "PolicyID": "PolicyId", - "RoleID": "RoleId", - "SAMLProviderARN": "SAMLProviderArn", - "SSHPublicKeyID": "SSHPublicKeyId", - "ServerCertificateID": "ServerCertificateId", - "URL": "Url", - "UserID": "UserId", - "VersionID": "VersionId", - }, - }, - "github.com/aws/aws-sdk-go/service/iam/iamiface": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{}, - }, - "github.com/aws/aws-sdk-go/service/kinesis": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{ - "AdjacentParentShardID": "AdjacentParentShardId", - "ExclusiveStartShardID": "ExclusiveStartShardId", - "ParentShardID": "ParentShardId", - "ShardID": "ShardId", - }, - }, - "github.com/aws/aws-sdk-go/service/kinesis/kinesisiface": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{}, - }, - "github.com/aws/aws-sdk-go/service/kms": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{ - "ARN": "Arn", - "AWSAccountID": "AWSAccountId", - "AliasARN": "AliasArn", - "DestinationKeyID": "DestinationKeyId", - "GrantID": "GrantId", - "KeyARN": "KeyArn", - "KeyID": "KeyId", - "SourceKeyID": "SourceKeyId", - "TargetKeyID": "TargetKeyId", - }, - }, - "github.com/aws/aws-sdk-go/service/kms/kmsiface": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{}, - }, - "github.com/aws/aws-sdk-go/service/lambda": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{ - "EventSourceARN": "EventSourceArn", - "FunctionARN": "FunctionArn", - "SourceARN": "SourceArn", - "StatementID": "StatementId", - }, - }, - "github.com/aws/aws-sdk-go/service/lambda/lambdaiface": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{}, - }, - "github.com/aws/aws-sdk-go/service/machinelearning": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{ - "BatchPredictionDataSourceID": "BatchPredictionDataSourceId", - "BatchPredictionID": "BatchPredictionId", - "CreatedByIAMUser": "CreatedByIamUser", - "DataPipelineID": "DataPipelineId", - "DataSchemaURI": "DataSchemaUri", - "DataSourceID": "DataSourceId", - "EndpointURL": "EndpointUrl", - "EvaluationDataSourceID": "EvaluationDataSourceId", - "EvaluationID": "EvaluationId", - "LogURI": "LogUri", - "MLModelID": "MLModelId", - "OutputURI": "OutputUri", - "RecipeURI": "RecipeUri", - "SecurityGroupIDs": "SecurityGroupIds", - "SelectSQLQuery": "SelectSqlQuery", - "SubnetID": "SubnetId", - "TrainingDataSourceID": "TrainingDataSourceId", - }, - }, - "github.com/aws/aws-sdk-go/service/machinelearning/machinelearningiface": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{}, - }, - "github.com/aws/aws-sdk-go/service/mobileanalytics": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{ - "ID": "Id", - }, - }, - "github.com/aws/aws-sdk-go/service/mobileanalytics/mobileanalyticsiface": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{}, - }, - "github.com/aws/aws-sdk-go/service/opsworks": { - operations: map[string]string{ - "AssociateElasticIP": "AssociateElasticIp", - "AssociateElasticIPPages": "AssociateElasticIpPages", - "AssociateElasticIPRequest": "AssociateElasticIpRequest", - "DeregisterElasticIP": "DeregisterElasticIp", - "DeregisterElasticIPPages": "DeregisterElasticIpPages", - "DeregisterElasticIPRequest": "DeregisterElasticIpRequest", - "DeregisterRDSDBInstance": "DeregisterRdsDbInstance", - "DeregisterRDSDBInstancePages": "DeregisterRdsDbInstancePages", - "DeregisterRDSDBInstanceRequest": "DeregisterRdsDbInstanceRequest", - "DescribeElasticIPs": "DescribeElasticIps", - "DescribeElasticIPsPages": "DescribeElasticIpsPages", - "DescribeElasticIPsRequest": "DescribeElasticIpsRequest", - "DescribeRAIDArrays": "DescribeRaidArrays", - "DescribeRAIDArraysPages": "DescribeRaidArraysPages", - "DescribeRAIDArraysRequest": "DescribeRaidArraysRequest", - "DescribeRDSDBInstances": "DescribeRdsDbInstances", - "DescribeRDSDBInstancesPages": "DescribeRdsDbInstancesPages", - "DescribeRDSDBInstancesRequest": "DescribeRdsDbInstancesRequest", - "DisassociateElasticIP": "DisassociateElasticIp", - "DisassociateElasticIPPages": "DisassociateElasticIpPages", - "DisassociateElasticIPRequest": "DisassociateElasticIpRequest", - "RegisterElasticIP": "RegisterElasticIp", - "RegisterElasticIPPages": "RegisterElasticIpPages", - "RegisterElasticIPRequest": "RegisterElasticIpRequest", - "RegisterRDSDBInstance": "RegisterRdsDbInstance", - "RegisterRDSDBInstancePages": "RegisterRdsDbInstancePages", - "RegisterRDSDBInstanceRequest": "RegisterRdsDbInstanceRequest", - "UpdateElasticIP": "UpdateElasticIp", - "UpdateElasticIPPages": "UpdateElasticIpPages", - "UpdateElasticIPRequest": "UpdateElasticIpRequest", - "UpdateRDSDBInstance": "UpdateRdsDbInstance", - "UpdateRDSDBInstancePages": "UpdateRdsDbInstancePages", - "UpdateRDSDBInstanceRequest": "UpdateRdsDbInstanceRequest", - }, - shapes: map[string]string{ - "AssociateElasticIPInput": "AssociateElasticIpInput", - "AssociateElasticIPOutput": "AssociateElasticIpOutput", - "DeregisterElasticIPInput": "DeregisterElasticIpInput", - "DeregisterElasticIPOutput": "DeregisterElasticIpOutput", - "DeregisterRDSDBInstanceInput": "DeregisterRdsDbInstanceInput", - "DeregisterRDSDBInstanceOutput": "DeregisterRdsDbInstanceOutput", - "DescribeElasticIPsInput": "DescribeElasticIpsInput", - "DescribeElasticIPsOutput": "DescribeElasticIpsOutput", - "DescribeRAIDArraysInput": "DescribeRaidArraysInput", - "DescribeRAIDArraysOutput": "DescribeRaidArraysOutput", - "DescribeRDSDBInstancesInput": "DescribeRdsDbInstancesInput", - "DescribeRDSDBInstancesOutput": "DescribeRdsDbInstancesOutput", - "DisassociateElasticIPInput": "DisassociateElasticIpInput", - "DisassociateElasticIPOutput": "DisassociateElasticIpOutput", - "EBSBlockDevice": "EbsBlockDevice", - "ElasticIP": "ElasticIp", - "RAIDArray": "RaidArray", - "RDSDBInstance": "RdsDbInstance", - "RegisterElasticIPInput": "RegisterElasticIpInput", - "RegisterElasticIPOutput": "RegisterElasticIpOutput", - "RegisterRDSDBInstanceInput": "RegisterRdsDbInstanceInput", - "RegisterRDSDBInstanceOutput": "RegisterRdsDbInstanceOutput", - "SSLConfiguration": "SslConfiguration", - "UpdateElasticIPInput": "UpdateElasticIpInput", - "UpdateElasticIPOutput": "UpdateElasticIpOutput", - "UpdateRDSDBInstanceInput": "UpdateRdsDbInstanceInput", - "UpdateRDSDBInstanceOutput": "UpdateRdsDbInstanceOutput", - }, - fields: map[string]string{ - "AMIID": "AmiId", - "ARN": "Arn", - "AgentInstallerURL": "AgentInstallerUrl", - "AllowSSH": "AllowSsh", - "AppID": "AppId", - "AppIDs": "AppIds", - "AutoAssignElasticIPs": "AutoAssignElasticIps", - "AutoAssignPublicIPs": "AutoAssignPublicIps", - "CPUThreshold": "CpuThreshold", - "CloneAppIDs": "CloneAppIds", - "CommandID": "CommandId", - "CommandIDs": "CommandIds", - "CustomInstanceProfileARN": "CustomInstanceProfileArn", - "CustomJSON": "CustomJson", - "CustomSecurityGroupIDs": "CustomSecurityGroupIds", - "DBInstanceIdentifier": "DbInstanceIdentifier", - "DBPassword": "DbPassword", - "DBUser": "DbUser", - "DNSName": "DnsName", - "DefaultInstanceProfileARN": "DefaultInstanceProfileArn", - "DefaultSSHKeyName": "DefaultSshKeyName", - "DefaultSubnetID": "DefaultSubnetId", - "DelayUntilELBConnectionsDrained": "DelayUntilElbConnectionsDrained", - "DeleteElasticIP": "DeleteElasticIp", - "DeploymentID": "DeploymentId", - "DeploymentIDs": "DeploymentIds", - "EBS": "Ebs", - "EBSOptimized": "EbsOptimized", - "EC2InstanceID": "Ec2InstanceId", - "EC2InstanceIDs": "Ec2InstanceIds", - "EC2VolumeID": "Ec2VolumeId", - "EcsClusterARN": "EcsClusterArn", - "EcsClusterARNs": "EcsClusterArns", - "EcsContainerInstanceARN": "EcsContainerInstanceArn", - "ElasticIP": "ElasticIp", - "ElasticIPs": "ElasticIps", - "EnableSSL": "EnableSsl", - "IAMUserARN": "IamUserArn", - "IAMUserARNs": "IamUserArns", - "IOPS": "Iops", - "IP": "Ip", - "IPs": "Ips", - "InstanceID": "InstanceId", - "InstanceIDs": "InstanceIds", - "InstanceProfileARN": "InstanceProfileArn", - "LastServiceErrorID": "LastServiceErrorId", - "LayerID": "LayerId", - "LayerIDs": "LayerIds", - "LogURL": "LogUrl", - "MissingOnRDS": "MissingOnRds", - "PrivateDNS": "PrivateDns", - "PrivateIP": "PrivateIp", - "PublicDNS": "PublicDns", - "PublicIP": "PublicIp", - "RAIDArrayID": "RaidArrayId", - "RAIDArrayIDs": "RaidArrayIds", - "RAIDArrays": "RaidArrays", - "RAIDLevel": "RaidLevel", - "RDSDBInstanceARN": "RdsDbInstanceArn", - "RDSDBInstanceARNs": "RdsDbInstanceArns", - "RDSDBInstances": "RdsDbInstances", - "RSAPublicKey": "RsaPublicKey", - "RSAPublicKeyFingerprint": "RsaPublicKeyFingerprint", - "RootDeviceVolumeID": "RootDeviceVolumeId", - "SSHHostDSAKeyFingerprint": "SshHostDsaKeyFingerprint", - "SSHHostRSAKeyFingerprint": "SshHostRsaKeyFingerprint", - "SSHKey": "SshKey", - "SSHKeyName": "SshKeyName", - "SSHPublicKey": "SshPublicKey", - "SSHUsername": "SshUsername", - "SSLConfiguration": "SslConfiguration", - "SecurityGroupIDs": "SecurityGroupIds", - "ServiceErrorID": "ServiceErrorId", - "ServiceErrorIDs": "ServiceErrorIds", - "ServiceRoleARN": "ServiceRoleArn", - "SnapshotID": "SnapshotId", - "SourceStackID": "SourceStackId", - "StackID": "StackId", - "StackIDs": "StackIds", - "SubnetID": "SubnetId", - "SubnetIDs": "SubnetIds", - "URL": "Url", - "UseEBSOptimizedInstances": "UseEbsOptimizedInstances", - "UseOpsWorksSecurityGroups": "UseOpsworksSecurityGroups", - "VPCID": "VpcId", - "VolumeID": "VolumeId", - "VolumeIDs": "VolumeIds", - }, - }, - "github.com/aws/aws-sdk-go/service/opsworks/opsworksiface": { - operations: map[string]string{ - "AssociateElasticIP": "AssociateElasticIp", - "AssociateElasticIPPages": "AssociateElasticIpPages", - "AssociateElasticIPRequest": "AssociateElasticIpRequest", - "DeregisterElasticIP": "DeregisterElasticIp", - "DeregisterElasticIPPages": "DeregisterElasticIpPages", - "DeregisterElasticIPRequest": "DeregisterElasticIpRequest", - "DeregisterRDSDBInstance": "DeregisterRdsDbInstance", - "DeregisterRDSDBInstancePages": "DeregisterRdsDbInstancePages", - "DeregisterRDSDBInstanceRequest": "DeregisterRdsDbInstanceRequest", - "DescribeElasticIPs": "DescribeElasticIps", - "DescribeElasticIPsPages": "DescribeElasticIpsPages", - "DescribeElasticIPsRequest": "DescribeElasticIpsRequest", - "DescribeRAIDArrays": "DescribeRaidArrays", - "DescribeRAIDArraysPages": "DescribeRaidArraysPages", - "DescribeRAIDArraysRequest": "DescribeRaidArraysRequest", - "DescribeRDSDBInstances": "DescribeRdsDbInstances", - "DescribeRDSDBInstancesPages": "DescribeRdsDbInstancesPages", - "DescribeRDSDBInstancesRequest": "DescribeRdsDbInstancesRequest", - "DisassociateElasticIP": "DisassociateElasticIp", - "DisassociateElasticIPPages": "DisassociateElasticIpPages", - "DisassociateElasticIPRequest": "DisassociateElasticIpRequest", - "RegisterElasticIP": "RegisterElasticIp", - "RegisterElasticIPPages": "RegisterElasticIpPages", - "RegisterElasticIPRequest": "RegisterElasticIpRequest", - "RegisterRDSDBInstance": "RegisterRdsDbInstance", - "RegisterRDSDBInstancePages": "RegisterRdsDbInstancePages", - "RegisterRDSDBInstanceRequest": "RegisterRdsDbInstanceRequest", - "UpdateElasticIP": "UpdateElasticIp", - "UpdateElasticIPPages": "UpdateElasticIpPages", - "UpdateElasticIPRequest": "UpdateElasticIpRequest", - "UpdateRDSDBInstance": "UpdateRdsDbInstance", - "UpdateRDSDBInstancePages": "UpdateRdsDbInstancePages", - "UpdateRDSDBInstanceRequest": "UpdateRdsDbInstanceRequest", - }, - shapes: map[string]string{}, - fields: map[string]string{}, - }, - "github.com/aws/aws-sdk-go/service/rds": { - operations: map[string]string{}, - shapes: map[string]string{ - "VPCSecurityGroupMembership": "VpcSecurityGroupMembership", - }, - fields: map[string]string{ - "AllowsVPCAndNonVPCInstanceMemberships": "AllowsVpcAndNonVpcInstanceMemberships", - "CustSubscriptionID": "CustSubscriptionId", - "CustomerAWSID": "CustomerAwsId", - "DBIResourceID": "DbiResourceId", - "DBInstancePort": "DbInstancePort", - "EC2SecurityGroupID": "EC2SecurityGroupId", - "EC2SecurityGroupOwnerID": "EC2SecurityGroupOwnerId", - "IOPS": "Iops", - "KMSKeyID": "KmsKeyId", - "OwnerID": "OwnerId", - "ReservedDBInstanceID": "ReservedDBInstanceId", - "ReservedDBInstancesOfferingID": "ReservedDBInstancesOfferingId", - "SNSTopicARN": "SnsTopicArn", - "SourceIDs": "SourceIds", - "SourceIDsList": "SourceIdsList", - "SubnetIDs": "SubnetIds", - "SupportsIOPS": "SupportsIops", - "TDECredentialARN": "TdeCredentialArn", - "TDECredentialPassword": "TdeCredentialPassword", - "VPC": "Vpc", - "VPCID": "VpcId", - "VPCSecurityGroupID": "VpcSecurityGroupId", - "VPCSecurityGroupIDs": "VpcSecurityGroupIds", - "VPCSecurityGroupMemberships": "VpcSecurityGroupMemberships", - "VPCSecurityGroups": "VpcSecurityGroups", - }, - }, - "github.com/aws/aws-sdk-go/service/rds/rdsiface": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{}, - }, - "github.com/aws/aws-sdk-go/service/redshift": { - operations: map[string]string{ - "CreateHSMClientCertificate": "CreateHsmClientCertificate", - "CreateHSMClientCertificatePages": "CreateHsmClientCertificatePages", - "CreateHSMClientCertificateRequest": "CreateHsmClientCertificateRequest", - "CreateHSMConfiguration": "CreateHsmConfiguration", - "CreateHSMConfigurationPages": "CreateHsmConfigurationPages", - "CreateHSMConfigurationRequest": "CreateHsmConfigurationRequest", - "DeleteHSMClientCertificate": "DeleteHsmClientCertificate", - "DeleteHSMClientCertificatePages": "DeleteHsmClientCertificatePages", - "DeleteHSMClientCertificateRequest": "DeleteHsmClientCertificateRequest", - "DeleteHSMConfiguration": "DeleteHsmConfiguration", - "DeleteHSMConfigurationPages": "DeleteHsmConfigurationPages", - "DeleteHSMConfigurationRequest": "DeleteHsmConfigurationRequest", - "DescribeHSMClientCertificates": "DescribeHsmClientCertificates", - "DescribeHSMClientCertificatesPages": "DescribeHsmClientCertificatesPages", - "DescribeHSMClientCertificatesRequest": "DescribeHsmClientCertificatesRequest", - "DescribeHSMConfigurations": "DescribeHsmConfigurations", - "DescribeHSMConfigurationsPages": "DescribeHsmConfigurationsPages", - "DescribeHSMConfigurationsRequest": "DescribeHsmConfigurationsRequest", - }, - shapes: map[string]string{ - "CreateHSMClientCertificateInput": "CreateHsmClientCertificateInput", - "CreateHSMClientCertificateOutput": "CreateHsmClientCertificateOutput", - "CreateHSMConfigurationInput": "CreateHsmConfigurationInput", - "CreateHSMConfigurationOutput": "CreateHsmConfigurationOutput", - "DeleteHSMClientCertificateInput": "DeleteHsmClientCertificateInput", - "DeleteHSMClientCertificateOutput": "DeleteHsmClientCertificateOutput", - "DeleteHSMConfigurationInput": "DeleteHsmConfigurationInput", - "DeleteHSMConfigurationOutput": "DeleteHsmConfigurationOutput", - "DescribeHSMClientCertificatesInput": "DescribeHsmClientCertificatesInput", - "DescribeHSMClientCertificatesOutput": "DescribeHsmClientCertificatesOutput", - "DescribeHSMConfigurationsInput": "DescribeHsmConfigurationsInput", - "DescribeHSMConfigurationsOutput": "DescribeHsmConfigurationsOutput", - "ElasticIPStatus": "ElasticIpStatus", - "HSMClientCertificate": "HsmClientCertificate", - "HSMConfiguration": "HsmConfiguration", - "HSMStatus": "HsmStatus", - "VPCSecurityGroupMembership": "VpcSecurityGroupMembership", - }, - fields: map[string]string{ - "AccountID": "AccountId", - "CustSubscriptionID": "CustSubscriptionId", - "CustomerAWSID": "CustomerAwsId", - "EC2SecurityGroupOwnerID": "EC2SecurityGroupOwnerId", - "ElasticIP": "ElasticIp", - "ElasticIPStatus": "ElasticIpStatus", - "EventID": "EventId", - "HSMClientCertificate": "HsmClientCertificate", - "HSMClientCertificateIdentifier": "HsmClientCertificateIdentifier", - "HSMClientCertificatePublicKey": "HsmClientCertificatePublicKey", - "HSMClientCertificates": "HsmClientCertificates", - "HSMConfiguration": "HsmConfiguration", - "HSMConfigurationIdentifier": "HsmConfigurationIdentifier", - "HSMConfigurations": "HsmConfigurations", - "HSMIPAddress": "HsmIpAddress", - "HSMPartitionName": "HsmPartitionName", - "HSMPartitionPassword": "HsmPartitionPassword", - "HSMServerPublicCertificate": "HsmServerPublicCertificate", - "HSMStatus": "HsmStatus", - "KMSKeyID": "KmsKeyId", - "ReservedNodeID": "ReservedNodeId", - "ReservedNodeOfferingID": "ReservedNodeOfferingId", - "SNSTopicARN": "SnsTopicArn", - "SourceIDs": "SourceIds", - "SourceIDsList": "SourceIdsList", - "SubnetIDs": "SubnetIds", - "VPCID": "VpcId", - "VPCSecurityGroupID": "VpcSecurityGroupId", - "VPCSecurityGroupIDs": "VpcSecurityGroupIds", - "VPCSecurityGroups": "VpcSecurityGroups", - }, - }, - "github.com/aws/aws-sdk-go/service/redshift/redshiftiface": { - operations: map[string]string{ - "CreateHSMClientCertificate": "CreateHsmClientCertificate", - "CreateHSMClientCertificatePages": "CreateHsmClientCertificatePages", - "CreateHSMClientCertificateRequest": "CreateHsmClientCertificateRequest", - "CreateHSMConfiguration": "CreateHsmConfiguration", - "CreateHSMConfigurationPages": "CreateHsmConfigurationPages", - "CreateHSMConfigurationRequest": "CreateHsmConfigurationRequest", - "DeleteHSMClientCertificate": "DeleteHsmClientCertificate", - "DeleteHSMClientCertificatePages": "DeleteHsmClientCertificatePages", - "DeleteHSMClientCertificateRequest": "DeleteHsmClientCertificateRequest", - "DeleteHSMConfiguration": "DeleteHsmConfiguration", - "DeleteHSMConfigurationPages": "DeleteHsmConfigurationPages", - "DeleteHSMConfigurationRequest": "DeleteHsmConfigurationRequest", - "DescribeHSMClientCertificates": "DescribeHsmClientCertificates", - "DescribeHSMClientCertificatesPages": "DescribeHsmClientCertificatesPages", - "DescribeHSMClientCertificatesRequest": "DescribeHsmClientCertificatesRequest", - "DescribeHSMConfigurations": "DescribeHsmConfigurations", - "DescribeHSMConfigurationsPages": "DescribeHsmConfigurationsPages", - "DescribeHSMConfigurationsRequest": "DescribeHsmConfigurationsRequest", - }, - shapes: map[string]string{}, - fields: map[string]string{}, - }, - "github.com/aws/aws-sdk-go/service/route53": { - operations: map[string]string{ - "GetCheckerIPRanges": "GetCheckerIpRanges", - "GetCheckerIPRangesPages": "GetCheckerIpRangesPages", - "GetCheckerIPRangesRequest": "GetCheckerIpRangesRequest", - }, - shapes: map[string]string{ - "GetCheckerIPRangesInput": "GetCheckerIpRangesInput", - "GetCheckerIPRangesOutput": "GetCheckerIpRangesOutput", - }, - fields: map[string]string{ - "CheckerIPRanges": "CheckerIpRanges", - "DelegationSetID": "DelegationSetId", - "HealthCheckID": "HealthCheckId", - "HostedZoneID": "HostedZoneId", - "ID": "Id", - "NextHostedZoneID": "NextHostedZoneId", - "ResourceID": "ResourceId", - "ResourceIDs": "ResourceIds", - "VPCID": "VPCId", - }, - }, - "github.com/aws/aws-sdk-go/service/route53/route53iface": { - operations: map[string]string{ - "GetCheckerIPRanges": "GetCheckerIpRanges", - "GetCheckerIPRangesPages": "GetCheckerIpRangesPages", - "GetCheckerIPRangesRequest": "GetCheckerIpRangesRequest", - }, - shapes: map[string]string{}, - fields: map[string]string{}, - }, - "github.com/aws/aws-sdk-go/service/route53domains": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{ - "DNSSec": "DnsSec", - "GlueIPs": "GlueIps", - "IDNLangCode": "IdnLangCode", - "OperationID": "OperationId", - "RegistrarURL": "RegistrarUrl", - "RegistryDomainID": "RegistryDomainId", - }, - }, - "github.com/aws/aws-sdk-go/service/route53domains/route53domainsiface": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{}, - }, - "github.com/aws/aws-sdk-go/service/s3": { - operations: map[string]string{ - "DeleteBucketCORS": "DeleteBucketCors", - "DeleteBucketCORSPages": "DeleteBucketCorsPages", - "DeleteBucketCORSRequest": "DeleteBucketCorsRequest", - "GetBucketACL": "GetBucketAcl", - "GetBucketACLPages": "GetBucketAclPages", - "GetBucketACLRequest": "GetBucketAclRequest", - "GetBucketCORS": "GetBucketCors", - "GetBucketCORSPages": "GetBucketCorsPages", - "GetBucketCORSRequest": "GetBucketCorsRequest", - "GetObjectACL": "GetObjectAcl", - "GetObjectACLPages": "GetObjectAclPages", - "GetObjectACLRequest": "GetObjectAclRequest", - "PutBucketACL": "PutBucketAcl", - "PutBucketACLPages": "PutBucketAclPages", - "PutBucketACLRequest": "PutBucketAclRequest", - "PutBucketCORS": "PutBucketCors", - "PutBucketCORSPages": "PutBucketCorsPages", - "PutBucketCORSRequest": "PutBucketCorsRequest", - "PutObjectACL": "PutObjectAcl", - "PutObjectACLPages": "PutObjectAclPages", - "PutObjectACLRequest": "PutObjectAclRequest", - }, - shapes: map[string]string{ - "DeleteBucketCORSInput": "DeleteBucketCorsInput", - "DeleteBucketCORSOutput": "DeleteBucketCorsOutput", - "GetBucketACLInput": "GetBucketAclInput", - "GetBucketACLOutput": "GetBucketAclOutput", - "GetBucketCORSInput": "GetBucketCorsInput", - "GetBucketCORSOutput": "GetBucketCorsOutput", - "GetObjectACLInput": "GetObjectAclInput", - "GetObjectACLOutput": "GetObjectAclOutput", - "PutBucketACLInput": "PutBucketAclInput", - "PutBucketACLOutput": "PutBucketAclOutput", - "PutBucketCORSInput": "PutBucketCorsInput", - "PutBucketCORSOutput": "PutBucketCorsOutput", - "PutObjectACLInput": "PutObjectAclInput", - "PutObjectACLOutput": "PutObjectAclOutput", - }, - fields: map[string]string{ - "CopySourceVersionID": "CopySourceVersionId", - "DeleteMarkerVersionID": "DeleteMarkerVersionId", - "HTTPErrorCodeReturnedEquals": "HttpErrorCodeReturnedEquals", - "HTTPRedirectCode": "HttpRedirectCode", - "ID": "Id", - "LambdaFunctionARN": "LambdaFunctionArn", - "NextUploadIDMarker": "NextUploadIdMarker", - "NextVersionIDMarker": "NextVersionIdMarker", - "QueueARN": "QueueArn", - "SSEKMSKeyID": "SSEKMSKeyId", - "TopicARN": "TopicArn", - "UploadID": "UploadId", - "UploadIDMarker": "UploadIdMarker", - "VersionID": "VersionId", - "VersionIDMarker": "VersionIdMarker", - }, - }, - "github.com/aws/aws-sdk-go/service/s3/s3manager": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{ - "UploadID": "UploadId", - }, - }, - "github.com/aws/aws-sdk-go/service/s3/s3iface": { - operations: map[string]string{ - "DeleteBucketCORS": "DeleteBucketCors", - "DeleteBucketCORSPages": "DeleteBucketCorsPages", - "DeleteBucketCORSRequest": "DeleteBucketCorsRequest", - "GetBucketACL": "GetBucketAcl", - "GetBucketACLPages": "GetBucketAclPages", - "GetBucketACLRequest": "GetBucketAclRequest", - "GetBucketCORS": "GetBucketCors", - "GetBucketCORSPages": "GetBucketCorsPages", - "GetBucketCORSRequest": "GetBucketCorsRequest", - "GetObjectACL": "GetObjectAcl", - "GetObjectACLPages": "GetObjectAclPages", - "GetObjectACLRequest": "GetObjectAclRequest", - "PutBucketACL": "PutBucketAcl", - "PutBucketACLPages": "PutBucketAclPages", - "PutBucketACLRequest": "PutBucketAclRequest", - "PutBucketCORS": "PutBucketCors", - "PutBucketCORSPages": "PutBucketCorsPages", - "PutBucketCORSRequest": "PutBucketCorsRequest", - "PutObjectACL": "PutObjectAcl", - "PutObjectACLPages": "PutObjectAclPages", - "PutObjectACLRequest": "PutObjectAclRequest", - }, - shapes: map[string]string{}, - fields: map[string]string{}, - }, - "github.com/aws/aws-sdk-go/service/ses": { - operations: map[string]string{ - "GetIdentityDKIMAttributes": "GetIdentityDkimAttributes", - "GetIdentityDKIMAttributesPages": "GetIdentityDkimAttributesPages", - "GetIdentityDKIMAttributesRequest": "GetIdentityDkimAttributesRequest", - "SetIdentityDKIMEnabled": "SetIdentityDkimEnabled", - "SetIdentityDKIMEnabledPages": "SetIdentityDkimEnabledPages", - "SetIdentityDKIMEnabledRequest": "SetIdentityDkimEnabledRequest", - "VerifyDomainDKIM": "VerifyDomainDkim", - "VerifyDomainDKIMPages": "VerifyDomainDkimPages", - "VerifyDomainDKIMRequest": "VerifyDomainDkimRequest", - }, - shapes: map[string]string{ - "GetIdentityDKIMAttributesInput": "GetIdentityDkimAttributesInput", - "GetIdentityDKIMAttributesOutput": "GetIdentityDkimAttributesOutput", - "IdentityDKIMAttributes": "IdentityDkimAttributes", - "SetIdentityDKIMEnabledInput": "SetIdentityDkimEnabledInput", - "SetIdentityDKIMEnabledOutput": "SetIdentityDkimEnabledOutput", - "VerifyDomainDKIMInput": "VerifyDomainDkimInput", - "VerifyDomainDKIMOutput": "VerifyDomainDkimOutput", - }, - fields: map[string]string{ - "BCCAddresses": "BccAddresses", - "CCAddresses": "CcAddresses", - "DKIMAttributes": "DkimAttributes", - "DKIMEnabled": "DkimEnabled", - "DKIMTokens": "DkimTokens", - "DKIMVerificationStatus": "DkimVerificationStatus", - "FromARN": "FromArn", - "HTML": "Html", - "MessageID": "MessageId", - "ReturnPathARN": "ReturnPathArn", - "SNSTopic": "SnsTopic", - "SourceARN": "SourceArn", - }, - }, - "github.com/aws/aws-sdk-go/service/ses/sesiface": { - operations: map[string]string{ - "GetIdentityDKIMAttributes": "GetIdentityDkimAttributes", - "GetIdentityDKIMAttributesPages": "GetIdentityDkimAttributesPages", - "GetIdentityDKIMAttributesRequest": "GetIdentityDkimAttributesRequest", - "SetIdentityDKIMEnabled": "SetIdentityDkimEnabled", - "SetIdentityDKIMEnabledPages": "SetIdentityDkimEnabledPages", - "SetIdentityDKIMEnabledRequest": "SetIdentityDkimEnabledRequest", - "VerifyDomainDKIM": "VerifyDomainDkim", - "VerifyDomainDKIMPages": "VerifyDomainDkimPages", - "VerifyDomainDKIMRequest": "VerifyDomainDkimRequest", - }, - shapes: map[string]string{}, - fields: map[string]string{}, - }, - "github.com/aws/aws-sdk-go/service/sns": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{ - "AWSAccountID": "AWSAccountId", - "EndpointARN": "EndpointArn", - "MessageID": "MessageId", - "PlatformApplicationARN": "PlatformApplicationArn", - "SubscriptionARN": "SubscriptionArn", - "TargetARN": "TargetArn", - "TopicARN": "TopicArn", - }, - }, - "github.com/aws/aws-sdk-go/service/sns/snsiface": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{}, - }, - "github.com/aws/aws-sdk-go/service/sqs": { - operations: map[string]string{ - "GetQueueURL": "GetQueueUrl", - "GetQueueURLPages": "GetQueueUrlPages", - "GetQueueURLRequest": "GetQueueUrlRequest", - }, - shapes: map[string]string{ - "GetQueueURLInput": "GetQueueUrlInput", - "GetQueueURLOutput": "GetQueueUrlOutput", - }, - fields: map[string]string{ - "AWSAccountIDs": "AWSAccountIds", - "ID": "Id", - "MessageID": "MessageId", - "QueueOwnerAWSAccountID": "QueueOwnerAWSAccountId", - "QueueURL": "QueueUrl", - "QueueURLs": "QueueUrls", - }, - }, - "github.com/aws/aws-sdk-go/service/sqs/sqsiface": { - operations: map[string]string{ - "GetQueueURL": "GetQueueUrl", - "GetQueueURLPages": "GetQueueUrlPages", - "GetQueueURLRequest": "GetQueueUrlRequest", - }, - shapes: map[string]string{}, - fields: map[string]string{}, - }, - "github.com/aws/aws-sdk-go/service/ssm": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{ - "InstanceID": "InstanceId", - "SHA1": "Sha1", - }, - }, - "github.com/aws/aws-sdk-go/service/ssm/ssmiface": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{}, - }, - "github.com/aws/aws-sdk-go/service/storagegateway": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{ - "DiskID": "DiskId", - "DiskIDs": "DiskIds", - "GatewayID": "GatewayId", - "IPV4Address": "Ipv4Address", - "IPV6Address": "Ipv6Address", - "MACAddress": "MacAddress", - "NetworkInterfaceID": "NetworkInterfaceId", - "SnapshotID": "SnapshotId", - "SourceSnapshotID": "SourceSnapshotId", - "VolumeDiskID": "VolumeDiskId", - "VolumeID": "VolumeId", - }, - }, - "github.com/aws/aws-sdk-go/service/storagegateway/storagegatewayiface": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{}, - }, - "github.com/aws/aws-sdk-go/service/sts": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{ - "ARN": "Arn", - "AccessKeyID": "AccessKeyId", - "AssumedRoleID": "AssumedRoleId", - "ExternalID": "ExternalId", - "FederatedUserID": "FederatedUserId", - "PrincipalARN": "PrincipalArn", - "ProviderID": "ProviderId", - "RoleARN": "RoleArn", - }, - }, - "github.com/aws/aws-sdk-go/service/sts/stsiface": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{}, - }, - "github.com/aws/aws-sdk-go/service/support": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{ - "AttachmentID": "AttachmentId", - "AttachmentSetID": "AttachmentSetId", - "CCEmailAddresses": "CcEmailAddresses", - "CaseID": "CaseId", - "CaseIDList": "CaseIdList", - "CheckID": "CheckId", - "CheckIDs": "CheckIds", - "DisplayID": "DisplayId", - "ID": "Id", - "ResourceID": "ResourceId", - }, - }, - "github.com/aws/aws-sdk-go/service/support/supportiface": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{}, - }, - "github.com/aws/aws-sdk-go/service/swf": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{ - "ActivityID": "ActivityId", - "ContinuedExecutionRunID": "ContinuedExecutionRunId", - "DecisionTaskCompletedEventID": "DecisionTaskCompletedEventId", - "EventID": "EventId", - "ExternalInitiatedEventID": "ExternalInitiatedEventId", - "ID": "Id", - "InitiatedEventID": "InitiatedEventId", - "LatestCancelRequestedEventID": "LatestCancelRequestedEventId", - "NewExecutionRunID": "NewExecutionRunId", - "ParentInitiatedEventID": "ParentInitiatedEventId", - "PreviousStartedEventID": "PreviousStartedEventId", - "RunID": "RunId", - "ScheduledEventID": "ScheduledEventId", - "StartedEventID": "StartedEventId", - "TimerID": "TimerId", - "WorkflowID": "WorkflowId", - }, - }, - "github.com/aws/aws-sdk-go/service/swf/swfiface": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{}, - }, - "github.com/aws/aws-sdk-go/service/workspaces": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{ - "BundleID": "BundleId", - "BundleIDs": "BundleIds", - "CustomSecurityGroupID": "CustomSecurityGroupId", - "DNSIPAddresses": "DnsIpAddresses", - "DefaultOU": "DefaultOu", - "DirectoryID": "DirectoryId", - "DirectoryIDs": "DirectoryIds", - "IAMRoleID": "IamRoleId", - "IPAddress": "IpAddress", - "SubnetID": "SubnetId", - "SubnetIDs": "SubnetIds", - "WorkspaceID": "WorkspaceId", - "WorkspaceIDs": "WorkspaceIds", - "WorkspaceSecurityGroupID": "WorkspaceSecurityGroupId", - }, - }, - "github.com/aws/aws-sdk-go/service/workspaces/workspacesiface": { - operations: map[string]string{}, - shapes: map[string]string{}, - fields: map[string]string{}, - }, -} diff --git a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/renamer.go b/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/renamer.go deleted file mode 100644 index ab516b8..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/renamer.go +++ /dev/null @@ -1,45 +0,0 @@ -// +build go1.5,deprecated - -package main - -//go:generate go run -tags deprecated gen/gen.go - -import ( - "os" - "os/exec" - "path/filepath" - "strings" - - "github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/rename" -) - -var safeTag = "4e554f77f00d527b452c68a46f2e68595284121b" - -func main() { - gopath := os.Getenv("GOPATH") - if gopath == "" { - panic("GOPATH not set!") - } - gopath = strings.Split(gopath, ":")[0] - - // change directory to SDK - err := os.Chdir(filepath.Join(gopath, "src", "github.com", "aws", "aws-sdk-go")) - if err != nil { - panic("Cannot find SDK repository") - } - - // store orig HEAD - head, err := exec.Command("git", "rev-parse", "--abbrev-ref", "HEAD").Output() - if err != nil { - panic("Cannot find SDK repository") - } - origHEAD := strings.Trim(string(head), " \r\n") - - // checkout to safe tag and run conversion - exec.Command("git", "checkout", safeTag).Run() - defer func() { - exec.Command("git", "checkout", origHEAD).Run() - }() - - rename.ParsePathsFromArgs() -} diff --git a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/LICENSE b/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/LICENSE deleted file mode 100644 index 6a66aea..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2009 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/PATENTS b/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/PATENTS deleted file mode 100644 index 7330990..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/PATENTS +++ /dev/null @@ -1,22 +0,0 @@ -Additional IP Rights Grant (Patents) - -"This implementation" means the copyrightable works distributed by -Google as part of the Go project. - -Google hereby grants to You a perpetual, worldwide, non-exclusive, -no-charge, royalty-free, irrevocable (except as stated in this section) -patent license to make, have made, use, offer to sell, sell, import, -transfer and otherwise run, modify and propagate the contents of this -implementation of Go, where such license applies only to those patent -claims, both currently owned or controlled by Google and acquired in -the future, licensable by Google that are necessarily infringed by this -implementation of Go. This grant does not include claims that would be -infringed only as a consequence of further modification of this -implementation. If you or your agent or exclusive licensee institute or -order or agree to the institution of patent litigation against any -entity (including a cross-claim or counterclaim in a lawsuit) alleging -that this implementation of Go or any code incorporated within this -implementation of Go constitutes direct or contributory patent -infringement, or inducement of patent infringement, then any patent -rights granted to you under this License for this implementation of Go -shall terminate as of the date such litigation is filed. diff --git a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/ast/astutil/enclosing.go b/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/ast/astutil/enclosing.go deleted file mode 100644 index 340c9e6..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/ast/astutil/enclosing.go +++ /dev/null @@ -1,624 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package astutil - -// This file defines utilities for working with source positions. - -import ( - "fmt" - "go/ast" - "go/token" - "sort" -) - -// PathEnclosingInterval returns the node that encloses the source -// interval [start, end), and all its ancestors up to the AST root. -// -// The definition of "enclosing" used by this function considers -// additional whitespace abutting a node to be enclosed by it. -// In this example: -// -// z := x + y // add them -// <-A-> -// <----B-----> -// -// the ast.BinaryExpr(+) node is considered to enclose interval B -// even though its [Pos()..End()) is actually only interval A. -// This behaviour makes user interfaces more tolerant of imperfect -// input. -// -// This function treats tokens as nodes, though they are not included -// in the result. e.g. PathEnclosingInterval("+") returns the -// enclosing ast.BinaryExpr("x + y"). -// -// If start==end, the 1-char interval following start is used instead. -// -// The 'exact' result is true if the interval contains only path[0] -// and perhaps some adjacent whitespace. It is false if the interval -// overlaps multiple children of path[0], or if it contains only -// interior whitespace of path[0]. -// In this example: -// -// z := x + y // add them -// <--C--> <---E--> -// ^ -// D -// -// intervals C, D and E are inexact. C is contained by the -// z-assignment statement, because it spans three of its children (:=, -// x, +). So too is the 1-char interval D, because it contains only -// interior whitespace of the assignment. E is considered interior -// whitespace of the BlockStmt containing the assignment. -// -// Precondition: [start, end) both lie within the same file as root. -// TODO(adonovan): return (nil, false) in this case and remove precond. -// Requires FileSet; see loader.tokenFileContainsPos. -// -// Postcondition: path is never nil; it always contains at least 'root'. -// -func PathEnclosingInterval(root *ast.File, start, end token.Pos) (path []ast.Node, exact bool) { - // fmt.Printf("EnclosingInterval %d %d\n", start, end) // debugging - - // Precondition: node.[Pos..End) and adjoining whitespace contain [start, end). - var visit func(node ast.Node) bool - visit = func(node ast.Node) bool { - path = append(path, node) - - nodePos := node.Pos() - nodeEnd := node.End() - - // fmt.Printf("visit(%T, %d, %d)\n", node, nodePos, nodeEnd) // debugging - - // Intersect [start, end) with interval of node. - if start < nodePos { - start = nodePos - } - if end > nodeEnd { - end = nodeEnd - } - - // Find sole child that contains [start, end). - children := childrenOf(node) - l := len(children) - for i, child := range children { - // [childPos, childEnd) is unaugmented interval of child. - childPos := child.Pos() - childEnd := child.End() - - // [augPos, augEnd) is whitespace-augmented interval of child. - augPos := childPos - augEnd := childEnd - if i > 0 { - augPos = children[i-1].End() // start of preceding whitespace - } - if i < l-1 { - nextChildPos := children[i+1].Pos() - // Does [start, end) lie between child and next child? - if start >= augEnd && end <= nextChildPos { - return false // inexact match - } - augEnd = nextChildPos // end of following whitespace - } - - // fmt.Printf("\tchild %d: [%d..%d)\tcontains interval [%d..%d)?\n", - // i, augPos, augEnd, start, end) // debugging - - // Does augmented child strictly contain [start, end)? - if augPos <= start && end <= augEnd { - _, isToken := child.(tokenNode) - return isToken || visit(child) - } - - // Does [start, end) overlap multiple children? - // i.e. left-augmented child contains start - // but LR-augmented child does not contain end. - if start < childEnd && end > augEnd { - break - } - } - - // No single child contained [start, end), - // so node is the result. Is it exact? - - // (It's tempting to put this condition before the - // child loop, but it gives the wrong result in the - // case where a node (e.g. ExprStmt) and its sole - // child have equal intervals.) - if start == nodePos && end == nodeEnd { - return true // exact match - } - - return false // inexact: overlaps multiple children - } - - if start > end { - start, end = end, start - } - - if start < root.End() && end > root.Pos() { - if start == end { - end = start + 1 // empty interval => interval of size 1 - } - exact = visit(root) - - // Reverse the path: - for i, l := 0, len(path); i < l/2; i++ { - path[i], path[l-1-i] = path[l-1-i], path[i] - } - } else { - // Selection lies within whitespace preceding the - // first (or following the last) declaration in the file. - // The result nonetheless always includes the ast.File. - path = append(path, root) - } - - return -} - -// tokenNode is a dummy implementation of ast.Node for a single token. -// They are used transiently by PathEnclosingInterval but never escape -// this package. -// -type tokenNode struct { - pos token.Pos - end token.Pos -} - -func (n tokenNode) Pos() token.Pos { - return n.pos -} - -func (n tokenNode) End() token.Pos { - return n.end -} - -func tok(pos token.Pos, len int) ast.Node { - return tokenNode{pos, pos + token.Pos(len)} -} - -// childrenOf returns the direct non-nil children of ast.Node n. -// It may include fake ast.Node implementations for bare tokens. -// it is not safe to call (e.g.) ast.Walk on such nodes. -// -func childrenOf(n ast.Node) []ast.Node { - var children []ast.Node - - // First add nodes for all true subtrees. - ast.Inspect(n, func(node ast.Node) bool { - if node == n { // push n - return true // recur - } - if node != nil { // push child - children = append(children, node) - } - return false // no recursion - }) - - // Then add fake Nodes for bare tokens. - switch n := n.(type) { - case *ast.ArrayType: - children = append(children, - tok(n.Lbrack, len("[")), - tok(n.Elt.End(), len("]"))) - - case *ast.AssignStmt: - children = append(children, - tok(n.TokPos, len(n.Tok.String()))) - - case *ast.BasicLit: - children = append(children, - tok(n.ValuePos, len(n.Value))) - - case *ast.BinaryExpr: - children = append(children, tok(n.OpPos, len(n.Op.String()))) - - case *ast.BlockStmt: - children = append(children, - tok(n.Lbrace, len("{")), - tok(n.Rbrace, len("}"))) - - case *ast.BranchStmt: - children = append(children, - tok(n.TokPos, len(n.Tok.String()))) - - case *ast.CallExpr: - children = append(children, - tok(n.Lparen, len("(")), - tok(n.Rparen, len(")"))) - if n.Ellipsis != 0 { - children = append(children, tok(n.Ellipsis, len("..."))) - } - - case *ast.CaseClause: - if n.List == nil { - children = append(children, - tok(n.Case, len("default"))) - } else { - children = append(children, - tok(n.Case, len("case"))) - } - children = append(children, tok(n.Colon, len(":"))) - - case *ast.ChanType: - switch n.Dir { - case ast.RECV: - children = append(children, tok(n.Begin, len("<-chan"))) - case ast.SEND: - children = append(children, tok(n.Begin, len("chan<-"))) - case ast.RECV | ast.SEND: - children = append(children, tok(n.Begin, len("chan"))) - } - - case *ast.CommClause: - if n.Comm == nil { - children = append(children, - tok(n.Case, len("default"))) - } else { - children = append(children, - tok(n.Case, len("case"))) - } - children = append(children, tok(n.Colon, len(":"))) - - case *ast.Comment: - // nop - - case *ast.CommentGroup: - // nop - - case *ast.CompositeLit: - children = append(children, - tok(n.Lbrace, len("{")), - tok(n.Rbrace, len("{"))) - - case *ast.DeclStmt: - // nop - - case *ast.DeferStmt: - children = append(children, - tok(n.Defer, len("defer"))) - - case *ast.Ellipsis: - children = append(children, - tok(n.Ellipsis, len("..."))) - - case *ast.EmptyStmt: - // nop - - case *ast.ExprStmt: - // nop - - case *ast.Field: - // TODO(adonovan): Field.{Doc,Comment,Tag}? - - case *ast.FieldList: - children = append(children, - tok(n.Opening, len("(")), - tok(n.Closing, len(")"))) - - case *ast.File: - // TODO test: Doc - children = append(children, - tok(n.Package, len("package"))) - - case *ast.ForStmt: - children = append(children, - tok(n.For, len("for"))) - - case *ast.FuncDecl: - // TODO(adonovan): FuncDecl.Comment? - - // Uniquely, FuncDecl breaks the invariant that - // preorder traversal yields tokens in lexical order: - // in fact, FuncDecl.Recv precedes FuncDecl.Type.Func. - // - // As a workaround, we inline the case for FuncType - // here and order things correctly. - // - children = nil // discard ast.Walk(FuncDecl) info subtrees - children = append(children, tok(n.Type.Func, len("func"))) - if n.Recv != nil { - children = append(children, n.Recv) - } - children = append(children, n.Name) - if n.Type.Params != nil { - children = append(children, n.Type.Params) - } - if n.Type.Results != nil { - children = append(children, n.Type.Results) - } - if n.Body != nil { - children = append(children, n.Body) - } - - case *ast.FuncLit: - // nop - - case *ast.FuncType: - if n.Func != 0 { - children = append(children, - tok(n.Func, len("func"))) - } - - case *ast.GenDecl: - children = append(children, - tok(n.TokPos, len(n.Tok.String()))) - if n.Lparen != 0 { - children = append(children, - tok(n.Lparen, len("(")), - tok(n.Rparen, len(")"))) - } - - case *ast.GoStmt: - children = append(children, - tok(n.Go, len("go"))) - - case *ast.Ident: - children = append(children, - tok(n.NamePos, len(n.Name))) - - case *ast.IfStmt: - children = append(children, - tok(n.If, len("if"))) - - case *ast.ImportSpec: - // TODO(adonovan): ImportSpec.{Doc,EndPos}? - - case *ast.IncDecStmt: - children = append(children, - tok(n.TokPos, len(n.Tok.String()))) - - case *ast.IndexExpr: - children = append(children, - tok(n.Lbrack, len("{")), - tok(n.Rbrack, len("}"))) - - case *ast.InterfaceType: - children = append(children, - tok(n.Interface, len("interface"))) - - case *ast.KeyValueExpr: - children = append(children, - tok(n.Colon, len(":"))) - - case *ast.LabeledStmt: - children = append(children, - tok(n.Colon, len(":"))) - - case *ast.MapType: - children = append(children, - tok(n.Map, len("map"))) - - case *ast.ParenExpr: - children = append(children, - tok(n.Lparen, len("(")), - tok(n.Rparen, len(")"))) - - case *ast.RangeStmt: - children = append(children, - tok(n.For, len("for")), - tok(n.TokPos, len(n.Tok.String()))) - - case *ast.ReturnStmt: - children = append(children, - tok(n.Return, len("return"))) - - case *ast.SelectStmt: - children = append(children, - tok(n.Select, len("select"))) - - case *ast.SelectorExpr: - // nop - - case *ast.SendStmt: - children = append(children, - tok(n.Arrow, len("<-"))) - - case *ast.SliceExpr: - children = append(children, - tok(n.Lbrack, len("[")), - tok(n.Rbrack, len("]"))) - - case *ast.StarExpr: - children = append(children, tok(n.Star, len("*"))) - - case *ast.StructType: - children = append(children, tok(n.Struct, len("struct"))) - - case *ast.SwitchStmt: - children = append(children, tok(n.Switch, len("switch"))) - - case *ast.TypeAssertExpr: - children = append(children, - tok(n.Lparen-1, len(".")), - tok(n.Lparen, len("(")), - tok(n.Rparen, len(")"))) - - case *ast.TypeSpec: - // TODO(adonovan): TypeSpec.{Doc,Comment}? - - case *ast.TypeSwitchStmt: - children = append(children, tok(n.Switch, len("switch"))) - - case *ast.UnaryExpr: - children = append(children, tok(n.OpPos, len(n.Op.String()))) - - case *ast.ValueSpec: - // TODO(adonovan): ValueSpec.{Doc,Comment}? - - case *ast.BadDecl, *ast.BadExpr, *ast.BadStmt: - // nop - } - - // TODO(adonovan): opt: merge the logic of ast.Inspect() into - // the switch above so we can make interleaved callbacks for - // both Nodes and Tokens in the right order and avoid the need - // to sort. - sort.Sort(byPos(children)) - - return children -} - -type byPos []ast.Node - -func (sl byPos) Len() int { - return len(sl) -} -func (sl byPos) Less(i, j int) bool { - return sl[i].Pos() < sl[j].Pos() -} -func (sl byPos) Swap(i, j int) { - sl[i], sl[j] = sl[j], sl[i] -} - -// NodeDescription returns a description of the concrete type of n suitable -// for a user interface. -// -// TODO(adonovan): in some cases (e.g. Field, FieldList, Ident, -// StarExpr) we could be much more specific given the path to the AST -// root. Perhaps we should do that. -// -func NodeDescription(n ast.Node) string { - switch n := n.(type) { - case *ast.ArrayType: - return "array type" - case *ast.AssignStmt: - return "assignment" - case *ast.BadDecl: - return "bad declaration" - case *ast.BadExpr: - return "bad expression" - case *ast.BadStmt: - return "bad statement" - case *ast.BasicLit: - return "basic literal" - case *ast.BinaryExpr: - return fmt.Sprintf("binary %s operation", n.Op) - case *ast.BlockStmt: - return "block" - case *ast.BranchStmt: - switch n.Tok { - case token.BREAK: - return "break statement" - case token.CONTINUE: - return "continue statement" - case token.GOTO: - return "goto statement" - case token.FALLTHROUGH: - return "fall-through statement" - } - case *ast.CallExpr: - return "function call (or conversion)" - case *ast.CaseClause: - return "case clause" - case *ast.ChanType: - return "channel type" - case *ast.CommClause: - return "communication clause" - case *ast.Comment: - return "comment" - case *ast.CommentGroup: - return "comment group" - case *ast.CompositeLit: - return "composite literal" - case *ast.DeclStmt: - return NodeDescription(n.Decl) + " statement" - case *ast.DeferStmt: - return "defer statement" - case *ast.Ellipsis: - return "ellipsis" - case *ast.EmptyStmt: - return "empty statement" - case *ast.ExprStmt: - return "expression statement" - case *ast.Field: - // Can be any of these: - // struct {x, y int} -- struct field(s) - // struct {T} -- anon struct field - // interface {I} -- interface embedding - // interface {f()} -- interface method - // func (A) func(B) C -- receiver, param(s), result(s) - return "field/method/parameter" - case *ast.FieldList: - return "field/method/parameter list" - case *ast.File: - return "source file" - case *ast.ForStmt: - return "for loop" - case *ast.FuncDecl: - return "function declaration" - case *ast.FuncLit: - return "function literal" - case *ast.FuncType: - return "function type" - case *ast.GenDecl: - switch n.Tok { - case token.IMPORT: - return "import declaration" - case token.CONST: - return "constant declaration" - case token.TYPE: - return "type declaration" - case token.VAR: - return "variable declaration" - } - case *ast.GoStmt: - return "go statement" - case *ast.Ident: - return "identifier" - case *ast.IfStmt: - return "if statement" - case *ast.ImportSpec: - return "import specification" - case *ast.IncDecStmt: - if n.Tok == token.INC { - return "increment statement" - } - return "decrement statement" - case *ast.IndexExpr: - return "index expression" - case *ast.InterfaceType: - return "interface type" - case *ast.KeyValueExpr: - return "key/value association" - case *ast.LabeledStmt: - return "statement label" - case *ast.MapType: - return "map type" - case *ast.Package: - return "package" - case *ast.ParenExpr: - return "parenthesized " + NodeDescription(n.X) - case *ast.RangeStmt: - return "range loop" - case *ast.ReturnStmt: - return "return statement" - case *ast.SelectStmt: - return "select statement" - case *ast.SelectorExpr: - return "selector" - case *ast.SendStmt: - return "channel send" - case *ast.SliceExpr: - return "slice expression" - case *ast.StarExpr: - return "*-operation" // load/store expr or pointer type - case *ast.StructType: - return "struct type" - case *ast.SwitchStmt: - return "switch statement" - case *ast.TypeAssertExpr: - return "type assertion" - case *ast.TypeSpec: - return "type specification" - case *ast.TypeSwitchStmt: - return "type switch" - case *ast.UnaryExpr: - return fmt.Sprintf("unary %s operation", n.Op) - case *ast.ValueSpec: - return "value specification" - - } - panic(fmt.Sprintf("unexpected node type: %T", n)) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/ast/astutil/imports.go b/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/ast/astutil/imports.go deleted file mode 100644 index a47bcfa..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/ast/astutil/imports.go +++ /dev/null @@ -1,400 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package astutil contains common utilities for working with the Go AST. -package astutil - -import ( - "fmt" - "go/ast" - "go/token" - "strconv" - "strings" -) - -// AddImport adds the import path to the file f, if absent. -func AddImport(fset *token.FileSet, f *ast.File, ipath string) (added bool) { - return AddNamedImport(fset, f, "", ipath) -} - -// AddNamedImport adds the import path to the file f, if absent. -// If name is not empty, it is used to rename the import. -// -// For example, calling -// AddNamedImport(fset, f, "pathpkg", "path") -// adds -// import pathpkg "path" -func AddNamedImport(fset *token.FileSet, f *ast.File, name, ipath string) (added bool) { - if imports(f, ipath) { - return false - } - - newImport := &ast.ImportSpec{ - Path: &ast.BasicLit{ - Kind: token.STRING, - Value: strconv.Quote(ipath), - }, - } - if name != "" { - newImport.Name = &ast.Ident{Name: name} - } - - // Find an import decl to add to. - // The goal is to find an existing import - // whose import path has the longest shared - // prefix with ipath. - var ( - bestMatch = -1 // length of longest shared prefix - lastImport = -1 // index in f.Decls of the file's final import decl - impDecl *ast.GenDecl // import decl containing the best match - impIndex = -1 // spec index in impDecl containing the best match - ) - for i, decl := range f.Decls { - gen, ok := decl.(*ast.GenDecl) - if ok && gen.Tok == token.IMPORT { - lastImport = i - // Do not add to import "C", to avoid disrupting the - // association with its doc comment, breaking cgo. - if declImports(gen, "C") { - continue - } - - // Match an empty import decl if that's all that is available. - if len(gen.Specs) == 0 && bestMatch == -1 { - impDecl = gen - } - - // Compute longest shared prefix with imports in this group. - for j, spec := range gen.Specs { - impspec := spec.(*ast.ImportSpec) - n := matchLen(importPath(impspec), ipath) - if n > bestMatch { - bestMatch = n - impDecl = gen - impIndex = j - } - } - } - } - - // If no import decl found, add one after the last import. - if impDecl == nil { - impDecl = &ast.GenDecl{ - Tok: token.IMPORT, - } - if lastImport >= 0 { - impDecl.TokPos = f.Decls[lastImport].End() - } else { - // There are no existing imports. - // Our new import goes after the package declaration and after - // the comment, if any, that starts on the same line as the - // package declaration. - impDecl.TokPos = f.Package - - file := fset.File(f.Package) - pkgLine := file.Line(f.Package) - for _, c := range f.Comments { - if file.Line(c.Pos()) > pkgLine { - break - } - impDecl.TokPos = c.End() - } - } - f.Decls = append(f.Decls, nil) - copy(f.Decls[lastImport+2:], f.Decls[lastImport+1:]) - f.Decls[lastImport+1] = impDecl - } - - // Insert new import at insertAt. - insertAt := 0 - if impIndex >= 0 { - // insert after the found import - insertAt = impIndex + 1 - } - impDecl.Specs = append(impDecl.Specs, nil) - copy(impDecl.Specs[insertAt+1:], impDecl.Specs[insertAt:]) - impDecl.Specs[insertAt] = newImport - pos := impDecl.Pos() - if insertAt > 0 { - // If there is a comment after an existing import, preserve the comment - // position by adding the new import after the comment. - if spec, ok := impDecl.Specs[insertAt-1].(*ast.ImportSpec); ok && spec.Comment != nil { - pos = spec.Comment.End() - } else { - // Assign same position as the previous import, - // so that the sorter sees it as being in the same block. - pos = impDecl.Specs[insertAt-1].Pos() - } - } - if newImport.Name != nil { - newImport.Name.NamePos = pos - } - newImport.Path.ValuePos = pos - newImport.EndPos = pos - - // Clean up parens. impDecl contains at least one spec. - if len(impDecl.Specs) == 1 { - // Remove unneeded parens. - impDecl.Lparen = token.NoPos - } else if !impDecl.Lparen.IsValid() { - // impDecl needs parens added. - impDecl.Lparen = impDecl.Specs[0].Pos() - } - - f.Imports = append(f.Imports, newImport) - - if len(f.Decls) <= 1 { - return true - } - - // Merge all the import declarations into the first one. - var first *ast.GenDecl - for i, decl := range f.Decls { - gen, ok := decl.(*ast.GenDecl) - if !ok || gen.Tok != token.IMPORT || declImports(gen, "C") { - continue - } - if first == nil { - first = gen - continue // Don't touch the first one. - } - // Move the imports of the other import declaration to the first one. - for _, spec := range gen.Specs { - spec.(*ast.ImportSpec).Path.ValuePos = first.Pos() - first.Specs = append(first.Specs, spec) - } - f.Decls = append(f.Decls[:i], f.Decls[i+1:]...) - } - - return true -} - -// DeleteImport deletes the import path from the file f, if present. -func DeleteImport(fset *token.FileSet, f *ast.File, path string) (deleted bool) { - return DeleteNamedImport(fset, f, "", path) -} - -// DeleteNamedImport deletes the import with the given name and path from the file f, if present. -func DeleteNamedImport(fset *token.FileSet, f *ast.File, name, path string) (deleted bool) { - var delspecs []*ast.ImportSpec - - // Find the import nodes that import path, if any. - for i := 0; i < len(f.Decls); i++ { - decl := f.Decls[i] - gen, ok := decl.(*ast.GenDecl) - if !ok || gen.Tok != token.IMPORT { - continue - } - for j := 0; j < len(gen.Specs); j++ { - spec := gen.Specs[j] - impspec := spec.(*ast.ImportSpec) - if impspec.Name == nil && name != "" { - continue - } - if impspec.Name != nil && impspec.Name.Name != name { - continue - } - if importPath(impspec) != path { - continue - } - - // We found an import spec that imports path. - // Delete it. - delspecs = append(delspecs, impspec) - deleted = true - copy(gen.Specs[j:], gen.Specs[j+1:]) - gen.Specs = gen.Specs[:len(gen.Specs)-1] - - // If this was the last import spec in this decl, - // delete the decl, too. - if len(gen.Specs) == 0 { - copy(f.Decls[i:], f.Decls[i+1:]) - f.Decls = f.Decls[:len(f.Decls)-1] - i-- - break - } else if len(gen.Specs) == 1 { - gen.Lparen = token.NoPos // drop parens - } - if j > 0 { - lastImpspec := gen.Specs[j-1].(*ast.ImportSpec) - lastLine := fset.Position(lastImpspec.Path.ValuePos).Line - line := fset.Position(impspec.Path.ValuePos).Line - - // We deleted an entry but now there may be - // a blank line-sized hole where the import was. - if line-lastLine > 1 { - // There was a blank line immediately preceding the deleted import, - // so there's no need to close the hole. - // Do nothing. - } else { - // There was no blank line. Close the hole. - fset.File(gen.Rparen).MergeLine(line) - } - } - j-- - } - } - - // Delete them from f.Imports. - for i := 0; i < len(f.Imports); i++ { - imp := f.Imports[i] - for j, del := range delspecs { - if imp == del { - copy(f.Imports[i:], f.Imports[i+1:]) - f.Imports = f.Imports[:len(f.Imports)-1] - copy(delspecs[j:], delspecs[j+1:]) - delspecs = delspecs[:len(delspecs)-1] - i-- - break - } - } - } - - if len(delspecs) > 0 { - panic(fmt.Sprintf("deleted specs from Decls but not Imports: %v", delspecs)) - } - - return -} - -// RewriteImport rewrites any import of path oldPath to path newPath. -func RewriteImport(fset *token.FileSet, f *ast.File, oldPath, newPath string) (rewrote bool) { - for _, imp := range f.Imports { - if importPath(imp) == oldPath { - rewrote = true - // record old End, because the default is to compute - // it using the length of imp.Path.Value. - imp.EndPos = imp.End() - imp.Path.Value = strconv.Quote(newPath) - } - } - return -} - -// UsesImport reports whether a given import is used. -func UsesImport(f *ast.File, path string) (used bool) { - spec := importSpec(f, path) - if spec == nil { - return - } - - name := spec.Name.String() - switch name { - case "": - // If the package name is not explicitly specified, - // make an educated guess. This is not guaranteed to be correct. - lastSlash := strings.LastIndex(path, "/") - if lastSlash == -1 { - name = path - } else { - name = path[lastSlash+1:] - } - case "_", ".": - // Not sure if this import is used - err on the side of caution. - return true - } - - ast.Walk(visitFn(func(n ast.Node) { - sel, ok := n.(*ast.SelectorExpr) - if ok && isTopName(sel.X, name) { - used = true - } - }), f) - - return -} - -type visitFn func(node ast.Node) - -func (fn visitFn) Visit(node ast.Node) ast.Visitor { - fn(node) - return fn -} - -// imports returns true if f imports path. -func imports(f *ast.File, path string) bool { - return importSpec(f, path) != nil -} - -// importSpec returns the import spec if f imports path, -// or nil otherwise. -func importSpec(f *ast.File, path string) *ast.ImportSpec { - for _, s := range f.Imports { - if importPath(s) == path { - return s - } - } - return nil -} - -// importPath returns the unquoted import path of s, -// or "" if the path is not properly quoted. -func importPath(s *ast.ImportSpec) string { - t, err := strconv.Unquote(s.Path.Value) - if err == nil { - return t - } - return "" -} - -// declImports reports whether gen contains an import of path. -func declImports(gen *ast.GenDecl, path string) bool { - if gen.Tok != token.IMPORT { - return false - } - for _, spec := range gen.Specs { - impspec := spec.(*ast.ImportSpec) - if importPath(impspec) == path { - return true - } - } - return false -} - -// matchLen returns the length of the longest path segment prefix shared by x and y. -func matchLen(x, y string) int { - n := 0 - for i := 0; i < len(x) && i < len(y) && x[i] == y[i]; i++ { - if x[i] == '/' { - n++ - } - } - return n -} - -// isTopName returns true if n is a top-level unresolved identifier with the given name. -func isTopName(n ast.Expr, name string) bool { - id, ok := n.(*ast.Ident) - return ok && id.Name == name && id.Obj == nil -} - -// Imports returns the file imports grouped by paragraph. -func Imports(fset *token.FileSet, f *ast.File) [][]*ast.ImportSpec { - var groups [][]*ast.ImportSpec - - for _, decl := range f.Decls { - genDecl, ok := decl.(*ast.GenDecl) - if !ok || genDecl.Tok != token.IMPORT { - break - } - - group := []*ast.ImportSpec{} - - var lastLine int - for _, spec := range genDecl.Specs { - importSpec := spec.(*ast.ImportSpec) - pos := importSpec.Path.ValuePos - line := fset.Position(pos).Line - if lastLine > 0 && pos > 0 && line-lastLine > 1 { - groups = append(groups, group) - group = []*ast.ImportSpec{} - } - group = append(group, importSpec) - lastLine = line - } - groups = append(groups, group) - } - - return groups -} diff --git a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/ast/astutil/util.go b/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/ast/astutil/util.go deleted file mode 100644 index 7630629..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/ast/astutil/util.go +++ /dev/null @@ -1,14 +0,0 @@ -package astutil - -import "go/ast" - -// Unparen returns e with any enclosing parentheses stripped. -func Unparen(e ast.Expr) ast.Expr { - for { - p, ok := e.(*ast.ParenExpr) - if !ok { - return e - } - e = p.X - } -} diff --git a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/buildutil/allpackages.go b/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/buildutil/allpackages.go deleted file mode 100644 index 3020809..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/buildutil/allpackages.go +++ /dev/null @@ -1,195 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package buildutil provides utilities related to the go/build -// package in the standard library. -// -// All I/O is done via the build.Context file system interface, which must -// be concurrency-safe. -package buildutil - -import ( - "go/build" - "os" - "path/filepath" - "sort" - "strings" - "sync" -) - -// AllPackages returns the package path of each Go package in any source -// directory of the specified build context (e.g. $GOROOT or an element -// of $GOPATH). Errors are ignored. The results are sorted. -// All package paths are canonical, and thus may contain "/vendor/". -// -// The result may include import paths for directories that contain no -// *.go files, such as "archive" (in $GOROOT/src). -// -// All I/O is done via the build.Context file system interface, -// which must be concurrency-safe. -// -func AllPackages(ctxt *build.Context) []string { - var list []string - ForEachPackage(ctxt, func(pkg string, _ error) { - list = append(list, pkg) - }) - sort.Strings(list) - return list -} - -// ForEachPackage calls the found function with the package path of -// each Go package it finds in any source directory of the specified -// build context (e.g. $GOROOT or an element of $GOPATH). -// All package paths are canonical, and thus may contain "/vendor/". -// -// If the package directory exists but could not be read, the second -// argument to the found function provides the error. -// -// All I/O is done via the build.Context file system interface, -// which must be concurrency-safe. -// -func ForEachPackage(ctxt *build.Context, found func(importPath string, err error)) { - ch := make(chan item) - - var wg sync.WaitGroup - for _, root := range ctxt.SrcDirs() { - root := root - wg.Add(1) - go func() { - allPackages(ctxt, root, ch) - wg.Done() - }() - } - go func() { - wg.Wait() - close(ch) - }() - - // All calls to found occur in the caller's goroutine. - for i := range ch { - found(i.importPath, i.err) - } -} - -type item struct { - importPath string - err error // (optional) -} - -// We use a process-wide counting semaphore to limit -// the number of parallel calls to ReadDir. -var ioLimit = make(chan bool, 20) - -func allPackages(ctxt *build.Context, root string, ch chan<- item) { - root = filepath.Clean(root) + string(os.PathSeparator) - - var wg sync.WaitGroup - - var walkDir func(dir string) - walkDir = func(dir string) { - // Avoid .foo, _foo, and testdata directory trees. - base := filepath.Base(dir) - if base == "" || base[0] == '.' || base[0] == '_' || base == "testdata" { - return - } - - pkg := filepath.ToSlash(strings.TrimPrefix(dir, root)) - - // Prune search if we encounter any of these import paths. - switch pkg { - case "builtin": - return - } - - ioLimit <- true - files, err := ReadDir(ctxt, dir) - <-ioLimit - if pkg != "" || err != nil { - ch <- item{pkg, err} - } - for _, fi := range files { - fi := fi - if fi.IsDir() { - wg.Add(1) - go func() { - walkDir(filepath.Join(dir, fi.Name())) - wg.Done() - }() - } - } - } - - walkDir(root) - wg.Wait() -} - -// ExpandPatterns returns the set of packages matched by patterns, -// which may have the following forms: -// -// golang.org/x/tools/cmd/guru # a single package -// golang.org/x/tools/... # all packages beneath dir -// ... # the entire workspace. -// -// Order is significant: a pattern preceded by '-' removes matching -// packages from the set. For example, these patterns match all encoding -// packages except encoding/xml: -// -// encoding/... -encoding/xml -// -func ExpandPatterns(ctxt *build.Context, patterns []string) map[string]bool { - // TODO(adonovan): support other features of 'go list': - // - "std"/"cmd"/"all" meta-packages - // - "..." not at the end of a pattern - // - relative patterns using "./" or "../" prefix - - pkgs := make(map[string]bool) - doPkg := func(pkg string, neg bool) { - if neg { - delete(pkgs, pkg) - } else { - pkgs[pkg] = true - } - } - - // Scan entire workspace if wildcards are present. - // TODO(adonovan): opt: scan only the necessary subtrees of the workspace. - var all []string - for _, arg := range patterns { - if strings.HasSuffix(arg, "...") { - all = AllPackages(ctxt) - break - } - } - - for _, arg := range patterns { - if arg == "" { - continue - } - - neg := arg[0] == '-' - if neg { - arg = arg[1:] - } - - if arg == "..." { - // ... matches all packages - for _, pkg := range all { - doPkg(pkg, neg) - } - } else if dir := strings.TrimSuffix(arg, "/..."); dir != arg { - // dir/... matches all packages beneath dir - for _, pkg := range all { - if strings.HasPrefix(pkg, dir) && - (len(pkg) == len(dir) || pkg[len(dir)] == '/') { - doPkg(pkg, neg) - } - } - } else { - // single package - doPkg(arg, neg) - } - } - - return pkgs -} diff --git a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/buildutil/fakecontext.go b/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/buildutil/fakecontext.go deleted file mode 100644 index 24cbcbe..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/buildutil/fakecontext.go +++ /dev/null @@ -1,108 +0,0 @@ -package buildutil - -import ( - "fmt" - "go/build" - "io" - "io/ioutil" - "os" - "path" - "path/filepath" - "sort" - "strings" - "time" -) - -// FakeContext returns a build.Context for the fake file tree specified -// by pkgs, which maps package import paths to a mapping from file base -// names to contents. -// -// The fake Context has a GOROOT of "/go" and no GOPATH, and overrides -// the necessary file access methods to read from memory instead of the -// real file system. -// -// Unlike a real file tree, the fake one has only two levels---packages -// and files---so ReadDir("/go/src/") returns all packages under -// /go/src/ including, for instance, "math" and "math/big". -// ReadDir("/go/src/math/big") would return all the files in the -// "math/big" package. -// -func FakeContext(pkgs map[string]map[string]string) *build.Context { - clean := func(filename string) string { - f := path.Clean(filepath.ToSlash(filename)) - // Removing "/go/src" while respecting segment - // boundaries has this unfortunate corner case: - if f == "/go/src" { - return "" - } - return strings.TrimPrefix(f, "/go/src/") - } - - ctxt := build.Default // copy - ctxt.GOROOT = "/go" - ctxt.GOPATH = "" - ctxt.IsDir = func(dir string) bool { - dir = clean(dir) - if dir == "" { - return true // needed by (*build.Context).SrcDirs - } - return pkgs[dir] != nil - } - ctxt.ReadDir = func(dir string) ([]os.FileInfo, error) { - dir = clean(dir) - var fis []os.FileInfo - if dir == "" { - // enumerate packages - for importPath := range pkgs { - fis = append(fis, fakeDirInfo(importPath)) - } - } else { - // enumerate files of package - for basename := range pkgs[dir] { - fis = append(fis, fakeFileInfo(basename)) - } - } - sort.Sort(byName(fis)) - return fis, nil - } - ctxt.OpenFile = func(filename string) (io.ReadCloser, error) { - filename = clean(filename) - dir, base := path.Split(filename) - content, ok := pkgs[path.Clean(dir)][base] - if !ok { - return nil, fmt.Errorf("file not found: %s", filename) - } - return ioutil.NopCloser(strings.NewReader(content)), nil - } - ctxt.IsAbsPath = func(path string) bool { - path = filepath.ToSlash(path) - // Don't rely on the default (filepath.Path) since on - // Windows, it reports virtual paths as non-absolute. - return strings.HasPrefix(path, "/") - } - return &ctxt -} - -type byName []os.FileInfo - -func (s byName) Len() int { return len(s) } -func (s byName) Swap(i, j int) { s[i], s[j] = s[j], s[i] } -func (s byName) Less(i, j int) bool { return s[i].Name() < s[j].Name() } - -type fakeFileInfo string - -func (fi fakeFileInfo) Name() string { return string(fi) } -func (fakeFileInfo) Sys() interface{} { return nil } -func (fakeFileInfo) ModTime() time.Time { return time.Time{} } -func (fakeFileInfo) IsDir() bool { return false } -func (fakeFileInfo) Size() int64 { return 0 } -func (fakeFileInfo) Mode() os.FileMode { return 0644 } - -type fakeDirInfo string - -func (fd fakeDirInfo) Name() string { return string(fd) } -func (fakeDirInfo) Sys() interface{} { return nil } -func (fakeDirInfo) ModTime() time.Time { return time.Time{} } -func (fakeDirInfo) IsDir() bool { return true } -func (fakeDirInfo) Size() int64 { return 0 } -func (fakeDirInfo) Mode() os.FileMode { return 0755 } diff --git a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/buildutil/tags.go b/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/buildutil/tags.go deleted file mode 100644 index 486606f..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/buildutil/tags.go +++ /dev/null @@ -1,75 +0,0 @@ -package buildutil - -// This logic was copied from stringsFlag from $GOROOT/src/cmd/go/build.go. - -import "fmt" - -const TagsFlagDoc = "a list of `build tags` to consider satisfied during the build. " + - "For more information about build tags, see the description of " + - "build constraints in the documentation for the go/build package" - -// TagsFlag is an implementation of the flag.Value and flag.Getter interfaces that parses -// a flag value in the same manner as go build's -tags flag and -// populates a []string slice. -// -// See $GOROOT/src/go/build/doc.go for description of build tags. -// See $GOROOT/src/cmd/go/doc.go for description of 'go build -tags' flag. -// -// Example: -// flag.Var((*buildutil.TagsFlag)(&build.Default.BuildTags), "tags", buildutil.TagsFlagDoc) -type TagsFlag []string - -func (v *TagsFlag) Set(s string) error { - var err error - *v, err = splitQuotedFields(s) - if *v == nil { - *v = []string{} - } - return err -} - -func (v *TagsFlag) Get() interface{} { return *v } - -func splitQuotedFields(s string) ([]string, error) { - // Split fields allowing '' or "" around elements. - // Quotes further inside the string do not count. - var f []string - for len(s) > 0 { - for len(s) > 0 && isSpaceByte(s[0]) { - s = s[1:] - } - if len(s) == 0 { - break - } - // Accepted quoted string. No unescaping inside. - if s[0] == '"' || s[0] == '\'' { - quote := s[0] - s = s[1:] - i := 0 - for i < len(s) && s[i] != quote { - i++ - } - if i >= len(s) { - return nil, fmt.Errorf("unterminated %c string", quote) - } - f = append(f, s[:i]) - s = s[i+1:] - continue - } - i := 0 - for i < len(s) && !isSpaceByte(s[i]) { - i++ - } - f = append(f, s[:i]) - s = s[i:] - } - return f, nil -} - -func (v *TagsFlag) String() string { - return "" -} - -func isSpaceByte(c byte) bool { - return c == ' ' || c == '\t' || c == '\n' || c == '\r' -} diff --git a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/buildutil/util.go b/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/buildutil/util.go deleted file mode 100644 index 0e093fc..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/buildutil/util.go +++ /dev/null @@ -1,167 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package buildutil - -import ( - "fmt" - "go/ast" - "go/build" - "go/parser" - "go/token" - "io" - "io/ioutil" - "os" - "path" - "path/filepath" - "runtime" - "strings" -) - -// ParseFile behaves like parser.ParseFile, -// but uses the build context's file system interface, if any. -// -// If file is not absolute (as defined by IsAbsPath), the (dir, file) -// components are joined using JoinPath; dir must be absolute. -// -// The displayPath function, if provided, is used to transform the -// filename that will be attached to the ASTs. -// -// TODO(adonovan): call this from go/loader.parseFiles when the tree thaws. -// -func ParseFile(fset *token.FileSet, ctxt *build.Context, displayPath func(string) string, dir string, file string, mode parser.Mode) (*ast.File, error) { - if !IsAbsPath(ctxt, file) { - file = JoinPath(ctxt, dir, file) - } - rd, err := OpenFile(ctxt, file) - if err != nil { - return nil, err - } - defer rd.Close() // ignore error - if displayPath != nil { - file = displayPath(file) - } - return parser.ParseFile(fset, file, rd, mode) -} - -// ContainingPackage returns the package containing filename. -// -// If filename is not absolute, it is interpreted relative to working directory dir. -// All I/O is via the build context's file system interface, if any. -// -// The '...Files []string' fields of the resulting build.Package are not -// populated (build.FindOnly mode). -// -// TODO(adonovan): call this from oracle when the tree thaws. -// -func ContainingPackage(ctxt *build.Context, dir, filename string) (*build.Package, error) { - if !IsAbsPath(ctxt, filename) { - filename = JoinPath(ctxt, dir, filename) - } - - // We must not assume the file tree uses - // "/" always, - // `\` always, - // or os.PathSeparator (which varies by platform), - // but to make any progress, we are forced to assume that - // paths will not use `\` unless the PathSeparator - // is also `\`, thus we can rely on filepath.ToSlash for some sanity. - - dirSlash := path.Dir(filepath.ToSlash(filename)) + "/" - - // We assume that no source root (GOPATH[i] or GOROOT) contains any other. - for _, srcdir := range ctxt.SrcDirs() { - srcdirSlash := filepath.ToSlash(srcdir) + "/" - if dirHasPrefix(dirSlash, srcdirSlash) { - importPath := dirSlash[len(srcdirSlash) : len(dirSlash)-len("/")] - return ctxt.Import(importPath, dir, build.FindOnly) - } - } - - return nil, fmt.Errorf("can't find package containing %s", filename) -} - -// dirHasPrefix tests whether the directory dir begins with prefix. -func dirHasPrefix(dir, prefix string) bool { - if runtime.GOOS != "windows" { - return strings.HasPrefix(dir, prefix) - } - return len(dir) >= len(prefix) && strings.EqualFold(dir[:len(prefix)], prefix) -} - -// -- Effective methods of file system interface ------------------------- - -// (go/build.Context defines these as methods, but does not export them.) - -// TODO(adonovan): HasSubdir? - -// FileExists returns true if the specified file exists, -// using the build context's file system interface. -func FileExists(ctxt *build.Context, path string) bool { - if ctxt.OpenFile != nil { - r, err := ctxt.OpenFile(path) - if err != nil { - return false - } - r.Close() // ignore error - return true - } - _, err := os.Stat(path) - return err == nil -} - -// OpenFile behaves like os.Open, -// but uses the build context's file system interface, if any. -func OpenFile(ctxt *build.Context, path string) (io.ReadCloser, error) { - if ctxt.OpenFile != nil { - return ctxt.OpenFile(path) - } - return os.Open(path) -} - -// IsAbsPath behaves like filepath.IsAbs, -// but uses the build context's file system interface, if any. -func IsAbsPath(ctxt *build.Context, path string) bool { - if ctxt.IsAbsPath != nil { - return ctxt.IsAbsPath(path) - } - return filepath.IsAbs(path) -} - -// JoinPath behaves like filepath.Join, -// but uses the build context's file system interface, if any. -func JoinPath(ctxt *build.Context, path ...string) string { - if ctxt.JoinPath != nil { - return ctxt.JoinPath(path...) - } - return filepath.Join(path...) -} - -// IsDir behaves like os.Stat plus IsDir, -// but uses the build context's file system interface, if any. -func IsDir(ctxt *build.Context, path string) bool { - if ctxt.IsDir != nil { - return ctxt.IsDir(path) - } - fi, err := os.Stat(path) - return err == nil && fi.IsDir() -} - -// ReadDir behaves like ioutil.ReadDir, -// but uses the build context's file system interface, if any. -func ReadDir(ctxt *build.Context, path string) ([]os.FileInfo, error) { - if ctxt.ReadDir != nil { - return ctxt.ReadDir(path) - } - return ioutil.ReadDir(path) -} - -// SplitPathList behaves like filepath.SplitList, -// but uses the build context's file system interface, if any. -func SplitPathList(ctxt *build.Context, s string) []string { - if ctxt.SplitPathList != nil { - return ctxt.SplitPathList(s) - } - return filepath.SplitList(s) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/loader/cgo.go b/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/loader/cgo.go deleted file mode 100644 index 245b914..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/loader/cgo.go +++ /dev/null @@ -1,209 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build go1.5 - -package loader - -// This file handles cgo preprocessing of files containing `import "C"`. -// -// DESIGN -// -// The approach taken is to run the cgo processor on the package's -// CgoFiles and parse the output, faking the filenames of the -// resulting ASTs so that the synthetic file containing the C types is -// called "C" (e.g. "~/go/src/net/C") and the preprocessed files -// have their original names (e.g. "~/go/src/net/cgo_unix.go"), -// not the names of the actual temporary files. -// -// The advantage of this approach is its fidelity to 'go build'. The -// downside is that the token.Position.Offset for each AST node is -// incorrect, being an offset within the temporary file. Line numbers -// should still be correct because of the //line comments. -// -// The logic of this file is mostly plundered from the 'go build' -// tool, which also invokes the cgo preprocessor. -// -// -// REJECTED ALTERNATIVE -// -// An alternative approach that we explored is to extend go/types' -// Importer mechanism to provide the identity of the importing package -// so that each time `import "C"` appears it resolves to a different -// synthetic package containing just the objects needed in that case. -// The loader would invoke cgo but parse only the cgo_types.go file -// defining the package-level objects, discarding the other files -// resulting from preprocessing. -// -// The benefit of this approach would have been that source-level -// syntax information would correspond exactly to the original cgo -// file, with no preprocessing involved, making source tools like -// godoc, oracle, and eg happy. However, the approach was rejected -// due to the additional complexity it would impose on go/types. (It -// made for a beautiful demo, though.) -// -// cgo files, despite their *.go extension, are not legal Go source -// files per the specification since they may refer to unexported -// members of package "C" such as C.int. Also, a function such as -// C.getpwent has in effect two types, one matching its C type and one -// which additionally returns (errno C.int). The cgo preprocessor -// uses name mangling to distinguish these two functions in the -// processed code, but go/types would need to duplicate this logic in -// its handling of function calls, analogous to the treatment of map -// lookups in which y=m[k] and y,ok=m[k] are both legal. - -import ( - "fmt" - "go/ast" - "go/build" - "go/parser" - "go/token" - "io/ioutil" - "log" - "os" - "os/exec" - "path/filepath" - "regexp" - "strings" -) - -// processCgoFiles invokes the cgo preprocessor on bp.CgoFiles, parses -// the output and returns the resulting ASTs. -// -func processCgoFiles(bp *build.Package, fset *token.FileSet, DisplayPath func(path string) string, mode parser.Mode) ([]*ast.File, error) { - tmpdir, err := ioutil.TempDir("", strings.Replace(bp.ImportPath, "/", "_", -1)+"_C") - if err != nil { - return nil, err - } - defer os.RemoveAll(tmpdir) - - pkgdir := bp.Dir - if DisplayPath != nil { - pkgdir = DisplayPath(pkgdir) - } - - cgoFiles, cgoDisplayFiles, err := runCgo(bp, pkgdir, tmpdir) - if err != nil { - return nil, err - } - var files []*ast.File - for i := range cgoFiles { - rd, err := os.Open(cgoFiles[i]) - if err != nil { - return nil, err - } - display := filepath.Join(bp.Dir, cgoDisplayFiles[i]) - f, err := parser.ParseFile(fset, display, rd, mode) - rd.Close() - if err != nil { - return nil, err - } - files = append(files, f) - } - return files, nil -} - -var cgoRe = regexp.MustCompile(`[/\\:]`) - -// runCgo invokes the cgo preprocessor on bp.CgoFiles and returns two -// lists of files: the resulting processed files (in temporary -// directory tmpdir) and the corresponding names of the unprocessed files. -// -// runCgo is adapted from (*builder).cgo in -// $GOROOT/src/cmd/go/build.go, but these features are unsupported: -// Objective C, CGOPKGPATH, CGO_FLAGS. -// -func runCgo(bp *build.Package, pkgdir, tmpdir string) (files, displayFiles []string, err error) { - cgoCPPFLAGS, _, _, _ := cflags(bp, true) - _, cgoexeCFLAGS, _, _ := cflags(bp, false) - - if len(bp.CgoPkgConfig) > 0 { - pcCFLAGS, err := pkgConfigFlags(bp) - if err != nil { - return nil, nil, err - } - cgoCPPFLAGS = append(cgoCPPFLAGS, pcCFLAGS...) - } - - // Allows including _cgo_export.h from .[ch] files in the package. - cgoCPPFLAGS = append(cgoCPPFLAGS, "-I", tmpdir) - - // _cgo_gotypes.go (displayed "C") contains the type definitions. - files = append(files, filepath.Join(tmpdir, "_cgo_gotypes.go")) - displayFiles = append(displayFiles, "C") - for _, fn := range bp.CgoFiles { - // "foo.cgo1.go" (displayed "foo.go") is the processed Go source. - f := cgoRe.ReplaceAllString(fn[:len(fn)-len("go")], "_") - files = append(files, filepath.Join(tmpdir, f+"cgo1.go")) - displayFiles = append(displayFiles, fn) - } - - var cgoflags []string - if bp.Goroot && bp.ImportPath == "runtime/cgo" { - cgoflags = append(cgoflags, "-import_runtime_cgo=false") - } - if bp.Goroot && bp.ImportPath == "runtime/race" || bp.ImportPath == "runtime/cgo" { - cgoflags = append(cgoflags, "-import_syscall=false") - } - - args := stringList( - "go", "tool", "cgo", "-objdir", tmpdir, cgoflags, "--", - cgoCPPFLAGS, cgoexeCFLAGS, bp.CgoFiles, - ) - if false { - log.Printf("Running cgo for package %q: %s (dir=%s)", bp.ImportPath, args, pkgdir) - } - cmd := exec.Command(args[0], args[1:]...) - cmd.Dir = pkgdir - cmd.Stdout = os.Stderr - cmd.Stderr = os.Stderr - if err := cmd.Run(); err != nil { - return nil, nil, fmt.Errorf("cgo failed: %s: %s", args, err) - } - - return files, displayFiles, nil -} - -// -- unmodified from 'go build' --------------------------------------- - -// Return the flags to use when invoking the C or C++ compilers, or cgo. -func cflags(p *build.Package, def bool) (cppflags, cflags, cxxflags, ldflags []string) { - var defaults string - if def { - defaults = "-g -O2" - } - - cppflags = stringList(envList("CGO_CPPFLAGS", ""), p.CgoCPPFLAGS) - cflags = stringList(envList("CGO_CFLAGS", defaults), p.CgoCFLAGS) - cxxflags = stringList(envList("CGO_CXXFLAGS", defaults), p.CgoCXXFLAGS) - ldflags = stringList(envList("CGO_LDFLAGS", defaults), p.CgoLDFLAGS) - return -} - -// envList returns the value of the given environment variable broken -// into fields, using the default value when the variable is empty. -func envList(key, def string) []string { - v := os.Getenv(key) - if v == "" { - v = def - } - return strings.Fields(v) -} - -// stringList's arguments should be a sequence of string or []string values. -// stringList flattens them into a single []string. -func stringList(args ...interface{}) []string { - var x []string - for _, arg := range args { - switch arg := arg.(type) { - case []string: - x = append(x, arg...) - case string: - x = append(x, arg) - default: - panic("stringList: invalid argument") - } - } - return x -} diff --git a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/loader/cgo_pkgconfig.go b/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/loader/cgo_pkgconfig.go deleted file mode 100644 index de57422..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/loader/cgo_pkgconfig.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package loader - -import ( - "errors" - "fmt" - "go/build" - "os/exec" - "strings" -) - -// pkgConfig runs pkg-config with the specified arguments and returns the flags it prints. -func pkgConfig(mode string, pkgs []string) (flags []string, err error) { - cmd := exec.Command("pkg-config", append([]string{mode}, pkgs...)...) - out, err := cmd.CombinedOutput() - if err != nil { - s := fmt.Sprintf("%s failed: %v", strings.Join(cmd.Args, " "), err) - if len(out) > 0 { - s = fmt.Sprintf("%s: %s", s, out) - } - return nil, errors.New(s) - } - if len(out) > 0 { - flags = strings.Fields(string(out)) - } - return -} - -// pkgConfigFlags calls pkg-config if needed and returns the cflags -// needed to build the package. -func pkgConfigFlags(p *build.Package) (cflags []string, err error) { - if len(p.CgoPkgConfig) == 0 { - return nil, nil - } - return pkgConfig("--cflags", p.CgoPkgConfig) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/loader/doc.go b/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/loader/doc.go deleted file mode 100644 index 9b51c9e..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/loader/doc.go +++ /dev/null @@ -1,205 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package loader loads a complete Go program from source code, parsing -// and type-checking the initial packages plus their transitive closure -// of dependencies. The ASTs and the derived facts are retained for -// later use. -// -// THIS INTERFACE IS EXPERIMENTAL AND IS LIKELY TO CHANGE. -// -// The package defines two primary types: Config, which specifies a -// set of initial packages to load and various other options; and -// Program, which is the result of successfully loading the packages -// specified by a configuration. -// -// The configuration can be set directly, but *Config provides various -// convenience methods to simplify the common cases, each of which can -// be called any number of times. Finally, these are followed by a -// call to Load() to actually load and type-check the program. -// -// var conf loader.Config -// -// // Use the command-line arguments to specify -// // a set of initial packages to load from source. -// // See FromArgsUsage for help. -// rest, err := conf.FromArgs(os.Args[1:], wantTests) -// -// // Parse the specified files and create an ad hoc package with path "foo". -// // All files must have the same 'package' declaration. -// conf.CreateFromFilenames("foo", "foo.go", "bar.go") -// -// // Create an ad hoc package with path "foo" from -// // the specified already-parsed files. -// // All ASTs must have the same 'package' declaration. -// conf.CreateFromFiles("foo", parsedFiles) -// -// // Add "runtime" to the set of packages to be loaded. -// conf.Import("runtime") -// -// // Adds "fmt" and "fmt_test" to the set of packages -// // to be loaded. "fmt" will include *_test.go files. -// conf.ImportWithTests("fmt") -// -// // Finally, load all the packages specified by the configuration. -// prog, err := conf.Load() -// -// See examples_test.go for examples of API usage. -// -// -// CONCEPTS AND TERMINOLOGY -// -// The WORKSPACE is the set of packages accessible to the loader. The -// workspace is defined by Config.Build, a *build.Context. The -// default context treats subdirectories of $GOROOT and $GOPATH as -// packages, but this behavior may be overridden. -// -// An AD HOC package is one specified as a set of source files on the -// command line. In the simplest case, it may consist of a single file -// such as $GOROOT/src/net/http/triv.go. -// -// EXTERNAL TEST packages are those comprised of a set of *_test.go -// files all with the same 'package foo_test' declaration, all in the -// same directory. (go/build.Package calls these files XTestFiles.) -// -// An IMPORTABLE package is one that can be referred to by some import -// spec. Every importable package is uniquely identified by its -// PACKAGE PATH or just PATH, a string such as "fmt", "encoding/json", -// or "cmd/vendor/golang.org/x/arch/x86/x86asm". A package path -// typically denotes a subdirectory of the workspace. -// -// An import declaration uses an IMPORT PATH to refer to a package. -// Most import declarations use the package path as the import path. -// -// Due to VENDORING (https://golang.org/s/go15vendor), the -// interpretation of an import path may depend on the directory in which -// it appears. To resolve an import path to a package path, go/build -// must search the enclosing directories for a subdirectory named -// "vendor". -// -// ad hoc packages and external test packages are NON-IMPORTABLE. The -// path of an ad hoc package is inferred from the package -// declarations of its files and is therefore not a unique package key. -// For example, Config.CreatePkgs may specify two initial ad hoc -// packages, both with path "main". -// -// An AUGMENTED package is an importable package P plus all the -// *_test.go files with same 'package foo' declaration as P. -// (go/build.Package calls these files TestFiles.) -// -// The INITIAL packages are those specified in the configuration. A -// DEPENDENCY is a package loaded to satisfy an import in an initial -// package or another dependency. -// -package loader - -// IMPLEMENTATION NOTES -// -// 'go test', in-package test files, and import cycles -// --------------------------------------------------- -// -// An external test package may depend upon members of the augmented -// package that are not in the unaugmented package, such as functions -// that expose internals. (See bufio/export_test.go for an example.) -// So, the loader must ensure that for each external test package -// it loads, it also augments the corresponding non-test package. -// -// The import graph over n unaugmented packages must be acyclic; the -// import graph over n-1 unaugmented packages plus one augmented -// package must also be acyclic. ('go test' relies on this.) But the -// import graph over n augmented packages may contain cycles. -// -// First, all the (unaugmented) non-test packages and their -// dependencies are imported in the usual way; the loader reports an -// error if it detects an import cycle. -// -// Then, each package P for which testing is desired is augmented by -// the list P' of its in-package test files, by calling -// (*types.Checker).Files. This arrangement ensures that P' may -// reference definitions within P, but P may not reference definitions -// within P'. Furthermore, P' may import any other package, including -// ones that depend upon P, without an import cycle error. -// -// Consider two packages A and B, both of which have lists of -// in-package test files we'll call A' and B', and which have the -// following import graph edges: -// B imports A -// B' imports A -// A' imports B -// This last edge would be expected to create an error were it not -// for the special type-checking discipline above. -// Cycles of size greater than two are possible. For example: -// compress/bzip2/bzip2_test.go (package bzip2) imports "io/ioutil" -// io/ioutil/tempfile_test.go (package ioutil) imports "regexp" -// regexp/exec_test.go (package regexp) imports "compress/bzip2" -// -// -// Concurrency -// ----------- -// -// Let us define the import dependency graph as follows. Each node is a -// list of files passed to (Checker).Files at once. Many of these lists -// are the production code of an importable Go package, so those nodes -// are labelled by the package's path. The remaining nodes are -// ad hoc packages and lists of in-package *_test.go files that augment -// an importable package; those nodes have no label. -// -// The edges of the graph represent import statements appearing within a -// file. An edge connects a node (a list of files) to the node it -// imports, which is importable and thus always labelled. -// -// Loading is controlled by this dependency graph. -// -// To reduce I/O latency, we start loading a package's dependencies -// asynchronously as soon as we've parsed its files and enumerated its -// imports (scanImports). This performs a preorder traversal of the -// import dependency graph. -// -// To exploit hardware parallelism, we type-check unrelated packages in -// parallel, where "unrelated" means not ordered by the partial order of -// the import dependency graph. -// -// We use a concurrency-safe non-blocking cache (importer.imported) to -// record the results of type-checking, whether success or failure. An -// entry is created in this cache by startLoad the first time the -// package is imported. The first goroutine to request an entry becomes -// responsible for completing the task and broadcasting completion to -// subsequent requestors, which block until then. -// -// Type checking occurs in (parallel) postorder: we cannot type-check a -// set of files until we have loaded and type-checked all of their -// immediate dependencies (and thus all of their transitive -// dependencies). If the input were guaranteed free of import cycles, -// this would be trivial: we could simply wait for completion of the -// dependencies and then invoke the typechecker. -// -// But as we saw in the 'go test' section above, some cycles in the -// import graph over packages are actually legal, so long as the -// cycle-forming edge originates in the in-package test files that -// augment the package. This explains why the nodes of the import -// dependency graph are not packages, but lists of files: the unlabelled -// nodes avoid the cycles. Consider packages A and B where B imports A -// and A's in-package tests AT import B. The naively constructed import -// graph over packages would contain a cycle (A+AT) --> B --> (A+AT) but -// the graph over lists of files is AT --> B --> A, where AT is an -// unlabelled node. -// -// Awaiting completion of the dependencies in a cyclic graph would -// deadlock, so we must materialize the import dependency graph (as -// importer.graph) and check whether each import edge forms a cycle. If -// x imports y, and the graph already contains a path from y to x, then -// there is an import cycle, in which case the processing of x must not -// wait for the completion of processing of y. -// -// When the type-checker makes a callback (doImport) to the loader for a -// given import edge, there are two possible cases. In the normal case, -// the dependency has already been completely type-checked; doImport -// does a cache lookup and returns it. In the cyclic case, the entry in -// the cache is still necessarily incomplete, indicating a cycle. We -// perform the cycle check again to obtain the error message, and return -// the error. -// -// The result of using concurrency is about a 2.5x speedup for stdlib_test. - -// TODO(adonovan): overhaul the package documentation. diff --git a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/loader/go16.go b/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/loader/go16.go deleted file mode 100644 index c0ed50f..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/loader/go16.go +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build go1.6 - -package loader - -import "go/build" - -func init() { - ignoreVendor = build.IgnoreVendor -} diff --git a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/loader/loader.go b/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/loader/loader.go deleted file mode 100644 index f0171fc..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/loader/loader.go +++ /dev/null @@ -1,1059 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build go1.5 - -package loader - -// See doc.go for package documentation and implementation notes. - -import ( - "errors" - "fmt" - "go/ast" - "go/build" - "go/parser" - "go/token" - "go/types" - "os" - "sort" - "strings" - "sync" - "time" - - "golang.org/x/tools/go/ast/astutil" -) - -var ignoreVendor build.ImportMode - -const trace = false // show timing info for type-checking - -// Config specifies the configuration for loading a whole program from -// Go source code. -// The zero value for Config is a ready-to-use default configuration. -type Config struct { - // Fset is the file set for the parser to use when loading the - // program. If nil, it may be lazily initialized by any - // method of Config. - Fset *token.FileSet - - // ParserMode specifies the mode to be used by the parser when - // loading source packages. - ParserMode parser.Mode - - // TypeChecker contains options relating to the type checker. - // - // The supplied IgnoreFuncBodies is not used; the effective - // value comes from the TypeCheckFuncBodies func below. - // The supplied Import function is not used either. - TypeChecker types.Config - - // TypeCheckFuncBodies is a predicate over package paths. - // A package for which the predicate is false will - // have its package-level declarations type checked, but not - // its function bodies; this can be used to quickly load - // dependencies from source. If nil, all func bodies are type - // checked. - TypeCheckFuncBodies func(path string) bool - - // If Build is non-nil, it is used to locate source packages. - // Otherwise &build.Default is used. - // - // By default, cgo is invoked to preprocess Go files that - // import the fake package "C". This behaviour can be - // disabled by setting CGO_ENABLED=0 in the environment prior - // to startup, or by setting Build.CgoEnabled=false. - Build *build.Context - - // The current directory, used for resolving relative package - // references such as "./go/loader". If empty, os.Getwd will be - // used instead. - Cwd string - - // If DisplayPath is non-nil, it is used to transform each - // file name obtained from Build.Import(). This can be used - // to prevent a virtualized build.Config's file names from - // leaking into the user interface. - DisplayPath func(path string) string - - // If AllowErrors is true, Load will return a Program even - // if some of the its packages contained I/O, parser or type - // errors; such errors are accessible via PackageInfo.Errors. If - // false, Load will fail if any package had an error. - AllowErrors bool - - // CreatePkgs specifies a list of non-importable initial - // packages to create. The resulting packages will appear in - // the corresponding elements of the Program.Created slice. - CreatePkgs []PkgSpec - - // ImportPkgs specifies a set of initial packages to load. - // The map keys are package paths. - // - // The map value indicates whether to load tests. If true, Load - // will add and type-check two lists of files to the package: - // non-test files followed by in-package *_test.go files. In - // addition, it will append the external test package (if any) - // to Program.Created. - ImportPkgs map[string]bool - - // FindPackage is called during Load to create the build.Package - // for a given import path from a given directory. - // If FindPackage is nil, (*build.Context).Import is used. - // A client may use this hook to adapt to a proprietary build - // system that does not follow the "go build" layout - // conventions, for example. - // - // It must be safe to call concurrently from multiple goroutines. - FindPackage func(ctxt *build.Context, fromDir, importPath string, mode build.ImportMode) (*build.Package, error) - - // AfterTypeCheck is called immediately after a list of files - // has been type-checked and appended to info.Files. - // - // This optional hook function is the earliest opportunity for - // the client to observe the output of the type checker, - // which may be useful to reduce analysis latency when loading - // a large program. - // - // The function is permitted to modify info.Info, for instance - // to clear data structures that are no longer needed, which can - // dramatically reduce peak memory consumption. - // - // The function may be called twice for the same PackageInfo: - // once for the files of the package and again for the - // in-package test files. - // - // It must be safe to call concurrently from multiple goroutines. - AfterTypeCheck func(info *PackageInfo, files []*ast.File) -} - -// A PkgSpec specifies a non-importable package to be created by Load. -// Files are processed first, but typically only one of Files and -// Filenames is provided. The path needn't be globally unique. -// -type PkgSpec struct { - Path string // package path ("" => use package declaration) - Files []*ast.File // ASTs of already-parsed files - Filenames []string // names of files to be parsed -} - -// A Program is a Go program loaded from source as specified by a Config. -type Program struct { - Fset *token.FileSet // the file set for this program - - // Created[i] contains the initial package whose ASTs or - // filenames were supplied by Config.CreatePkgs[i], followed by - // the external test package, if any, of each package in - // Config.ImportPkgs ordered by ImportPath. - // - // NOTE: these files must not import "C". Cgo preprocessing is - // only performed on imported packages, not ad hoc packages. - // - // TODO(adonovan): we need to copy and adapt the logic of - // goFilesPackage (from $GOROOT/src/cmd/go/build.go) and make - // Config.Import and Config.Create methods return the same kind - // of entity, essentially a build.Package. - // Perhaps we can even reuse that type directly. - Created []*PackageInfo - - // Imported contains the initially imported packages, - // as specified by Config.ImportPkgs. - Imported map[string]*PackageInfo - - // AllPackages contains the PackageInfo of every package - // encountered by Load: all initial packages and all - // dependencies, including incomplete ones. - AllPackages map[*types.Package]*PackageInfo - - // importMap is the canonical mapping of package paths to - // packages. It contains all Imported initial packages, but not - // Created ones, and all imported dependencies. - importMap map[string]*types.Package -} - -// PackageInfo holds the ASTs and facts derived by the type-checker -// for a single package. -// -// Not mutated once exposed via the API. -// -type PackageInfo struct { - Pkg *types.Package - Importable bool // true if 'import "Pkg.Path()"' would resolve to this - TransitivelyErrorFree bool // true if Pkg and all its dependencies are free of errors - Files []*ast.File // syntax trees for the package's files - Errors []error // non-nil if the package had errors - types.Info // type-checker deductions. - dir string // package directory - - checker *types.Checker // transient type-checker state - errorFunc func(error) -} - -func (info *PackageInfo) String() string { return info.Pkg.Path() } - -func (info *PackageInfo) appendError(err error) { - if info.errorFunc != nil { - info.errorFunc(err) - } else { - fmt.Fprintln(os.Stderr, err) - } - info.Errors = append(info.Errors, err) -} - -func (conf *Config) fset() *token.FileSet { - if conf.Fset == nil { - conf.Fset = token.NewFileSet() - } - return conf.Fset -} - -// ParseFile is a convenience function (intended for testing) that invokes -// the parser using the Config's FileSet, which is initialized if nil. -// -// src specifies the parser input as a string, []byte, or io.Reader, and -// filename is its apparent name. If src is nil, the contents of -// filename are read from the file system. -// -func (conf *Config) ParseFile(filename string, src interface{}) (*ast.File, error) { - // TODO(adonovan): use conf.build() etc like parseFiles does. - return parser.ParseFile(conf.fset(), filename, src, conf.ParserMode) -} - -// FromArgsUsage is a partial usage message that applications calling -// FromArgs may wish to include in their -help output. -const FromArgsUsage = ` - is a list of arguments denoting a set of initial packages. -It may take one of two forms: - -1. A list of *.go source files. - - All of the specified files are loaded, parsed and type-checked - as a single package. All the files must belong to the same directory. - -2. A list of import paths, each denoting a package. - - The package's directory is found relative to the $GOROOT and - $GOPATH using similar logic to 'go build', and the *.go files in - that directory are loaded, parsed and type-checked as a single - package. - - In addition, all *_test.go files in the directory are then loaded - and parsed. Those files whose package declaration equals that of - the non-*_test.go files are included in the primary package. Test - files whose package declaration ends with "_test" are type-checked - as another package, the 'external' test package, so that a single - import path may denote two packages. (Whether this behaviour is - enabled is tool-specific, and may depend on additional flags.) - -A '--' argument terminates the list of packages. -` - -// FromArgs interprets args as a set of initial packages to load from -// source and updates the configuration. It returns the list of -// unconsumed arguments. -// -// It is intended for use in command-line interfaces that require a -// set of initial packages to be specified; see FromArgsUsage message -// for details. -// -// Only superficial errors are reported at this stage; errors dependent -// on I/O are detected during Load. -// -func (conf *Config) FromArgs(args []string, xtest bool) ([]string, error) { - var rest []string - for i, arg := range args { - if arg == "--" { - rest = args[i+1:] - args = args[:i] - break // consume "--" and return the remaining args - } - } - - if len(args) > 0 && strings.HasSuffix(args[0], ".go") { - // Assume args is a list of a *.go files - // denoting a single ad hoc package. - for _, arg := range args { - if !strings.HasSuffix(arg, ".go") { - return nil, fmt.Errorf("named files must be .go files: %s", arg) - } - } - conf.CreateFromFilenames("", args...) - } else { - // Assume args are directories each denoting a - // package and (perhaps) an external test, iff xtest. - for _, arg := range args { - if xtest { - conf.ImportWithTests(arg) - } else { - conf.Import(arg) - } - } - } - - return rest, nil -} - -// CreateFromFilenames is a convenience function that adds -// a conf.CreatePkgs entry to create a package of the specified *.go -// files. -// -func (conf *Config) CreateFromFilenames(path string, filenames ...string) { - conf.CreatePkgs = append(conf.CreatePkgs, PkgSpec{Path: path, Filenames: filenames}) -} - -// CreateFromFiles is a convenience function that adds a conf.CreatePkgs -// entry to create package of the specified path and parsed files. -// -func (conf *Config) CreateFromFiles(path string, files ...*ast.File) { - conf.CreatePkgs = append(conf.CreatePkgs, PkgSpec{Path: path, Files: files}) -} - -// ImportWithTests is a convenience function that adds path to -// ImportPkgs, the set of initial source packages located relative to -// $GOPATH. The package will be augmented by any *_test.go files in -// its directory that contain a "package x" (not "package x_test") -// declaration. -// -// In addition, if any *_test.go files contain a "package x_test" -// declaration, an additional package comprising just those files will -// be added to CreatePkgs. -// -func (conf *Config) ImportWithTests(path string) { conf.addImport(path, true) } - -// Import is a convenience function that adds path to ImportPkgs, the -// set of initial packages that will be imported from source. -// -func (conf *Config) Import(path string) { conf.addImport(path, false) } - -func (conf *Config) addImport(path string, tests bool) { - if path == "C" { - return // ignore; not a real package - } - if conf.ImportPkgs == nil { - conf.ImportPkgs = make(map[string]bool) - } - conf.ImportPkgs[path] = conf.ImportPkgs[path] || tests -} - -// PathEnclosingInterval returns the PackageInfo and ast.Node that -// contain source interval [start, end), and all the node's ancestors -// up to the AST root. It searches all ast.Files of all packages in prog. -// exact is defined as for astutil.PathEnclosingInterval. -// -// The zero value is returned if not found. -// -func (prog *Program) PathEnclosingInterval(start, end token.Pos) (pkg *PackageInfo, path []ast.Node, exact bool) { - for _, info := range prog.AllPackages { - for _, f := range info.Files { - if f.Pos() == token.NoPos { - // This can happen if the parser saw - // too many errors and bailed out. - // (Use parser.AllErrors to prevent that.) - continue - } - if !tokenFileContainsPos(prog.Fset.File(f.Pos()), start) { - continue - } - if path, exact := astutil.PathEnclosingInterval(f, start, end); path != nil { - return info, path, exact - } - } - } - return nil, nil, false -} - -// InitialPackages returns a new slice containing the set of initial -// packages (Created + Imported) in unspecified order. -// -func (prog *Program) InitialPackages() []*PackageInfo { - infos := make([]*PackageInfo, 0, len(prog.Created)+len(prog.Imported)) - infos = append(infos, prog.Created...) - for _, info := range prog.Imported { - infos = append(infos, info) - } - return infos -} - -// Package returns the ASTs and results of type checking for the -// specified package. -func (prog *Program) Package(path string) *PackageInfo { - if info, ok := prog.AllPackages[prog.importMap[path]]; ok { - return info - } - for _, info := range prog.Created { - if path == info.Pkg.Path() { - return info - } - } - return nil -} - -// ---------- Implementation ---------- - -// importer holds the working state of the algorithm. -type importer struct { - conf *Config // the client configuration - start time.Time // for logging - - progMu sync.Mutex // guards prog - prog *Program // the resulting program - - // findpkg is a memoization of FindPackage. - findpkgMu sync.Mutex // guards findpkg - findpkg map[findpkgKey]*findpkgValue - - importedMu sync.Mutex // guards imported - imported map[string]*importInfo // all imported packages (incl. failures) by import path - - // import dependency graph: graph[x][y] => x imports y - // - // Since non-importable packages cannot be cyclic, we ignore - // their imports, thus we only need the subgraph over importable - // packages. Nodes are identified by their import paths. - graphMu sync.Mutex - graph map[string]map[string]bool -} - -type findpkgKey struct { - importPath string - fromDir string - mode build.ImportMode -} - -type findpkgValue struct { - ready chan struct{} // closed to broadcast readiness - bp *build.Package - err error -} - -// importInfo tracks the success or failure of a single import. -// -// Upon completion, exactly one of info and err is non-nil: -// info on successful creation of a package, err otherwise. -// A successful package may still contain type errors. -// -type importInfo struct { - path string // import path - info *PackageInfo // results of typechecking (including errors) - complete chan struct{} // closed to broadcast that info is set. -} - -// awaitCompletion blocks until ii is complete, -// i.e. the info field is safe to inspect. -func (ii *importInfo) awaitCompletion() { - <-ii.complete // wait for close -} - -// Complete marks ii as complete. -// Its info and err fields will not be subsequently updated. -func (ii *importInfo) Complete(info *PackageInfo) { - if info == nil { - panic("info == nil") - } - ii.info = info - close(ii.complete) -} - -type importError struct { - path string // import path - err error // reason for failure to create a package -} - -// Load creates the initial packages specified by conf.{Create,Import}Pkgs, -// loading their dependencies packages as needed. -// -// On success, Load returns a Program containing a PackageInfo for -// each package. On failure, it returns an error. -// -// If AllowErrors is true, Load will return a Program even if some -// packages contained I/O, parser or type errors, or if dependencies -// were missing. (Such errors are accessible via PackageInfo.Errors. If -// false, Load will fail if any package had an error. -// -// It is an error if no packages were loaded. -// -func (conf *Config) Load() (*Program, error) { - // Create a simple default error handler for parse/type errors. - if conf.TypeChecker.Error == nil { - conf.TypeChecker.Error = func(e error) { fmt.Fprintln(os.Stderr, e) } - } - - // Set default working directory for relative package references. - if conf.Cwd == "" { - var err error - conf.Cwd, err = os.Getwd() - if err != nil { - return nil, err - } - } - - // Install default FindPackage hook using go/build logic. - if conf.FindPackage == nil { - conf.FindPackage = (*build.Context).Import - } - - prog := &Program{ - Fset: conf.fset(), - Imported: make(map[string]*PackageInfo), - importMap: make(map[string]*types.Package), - AllPackages: make(map[*types.Package]*PackageInfo), - } - - imp := importer{ - conf: conf, - prog: prog, - findpkg: make(map[findpkgKey]*findpkgValue), - imported: make(map[string]*importInfo), - start: time.Now(), - graph: make(map[string]map[string]bool), - } - - // -- loading proper (concurrent phase) -------------------------------- - - var errpkgs []string // packages that contained errors - - // Load the initially imported packages and their dependencies, - // in parallel. - // No vendor check on packages imported from the command line. - infos, importErrors := imp.importAll("", conf.Cwd, conf.ImportPkgs, ignoreVendor) - for _, ie := range importErrors { - conf.TypeChecker.Error(ie.err) // failed to create package - errpkgs = append(errpkgs, ie.path) - } - for _, info := range infos { - prog.Imported[info.Pkg.Path()] = info - } - - // Augment the designated initial packages by their tests. - // Dependencies are loaded in parallel. - var xtestPkgs []*build.Package - for importPath, augment := range conf.ImportPkgs { - if !augment { - continue - } - - // No vendor check on packages imported from command line. - bp, err := imp.findPackage(importPath, conf.Cwd, ignoreVendor) - if err != nil { - // Package not found, or can't even parse package declaration. - // Already reported by previous loop; ignore it. - continue - } - - // Needs external test package? - if len(bp.XTestGoFiles) > 0 { - xtestPkgs = append(xtestPkgs, bp) - } - - // Consult the cache using the canonical package path. - path := bp.ImportPath - imp.importedMu.Lock() // (unnecessary, we're sequential here) - ii, ok := imp.imported[path] - // Paranoid checks added due to issue #11012. - if !ok { - // Unreachable. - // The previous loop called importAll and thus - // startLoad for each path in ImportPkgs, which - // populates imp.imported[path] with a non-zero value. - panic(fmt.Sprintf("imported[%q] not found", path)) - } - if ii == nil { - // Unreachable. - // The ii values in this loop are the same as in - // the previous loop, which enforced the invariant - // that at least one of ii.err and ii.info is non-nil. - panic(fmt.Sprintf("imported[%q] == nil", path)) - } - if ii.info == nil { - // Unreachable. - // awaitCompletion has the postcondition - // ii.info != nil. - panic(fmt.Sprintf("imported[%q].info = nil", path)) - } - info := ii.info - imp.importedMu.Unlock() - - // Parse the in-package test files. - files, errs := imp.conf.parsePackageFiles(bp, 't') - for _, err := range errs { - info.appendError(err) - } - - // The test files augmenting package P cannot be imported, - // but may import packages that import P, - // so we must disable the cycle check. - imp.addFiles(info, files, false) - } - - createPkg := func(path string, files []*ast.File, errs []error) { - // TODO(adonovan): fix: use dirname of files, not cwd. - info := imp.newPackageInfo(path, conf.Cwd) - for _, err := range errs { - info.appendError(err) - } - - // Ad hoc packages are non-importable, - // so no cycle check is needed. - // addFiles loads dependencies in parallel. - imp.addFiles(info, files, false) - prog.Created = append(prog.Created, info) - } - - // Create packages specified by conf.CreatePkgs. - for _, cp := range conf.CreatePkgs { - files, errs := parseFiles(conf.fset(), conf.build(), nil, ".", cp.Filenames, conf.ParserMode) - files = append(files, cp.Files...) - - path := cp.Path - if path == "" { - if len(files) > 0 { - path = files[0].Name.Name - } else { - path = "(unnamed)" - } - } - createPkg(path, files, errs) - } - - // Create external test packages. - sort.Sort(byImportPath(xtestPkgs)) - for _, bp := range xtestPkgs { - files, errs := imp.conf.parsePackageFiles(bp, 'x') - createPkg(bp.ImportPath+"_test", files, errs) - } - - // -- finishing up (sequential) ---------------------------------------- - - if len(prog.Imported)+len(prog.Created) == 0 { - return nil, errors.New("no initial packages were loaded") - } - - // Create infos for indirectly imported packages. - // e.g. incomplete packages without syntax, loaded from export data. - for _, obj := range prog.importMap { - info := prog.AllPackages[obj] - if info == nil { - prog.AllPackages[obj] = &PackageInfo{Pkg: obj, Importable: true} - } else { - // finished - info.checker = nil - info.errorFunc = nil - } - } - - if !conf.AllowErrors { - // Report errors in indirectly imported packages. - for _, info := range prog.AllPackages { - if len(info.Errors) > 0 { - errpkgs = append(errpkgs, info.Pkg.Path()) - } - } - if errpkgs != nil { - var more string - if len(errpkgs) > 3 { - more = fmt.Sprintf(" and %d more", len(errpkgs)-3) - errpkgs = errpkgs[:3] - } - return nil, fmt.Errorf("couldn't load packages due to errors: %s%s", - strings.Join(errpkgs, ", "), more) - } - } - - markErrorFreePackages(prog.AllPackages) - - return prog, nil -} - -type byImportPath []*build.Package - -func (b byImportPath) Len() int { return len(b) } -func (b byImportPath) Less(i, j int) bool { return b[i].ImportPath < b[j].ImportPath } -func (b byImportPath) Swap(i, j int) { b[i], b[j] = b[j], b[i] } - -// markErrorFreePackages sets the TransitivelyErrorFree flag on all -// applicable packages. -func markErrorFreePackages(allPackages map[*types.Package]*PackageInfo) { - // Build the transpose of the import graph. - importedBy := make(map[*types.Package]map[*types.Package]bool) - for P := range allPackages { - for _, Q := range P.Imports() { - clients, ok := importedBy[Q] - if !ok { - clients = make(map[*types.Package]bool) - importedBy[Q] = clients - } - clients[P] = true - } - } - - // Find all packages reachable from some error package. - reachable := make(map[*types.Package]bool) - var visit func(*types.Package) - visit = func(p *types.Package) { - if !reachable[p] { - reachable[p] = true - for q := range importedBy[p] { - visit(q) - } - } - } - for _, info := range allPackages { - if len(info.Errors) > 0 { - visit(info.Pkg) - } - } - - // Mark the others as "transitively error-free". - for _, info := range allPackages { - if !reachable[info.Pkg] { - info.TransitivelyErrorFree = true - } - } -} - -// build returns the effective build context. -func (conf *Config) build() *build.Context { - if conf.Build != nil { - return conf.Build - } - return &build.Default -} - -// parsePackageFiles enumerates the files belonging to package path, -// then loads, parses and returns them, plus a list of I/O or parse -// errors that were encountered. -// -// 'which' indicates which files to include: -// 'g': include non-test *.go source files (GoFiles + processed CgoFiles) -// 't': include in-package *_test.go source files (TestGoFiles) -// 'x': include external *_test.go source files. (XTestGoFiles) -// -func (conf *Config) parsePackageFiles(bp *build.Package, which rune) ([]*ast.File, []error) { - if bp.ImportPath == "unsafe" { - return nil, nil - } - var filenames []string - switch which { - case 'g': - filenames = bp.GoFiles - case 't': - filenames = bp.TestGoFiles - case 'x': - filenames = bp.XTestGoFiles - default: - panic(which) - } - - files, errs := parseFiles(conf.fset(), conf.build(), conf.DisplayPath, bp.Dir, filenames, conf.ParserMode) - - // Preprocess CgoFiles and parse the outputs (sequentially). - if which == 'g' && bp.CgoFiles != nil { - cgofiles, err := processCgoFiles(bp, conf.fset(), conf.DisplayPath, conf.ParserMode) - if err != nil { - errs = append(errs, err) - } else { - files = append(files, cgofiles...) - } - } - - return files, errs -} - -// doImport imports the package denoted by path. -// It implements the types.Importer signature. -// -// It returns an error if a package could not be created -// (e.g. go/build or parse error), but type errors are reported via -// the types.Config.Error callback (the first of which is also saved -// in the package's PackageInfo). -// -// Idempotent. -// -func (imp *importer) doImport(from *PackageInfo, to string) (*types.Package, error) { - if to == "C" { - // This should be unreachable, but ad hoc packages are - // not currently subject to cgo preprocessing. - // See https://github.com/golang/go/issues/11627. - return nil, fmt.Errorf(`the loader doesn't cgo-process ad hoc packages like %q; see Go issue 11627`, - from.Pkg.Path()) - } - - bp, err := imp.findPackage(to, from.dir, 0) - if err != nil { - return nil, err - } - - // The standard unsafe package is handled specially, - // and has no PackageInfo. - if bp.ImportPath == "unsafe" { - return types.Unsafe, nil - } - - // Look for the package in the cache using its canonical path. - path := bp.ImportPath - imp.importedMu.Lock() - ii := imp.imported[path] - imp.importedMu.Unlock() - if ii == nil { - panic("internal error: unexpected import: " + path) - } - if ii.info != nil { - return ii.info.Pkg, nil - } - - // Import of incomplete package: this indicates a cycle. - fromPath := from.Pkg.Path() - if cycle := imp.findPath(path, fromPath); cycle != nil { - cycle = append([]string{fromPath}, cycle...) - return nil, fmt.Errorf("import cycle: %s", strings.Join(cycle, " -> ")) - } - - panic("internal error: import of incomplete (yet acyclic) package: " + fromPath) -} - -// findPackage locates the package denoted by the importPath in the -// specified directory. -func (imp *importer) findPackage(importPath, fromDir string, mode build.ImportMode) (*build.Package, error) { - // We use a non-blocking duplicate-suppressing cache (gopl.io §9.7) - // to avoid holding the lock around FindPackage. - key := findpkgKey{importPath, fromDir, mode} - imp.findpkgMu.Lock() - v, ok := imp.findpkg[key] - if ok { - // cache hit - imp.findpkgMu.Unlock() - - <-v.ready // wait for entry to become ready - } else { - // Cache miss: this goroutine becomes responsible for - // populating the map entry and broadcasting its readiness. - v = &findpkgValue{ready: make(chan struct{})} - imp.findpkg[key] = v - imp.findpkgMu.Unlock() - - ioLimit <- true - v.bp, v.err = imp.conf.FindPackage(imp.conf.build(), importPath, fromDir, mode) - <-ioLimit - - if _, ok := v.err.(*build.NoGoError); ok { - v.err = nil // empty directory is not an error - } - - close(v.ready) // broadcast ready condition - } - return v.bp, v.err -} - -// importAll loads, parses, and type-checks the specified packages in -// parallel and returns their completed importInfos in unspecified order. -// -// fromPath is the package path of the importing package, if it is -// importable, "" otherwise. It is used for cycle detection. -// -// fromDir is the directory containing the import declaration that -// caused these imports. -// -func (imp *importer) importAll(fromPath, fromDir string, imports map[string]bool, mode build.ImportMode) (infos []*PackageInfo, errors []importError) { - // TODO(adonovan): opt: do the loop in parallel once - // findPackage is non-blocking. - var pending []*importInfo - for importPath := range imports { - bp, err := imp.findPackage(importPath, fromDir, mode) - if err != nil { - errors = append(errors, importError{ - path: importPath, - err: err, - }) - continue - } - pending = append(pending, imp.startLoad(bp)) - } - - if fromPath != "" { - // We're loading a set of imports. - // - // We must record graph edges from the importing package - // to its dependencies, and check for cycles. - imp.graphMu.Lock() - deps, ok := imp.graph[fromPath] - if !ok { - deps = make(map[string]bool) - imp.graph[fromPath] = deps - } - for _, ii := range pending { - deps[ii.path] = true - } - imp.graphMu.Unlock() - } - - for _, ii := range pending { - if fromPath != "" { - if cycle := imp.findPath(ii.path, fromPath); cycle != nil { - // Cycle-forming import: we must not await its - // completion since it would deadlock. - // - // We don't record the error in ii since - // the error is really associated with the - // cycle-forming edge, not the package itself. - // (Also it would complicate the - // invariants of importPath completion.) - if trace { - fmt.Fprintf(os.Stderr, "import cycle: %q\n", cycle) - } - continue - } - } - ii.awaitCompletion() - infos = append(infos, ii.info) - } - - return infos, errors -} - -// findPath returns an arbitrary path from 'from' to 'to' in the import -// graph, or nil if there was none. -func (imp *importer) findPath(from, to string) []string { - imp.graphMu.Lock() - defer imp.graphMu.Unlock() - - seen := make(map[string]bool) - var search func(stack []string, importPath string) []string - search = func(stack []string, importPath string) []string { - if !seen[importPath] { - seen[importPath] = true - stack = append(stack, importPath) - if importPath == to { - return stack - } - for x := range imp.graph[importPath] { - if p := search(stack, x); p != nil { - return p - } - } - } - return nil - } - return search(make([]string, 0, 20), from) -} - -// startLoad initiates the loading, parsing and type-checking of the -// specified package and its dependencies, if it has not already begun. -// -// It returns an importInfo, not necessarily in a completed state. The -// caller must call awaitCompletion() before accessing its info field. -// -// startLoad is concurrency-safe and idempotent. -// -func (imp *importer) startLoad(bp *build.Package) *importInfo { - path := bp.ImportPath - imp.importedMu.Lock() - ii, ok := imp.imported[path] - if !ok { - ii = &importInfo{path: path, complete: make(chan struct{})} - imp.imported[path] = ii - go func() { - info := imp.load(bp) - ii.Complete(info) - }() - } - imp.importedMu.Unlock() - - return ii -} - -// load implements package loading by parsing Go source files -// located by go/build. -func (imp *importer) load(bp *build.Package) *PackageInfo { - info := imp.newPackageInfo(bp.ImportPath, bp.Dir) - info.Importable = true - files, errs := imp.conf.parsePackageFiles(bp, 'g') - for _, err := range errs { - info.appendError(err) - } - - imp.addFiles(info, files, true) - - imp.progMu.Lock() - imp.prog.importMap[bp.ImportPath] = info.Pkg - imp.progMu.Unlock() - - return info -} - -// addFiles adds and type-checks the specified files to info, loading -// their dependencies if needed. The order of files determines the -// package initialization order. It may be called multiple times on the -// same package. Errors are appended to the info.Errors field. -// -// cycleCheck determines whether the imports within files create -// dependency edges that should be checked for potential cycles. -// -func (imp *importer) addFiles(info *PackageInfo, files []*ast.File, cycleCheck bool) { - // Ensure the dependencies are loaded, in parallel. - var fromPath string - if cycleCheck { - fromPath = info.Pkg.Path() - } - // TODO(adonovan): opt: make the caller do scanImports. - // Callers with a build.Package can skip it. - imp.importAll(fromPath, info.dir, scanImports(files), 0) - - if trace { - fmt.Fprintf(os.Stderr, "%s: start %q (%d)\n", - time.Since(imp.start), info.Pkg.Path(), len(files)) - } - - // Ignore the returned (first) error since we - // already collect them all in the PackageInfo. - info.checker.Files(files) - info.Files = append(info.Files, files...) - - if imp.conf.AfterTypeCheck != nil { - imp.conf.AfterTypeCheck(info, files) - } - - if trace { - fmt.Fprintf(os.Stderr, "%s: stop %q\n", - time.Since(imp.start), info.Pkg.Path()) - } -} - -func (imp *importer) newPackageInfo(path, dir string) *PackageInfo { - pkg := types.NewPackage(path, "") - info := &PackageInfo{ - Pkg: pkg, - Info: types.Info{ - Types: make(map[ast.Expr]types.TypeAndValue), - Defs: make(map[*ast.Ident]types.Object), - Uses: make(map[*ast.Ident]types.Object), - Implicits: make(map[ast.Node]types.Object), - Scopes: make(map[ast.Node]*types.Scope), - Selections: make(map[*ast.SelectorExpr]*types.Selection), - }, - errorFunc: imp.conf.TypeChecker.Error, - dir: dir, - } - - // Copy the types.Config so we can vary it across PackageInfos. - tc := imp.conf.TypeChecker - tc.IgnoreFuncBodies = false - if f := imp.conf.TypeCheckFuncBodies; f != nil { - tc.IgnoreFuncBodies = !f(path) - } - tc.Importer = closure{imp, info} - tc.Error = info.appendError // appendError wraps the user's Error function - - info.checker = types.NewChecker(&tc, imp.conf.fset(), pkg, &info.Info) - imp.progMu.Lock() - imp.prog.AllPackages[pkg] = info - imp.progMu.Unlock() - return info -} - -type closure struct { - imp *importer - info *PackageInfo -} - -func (c closure) Import(to string) (*types.Package, error) { return c.imp.doImport(c.info, to) } diff --git a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/loader/util.go b/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/loader/util.go deleted file mode 100644 index 7f38dd7..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/loader/util.go +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package loader - -import ( - "go/ast" - "go/build" - "go/parser" - "go/token" - "io" - "os" - "strconv" - "sync" - - "golang.org/x/tools/go/buildutil" -) - -// We use a counting semaphore to limit -// the number of parallel I/O calls per process. -var ioLimit = make(chan bool, 10) - -// parseFiles parses the Go source files within directory dir and -// returns the ASTs of the ones that could be at least partially parsed, -// along with a list of I/O and parse errors encountered. -// -// I/O is done via ctxt, which may specify a virtual file system. -// displayPath is used to transform the filenames attached to the ASTs. -// -func parseFiles(fset *token.FileSet, ctxt *build.Context, displayPath func(string) string, dir string, files []string, mode parser.Mode) ([]*ast.File, []error) { - if displayPath == nil { - displayPath = func(path string) string { return path } - } - var wg sync.WaitGroup - n := len(files) - parsed := make([]*ast.File, n) - errors := make([]error, n) - for i, file := range files { - if !buildutil.IsAbsPath(ctxt, file) { - file = buildutil.JoinPath(ctxt, dir, file) - } - wg.Add(1) - go func(i int, file string) { - ioLimit <- true // wait - defer func() { - wg.Done() - <-ioLimit // signal - }() - var rd io.ReadCloser - var err error - if ctxt.OpenFile != nil { - rd, err = ctxt.OpenFile(file) - } else { - rd, err = os.Open(file) - } - if err != nil { - errors[i] = err // open failed - return - } - - // ParseFile may return both an AST and an error. - parsed[i], errors[i] = parser.ParseFile(fset, displayPath(file), rd, mode) - rd.Close() - }(i, file) - } - wg.Wait() - - // Eliminate nils, preserving order. - var o int - for _, f := range parsed { - if f != nil { - parsed[o] = f - o++ - } - } - parsed = parsed[:o] - - o = 0 - for _, err := range errors { - if err != nil { - errors[o] = err - o++ - } - } - errors = errors[:o] - - return parsed, errors -} - -// scanImports returns the set of all import paths from all -// import specs in the specified files. -func scanImports(files []*ast.File) map[string]bool { - imports := make(map[string]bool) - for _, f := range files { - for _, decl := range f.Decls { - if decl, ok := decl.(*ast.GenDecl); ok && decl.Tok == token.IMPORT { - for _, spec := range decl.Specs { - spec := spec.(*ast.ImportSpec) - - // NB: do not assume the program is well-formed! - path, err := strconv.Unquote(spec.Path.Value) - if err != nil { - continue // quietly ignore the error - } - if path == "C" { - continue // skip pseudopackage - } - imports[path] = true - } - } - } - } - return imports -} - -// ---------- Internal helpers ---------- - -// TODO(adonovan): make this a method: func (*token.File) Contains(token.Pos) -func tokenFileContainsPos(f *token.File, pos token.Pos) bool { - p := int(pos) - base := f.Base() - return base <= p && p < base+f.Size() -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/assert.go b/vendor/github.com/aws/aws-sdk-go/awstesting/assert.go deleted file mode 100644 index 5494dc7..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/assert.go +++ /dev/null @@ -1,190 +0,0 @@ -package awstesting - -import ( - "encoding/json" - "encoding/xml" - "fmt" - "net/url" - "reflect" - "regexp" - "sort" - "strings" - "testing" -) - -// Match is a testing helper to test for testing error by comparing expected -// with a regular expression. -func Match(t *testing.T, regex, expected string) { - if !regexp.MustCompile(regex).Match([]byte(expected)) { - t.Errorf("%q\n\tdoes not match /%s/", expected, regex) - } -} - -// AssertURL verifies the expected URL is matches the actual. -func AssertURL(t *testing.T, expect, actual string, msgAndArgs ...interface{}) bool { - expectURL, err := url.Parse(expect) - if err != nil { - t.Errorf(errMsg("unable to parse expected URL", err, msgAndArgs)) - return false - } - actualURL, err := url.Parse(actual) - if err != nil { - t.Errorf(errMsg("unable to parse actual URL", err, msgAndArgs)) - return false - } - - equal(t, expectURL.Host, actualURL.Host, msgAndArgs...) - equal(t, expectURL.Scheme, actualURL.Scheme, msgAndArgs...) - equal(t, expectURL.Path, actualURL.Path, msgAndArgs...) - - return AssertQuery(t, expectURL.Query().Encode(), actualURL.Query().Encode(), msgAndArgs...) -} - -var queryMapKey = regexp.MustCompile("(.*?)\\.[0-9]+\\.key") - -// AssertQuery verifies the expect HTTP query string matches the actual. -func AssertQuery(t *testing.T, expect, actual string, msgAndArgs ...interface{}) bool { - expectQ, err := url.ParseQuery(expect) - if err != nil { - t.Errorf(errMsg("unable to parse expected Query", err, msgAndArgs)) - return false - } - actualQ, err := url.ParseQuery(actual) - if err != nil { - t.Errorf(errMsg("unable to parse actual Query", err, msgAndArgs)) - return false - } - - // Make sure the keys are the same - if !equal(t, queryValueKeys(expectQ), queryValueKeys(actualQ), msgAndArgs...) { - return false - } - - keys := map[string][]string{} - for key, v := range expectQ { - if queryMapKey.Match([]byte(key)) { - submatch := queryMapKey.FindStringSubmatch(key) - keys[submatch[1]] = append(keys[submatch[1]], v...) - } - } - - for k, v := range keys { - // clear all keys that have prefix - for key := range expectQ { - if strings.HasPrefix(key, k) { - delete(expectQ, key) - } - } - - sort.Strings(v) - for i, value := range v { - expectQ[fmt.Sprintf("%s.%d.key", k, i+1)] = []string{value} - } - } - - for k, expectQVals := range expectQ { - sort.Strings(expectQVals) - actualQVals := actualQ[k] - sort.Strings(actualQVals) - if !equal(t, expectQVals, actualQVals, msgAndArgs...) { - return false - } - } - - return true -} - -// AssertJSON verifies that the expect json string matches the actual. -func AssertJSON(t *testing.T, expect, actual string, msgAndArgs ...interface{}) bool { - expectVal := map[string]interface{}{} - if err := json.Unmarshal([]byte(expect), &expectVal); err != nil { - t.Errorf(errMsg("unable to parse expected JSON", err, msgAndArgs...)) - return false - } - - actualVal := map[string]interface{}{} - if err := json.Unmarshal([]byte(actual), &actualVal); err != nil { - t.Errorf(errMsg("unable to parse actual JSON", err, msgAndArgs...)) - return false - } - - return equal(t, expectVal, actualVal, msgAndArgs...) -} - -// AssertXML verifies that the expect xml string matches the actual. -func AssertXML(t *testing.T, expect, actual string, container interface{}, msgAndArgs ...interface{}) bool { - expectVal := container - if err := xml.Unmarshal([]byte(expect), &expectVal); err != nil { - t.Errorf(errMsg("unable to parse expected XML", err, msgAndArgs...)) - } - - actualVal := container - if err := xml.Unmarshal([]byte(actual), &actualVal); err != nil { - t.Errorf(errMsg("unable to parse actual XML", err, msgAndArgs...)) - } - return equal(t, expectVal, actualVal, msgAndArgs...) -} - -// objectsAreEqual determines if two objects are considered equal. -// -// This function does no assertion of any kind. -// -// Based on github.com/stretchr/testify/assert.ObjectsAreEqual -// Copied locally to prevent non-test build dependencies on testify -func objectsAreEqual(expected, actual interface{}) bool { - if expected == nil || actual == nil { - return expected == actual - } - - return reflect.DeepEqual(expected, actual) -} - -// Equal asserts that two objects are equal. -// -// assert.Equal(t, 123, 123, "123 and 123 should be equal") -// -// Returns whether the assertion was successful (true) or not (false). -// -// Based on github.com/stretchr/testify/assert.Equal -// Copied locally to prevent non-test build dependencies on testify -func equal(t *testing.T, expected, actual interface{}, msgAndArgs ...interface{}) bool { - if !objectsAreEqual(expected, actual) { - t.Errorf("Not Equal:\n\t%#v (expected)\n\t%#v (actual), %s", - expected, actual, messageFromMsgAndArgs(msgAndArgs)) - return false - } - - return true -} - -func errMsg(baseMsg string, err error, msgAndArgs ...interface{}) string { - message := messageFromMsgAndArgs(msgAndArgs) - if message != "" { - message += ", " - } - return fmt.Sprintf("%s%s, %v", message, baseMsg, err) -} - -// Based on github.com/stretchr/testify/assert.messageFromMsgAndArgs -// Copied locally to prevent non-test build dependencies on testify -func messageFromMsgAndArgs(msgAndArgs []interface{}) string { - if len(msgAndArgs) == 0 || msgAndArgs == nil { - return "" - } - if len(msgAndArgs) == 1 { - return msgAndArgs[0].(string) - } - if len(msgAndArgs) > 1 { - return fmt.Sprintf(msgAndArgs[0].(string), msgAndArgs[1:]...) - } - return "" -} - -func queryValueKeys(v url.Values) []string { - keys := make([]string, 0, len(v)) - for k := range v { - keys = append(keys, k) - } - sort.Strings(keys) - return keys -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/assert_test.go b/vendor/github.com/aws/aws-sdk-go/awstesting/assert_test.go deleted file mode 100644 index f72abfb..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/assert_test.go +++ /dev/null @@ -1,89 +0,0 @@ -package awstesting_test - -import ( - "encoding/xml" - "testing" - - "github.com/aws/aws-sdk-go/awstesting" -) - -func TestAssertJSON(t *testing.T) { - cases := []struct { - e, a string - asserts bool - }{ - { - e: `{"RecursiveStruct":{"RecursiveMap":{"foo":{"NoRecurse":"foo"},"bar":{"NoRecurse":"bar"}}}}`, - a: `{"RecursiveStruct":{"RecursiveMap":{"bar":{"NoRecurse":"bar"},"foo":{"NoRecurse":"foo"}}}}`, - asserts: true, - }, - } - - for i, c := range cases { - mockT := &testing.T{} - if awstesting.AssertJSON(mockT, c.e, c.a) != c.asserts { - t.Error("Assert JSON result was not expected.", i) - } - } -} - -func TestAssertXML(t *testing.T) { - cases := []struct { - e, a string - asserts bool - container struct { - XMLName xml.Name `xml:"OperationRequest"` - NS string `xml:"xmlns,attr"` - RecursiveStruct struct { - RecursiveMap struct { - Entries []struct { - XMLName xml.Name `xml:"entries"` - Key string `xml:"key"` - Value struct { - XMLName xml.Name `xml:"value"` - NoRecurse string - } - } - } - } - } - }{ - { - e: `foofoobarbar`, - a: `barbarfoofoo`, - asserts: true, - }, - } - - for i, c := range cases { - // mockT := &testing.T{} - if awstesting.AssertXML(t, c.e, c.a, c.container) != c.asserts { - t.Error("Assert XML result was not expected.", i) - } - } -} - -func TestAssertQuery(t *testing.T) { - cases := []struct { - e, a string - asserts bool - }{ - { - e: `Action=OperationName&Version=2014-01-01&Foo=val1&Bar=val2`, - a: `Action=OperationName&Version=2014-01-01&Foo=val2&Bar=val3`, - asserts: false, - }, - { - e: `Action=OperationName&Version=2014-01-01&Foo=val1&Bar=val2`, - a: `Action=OperationName&Version=2014-01-01&Foo=val1&Bar=val2`, - asserts: true, - }, - } - - for i, c := range cases { - mockT := &testing.T{} - if awstesting.AssertQuery(mockT, c.e, c.a) != c.asserts { - t.Error("Assert Query result was not expected.", i) - } - } -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/client.go deleted file mode 100644 index 539639d..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/client.go +++ /dev/null @@ -1,24 +0,0 @@ -package awstesting - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/defaults" -) - -// NewClient creates and initializes a generic service client for testing. -func NewClient(cfgs ...*aws.Config) *client.Client { - info := metadata.ClientInfo{ - Endpoint: "http://endpoint", - SigningName: "", - } - def := defaults.Get() - def.Config.MergeIn(cfgs...) - - if v := aws.StringValue(def.Config.Endpoint); len(v) > 0 { - info.Endpoint = v - } - - return client.New(*def.Config, info, def.Handlers) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/cmd/bucket_cleanup/main.go b/vendor/github.com/aws/aws-sdk-go/awstesting/cmd/bucket_cleanup/main.go deleted file mode 100644 index 8425c39..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/cmd/bucket_cleanup/main.go +++ /dev/null @@ -1,94 +0,0 @@ -// +build integration - -package main - -import ( - "fmt" - "os" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/session" - "github.com/aws/aws-sdk-go/service/s3" -) - -// Searches the buckets of an account that match the prefix, and deletes -// those buckets, and all objects within. Before deleting will prompt user -// to confirm bucket should be deleted. Positive confirmation is required. -// -// Usage: -// go run deleteBuckets.go -func main() { - sess := session.Must(session.NewSession()) - - svc := s3.New(sess) - buckets, err := svc.ListBuckets(&s3.ListBucketsInput{}) - if err != nil { - panic(fmt.Sprintf("failed to list buckets, %v", err)) - } - - if len(os.Args) < 2 { - fmt.Fprintln(os.Stderr, "bucket prefix required") - os.Exit(1) - } - bucketPrefix := os.Args[1] - - var failed bool - for _, b := range buckets.Buckets { - bucket := aws.StringValue(b.Name) - - if !strings.HasPrefix(bucket, bucketPrefix) { - continue - } - - fmt.Printf("Delete bucket %q? [y/N]: ", bucket) - var v string - if _, err := fmt.Scanln(&v); err != nil || !(v == "Y" || v == "y") { - fmt.Println("\tSkipping") - continue - } - - fmt.Println("\tDeleting") - if err := deleteBucket(svc, bucket); err != nil { - fmt.Fprintf(os.Stderr, "failed to delete bucket %q, %v", bucket, err) - failed = true - } - } - - if failed { - os.Exit(1) - } -} - -func deleteBucket(svc *s3.S3, bucket string) error { - bucketName := &bucket - - objs, err := svc.ListObjects(&s3.ListObjectsInput{Bucket: bucketName}) - if err != nil { - return fmt.Errorf("failed to list bucket %q objects, %v", bucketName, err) - } - - for _, o := range objs.Contents { - svc.DeleteObject(&s3.DeleteObjectInput{Bucket: bucketName, Key: o.Key}) - } - - uploads, err := svc.ListMultipartUploads(&s3.ListMultipartUploadsInput{Bucket: bucketName}) - if err != nil { - return fmt.Errorf("failed to list bucket %q multipart objects, %v", bucketName, err) - } - - for _, u := range uploads.Uploads { - svc.AbortMultipartUpload(&s3.AbortMultipartUploadInput{ - Bucket: bucketName, - Key: u.Key, - UploadId: u.UploadId, - }) - } - - _, err = svc.DeleteBucket(&s3.DeleteBucketInput{Bucket: bucketName}) - if err != nil { - return fmt.Errorf("failed to delete bucket %q, %v", bucketName, err) - } - - return nil -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/integration_test.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/integration_test.go deleted file mode 100644 index 93d5ff6..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/integration_test.go +++ /dev/null @@ -1,124 +0,0 @@ -// +build integration - -// Package s3_test runs integration tests for S3 -package s3_test - -import ( - "bytes" - "fmt" - "io/ioutil" - "net/http" - "os" - "testing" - "time" - - "github.com/stretchr/testify/assert" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/awstesting/integration" - "github.com/aws/aws-sdk-go/service/s3" -) - -var bucketName *string -var svc *s3.S3 - -func TestMain(m *testing.M) { - setup() - defer teardown() // only called if we panic - result := m.Run() - teardown() - os.Exit(result) -} - -// Create a bucket for testing -func setup() { - svc = s3.New(integration.Session) - bucketName = aws.String( - fmt.Sprintf("aws-sdk-go-integration-%d-%s", time.Now().Unix(), integration.UniqueID())) - - for i := 0; i < 10; i++ { - _, err := svc.CreateBucket(&s3.CreateBucketInput{Bucket: bucketName}) - if err == nil { - break - } - } - - for { - _, err := svc.HeadBucket(&s3.HeadBucketInput{Bucket: bucketName}) - if err == nil { - break - } - time.Sleep(1 * time.Second) - } -} - -// Delete the bucket -func teardown() { - resp, _ := svc.ListObjects(&s3.ListObjectsInput{Bucket: bucketName}) - for _, o := range resp.Contents { - svc.DeleteObject(&s3.DeleteObjectInput{Bucket: bucketName, Key: o.Key}) - } - svc.DeleteBucket(&s3.DeleteBucketInput{Bucket: bucketName}) -} - -func TestWriteToObject(t *testing.T) { - _, err := svc.PutObject(&s3.PutObjectInput{ - Bucket: bucketName, - Key: aws.String("key name"), - Body: bytes.NewReader([]byte("hello world")), - }) - assert.NoError(t, err) - - resp, err := svc.GetObject(&s3.GetObjectInput{ - Bucket: bucketName, - Key: aws.String("key name"), - }) - assert.NoError(t, err) - - b, _ := ioutil.ReadAll(resp.Body) - assert.Equal(t, []byte("hello world"), b) -} - -func TestPresignedGetPut(t *testing.T) { - putreq, _ := svc.PutObjectRequest(&s3.PutObjectInput{ - Bucket: bucketName, - Key: aws.String("presigned-key"), - }) - var err error - - // Presign a PUT request - var puturl string - puturl, err = putreq.Presign(300 * time.Second) - assert.NoError(t, err) - - // PUT to the presigned URL with a body - var puthttpreq *http.Request - buf := bytes.NewReader([]byte("hello world")) - puthttpreq, err = http.NewRequest("PUT", puturl, buf) - assert.NoError(t, err) - - var putresp *http.Response - putresp, err = http.DefaultClient.Do(puthttpreq) - assert.NoError(t, err) - assert.Equal(t, 200, putresp.StatusCode) - - // Presign a GET on the same URL - getreq, _ := svc.GetObjectRequest(&s3.GetObjectInput{ - Bucket: bucketName, - Key: aws.String("presigned-key"), - }) - - var geturl string - geturl, err = getreq.Presign(300 * time.Second) - assert.NoError(t, err) - - // Get the body - var getresp *http.Response - getresp, err = http.Get(geturl) - assert.NoError(t, err) - - var b []byte - defer getresp.Body.Close() - b, err = ioutil.ReadAll(getresp.Body) - assert.Equal(t, "hello world", string(b)) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/s3crypto/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/s3crypto/client.go deleted file mode 100644 index eb16be6..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/s3crypto/client.go +++ /dev/null @@ -1,29 +0,0 @@ -// +build integration - -//Package s3crypto provides gucumber integration tests support. -package s3crypto - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/session" - "github.com/aws/aws-sdk-go/service/s3" - "github.com/aws/aws-sdk-go/service/s3/s3crypto" - - "github.com/gucumber/gucumber" -) - -func init() { - gucumber.Before("@s3crypto", func() { - sess := session.New((&aws.Config{ - Region: aws.String("us-west-2"), - })) - encryptionClient := s3crypto.NewEncryptionClient(sess, nil, func(c *s3crypto.EncryptionClient) { - }) - gucumber.World["encryptionClient"] = encryptionClient - - decryptionClient := s3crypto.NewDecryptionClient(sess) - gucumber.World["decryptionClient"] = decryptionClient - - gucumber.World["client"] = s3.New(sess) - }) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/s3crypto/s3_crypto.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/s3crypto/s3_crypto.feature deleted file mode 100644 index 81abc1a..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/s3crypto/s3_crypto.feature +++ /dev/null @@ -1,33 +0,0 @@ -# language: en -@s3crypto @client -Feature: S3 Integration Crypto Tests - - Scenario: Uploading Go's SDK fixtures - When I get all fixtures for "aes_gcm" from "aws-s3-shared-tests" - Then I encrypt each fixture with "kms" "AWS_SDK_TEST_ALIAS" "us-west-2" and "aes_gcm" - And upload "Go" data with folder "version_2" - - Scenario: Uploading Go's SDK fixtures - When I get all fixtures for "aes_cbc" from "aws-s3-shared-tests" - Then I encrypt each fixture with "kms" "AWS_SDK_TEST_ALIAS" "us-west-2" and "aes_cbc" - And upload "Go" data with folder "version_2" - - Scenario: Get all plaintext fixtures for symmetric masterkey aes gcm - When I get all fixtures for "aes_gcm" from "aws-s3-shared-tests" - Then I decrypt each fixture against "Go" "version_2" - And I compare the decrypted ciphertext to the plaintext - - Scenario: Get all plaintext fixtures for symmetric masterkey aes cbc - When I get all fixtures for "aes_cbc" from "aws-s3-shared-tests" - Then I decrypt each fixture against "Go" "version_2" - And I compare the decrypted ciphertext to the plaintext - - Scenario: Get all plaintext fixtures for symmetric masterkey aes gcm - When I get all fixtures for "aes_gcm" from "aws-s3-shared-tests" - Then I decrypt each fixture against "Java" "version_2" - And I compare the decrypted ciphertext to the plaintext - - Scenario: Get all plaintext fixtures for symmetric masterkey aes cbc - When I get all fixtures for "aes_cbc" from "aws-s3-shared-tests" - Then I decrypt each fixture against "Java" "version_2" - And I compare the decrypted ciphertext to the plaintext diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/s3crypto/stepdef.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/s3crypto/stepdef.go deleted file mode 100644 index 7d58e19..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/s3crypto/stepdef.go +++ /dev/null @@ -1,190 +0,0 @@ -// +build integration - -// Package s3crypto contains shared step definitions that are used across integration tests -package s3crypto - -import ( - "bytes" - "encoding/base64" - "errors" - "io/ioutil" - "strings" - - "github.com/gucumber/gucumber" - "github.com/stretchr/testify/assert" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/session" - "github.com/aws/aws-sdk-go/service/kms" - "github.com/aws/aws-sdk-go/service/s3" - "github.com/aws/aws-sdk-go/service/s3/s3crypto" -) - -func init() { - gucumber.When(`^I get all fixtures for "(.+?)" from "(.+?)"$`, - func(cekAlg, bucket string) { - prefix := "plaintext_test_case_" - baseFolder := "crypto_tests/" + cekAlg - s3Client := gucumber.World["client"].(*s3.S3) - - out, err := s3Client.ListObjects(&s3.ListObjectsInput{ - Bucket: aws.String(bucket), - Prefix: aws.String(baseFolder + "/" + prefix), - }) - assert.NoError(gucumber.T, err) - - plaintexts := make(map[string][]byte) - for _, obj := range out.Contents { - plaintextKey := obj.Key - ptObj, err := s3Client.GetObject(&s3.GetObjectInput{ - Bucket: aws.String(bucket), - Key: plaintextKey, - }) - assert.NoError(gucumber.T, err) - caseKey := strings.TrimPrefix(*plaintextKey, baseFolder+"/"+prefix) - plaintext, err := ioutil.ReadAll(ptObj.Body) - assert.NoError(gucumber.T, err) - - plaintexts[caseKey] = plaintext - } - gucumber.World["baseFolder"] = baseFolder - gucumber.World["bucket"] = bucket - gucumber.World["plaintexts"] = plaintexts - }) - - gucumber.Then(`^I decrypt each fixture against "(.+?)" "(.+?)"$`, func(lang, version string) { - plaintexts := gucumber.World["plaintexts"].(map[string][]byte) - baseFolder := gucumber.World["baseFolder"].(string) - bucket := gucumber.World["bucket"].(string) - prefix := "ciphertext_test_case_" - s3Client := gucumber.World["client"].(*s3.S3) - s3CryptoClient := gucumber.World["decryptionClient"].(*s3crypto.DecryptionClient) - language := "language_" + lang - - ciphertexts := make(map[string][]byte) - for caseKey := range plaintexts { - cipherKey := baseFolder + "/" + version + "/" + language + "/" + prefix + caseKey - - // To get metadata for encryption key - ctObj, err := s3Client.GetObject(&s3.GetObjectInput{ - Bucket: aws.String(bucket), - Key: &cipherKey, - }) - if err != nil { - continue - } - - // We don't support wrap, so skip it - if ctObj.Metadata["X-Amz-Wrap-Alg"] == nil || *ctObj.Metadata["X-Amz-Wrap-Alg"] != "kms" { - continue - } - - ctObj, err = s3CryptoClient.GetObject(&s3.GetObjectInput{ - Bucket: aws.String(bucket), - Key: &cipherKey, - }, - ) - assert.NoError(gucumber.T, err) - - ciphertext, err := ioutil.ReadAll(ctObj.Body) - assert.NoError(gucumber.T, err) - ciphertexts[caseKey] = ciphertext - } - gucumber.World["decrypted"] = ciphertexts - }) - - gucumber.And(`^I compare the decrypted ciphertext to the plaintext$`, func() { - plaintexts := gucumber.World["plaintexts"].(map[string][]byte) - ciphertexts := gucumber.World["decrypted"].(map[string][]byte) - for caseKey, ciphertext := range ciphertexts { - assert.Equal(gucumber.T, len(plaintexts[caseKey]), len(ciphertext)) - assert.True(gucumber.T, bytes.Equal(plaintexts[caseKey], ciphertext)) - } - }) - - gucumber.Then(`^I encrypt each fixture with "(.+?)" "(.+?)" "(.+?)" and "(.+?)"$`, func(kek, v1, v2, cek string) { - var handler s3crypto.CipherDataGenerator - var builder s3crypto.ContentCipherBuilder - switch kek { - case "kms": - arn, err := getAliasInformation(v1, v2) - assert.Nil(gucumber.T, err) - - b64Arn := base64.StdEncoding.EncodeToString([]byte(arn)) - assert.Nil(gucumber.T, err) - gucumber.World["Masterkey"] = b64Arn - - handler = s3crypto.NewKMSKeyGenerator(kms.New(session.New(&aws.Config{ - Region: &v2, - })), arn) - assert.Nil(gucumber.T, err) - default: - gucumber.T.Skip() - } - - switch cek { - case "aes_gcm": - builder = s3crypto.AESGCMContentCipherBuilder(handler) - case "aes_cbc": - builder = s3crypto.AESCBCContentCipherBuilder(handler, s3crypto.AESCBCPadder) - default: - gucumber.T.Skip() - } - - sess := session.New(&aws.Config{ - Region: aws.String("us-west-2"), - }) - c := s3crypto.NewEncryptionClient(sess, builder, func(c *s3crypto.EncryptionClient) { - }) - gucumber.World["encryptionClient"] = c - gucumber.World["cek"] = cek - }) - - gucumber.And(`^upload "(.+?)" data with folder "(.+?)"$`, func(language, folder string) { - c := gucumber.World["encryptionClient"].(*s3crypto.EncryptionClient) - cek := gucumber.World["cek"].(string) - bucket := gucumber.World["bucket"].(string) - plaintexts := gucumber.World["plaintexts"].(map[string][]byte) - key := gucumber.World["Masterkey"].(string) - for caseKey, plaintext := range plaintexts { - input := &s3.PutObjectInput{ - Bucket: &bucket, - Key: aws.String("crypto_tests/" + cek + "/" + folder + "/language_" + language + "/ciphertext_test_case_" + caseKey), - Body: bytes.NewReader(plaintext), - Metadata: map[string]*string{ - "Masterkey": &key, - }, - } - - _, err := c.PutObject(input) - assert.Nil(gucumber.T, err) - } - }) -} - -func getAliasInformation(alias, region string) (string, error) { - arn := "" - svc := kms.New(session.New(&aws.Config{ - Region: ®ion, - })) - - truncated := true - var marker *string - for truncated { - out, err := svc.ListAliases(&kms.ListAliasesInput{ - Marker: marker, - }) - if err != nil { - return arn, err - } - for _, aliasEntry := range out.Aliases { - if *aliasEntry.AliasName == "alias/"+alias { - return *aliasEntry.AliasArn, nil - } - } - truncated = *out.Truncated - marker = out.NextMarker - } - - return "", errors.New("The alias " + alias + " does not exist in your account. Please add the proper alias to a key") -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/s3manager/bucket_region_test.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/s3manager/bucket_region_test.go deleted file mode 100644 index 823b2c1..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/s3manager/bucket_region_test.go +++ /dev/null @@ -1,27 +0,0 @@ -// +build integration - -package s3manager - -import ( - "testing" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/awstesting/integration" - "github.com/aws/aws-sdk-go/service/s3/s3manager" -) - -func TestGetBucketRegion(t *testing.T) { - expectRegion := aws.StringValue(integration.Session.Config.Region) - - ctx := aws.BackgroundContext() - region, err := s3manager.GetBucketRegion(ctx, integration.Session, - aws.StringValue(bucketName), expectRegion) - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - if e, a := expectRegion, region; e != a { - t.Errorf("expect %s bucket region, got %s", e, a) - } -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/s3manager/integration_test.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/s3manager/integration_test.go deleted file mode 100644 index 8753643..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/s3manager/integration_test.go +++ /dev/null @@ -1,210 +0,0 @@ -// +build integration - -// Package s3manager provides integration tests for the service/s3/s3manager package -package s3manager - -import ( - "bytes" - "crypto/md5" - "fmt" - "io" - "os" - "regexp" - "strings" - "testing" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/awstesting/integration" - "github.com/aws/aws-sdk-go/service/s3" - "github.com/aws/aws-sdk-go/service/s3/s3manager" -) - -var integBuf12MB = make([]byte, 1024*1024*12) -var integMD512MB = fmt.Sprintf("%x", md5.Sum(integBuf12MB)) -var bucketName *string - -func TestMain(m *testing.M) { - if err := setup(); err != nil { - panic(fmt.Sprintf("failed to setup integration test, %v", err)) - } - - var result int - - defer func() { - if err := teardown(); err != nil { - fmt.Fprintf(os.Stderr, "teardown failed, %v", err) - } - if r := recover(); r != nil { - fmt.Println("S3Manager integration test hit a panic,", r) - result = 1 - } - os.Exit(result) - }() - - result = m.Run() -} - -func setup() error { - svc := s3.New(integration.Session) - - // Create a bucket for testing - bucketName = aws.String( - fmt.Sprintf("aws-sdk-go-integration-%d-%s", time.Now().Unix(), integration.UniqueID())) - - _, err := svc.CreateBucket(&s3.CreateBucketInput{Bucket: bucketName}) - if err != nil { - return fmt.Errorf("failed to create bucket %q, %v", *bucketName, err) - } - - err = svc.WaitUntilBucketExists(&s3.HeadBucketInput{Bucket: bucketName}) - if err != nil { - return fmt.Errorf("failed to wait for bucket %q to exist, %v", bucketName, err) - } - - return nil -} - -// Delete the bucket -func teardown() error { - svc := s3.New(integration.Session) - - objs, err := svc.ListObjects(&s3.ListObjectsInput{Bucket: bucketName}) - if err != nil { - return fmt.Errorf("failed to list bucket %q objects, %v", bucketName, err) - } - - for _, o := range objs.Contents { - svc.DeleteObject(&s3.DeleteObjectInput{Bucket: bucketName, Key: o.Key}) - } - - uploads, err := svc.ListMultipartUploads(&s3.ListMultipartUploadsInput{Bucket: bucketName}) - if err != nil { - return fmt.Errorf("failed to list bucket %q multipart objects, %v", bucketName, err) - } - - for _, u := range uploads.Uploads { - svc.AbortMultipartUpload(&s3.AbortMultipartUploadInput{ - Bucket: bucketName, - Key: u.Key, - UploadId: u.UploadId, - }) - } - - _, err = svc.DeleteBucket(&s3.DeleteBucketInput{Bucket: bucketName}) - if err != nil { - return fmt.Errorf("failed to delete bucket %q, %v", bucketName, err) - } - - return nil -} - -type dlwriter struct { - buf []byte -} - -func newDLWriter(size int) *dlwriter { - return &dlwriter{buf: make([]byte, size)} -} - -func (d dlwriter) WriteAt(p []byte, pos int64) (n int, err error) { - if pos > int64(len(d.buf)) { - return 0, io.EOF - } - - written := 0 - for i, b := range p { - if i >= len(d.buf) { - break - } - d.buf[pos+int64(i)] = b - written++ - } - return written, nil -} - -func validate(t *testing.T, key string, md5value string) { - mgr := s3manager.NewDownloader(integration.Session) - params := &s3.GetObjectInput{Bucket: bucketName, Key: &key} - - w := newDLWriter(1024 * 1024 * 20) - n, err := mgr.Download(w, params) - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - if e, a := md5value, fmt.Sprintf("%x", md5.Sum(w.buf[0:n])); e != a { - t.Errorf("expect %s md5 value, got %s", e, a) - } -} - -func TestUploadConcurrently(t *testing.T) { - key := "12mb-1" - mgr := s3manager.NewUploader(integration.Session) - out, err := mgr.Upload(&s3manager.UploadInput{ - Bucket: bucketName, - Key: &key, - Body: bytes.NewReader(integBuf12MB), - }) - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - if len(out.UploadID) == 0 { - t.Errorf("expect upload ID but was empty") - } - - re := regexp.MustCompile(`^https?://.+/` + key + `$`) - if e, a := re.String(), out.Location; !re.MatchString(a) { - t.Errorf("expect %s to match URL regexp %q, did not", e, a) - } - - validate(t, key, integMD512MB) -} - -func TestUploadFailCleanup(t *testing.T) { - svc := s3.New(integration.Session) - - // Break checksum on 2nd part so it fails - part := 0 - svc.Handlers.Build.PushBack(func(r *request.Request) { - if r.Operation.Name == "UploadPart" { - if part == 1 { - r.HTTPRequest.Header.Set("X-Amz-Content-Sha256", "000") - } - part++ - } - }) - - key := "12mb-leave" - mgr := s3manager.NewUploaderWithClient(svc, func(u *s3manager.Uploader) { - u.LeavePartsOnError = false - }) - _, err := mgr.Upload(&s3manager.UploadInput{ - Bucket: bucketName, - Key: &key, - Body: bytes.NewReader(integBuf12MB), - }) - if err == nil { - t.Fatalf("expect error, but did not get one") - } - - aerr := err.(awserr.Error) - if e, a := "MissingRegion", aerr.Code(); strings.Contains(a, e) { - t.Errorf("expect %q to not be in error code %q", e, a) - } - - uploadID := "" - merr := err.(s3manager.MultiUploadFailure) - if uploadID = merr.UploadID(); len(uploadID) == 0 { - t.Errorf("expect upload ID to not be empty, but was") - } - - _, err = svc.ListParts(&s3.ListPartsInput{ - Bucket: bucketName, Key: &key, UploadId: &uploadID, - }) - if err == nil { - t.Errorf("expect error for list parts, but got none") - } -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/s3manager/stub.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/s3manager/stub.go deleted file mode 100644 index 9434ae9..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/s3manager/stub.go +++ /dev/null @@ -1 +0,0 @@ -package s3manager diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/stub.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/stub.go deleted file mode 100644 index 3ed7f97..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/stub.go +++ /dev/null @@ -1 +0,0 @@ -package s3 diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/integration.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/integration.go deleted file mode 100644 index 88bcf16..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/integration.go +++ /dev/null @@ -1,44 +0,0 @@ -// +build integration - -// Package integration performs initialization and validation for integration -// tests. -package integration - -import ( - "crypto/rand" - "fmt" - "io" - "os" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/session" -) - -// Session is a shared session for all integration tests to use. -var Session = session.Must(session.NewSession()) - -func init() { - logLevel := Session.Config.LogLevel - if os.Getenv("DEBUG") != "" { - logLevel = aws.LogLevel(aws.LogDebug) - } - if os.Getenv("DEBUG_SIGNING") != "" { - logLevel = aws.LogLevel(aws.LogDebugWithSigning) - } - if os.Getenv("DEBUG_BODY") != "" { - logLevel = aws.LogLevel(aws.LogDebugWithSigning | aws.LogDebugWithHTTPBody) - } - Session.Config.LogLevel = logLevel - - if aws.StringValue(Session.Config.Region) == "" { - panic("AWS_REGION must be configured to run integration tests") - } -} - -// UniqueID returns a unique UUID-like identifier for use in generating -// resources for integration tests. -func UniqueID() string { - uuid := make([]byte, 16) - io.ReadFull(rand.Reader, uuid) - return fmt.Sprintf("%x", uuid) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/acm/acm.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/acm/acm.feature deleted file mode 100644 index dc28b55..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/acm/acm.feature +++ /dev/null @@ -1,14 +0,0 @@ -#language en -@acm @client -Feature: AWS Certificate Manager - - Scenario: Making a request - When I call the "ListCertificates" API - Then the request should be successful - - Scenario: Handling errors - When I attempt to call the "GetCertificate" API with: - | CertificateArn | arn:aws:acm:region:123456789012:certificate/12345678-1234-1234-1234-123456789012 | - Then I expect the response error code to be "ResourceNotFoundException" - And I expect the response error message not be empty - diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/acm/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/acm/client.go deleted file mode 100644 index fdb6438..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/acm/client.go +++ /dev/null @@ -1,16 +0,0 @@ -// +build integration - -//Package acm provides gucumber integration tests support. -package acm - -import ( - "github.com/aws/aws-sdk-go/awstesting/integration/smoke" - "github.com/aws/aws-sdk-go/service/acm" - "github.com/gucumber/gucumber" -) - -func init() { - gucumber.Before("@acm", func() { - gucumber.World["client"] = acm.New(smoke.Session) - }) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/apigateway/apigateway.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/apigateway/apigateway.feature deleted file mode 100644 index 4286b81..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/apigateway/apigateway.feature +++ /dev/null @@ -1,16 +0,0 @@ -# language: en -@apigateway @client -Feature: Amazon API Gateway - - Scenario: Making a request - When I call the "GetAccountRequest" API - Then the request should be successful - - Scenario: Handing errors - When I attempt to call the "GetRestApi" API with: - | RestApiId | api123 | - Then I expect the response error code to be "NotFoundException" - And I expect the response error message to include: - """ - Invalid REST API identifier specified - """ diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/apigateway/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/apigateway/client.go deleted file mode 100644 index 10ee2de..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/apigateway/client.go +++ /dev/null @@ -1,16 +0,0 @@ -// +build integration - -//Package apigateway provides gucumber integration tests support. -package apigateway - -import ( - "github.com/aws/aws-sdk-go/awstesting/integration/smoke" - "github.com/aws/aws-sdk-go/service/apigateway" - "github.com/gucumber/gucumber" -) - -func init() { - gucumber.Before("@apigateway", func() { - gucumber.World["client"] = apigateway.New(smoke.Session) - }) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/applicationdiscoveryservice/applicationdiscoveryservice.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/applicationdiscoveryservice/applicationdiscoveryservice.feature deleted file mode 100644 index 02ae287..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/applicationdiscoveryservice/applicationdiscoveryservice.feature +++ /dev/null @@ -1,8 +0,0 @@ -#language en -@applicationdiscoveryservice @client -Feature: AWS Application Discovery Service - - Scenario: Making a request - When I call the "DescribeAgents" API - Then the request should be successful - diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/applicationdiscoveryservice/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/applicationdiscoveryservice/client.go deleted file mode 100644 index 85a4dab..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/applicationdiscoveryservice/client.go +++ /dev/null @@ -1,19 +0,0 @@ -// +build integration - -//Package applicationdiscoveryservice provides gucumber integration tests support. -package applicationdiscoveryservice - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/awstesting/integration/smoke" - "github.com/aws/aws-sdk-go/service/applicationdiscoveryservice" - "github.com/gucumber/gucumber" -) - -func init() { - gucumber.Before("@applicationdiscoveryservice", func() { - gucumber.World["client"] = applicationdiscoveryservice.New( - smoke.Session, &aws.Config{Region: aws.String("us-west-2")}, - ) - }) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/autoscaling/autoscaling.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/autoscaling/autoscaling.feature deleted file mode 100644 index 7c2bdf6..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/autoscaling/autoscaling.feature +++ /dev/null @@ -1,18 +0,0 @@ -# language: en -@autoscaling @client -Feature: Auto Scaling - - Scenario: Making a request - When I call the "DescribeScalingProcessTypes" API - Then the value at "Processes" should be a list - - Scenario: Handing errors - When I attempt to call the "CreateLaunchConfiguration" API with: - | LaunchConfigurationName | | - | ImageId | ami-12345678 | - | InstanceType | m1.small | - Then I expect the response error code to be "InvalidParameter" - And I expect the response error message to include: - """ - LaunchConfigurationName - """ diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/autoscaling/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/autoscaling/client.go deleted file mode 100644 index 55c68d1..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/autoscaling/client.go +++ /dev/null @@ -1,16 +0,0 @@ -// +build integration - -//Package autoscaling provides gucumber integration tests support. -package autoscaling - -import ( - "github.com/aws/aws-sdk-go/awstesting/integration/smoke" - "github.com/aws/aws-sdk-go/service/autoscaling" - "github.com/gucumber/gucumber" -) - -func init() { - gucumber.Before("@autoscaling", func() { - gucumber.World["client"] = autoscaling.New(smoke.Session) - }) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudformation/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudformation/client.go deleted file mode 100644 index 079fde7..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudformation/client.go +++ /dev/null @@ -1,16 +0,0 @@ -// +build integration - -//Package cloudformation provides gucumber integration tests support. -package cloudformation - -import ( - "github.com/aws/aws-sdk-go/awstesting/integration/smoke" - "github.com/aws/aws-sdk-go/service/cloudformation" - "github.com/gucumber/gucumber" -) - -func init() { - gucumber.Before("@cloudformation", func() { - gucumber.World["client"] = cloudformation.New(smoke.Session) - }) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudformation/cloudformation.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudformation/cloudformation.feature deleted file mode 100644 index 3eafaf6..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudformation/cloudformation.feature +++ /dev/null @@ -1,17 +0,0 @@ -# language: en -@cloudformation @client -Feature: AWS CloudFormation - - Scenario: Making a request - When I call the "ListStacks" API - Then the value at "StackSummaries" should be a list - - Scenario: Handling errors - When I attempt to call the "CreateStack" API with: - | StackName | fakestack | - | TemplateURL | http://s3.amazonaws.com/foo/bar | - Then I expect the response error code to be "ValidationError" - And I expect the response error message to include: - """ - TemplateURL must reference a valid S3 object to which you have access. - """ diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudfront/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudfront/client.go deleted file mode 100644 index c958362..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudfront/client.go +++ /dev/null @@ -1,16 +0,0 @@ -// +build integration - -//Package cloudfront provides gucumber integration tests support. -package cloudfront - -import ( - "github.com/aws/aws-sdk-go/awstesting/integration/smoke" - "github.com/aws/aws-sdk-go/service/cloudfront" - "github.com/gucumber/gucumber" -) - -func init() { - gucumber.Before("@cloudfront", func() { - gucumber.World["client"] = cloudfront.New(smoke.Session) - }) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudfront/cloudfront.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudfront/cloudfront.feature deleted file mode 100644 index bbb2a8d..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudfront/cloudfront.feature +++ /dev/null @@ -1,17 +0,0 @@ -# language: en -@cloudfront @client -Feature: Amazon CloudFront - - Scenario: Making a basic request - When I call the "ListDistributions" API with: - | MaxItems | 1 | - Then the value at "DistributionList.Items" should be a list - - Scenario: Error handling - When I attempt to call the "GetDistribution" API with: - | Id | fake-id | - Then I expect the response error code to be "NoSuchDistribution" - And I expect the response error message to include: - """ - The specified distribution does not exist. - """ diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudhsm/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudhsm/client.go deleted file mode 100644 index 23f24be..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudhsm/client.go +++ /dev/null @@ -1,16 +0,0 @@ -// +build integration - -//Package cloudhsm provides gucumber integration tests support. -package cloudhsm - -import ( - "github.com/aws/aws-sdk-go/awstesting/integration/smoke" - "github.com/aws/aws-sdk-go/service/cloudhsm" - "github.com/gucumber/gucumber" -) - -func init() { - gucumber.Before("@cloudhsm", func() { - gucumber.World["client"] = cloudhsm.New(smoke.Session) - }) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudhsm/cloudhsm.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudhsm/cloudhsm.feature deleted file mode 100644 index 545ca4e..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudhsm/cloudhsm.feature +++ /dev/null @@ -1,16 +0,0 @@ -# language: en -@cloudhsm @client -Feature: Amazon CloudHSM - - Scenario: Making a request - When I call the "ListHapgs" API - Then the value at "HapgList" should be a list - - Scenario: Handling errors - When I attempt to call the "DescribeHapg" API with: - | HapgArn | bogus-arn | - Then I expect the response error code to be "ValidationException" - And I expect the response error message to include: - """ - Value 'bogus-arn' at 'hapgArn' failed to satisfy constraint - """ diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudsearch/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudsearch/client.go deleted file mode 100644 index c346b28..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudsearch/client.go +++ /dev/null @@ -1,16 +0,0 @@ -// +build integration - -//Package cloudsearch provides gucumber integration tests support. -package cloudsearch - -import ( - "github.com/aws/aws-sdk-go/awstesting/integration/smoke" - "github.com/aws/aws-sdk-go/service/cloudsearch" - "github.com/gucumber/gucumber" -) - -func init() { - gucumber.Before("@cloudsearch", func() { - gucumber.World["client"] = cloudsearch.New(smoke.Session) - }) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudsearch/cloudsearch.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudsearch/cloudsearch.feature deleted file mode 100644 index 160e916..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudsearch/cloudsearch.feature +++ /dev/null @@ -1,16 +0,0 @@ -# language: en -@cloudsearch @client -Feature: Amazon CloudSearch - - Scenario: Making a request - When I call the "DescribeDomains" API - Then the response should contain a "DomainStatusList" - - Scenario: Handling errors - When I attempt to call the "DescribeIndexFields" API with: - | DomainName | fakedomain | - Then I expect the response error code to be "ResourceNotFound" - And I expect the response error message to include: - """ - Domain not found: fakedomain - """ diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudtrail/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudtrail/client.go deleted file mode 100644 index 97c7bfa..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudtrail/client.go +++ /dev/null @@ -1,16 +0,0 @@ -// +build integration - -//Package cloudtrail provides gucumber integration tests support. -package cloudtrail - -import ( - "github.com/aws/aws-sdk-go/awstesting/integration/smoke" - "github.com/aws/aws-sdk-go/service/cloudtrail" - "github.com/gucumber/gucumber" -) - -func init() { - gucumber.Before("@cloudtrail", func() { - gucumber.World["client"] = cloudtrail.New(smoke.Session) - }) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudtrail/cloudtrail.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudtrail/cloudtrail.feature deleted file mode 100644 index 817ab5c..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudtrail/cloudtrail.feature +++ /dev/null @@ -1,12 +0,0 @@ -# language: en -@cloudtrail @client -Feature: AWS CloudTrail - - Scenario: Making a request - When I call the "DescribeTrails" API - Then the request should be successful - - Scenario: Handling errors - When I attempt to call the "DeleteTrail" API with: - | Name | faketrail | - Then I expect the response error code to be "TrailNotFoundException" diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudwatch/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudwatch/client.go deleted file mode 100644 index ebc339d..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudwatch/client.go +++ /dev/null @@ -1,16 +0,0 @@ -// +build integration - -//Package cloudwatch provides gucumber integration tests support. -package cloudwatch - -import ( - "github.com/aws/aws-sdk-go/awstesting/integration/smoke" - "github.com/aws/aws-sdk-go/service/cloudwatch" - "github.com/gucumber/gucumber" -) - -func init() { - gucumber.Before("@cloudwatch", func() { - gucumber.World["client"] = cloudwatch.New(smoke.Session) - }) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudwatch/cloudwatch.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudwatch/cloudwatch.feature deleted file mode 100644 index 84307ef..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudwatch/cloudwatch.feature +++ /dev/null @@ -1,19 +0,0 @@ -# language: en -@cloudwatch @monitoring @client -Feature: Amazon CloudWatch - - Scenario: Making a request - When I call the "ListMetrics" API with: - | Namespace | AWS/EC2 | - Then the value at "Metrics" should be a list - - Scenario: Handling errors - When I attempt to call the "SetAlarmState" API with: - | AlarmName | abc | - | StateValue | mno | - | StateReason | xyz | - Then I expect the response error code to be "ValidationError" - And I expect the response error message to include: - """ - failed to satisfy constraint - """ diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudwatchlogs/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudwatchlogs/client.go deleted file mode 100644 index 75fa2c5..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudwatchlogs/client.go +++ /dev/null @@ -1,16 +0,0 @@ -// +build integration - -//Package cloudwatchlogs provides gucumber integration tests support. -package cloudwatchlogs - -import ( - "github.com/aws/aws-sdk-go/awstesting/integration/smoke" - "github.com/aws/aws-sdk-go/service/cloudwatchlogs" - "github.com/gucumber/gucumber" -) - -func init() { - gucumber.Before("@cloudwatchlogs", func() { - gucumber.World["client"] = cloudwatchlogs.New(smoke.Session) - }) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudwatchlogs/cloudwatchlogs.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudwatchlogs/cloudwatchlogs.feature deleted file mode 100644 index 5711c4e..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudwatchlogs/cloudwatchlogs.feature +++ /dev/null @@ -1,17 +0,0 @@ -# language: en -@cloudwatchlogs @logs -Feature: Amazon CloudWatch Logs - - Scenario: Making a request - When I call the "DescribeLogGroups" API - Then the value at "logGroups" should be a list - - Scenario: Handling errors - When I attempt to call the "GetLogEvents" API with: - | logGroupName | fakegroup | - | logStreamName | fakestream | - Then I expect the response error code to be "ResourceNotFoundException" - And I expect the response error message to include: - """ - The specified log group does not exist. - """ diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/codecommit/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/codecommit/client.go deleted file mode 100644 index 2f9da34..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/codecommit/client.go +++ /dev/null @@ -1,16 +0,0 @@ -// +build integration - -//Package codecommit provides gucumber integration tests support. -package codecommit - -import ( - "github.com/aws/aws-sdk-go/awstesting/integration/smoke" - "github.com/aws/aws-sdk-go/service/codecommit" - "github.com/gucumber/gucumber" -) - -func init() { - gucumber.Before("@codecommit", func() { - gucumber.World["client"] = codecommit.New(smoke.Session) - }) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/codecommit/codecommit.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/codecommit/codecommit.feature deleted file mode 100644 index c5c0190..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/codecommit/codecommit.feature +++ /dev/null @@ -1,16 +0,0 @@ -# language: en -@codecommit @client -Feature: Amazon CodeCommit - - Scenario: Making a request - When I call the "ListRepositories" API - Then the value at "repositories" should be a list - - Scenario: Handling errors - When I attempt to call the "ListBranches" API with: - | repositoryName | fake-repo | - Then I expect the response error code to be "RepositoryDoesNotExistException" - And I expect the response error message to include: - """ - fake-repo does not exist - """ diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/codedeploy/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/codedeploy/client.go deleted file mode 100644 index 29587b9..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/codedeploy/client.go +++ /dev/null @@ -1,16 +0,0 @@ -// +build integration - -//Package codedeploy provides gucumber integration tests support. -package codedeploy - -import ( - "github.com/aws/aws-sdk-go/awstesting/integration/smoke" - "github.com/aws/aws-sdk-go/service/codedeploy" - "github.com/gucumber/gucumber" -) - -func init() { - gucumber.Before("@codedeploy", func() { - gucumber.World["client"] = codedeploy.New(smoke.Session) - }) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/codedeploy/codedeploy.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/codedeploy/codedeploy.feature deleted file mode 100644 index 45dfd2f..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/codedeploy/codedeploy.feature +++ /dev/null @@ -1,16 +0,0 @@ -# language: en -@codedeploy @client -Feature: Amazon CodeDeploy - - Scenario: Making a request - When I call the "ListApplications" API - Then the value at "applications" should be a list - - Scenario: Handling errors - When I attempt to call the "GetDeployment" API with: - | deploymentId | d-USUAELQEX | - Then I expect the response error code to be "DeploymentDoesNotExistException" - And I expect the response error message to include: - """ - The deployment d-USUAELQEX could not be found - """ diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/codepipeline/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/codepipeline/client.go deleted file mode 100644 index edc34f6..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/codepipeline/client.go +++ /dev/null @@ -1,16 +0,0 @@ -// +build integration - -//Package codepipeline provides gucumber integration tests support. -package codepipeline - -import ( - "github.com/aws/aws-sdk-go/awstesting/integration/smoke" - "github.com/aws/aws-sdk-go/service/codepipeline" - "github.com/gucumber/gucumber" -) - -func init() { - gucumber.Before("@codepipeline", func() { - gucumber.World["client"] = codepipeline.New(smoke.Session) - }) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/codepipeline/codepipeline.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/codepipeline/codepipeline.feature deleted file mode 100644 index cb962cc..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/codepipeline/codepipeline.feature +++ /dev/null @@ -1,16 +0,0 @@ -# language: en -@codepipeline @client -Feature: Amazon CodePipeline - - Scenario: Making a request - When I call the "ListPipelines" API - Then the value at "pipelines" should be a list - - Scenario: Handling errors - When I attempt to call the "GetPipeline" API with: - | name | fake-pipeline | - Then I expect the response error code to be "PipelineNotFoundException" - And I expect the response error message to include: - """ - does not have a pipeline with name 'fake-pipeline' - """ diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cognitoidentity/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cognitoidentity/client.go deleted file mode 100644 index 476169f..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cognitoidentity/client.go +++ /dev/null @@ -1,16 +0,0 @@ -// +build integration - -//Package cognitoidentity provides gucumber integration tests support. -package cognitoidentity - -import ( - "github.com/aws/aws-sdk-go/awstesting/integration/smoke" - "github.com/aws/aws-sdk-go/service/cognitoidentity" - "github.com/gucumber/gucumber" -) - -func init() { - gucumber.Before("@cognitoidentity", func() { - gucumber.World["client"] = cognitoidentity.New(smoke.Session) - }) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cognitoidentity/cognitoidentity.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cognitoidentity/cognitoidentity.feature deleted file mode 100644 index 12abcc8..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cognitoidentity/cognitoidentity.feature +++ /dev/null @@ -1,19 +0,0 @@ -# language: en -@cognitoidentity @client -Feature: Amazon Cognito Idenity - - Scenario: Making a request - When I call the "ListIdentityPools" API with JSON: - """ - {"MaxResults": 10} - """ - Then the value at "IdentityPools" should be a list - - Scenario: Handling errors - When I attempt to call the "DescribeIdentityPool" API with: - | IdentityPoolId | us-east-1:aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee | - Then I expect the response error code to be "ResourceNotFoundException" - And I expect the response error message to include: - """ - IdentityPool 'us-east-1:aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee' not found - """ diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cognitosync/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cognitosync/client.go deleted file mode 100644 index 585e47c..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cognitosync/client.go +++ /dev/null @@ -1,16 +0,0 @@ -// +build integration - -//Package cognitosync provides gucumber integration tests support. -package cognitosync - -import ( - "github.com/aws/aws-sdk-go/awstesting/integration/smoke" - "github.com/aws/aws-sdk-go/service/cognitosync" - "github.com/gucumber/gucumber" -) - -func init() { - gucumber.Before("@cognitosync", func() { - gucumber.World["client"] = cognitosync.New(smoke.Session) - }) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cognitosync/cognitosync.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cognitosync/cognitosync.feature deleted file mode 100644 index 3cdf84e..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cognitosync/cognitosync.feature +++ /dev/null @@ -1,16 +0,0 @@ -# language: en -@cognitosync @client -Feature: Amazon Cognito Sync - - Scenario: Making a request - When I call the "ListIdentityPoolUsage" API - Then the value at "IdentityPoolUsages" should be a list - - Scenario: Handling errors - When I attempt to call the "DescribeIdentityPoolUsage" API with: - | IdentityPoolId | us-east-1:aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee | - Then I expect the response error code to be "ResourceNotFoundException" - And I expect the response error message to include: - """ - IdentityPool 'us-east-1:aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee' not found - """ diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/configservice/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/configservice/client.go deleted file mode 100644 index fed6229..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/configservice/client.go +++ /dev/null @@ -1,16 +0,0 @@ -// +build integration - -//Package configservice provides gucumber integration tests support. -package configservice - -import ( - "github.com/aws/aws-sdk-go/awstesting/integration/smoke" - "github.com/aws/aws-sdk-go/service/configservice" - "github.com/gucumber/gucumber" -) - -func init() { - gucumber.Before("@configservice", func() { - gucumber.World["client"] = configservice.New(smoke.Session) - }) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/configservice/configservice.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/configservice/configservice.feature deleted file mode 100644 index ccc3af6..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/configservice/configservice.feature +++ /dev/null @@ -1,17 +0,0 @@ -# language: en -@configservice @config @client -Feature: AWS Config - - Scenario: Making a request - When I call the "DescribeConfigurationRecorders" API - Then the value at "ConfigurationRecorders" should be a list - - Scenario: Handling errors - When I attempt to call the "GetResourceConfigHistory" API with: - | resourceType | fake-type | - | resourceId | fake-id | - Then I expect the response error code to be "ValidationException" - And I expect the response error message to include: - """ - failed to satisfy constraint - """ diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/datapipeline/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/datapipeline/client.go deleted file mode 100644 index 10bb6f1..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/datapipeline/client.go +++ /dev/null @@ -1,16 +0,0 @@ -// +build integration - -//Package datapipeline provides gucumber integration tests support. -package datapipeline - -import ( - "github.com/aws/aws-sdk-go/awstesting/integration/smoke" - "github.com/aws/aws-sdk-go/service/datapipeline" - "github.com/gucumber/gucumber" -) - -func init() { - gucumber.Before("@datapipeline", func() { - gucumber.World["client"] = datapipeline.New(smoke.Session) - }) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/datapipeline/datapipeline.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/datapipeline/datapipeline.feature deleted file mode 100644 index db31518..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/datapipeline/datapipeline.feature +++ /dev/null @@ -1,16 +0,0 @@ -# language: en -@datapipeline @client -Feature: AWS Data Pipeline - - Scenario: Making a request - When I call the "ListPipelines" API - Then the response should contain a "pipelineIdList" - - Scenario: Handling errors - When I attempt to call the "GetPipelineDefinition" API with: - | pipelineId | fake-id | - Then I expect the response error code to be "PipelineNotFoundException" - And I expect the response error message to include: - """ - does not exist - """ diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/devicefarm/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/devicefarm/client.go deleted file mode 100644 index f1bcbf7..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/devicefarm/client.go +++ /dev/null @@ -1,19 +0,0 @@ -// +build integration - -//Package devicefarm provides gucumber integration tests support. -package devicefarm - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/awstesting/integration/smoke" - "github.com/aws/aws-sdk-go/service/devicefarm" - "github.com/gucumber/gucumber" -) - -func init() { - gucumber.Before("@devicefarm", func() { - // FIXME remove custom region - gucumber.World["client"] = devicefarm.New(smoke.Session, - aws.NewConfig().WithRegion("us-west-2")) - }) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/devicefarm/devicefarm.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/devicefarm/devicefarm.feature deleted file mode 100644 index 1d200a9..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/devicefarm/devicefarm.feature +++ /dev/null @@ -1,16 +0,0 @@ -# language: en -@devicefarm @client -Feature: AWS Device Farm - - Scenario: Making a request - When I call the "ListDevices" API - Then the value at "devices" should be a list - - Scenario: Handling errors - When I attempt to call the "GetDevice" API with: - | arn | arn:aws:devicefarm:us-west-2::device:000000000000000000000000fake-arn | - Then I expect the response error code to be "NotFoundException" - And I expect the response error message to include: - """ - No device was found for arn - """ diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/directconnect/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/directconnect/client.go deleted file mode 100644 index c86e5d8..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/directconnect/client.go +++ /dev/null @@ -1,16 +0,0 @@ -// +build integration - -//Package directconnect provides gucumber integration tests support. -package directconnect - -import ( - "github.com/aws/aws-sdk-go/awstesting/integration/smoke" - "github.com/aws/aws-sdk-go/service/directconnect" - "github.com/gucumber/gucumber" -) - -func init() { - gucumber.Before("@directconnect", func() { - gucumber.World["client"] = directconnect.New(smoke.Session) - }) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/directconnect/directconnect.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/directconnect/directconnect.feature deleted file mode 100644 index 3efd9c7..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/directconnect/directconnect.feature +++ /dev/null @@ -1,16 +0,0 @@ -# language: en -@directconnect @client -Feature: AWS Direct Connect - - Scenario: Making a request - When I call the "DescribeConnections" API - Then the value at "connections" should be a list - - Scenario: Handling errors - When I attempt to call the "DescribeConnections" API with: - | connectionId | fake-connection | - Then I expect the response error code to be "DirectConnectClientException" - And I expect the response error message to include: - """ - Connection ID fake-connection has an invalid format - """ diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/directoryservice/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/directoryservice/client.go deleted file mode 100644 index ae2fbba..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/directoryservice/client.go +++ /dev/null @@ -1,16 +0,0 @@ -// +build integration - -//Package directoryservice provides gucumber integration tests support. -package directoryservice - -import ( - "github.com/aws/aws-sdk-go/awstesting/integration/smoke" - "github.com/aws/aws-sdk-go/service/directoryservice" - "github.com/gucumber/gucumber" -) - -func init() { - gucumber.Before("@directoryservice", func() { - gucumber.World["client"] = directoryservice.New(smoke.Session) - }) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/directoryservice/directoryservice.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/directoryservice/directoryservice.feature deleted file mode 100644 index 315839b..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/directoryservice/directoryservice.feature +++ /dev/null @@ -1,17 +0,0 @@ -# language: en -@directoryservice @ds @client -Feature: AWS Directory Service - - I want to use AWS Directory Service - - Scenario: Making a request - When I call the "DescribeDirectories" API - Then the value at "DirectoryDescriptions" should be a list - - Scenario: Handling errors - When I attempt to call the "CreateDirectory" API with: - | Name | | - | Password | | - | Size | | - Then I expect the response error code to be "ValidationException" - diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/dynamodb/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/dynamodb/client.go deleted file mode 100644 index 5e3d3fb..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/dynamodb/client.go +++ /dev/null @@ -1,16 +0,0 @@ -// +build integration - -//Package dynamodb provides gucumber integration tests support. -package dynamodb - -import ( - "github.com/aws/aws-sdk-go/awstesting/integration/smoke" - "github.com/aws/aws-sdk-go/service/dynamodb" - "github.com/gucumber/gucumber" -) - -func init() { - gucumber.Before("@dynamodb", func() { - gucumber.World["client"] = dynamodb.New(smoke.Session) - }) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/dynamodb/dynamodb.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/dynamodb/dynamodb.feature deleted file mode 100644 index 1df6b3c..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/dynamodb/dynamodb.feature +++ /dev/null @@ -1,19 +0,0 @@ -# language: en -@dynamodb @client -Feature: Amazon DynamoDB - - Scenario: Making a request - When I call the "ListTables" API with JSON: - """ - {"Limit": 1} - """ - Then the value at "TableNames" should be a list - - Scenario: Handling errors - When I attempt to call the "DescribeTable" API with: - | TableName | fake-table | - Then I expect the response error code to be "ResourceNotFoundException" - And I expect the response error message to include: - """ - Requested resource not found: Table: fake-table not found - """ diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/dynamodbstreams/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/dynamodbstreams/client.go deleted file mode 100644 index 64cedf2..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/dynamodbstreams/client.go +++ /dev/null @@ -1,16 +0,0 @@ -// +build integration - -//Package dynamodbstreams provides gucumber integration tests support. -package dynamodbstreams - -import ( - "github.com/aws/aws-sdk-go/awstesting/integration/smoke" - "github.com/aws/aws-sdk-go/service/dynamodbstreams" - "github.com/gucumber/gucumber" -) - -func init() { - gucumber.Before("@dynamodbstreams", func() { - gucumber.World["client"] = dynamodbstreams.New(smoke.Session) - }) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/dynamodbstreams/dynamodbstreams.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/dynamodbstreams/dynamodbstreams.feature deleted file mode 100644 index 6e35e29..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/dynamodbstreams/dynamodbstreams.feature +++ /dev/null @@ -1,16 +0,0 @@ -# language: en -@dynamodbstreams @client -Feature: Amazon DynamoDB Streams - - Scenario: Making a request - When I call the "ListStreams" API - Then the value at "Streams" should be a list - - Scenario: Handling errors - When I attempt to call the "DescribeStream" API with: - | StreamArn | fake-stream | - Then I expect the response error code to be "InvalidParameter" - And I expect the response error message to include: - """ - StreamArn - """ diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/ec2/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/ec2/client.go deleted file mode 100644 index 6820153..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/ec2/client.go +++ /dev/null @@ -1,16 +0,0 @@ -// +build integration - -//Package ec2 provides gucumber integration tests support. -package ec2 - -import ( - "github.com/aws/aws-sdk-go/awstesting/integration/smoke" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/gucumber/gucumber" -) - -func init() { - gucumber.Before("@ec2", func() { - gucumber.World["client"] = ec2.New(smoke.Session) - }) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/ec2/ec2.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/ec2/ec2.feature deleted file mode 100644 index e238c2c..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/ec2/ec2.feature +++ /dev/null @@ -1,18 +0,0 @@ -# language: en -@ec2 @client -Feature: Amazon Elastic Compute Cloud - - Scenario: Making a request - When I call the "DescribeRegions" API - Then the value at "Regions" should be a list - - Scenario: Handling errors - When I attempt to call the "DescribeInstances" API with JSON: - """ - {"InstanceIds": ["i-12345678"]} - """ - Then I expect the response error code to be "InvalidInstanceID.NotFound" - And I expect the response error message to include: - """ - The instance ID 'i-12345678' does not exist - """ diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/ecs/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/ecs/client.go deleted file mode 100644 index 0db8224..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/ecs/client.go +++ /dev/null @@ -1,19 +0,0 @@ -// +build integration - -//Package ecs provides gucumber integration tests support. -package ecs - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/awstesting/integration/smoke" - "github.com/aws/aws-sdk-go/service/ecs" - "github.com/gucumber/gucumber" -) - -func init() { - gucumber.Before("@ecs", func() { - // FIXME remove custom region - gucumber.World["client"] = ecs.New(smoke.Session, - aws.NewConfig().WithRegion("us-west-2")) - }) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/ecs/ecs.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/ecs/ecs.feature deleted file mode 100644 index 6942137..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/ecs/ecs.feature +++ /dev/null @@ -1,14 +0,0 @@ -# language: en -@ecs @client -Feature: Amazon ECS - - I want to use Amazon ECS - - Scenario: Making a request - When I call the "ListClusters" API - Then the value at "clusterArns" should be a list - - Scenario: Handling errors - When I attempt to call the "StopTask" API with: - | task | xxxxxxxxxxx-xxxxxxxxxxxx-xxxxxxxxxxx | - Then the error code should be "ClusterNotFoundException" diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/efs/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/efs/client.go deleted file mode 100644 index fba6a32..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/efs/client.go +++ /dev/null @@ -1,19 +0,0 @@ -// +build integration - -//Package efs provides gucumber integration tests support. -package efs - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/awstesting/integration/smoke" - "github.com/aws/aws-sdk-go/service/efs" - "github.com/gucumber/gucumber" -) - -func init() { - gucumber.Before("@efs", func() { - // FIXME remove custom region - gucumber.World["client"] = efs.New(smoke.Session, - aws.NewConfig().WithRegion("us-west-2")) - }) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/efs/efs.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/efs/efs.feature deleted file mode 100644 index 113dd35..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/efs/efs.feature +++ /dev/null @@ -1,14 +0,0 @@ -# language: en -@efs @elasticfilesystem @client -Feature: Amazon Elastic File System - - I want to use Amazon Elastic File System - - Scenario: Making a request - When I call the "DescribeFileSystems" API - Then the value at "FileSystems" should be a list - - Scenario: Handling errors - When I attempt to call the "DeleteFileSystem" API with: - | FileSystemId | fake-id | - Then the error code should be "BadRequest" diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/elasticache/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/elasticache/client.go deleted file mode 100644 index 386237f..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/elasticache/client.go +++ /dev/null @@ -1,16 +0,0 @@ -// +build integration - -//Package elasticache provides gucumber integration tests support. -package elasticache - -import ( - "github.com/aws/aws-sdk-go/awstesting/integration/smoke" - "github.com/aws/aws-sdk-go/service/elasticache" - "github.com/gucumber/gucumber" -) - -func init() { - gucumber.Before("@elasticache", func() { - gucumber.World["client"] = elasticache.New(smoke.Session) - }) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/elasticache/elasticache.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/elasticache/elasticache.feature deleted file mode 100644 index 48828ca..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/elasticache/elasticache.feature +++ /dev/null @@ -1,16 +0,0 @@ -# language: en -@elasticache @client -Feature: ElastiCache - - Scenario: Making a request - When I call the "DescribeEvents" API - Then the value at "Events" should be a list - - Scenario: Handling errors - When I attempt to call the "DescribeCacheClusters" API with: - | CacheClusterId | fake_cluster | - Then I expect the response error code to be "InvalidParameterValue" - And I expect the response error message to include: - """ - The parameter CacheClusterIdentifier is not a valid identifier. - """ diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/elasticbeanstalk/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/elasticbeanstalk/client.go deleted file mode 100644 index 61cb2e1..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/elasticbeanstalk/client.go +++ /dev/null @@ -1,16 +0,0 @@ -// +build integration - -//Package elasticbeanstalk provides gucumber integration tests support. -package elasticbeanstalk - -import ( - "github.com/aws/aws-sdk-go/awstesting/integration/smoke" - "github.com/aws/aws-sdk-go/service/elasticbeanstalk" - "github.com/gucumber/gucumber" -) - -func init() { - gucumber.Before("@elasticbeanstalk", func() { - gucumber.World["client"] = elasticbeanstalk.New(smoke.Session) - }) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/elasticbeanstalk/elasticbeanstalk.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/elasticbeanstalk/elasticbeanstalk.feature deleted file mode 100644 index 35b1ad8..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/elasticbeanstalk/elasticbeanstalk.feature +++ /dev/null @@ -1,16 +0,0 @@ -# language: en -@elasticbeanstalk @client -Feature: AWS Elastic Beanstalk - - Scenario: Making a request - When I call the "ListAvailableSolutionStacks" API - Then the value at "SolutionStacks" should be a list - - Scenario: Handling errors - When I attempt to call the "DescribeEnvironmentResources" API with: - | EnvironmentId | fake_environment | - Then I expect the response error code to be "InvalidParameterValue" - And I expect the response error message to include: - """ - No Environment found for EnvironmentId = 'fake_environment'. - """ diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/elasticloadbalancing/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/elasticloadbalancing/client.go deleted file mode 100644 index 6682a77..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/elasticloadbalancing/client.go +++ /dev/null @@ -1,16 +0,0 @@ -// +build integration - -//Package elasticloadbalancing provides gucumber integration tests support. -package elasticloadbalancing - -import ( - "github.com/aws/aws-sdk-go/awstesting/integration/smoke" - "github.com/aws/aws-sdk-go/service/elb" - "github.com/gucumber/gucumber" -) - -func init() { - gucumber.Before("@elasticloadbalancing", func() { - gucumber.World["client"] = elb.New(smoke.Session) - }) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/elasticloadbalancing/elasticloadbalancing.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/elasticloadbalancing/elasticloadbalancing.feature deleted file mode 100644 index a8c7209..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/elasticloadbalancing/elasticloadbalancing.feature +++ /dev/null @@ -1,18 +0,0 @@ -# language: en -@elasticloadbalancing @client -Feature: Elastic Load Balancing - - Scenario: Making a request - When I call the "DescribeLoadBalancers" API - Then the value at "LoadBalancerDescriptions" should be a list - - Scenario: Handling errors - When I attempt to call the "DescribeLoadBalancers" API with JSON: - """ - {"LoadBalancerNames": ["fake_load_balancer"]} - """ - Then I expect the response error code to be "ValidationError" - And I expect the response error message to include: - """ - LoadBalancer name cannot contain characters that are not letters, or digits or the dash. - """ diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/elastictranscoder/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/elastictranscoder/client.go deleted file mode 100644 index 7e29b47..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/elastictranscoder/client.go +++ /dev/null @@ -1,16 +0,0 @@ -// +build integration - -//Package elastictranscoder provides gucumber integration tests support. -package elastictranscoder - -import ( - "github.com/aws/aws-sdk-go/awstesting/integration/smoke" - "github.com/aws/aws-sdk-go/service/elastictranscoder" - "github.com/gucumber/gucumber" -) - -func init() { - gucumber.Before("@elastictranscoder", func() { - gucumber.World["client"] = elastictranscoder.New(smoke.Session) - }) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/elastictranscoder/elastictranscoder.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/elastictranscoder/elastictranscoder.feature deleted file mode 100644 index 77658e6..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/elastictranscoder/elastictranscoder.feature +++ /dev/null @@ -1,16 +0,0 @@ -# language: en -@elastictranscoder @client -Feature: Amazon Elastic Transcoder - - Scenario: Making a request - When I call the "ListPresets" API - Then the value at "Presets" should be a list - - Scenario: Handling errors - When I attempt to call the "ReadJob" API with: - | Id | fake_job | - Then I expect the response error code to be "ValidationException" - And I expect the response error message to include: - """ - Value 'fake_job' at 'id' failed to satisfy constraint - """ diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/emr/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/emr/client.go deleted file mode 100644 index 41295c7..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/emr/client.go +++ /dev/null @@ -1,16 +0,0 @@ -// +build integration - -//Package emr provides gucumber integration tests support. -package emr - -import ( - "github.com/aws/aws-sdk-go/awstesting/integration/smoke" - "github.com/aws/aws-sdk-go/service/emr" - "github.com/gucumber/gucumber" -) - -func init() { - gucumber.Before("@emr", func() { - gucumber.World["client"] = emr.New(smoke.Session) - }) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/emr/emr.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/emr/emr.feature deleted file mode 100644 index 133c174..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/emr/emr.feature +++ /dev/null @@ -1,16 +0,0 @@ -# language: en -@emr @client @elasticmapreduce -Feature: Amazon EMR - - Scenario: Making a request - When I call the "ListClusters" API - Then the value at "Clusters" should be a list - - Scenario: Handling errors - When I attempt to call the "DescribeCluster" API with: - | ClusterId | fake_cluster | - Then I expect the response error code to be "InvalidRequestException" - And I expect the response error message to include: - """ - Cluster id 'fake_cluster' is not valid. - """ diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/es/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/es/client.go deleted file mode 100644 index 33e59c4..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/es/client.go +++ /dev/null @@ -1,16 +0,0 @@ -// +build integration - -//Package es provides gucumber integration tests support. -package es - -import ( - "github.com/aws/aws-sdk-go/awstesting/integration/smoke" - "github.com/aws/aws-sdk-go/service/elasticsearchservice" - "github.com/gucumber/gucumber" -) - -func init() { - gucumber.Before("@es", func() { - gucumber.World["client"] = elasticsearchservice.New(smoke.Session) - }) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/es/es.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/es/es.feature deleted file mode 100644 index 8bd1f1e..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/es/es.feature +++ /dev/null @@ -1,16 +0,0 @@ -# language: en -@es @elasticsearchservice -Feature: Amazon ElasticsearchService - - Scenario: Making a request - When I call the "ListDomainNames" API - Then the value at "DomainNames" should be a list - - Scenario: Handling errors - When I attempt to call the "DescribeElasticsearchDomain" API with: - | DomainName | not-a-domain | - Then the error code should be "ResourceNotFoundException" - And I expect the response error message to include: - """ - Domain not found: not-a-domain - """ \ No newline at end of file diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/glacier/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/glacier/client.go deleted file mode 100644 index 26235ab..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/glacier/client.go +++ /dev/null @@ -1,16 +0,0 @@ -// +build integration - -//Package glacier provides gucumber integration tests support. -package glacier - -import ( - "github.com/aws/aws-sdk-go/awstesting/integration/smoke" - "github.com/aws/aws-sdk-go/service/glacier" - "github.com/gucumber/gucumber" -) - -func init() { - gucumber.Before("@glacier", func() { - gucumber.World["client"] = glacier.New(smoke.Session) - }) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/glacier/glacier.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/glacier/glacier.feature deleted file mode 100644 index 0e1a113..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/glacier/glacier.feature +++ /dev/null @@ -1,16 +0,0 @@ -# language: en -@glacier @client -Feature: Amazon Glacier - - Scenario: Making a request - When I call the "ListVaults" API - Then the response should contain a "VaultList" - - Scenario: Handling errors - When I attempt to call the "ListVaults" API with: - | accountId | abcmnoxyz | - Then I expect the response error code to be "UnrecognizedClientException" - And I expect the response error message to include: - """ - No account found for the given parameters - """ diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/iam/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/iam/client.go deleted file mode 100644 index d551c73..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/iam/client.go +++ /dev/null @@ -1,16 +0,0 @@ -// +build integration - -//Package iam provides gucumber integration tests support. -package iam - -import ( - "github.com/aws/aws-sdk-go/awstesting/integration/smoke" - "github.com/aws/aws-sdk-go/service/iam" - "github.com/gucumber/gucumber" -) - -func init() { - gucumber.Before("@iam", func() { - gucumber.World["client"] = iam.New(smoke.Session) - }) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/iam/iam.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/iam/iam.feature deleted file mode 100644 index 0da6463..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/iam/iam.feature +++ /dev/null @@ -1,16 +0,0 @@ -# language: en -@iam @client -Feature: AWS Identity and Access Management - - Scenario: Making a request - When I call the "ListUsers" API - Then the value at "Users" should be a list - - Scenario: Handling errors - When I attempt to call the "GetUser" API with: - | UserName | fake_user | - Then I expect the response error code to be "NoSuchEntity" - And I expect the response error message to include: - """ - The user with name fake_user cannot be found. - """ diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/iotdataplane/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/iotdataplane/client.go deleted file mode 100644 index 28f9067..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/iotdataplane/client.go +++ /dev/null @@ -1,29 +0,0 @@ -// +build integration - -//Package iotdataplane provides gucumber integration tests support. -package iotdataplane - -import ( - "fmt" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/awstesting/integration/smoke" - "github.com/aws/aws-sdk-go/service/iot" - "github.com/aws/aws-sdk-go/service/iotdataplane" - "github.com/gucumber/gucumber" -) - -func init() { - gucumber.Before("@iotdataplane", func() { - svc := iot.New(smoke.Session) - result, err := svc.DescribeEndpoint(&iot.DescribeEndpointInput{}) - if err != nil { - gucumber.World["error"] = err - return - } - - fmt.Println("IOT Data endpoint:", *result.EndpointAddress) - gucumber.World["client"] = iotdataplane.New(smoke.Session, aws.NewConfig(). - WithEndpoint(*result.EndpointAddress)) - }) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/iotdataplane/iotdataplane.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/iotdataplane/iotdataplane.feature deleted file mode 100644 index 515d9bb..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/iotdataplane/iotdataplane.feature +++ /dev/null @@ -1,9 +0,0 @@ -# language: en -@iotdataplane @client - -Feature: AWS IoT Data Plane - - Scenario: Handling errors - When I attempt to call the "GetThingShadow" API with: - | thingName | fake-thing | - Then I expect the response error code to be "ResourceNotFoundException" diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/kinesis/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/kinesis/client.go deleted file mode 100644 index 5081bfe..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/kinesis/client.go +++ /dev/null @@ -1,16 +0,0 @@ -// +build integration - -//Package kinesis provides gucumber integration tests support. -package kinesis - -import ( - "github.com/aws/aws-sdk-go/awstesting/integration/smoke" - "github.com/aws/aws-sdk-go/service/kinesis" - "github.com/gucumber/gucumber" -) - -func init() { - gucumber.Before("@kinesis", func() { - gucumber.World["client"] = kinesis.New(smoke.Session) - }) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/kinesis/kinesis.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/kinesis/kinesis.feature deleted file mode 100644 index 570505c..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/kinesis/kinesis.feature +++ /dev/null @@ -1,16 +0,0 @@ -# language: en -@kinesis @client -Feature: AWS Kinesis - - Scenario: Making a request - When I call the "ListStreams" API - Then the value at "StreamNames" should be a list - - Scenario: Handling errors - When I attempt to call the "DescribeStream" API with: - | StreamName | bogus-stream-name | - Then I expect the response error code to be "ResourceNotFoundException" - And I expect the response error message to include: - """ - Stream bogus-stream-name under account - """ diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/kms/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/kms/client.go deleted file mode 100644 index e9498b3..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/kms/client.go +++ /dev/null @@ -1,16 +0,0 @@ -// +build integration - -//Package kms provides gucumber integration tests support. -package kms - -import ( - "github.com/aws/aws-sdk-go/awstesting/integration/smoke" - "github.com/aws/aws-sdk-go/service/kms" - "github.com/gucumber/gucumber" -) - -func init() { - gucumber.Before("@kms", func() { - gucumber.World["client"] = kms.New(smoke.Session) - }) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/kms/kms.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/kms/kms.feature deleted file mode 100644 index ee428ab..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/kms/kms.feature +++ /dev/null @@ -1,13 +0,0 @@ -# language: en -@kms @client -Feature: Amazon Key Management Service - - Scenario: Making a request - When I call the "ListAliases" API - Then the value at "Aliases" should be a list - - Scenario: Handling errors - When I attempt to call the "GetKeyPolicy" API with: - | KeyId | fake-key | - | PolicyName | fakepolicy | - Then I expect the response error code to be "NotFoundException" diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/lambda/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/lambda/client.go deleted file mode 100644 index 257bc26..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/lambda/client.go +++ /dev/null @@ -1,16 +0,0 @@ -// +build integration - -//Package lambda provides gucumber integration tests support. -package lambda - -import ( - "github.com/aws/aws-sdk-go/awstesting/integration/smoke" - "github.com/aws/aws-sdk-go/service/lambda" - "github.com/gucumber/gucumber" -) - -func init() { - gucumber.Before("@lambda", func() { - gucumber.World["client"] = lambda.New(smoke.Session) - }) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/lambda/lambda.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/lambda/lambda.feature deleted file mode 100644 index 6ff9cf4..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/lambda/lambda.feature +++ /dev/null @@ -1,16 +0,0 @@ -# language: en -@lambda @client -Feature: Amazon Lambda - - Scenario: Making a request - When I call the "ListFunctions" API - Then the value at "Functions" should be a list - - Scenario: Handling errors - When I attempt to call the "Invoke" API with: - | FunctionName | bogus-function | - Then I expect the response error code to be "ResourceNotFoundException" - And I expect the response error message to include: - """ - Function not found - """ diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/machinelearning/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/machinelearning/client.go deleted file mode 100644 index a8ba24c..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/machinelearning/client.go +++ /dev/null @@ -1,16 +0,0 @@ -// +build integration - -//Package machinelearning provides gucumber integration tests support. -package machinelearning - -import ( - "github.com/aws/aws-sdk-go/awstesting/integration/smoke" - "github.com/aws/aws-sdk-go/service/machinelearning" - "github.com/gucumber/gucumber" -) - -func init() { - gucumber.Before("@machinelearning", func() { - gucumber.World["client"] = machinelearning.New(smoke.Session) - }) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/machinelearning/machinelearning.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/machinelearning/machinelearning.feature deleted file mode 100644 index 2d9b064..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/machinelearning/machinelearning.feature +++ /dev/null @@ -1,18 +0,0 @@ -# language: en -@machinelearning @client -Feature: Amazon Machine Learning - - I want to use Amazon Machine Learning - - Scenario: Making a request - When I call the "DescribeMLModels" API - Then the value at "Results" should be a list - - Scenario: Error handling - When I attempt to call the "GetBatchPrediction" API with: - | BatchPredictionId | fake-id | - Then the error code should be "ResourceNotFoundException" - And the error message should contain: - """ - No BatchPrediction with id fake-id exists - """ diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/opsworks/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/opsworks/client.go deleted file mode 100644 index 8f3f537..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/opsworks/client.go +++ /dev/null @@ -1,16 +0,0 @@ -// +build integration - -//Package opsworks provides gucumber integration tests support. -package opsworks - -import ( - "github.com/aws/aws-sdk-go/awstesting/integration/smoke" - "github.com/aws/aws-sdk-go/service/opsworks" - "github.com/gucumber/gucumber" -) - -func init() { - gucumber.Before("@opsworks", func() { - gucumber.World["client"] = opsworks.New(smoke.Session) - }) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/opsworks/opsworks.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/opsworks/opsworks.feature deleted file mode 100644 index a9cfe52..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/opsworks/opsworks.feature +++ /dev/null @@ -1,16 +0,0 @@ -# language: en -@opsworks @client -Feature: AWS OpsWorks - - Scenario: Making a request - When I call the "DescribeStacks" API - Then the value at "Stacks" should be a list - - Scenario: Handling errors - When I attempt to call the "DescribeLayers" API with: - | StackId | fake_stack | - Then I expect the response error code to be "ResourceNotFoundException" - And I expect the response error message to include: - """ - Unable to find stack with ID fake_stack - """ diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/rds/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/rds/client.go deleted file mode 100644 index a12c73b..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/rds/client.go +++ /dev/null @@ -1,16 +0,0 @@ -// +build integration - -//Package rds provides gucumber integration tests support. -package rds - -import ( - "github.com/aws/aws-sdk-go/awstesting/integration/smoke" - "github.com/aws/aws-sdk-go/service/rds" - "github.com/gucumber/gucumber" -) - -func init() { - gucumber.Before("@rds", func() { - gucumber.World["client"] = rds.New(smoke.Session) - }) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/rds/rds.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/rds/rds.feature deleted file mode 100644 index 547d76d..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/rds/rds.feature +++ /dev/null @@ -1,16 +0,0 @@ -# language: en -@rds @client -Feature: Amazon RDS - - Scenario: Making a request - When I call the "DescribeDBEngineVersions" API - Then the value at "DBEngineVersions" should be a list - - Scenario: Handling errors - When I attempt to call the "DescribeDBInstances" API with: - | DBInstanceIdentifier | fake-id | - Then I expect the response error code to be "DBInstanceNotFound" - And I expect the response error message to include: - """ - DBInstance fake-id not found. - """ diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/redshift/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/redshift/client.go deleted file mode 100644 index 9e6da95..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/redshift/client.go +++ /dev/null @@ -1,16 +0,0 @@ -// +build integration - -//Package redshift provides gucumber integration tests support. -package redshift - -import ( - "github.com/aws/aws-sdk-go/awstesting/integration/smoke" - "github.com/aws/aws-sdk-go/service/redshift" - "github.com/gucumber/gucumber" -) - -func init() { - gucumber.Before("@redshift", func() { - gucumber.World["client"] = redshift.New(smoke.Session) - }) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/redshift/redshift.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/redshift/redshift.feature deleted file mode 100644 index 8cb45b1..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/redshift/redshift.feature +++ /dev/null @@ -1,16 +0,0 @@ -# language: en -@redshift @client -Feature: Amazon Redshift - - Scenario: Making a request - When I call the "DescribeClusterVersions" API - Then the value at "ClusterVersions" should be a list - - Scenario: Handling errors - When I attempt to call the "DescribeClusters" API with: - | ClusterIdentifier | fake-cluster | - Then I expect the response error code to be "ClusterNotFound" - And I expect the response error message to include: - """ - Cluster fake-cluster not found. - """ diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/route53/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/route53/client.go deleted file mode 100644 index a55a14e..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/route53/client.go +++ /dev/null @@ -1,16 +0,0 @@ -// +build integration - -//Package route53 provides gucumber integration tests support. -package route53 - -import ( - "github.com/aws/aws-sdk-go/awstesting/integration/smoke" - "github.com/aws/aws-sdk-go/service/route53" - "github.com/gucumber/gucumber" -) - -func init() { - gucumber.Before("@route53", func() { - gucumber.World["client"] = route53.New(smoke.Session) - }) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/route53/route53.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/route53/route53.feature deleted file mode 100644 index 51463c5..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/route53/route53.feature +++ /dev/null @@ -1,16 +0,0 @@ -# language: en -@route53 @client -Feature: Amazon Route 53 - - Scenario: Making a request - When I call the "ListHostedZones" API - Then the value at "HostedZones" should be a list - - Scenario: Handling errors - When I attempt to call the "GetHostedZone" API with: - | Id | fake-zone | - Then I expect the response error code to be "NoSuchHostedZone" - And I expect the response error message to include: - """ - No hosted zone found with ID: fake-zone - """ diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/route53domains/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/route53domains/client.go deleted file mode 100644 index c47de45..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/route53domains/client.go +++ /dev/null @@ -1,16 +0,0 @@ -// +build integration - -//Package route53domains provides gucumber integration tests support. -package route53domains - -import ( - "github.com/aws/aws-sdk-go/awstesting/integration/smoke" - "github.com/aws/aws-sdk-go/service/route53domains" - "github.com/gucumber/gucumber" -) - -func init() { - gucumber.Before("@route53domains", func() { - gucumber.World["client"] = route53domains.New(smoke.Session) - }) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/route53domains/route53domains.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/route53domains/route53domains.feature deleted file mode 100644 index f18dcc4..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/route53domains/route53domains.feature +++ /dev/null @@ -1,16 +0,0 @@ -# language: en -@route53domains @client -Feature: Amazon Route53 Domains - - Scenario: Making a request - When I call the "ListDomains" API - Then the value at "Domains" should be a list - - Scenario: Handling errors - When I attempt to call the "GetDomainDetail" API with: - | DomainName | fake-domain-name | - Then I expect the response error code to be "InvalidInput" - And I expect the response error message to include: - """ - domain name must contain more than 1 label - """ diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/ses/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/ses/client.go deleted file mode 100644 index f81947a..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/ses/client.go +++ /dev/null @@ -1,16 +0,0 @@ -// +build integration - -//Package ses provides gucumber integration tests support. -package ses - -import ( - "github.com/aws/aws-sdk-go/awstesting/integration/smoke" - "github.com/aws/aws-sdk-go/service/ses" - "github.com/gucumber/gucumber" -) - -func init() { - gucumber.Before("@ses", func() { - gucumber.World["client"] = ses.New(smoke.Session) - }) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/ses/ses.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/ses/ses.feature deleted file mode 100644 index 6b67fa7..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/ses/ses.feature +++ /dev/null @@ -1,16 +0,0 @@ -# language: en -@ses @email @client -Feature: Amazon Simple Email Service - - Scenario: Making a request - When I call the "ListIdentities" API - Then the value at "Identities" should be a list - - Scenario: Handling errors - When I attempt to call the "VerifyEmailIdentity" API with: - | EmailAddress | fake_email | - Then I expect the response error code to be "InvalidParameterValue" - And I expect the response error message to include: - """ - Invalid email address. - """ diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/shared.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/shared.go deleted file mode 100644 index dbb1338..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/shared.go +++ /dev/null @@ -1,230 +0,0 @@ -// +build integration - -// Package smoke contains shared step definitions that are used across integration tests -package smoke - -import ( - "encoding/json" - "fmt" - "os" - "reflect" - "regexp" - "strconv" - "strings" - - "github.com/gucumber/gucumber" - "github.com/stretchr/testify/assert" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/session" -) - -// Session is a shared session for all integration smoke tests to use. -var Session = session.Must(session.NewSession()) - -func init() { - logLevel := Session.Config.LogLevel - if os.Getenv("DEBUG") != "" { - logLevel = aws.LogLevel(aws.LogDebug) - } - if os.Getenv("DEBUG_SIGNING") != "" { - logLevel = aws.LogLevel(aws.LogDebugWithSigning) - } - if os.Getenv("DEBUG_BODY") != "" { - logLevel = aws.LogLevel(aws.LogDebugWithHTTPBody) - } - Session.Config.LogLevel = logLevel - - gucumber.When(`^I call the "(.+?)" API$`, func(op string) { - call(op, nil, false) - }) - - gucumber.When(`^I call the "(.+?)" API with:$`, func(op string, args [][]string) { - call(op, args, false) - }) - - gucumber.Then(`^the value at "(.+?)" should be a list$`, func(member string) { - vals, _ := awsutil.ValuesAtPath(gucumber.World["response"], member) - assert.NotNil(gucumber.T, vals) - }) - - gucumber.Then(`^the response should contain a "(.+?)"$`, func(member string) { - vals, _ := awsutil.ValuesAtPath(gucumber.World["response"], member) - assert.NotEmpty(gucumber.T, vals) - }) - - gucumber.When(`^I attempt to call the "(.+?)" API with:$`, func(op string, args [][]string) { - call(op, args, true) - }) - - gucumber.Then(`^I expect the response error code to be "(.+?)"$`, func(code string) { - err, ok := gucumber.World["error"].(awserr.Error) - assert.True(gucumber.T, ok, "no error returned") - if ok { - assert.Equal(gucumber.T, code, err.Code(), "Error: %v", err) - } - }) - - gucumber.And(`^I expect the response error message to include:$`, func(data string) { - err, ok := gucumber.World["error"].(awserr.Error) - assert.True(gucumber.T, ok, "no error returned") - if ok { - assert.Contains(gucumber.T, err.Error(), data) - } - }) - - gucumber.And(`^I expect the response error message to include one of:$`, func(table [][]string) { - err, ok := gucumber.World["error"].(awserr.Error) - assert.True(gucumber.T, ok, "no error returned") - if ok { - found := false - for _, row := range table { - if strings.Contains(err.Error(), row[0]) { - found = true - break - } - } - - assert.True(gucumber.T, found, fmt.Sprintf("no error messages matched: \"%s\"", err.Error())) - } - }) - - gucumber.And(`^I expect the response error message not be empty$`, func() { - err, ok := gucumber.World["error"].(awserr.Error) - assert.True(gucumber.T, ok, "no error returned") - assert.NotEmpty(gucumber.T, err.Message()) - }) - - gucumber.When(`^I call the "(.+?)" API with JSON:$`, func(s1 string, data string) { - callWithJSON(s1, data, false) - }) - - gucumber.When(`^I attempt to call the "(.+?)" API with JSON:$`, func(s1 string, data string) { - callWithJSON(s1, data, true) - }) - - gucumber.Then(`^the error code should be "(.+?)"$`, func(s1 string) { - err, ok := gucumber.World["error"].(awserr.Error) - assert.True(gucumber.T, ok, "no error returned") - assert.Equal(gucumber.T, s1, err.Code()) - }) - - gucumber.And(`^the error message should contain:$`, func(data string) { - err, ok := gucumber.World["error"].(awserr.Error) - assert.True(gucumber.T, ok, "no error returned") - assert.Contains(gucumber.T, err.Error(), data) - }) - - gucumber.Then(`^the request should fail$`, func() { - err, ok := gucumber.World["error"].(awserr.Error) - assert.True(gucumber.T, ok, "no error returned") - assert.Error(gucumber.T, err) - }) - - gucumber.Then(`^the request should be successful$`, func() { - err, ok := gucumber.World["error"].(awserr.Error) - assert.False(gucumber.T, ok, "error returned") - assert.NoError(gucumber.T, err) - }) -} - -// findMethod finds the op operation on the v structure using a case-insensitive -// lookup. Returns nil if no method is found. -func findMethod(v reflect.Value, op string) *reflect.Value { - t := v.Type() - op = strings.ToLower(op) - for i := 0; i < t.NumMethod(); i++ { - name := t.Method(i).Name - if strings.ToLower(name) == op { - m := v.MethodByName(name) - return &m - } - } - return nil -} - -// call calls an operation on gucumber.World["client"] by the name op using the args -// table of arguments to set. -func call(op string, args [][]string, allowError bool) { - v := reflect.ValueOf(gucumber.World["client"]) - if m := findMethod(v, op); m != nil { - t := m.Type() - in := reflect.New(t.In(0).Elem()) - fillArgs(in, args) - - resps := m.Call([]reflect.Value{in}) - gucumber.World["response"] = resps[0].Interface() - gucumber.World["error"] = resps[1].Interface() - - if !allowError { - err, _ := gucumber.World["error"].(error) - assert.NoError(gucumber.T, err) - } - } else { - assert.Fail(gucumber.T, "failed to find operation "+op) - } -} - -// reIsNum is a regular expression matching a numeric input (integer) -var reIsNum = regexp.MustCompile(`^\d+$`) - -// reIsArray is a regular expression matching a list -var reIsArray = regexp.MustCompile(`^\['.*?'\]$`) -var reArrayElem = regexp.MustCompile(`'(.+?)'`) - -// fillArgs fills arguments on the input structure using the args table of -// arguments. -func fillArgs(in reflect.Value, args [][]string) { - if args == nil { - return - } - - for _, row := range args { - path := row[0] - var val interface{} = row[1] - if reIsArray.MatchString(row[1]) { - quotedStrs := reArrayElem.FindAllString(row[1], -1) - strs := make([]*string, len(quotedStrs)) - for i, e := range quotedStrs { - str := e[1 : len(e)-1] - strs[i] = &str - } - val = strs - } else if reIsNum.MatchString(row[1]) { // handle integer values - num, err := strconv.ParseInt(row[1], 10, 64) - if err == nil { - val = num - } - } - awsutil.SetValueAtPath(in.Interface(), path, val) - } -} - -func callWithJSON(op, j string, allowError bool) { - v := reflect.ValueOf(gucumber.World["client"]) - if m := findMethod(v, op); m != nil { - t := m.Type() - in := reflect.New(t.In(0).Elem()) - fillJSON(in, j) - - resps := m.Call([]reflect.Value{in}) - gucumber.World["response"] = resps[0].Interface() - gucumber.World["error"] = resps[1].Interface() - - if !allowError { - err, _ := gucumber.World["error"].(error) - assert.NoError(gucumber.T, err) - } - } else { - assert.Fail(gucumber.T, "failed to find operation "+op) - } -} - -func fillJSON(in reflect.Value, j string) { - d := json.NewDecoder(strings.NewReader(j)) - if err := d.Decode(in.Interface()); err != nil { - panic(err) - } -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/simpledb/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/simpledb/client.go deleted file mode 100644 index e8d9ec2..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/simpledb/client.go +++ /dev/null @@ -1,16 +0,0 @@ -// +build integration - -//Package simpledb provides gucumber integration tests support. -package simpledb - -import ( - "github.com/aws/aws-sdk-go/awstesting/integration/smoke" - "github.com/aws/aws-sdk-go/service/simpledb" - "github.com/gucumber/gucumber" -) - -func init() { - gucumber.Before("@simpledb", func() { - gucumber.World["client"] = simpledb.New(smoke.Session) - }) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/simpledb/simpledb.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/simpledb/simpledb.feature deleted file mode 100644 index ddc03d8..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/simpledb/simpledb.feature +++ /dev/null @@ -1,24 +0,0 @@ -# language: en -@simpledb @sdb -Feature: Amazon SimpleDB - - I want to use Amazon SimpleDB - - Scenario: Making a request - When I call the "CreateDomain" API with: - | DomainName | sample-domain | - Then the request should be successful - And I call the "ListDomains" API - Then the value at "DomainNames" should be a list - And I call the "DeleteDomain" API with: - | DomainName | sample-domain | - Then the request should be successful - - Scenario: Handling errors - When I attempt to call the "CreateDomain" API with: - | DomainName | | - Then I expect the response error code to be "InvalidParameterValue" - And I expect the response error message to include: - """ - DomainName is invalid - """ diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/sns/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/sns/client.go deleted file mode 100644 index cbf990c..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/sns/client.go +++ /dev/null @@ -1,16 +0,0 @@ -// +build integration - -//Package sns provides gucumber integration tests support. -package sns - -import ( - "github.com/aws/aws-sdk-go/awstesting/integration/smoke" - "github.com/aws/aws-sdk-go/service/sns" - "github.com/gucumber/gucumber" -) - -func init() { - gucumber.Before("@sns", func() { - gucumber.World["client"] = sns.New(smoke.Session) - }) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/sns/sns.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/sns/sns.feature deleted file mode 100644 index 76f6a16..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/sns/sns.feature +++ /dev/null @@ -1,14 +0,0 @@ -# language: en -@sns @client -Feature: Amazon Simple Notification Service - - Scenario: Making a request - When I call the "ListTopics" API - Then the value at "Topics" should be a list - - Scenario: Handling errors - When I attempt to call the "Publish" API with: - | Message | hello | - | TopicArn | fake_topic | - Then I expect the response error code to be "InvalidParameter" - And I expect the response error message not be empty diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/sqs/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/sqs/client.go deleted file mode 100644 index 884dbbd..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/sqs/client.go +++ /dev/null @@ -1,16 +0,0 @@ -// +build integration - -//Package sqs provides gucumber integration tests support. -package sqs - -import ( - "github.com/aws/aws-sdk-go/awstesting/integration/smoke" - "github.com/aws/aws-sdk-go/service/sqs" - "github.com/gucumber/gucumber" -) - -func init() { - gucumber.Before("@sqs", func() { - gucumber.World["client"] = sqs.New(smoke.Session) - }) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/sqs/sqs.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/sqs/sqs.feature deleted file mode 100644 index 1413820..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/sqs/sqs.feature +++ /dev/null @@ -1,16 +0,0 @@ -# language: en -@sqs @client -Feature: Amazon Simple Queue Service - - Scenario: Making a request - When I call the "ListQueues" API - Then the value at "QueueUrls" should be a list - - Scenario: Handling errors - When I attempt to call the "GetQueueUrl" API with: - | QueueName | fake_queue | - Then I expect the response error code to be "AWS.SimpleQueueService.NonExistentQueue" - And I expect the response error message to include: - """ - The specified queue does not exist for this wsdl version. - """ diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/ssm/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/ssm/client.go deleted file mode 100644 index af5e2aa..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/ssm/client.go +++ /dev/null @@ -1,16 +0,0 @@ -// +build integration - -//Package ssm provides gucumber integration tests support. -package ssm - -import ( - "github.com/aws/aws-sdk-go/awstesting/integration/smoke" - "github.com/aws/aws-sdk-go/service/ssm" - "github.com/gucumber/gucumber" -) - -func init() { - gucumber.Before("@ssm", func() { - gucumber.World["client"] = ssm.New(smoke.Session) - }) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/ssm/ssm.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/ssm/ssm.feature deleted file mode 100644 index 3e2230e..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/ssm/ssm.feature +++ /dev/null @@ -1,16 +0,0 @@ -# language: en -@ssm @client -Feature: Amazon SSM - - Scenario: Making a request - When I call the "ListDocuments" API - Then the value at "DocumentIdentifiers" should be a list - - Scenario: Handling errors - When I attempt to call the "GetDocument" API with: - | Name | 'fake-name' | - Then I expect the response error code to be "ValidationException" - And I expect the response error message to include: - """ - validation error detected - """ diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/storagegateway/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/storagegateway/client.go deleted file mode 100644 index 44d3731..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/storagegateway/client.go +++ /dev/null @@ -1,16 +0,0 @@ -// +build integration - -//Package storagegateway provides gucumber integration tests support. -package storagegateway - -import ( - "github.com/aws/aws-sdk-go/awstesting/integration/smoke" - "github.com/aws/aws-sdk-go/service/storagegateway" - "github.com/gucumber/gucumber" -) - -func init() { - gucumber.Before("@storagegateway", func() { - gucumber.World["client"] = storagegateway.New(smoke.Session) - }) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/storagegateway/storagegateway.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/storagegateway/storagegateway.feature deleted file mode 100644 index ef96eed..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/storagegateway/storagegateway.feature +++ /dev/null @@ -1,16 +0,0 @@ -# language: en -@storagegateway @client -Feature: AWS Storage Gateway - - Scenario: Making a request - When I call the "ListGateways" API - Then the value at "Gateways" should be a list - - Scenario: Handling errors - When I attempt to call the "ListVolumes" API with: - | GatewayARN | fake_gateway | - Then I expect the response error code to be "InvalidParameter" - And I expect the response error message to include: - """ - GatewayARN - """ diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/sts/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/sts/client.go deleted file mode 100644 index ed61e1b..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/sts/client.go +++ /dev/null @@ -1,16 +0,0 @@ -// +build integration - -//Package sts provides gucumber integration tests support. -package sts - -import ( - "github.com/aws/aws-sdk-go/awstesting/integration/smoke" - "github.com/aws/aws-sdk-go/service/sts" - "github.com/gucumber/gucumber" -) - -func init() { - gucumber.Before("@sts", func() { - gucumber.World["client"] = sts.New(smoke.Session) - }) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/sts/sts.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/sts/sts.feature deleted file mode 100644 index 9caf1fa..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/sts/sts.feature +++ /dev/null @@ -1,17 +0,0 @@ -# language: en -@sts @client -Feature: AWS STS - - Scenario: Making a request - When I call the "GetSessionToken" API - Then the response should contain a "Credentials" - - Scenario: Handling errors - When I attempt to call the "GetFederationToken" API with: - | Name | temp | - | Policy | | - Then I expect the response error code to be "InvalidParameter" - And I expect the response error message to include: - """ - Policy - """ diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/support/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/support/client.go deleted file mode 100644 index 9322d57..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/support/client.go +++ /dev/null @@ -1,16 +0,0 @@ -// +build integration - -//Package support provides gucumber integration tests support. -package support - -import ( - "github.com/aws/aws-sdk-go/awstesting/integration/smoke" - "github.com/aws/aws-sdk-go/service/support" - "github.com/gucumber/gucumber" -) - -func init() { - gucumber.Before("@support", func() { - gucumber.World["client"] = support.New(smoke.Session) - }) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/support/support.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/support/support.feature deleted file mode 100644 index 2f91ff8..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/support/support.feature +++ /dev/null @@ -1,22 +0,0 @@ -# language: en -@support @client -Feature: AWS Support - - I want to use AWS Support - - Scenario: Making a request - When I call the "DescribeServices" API - Then the value at "services" should be a list - - Scenario: Handling errors - When I attempt to call the "CreateCase" API with: - | subject | subject | - | communicationBody | communication | - | categoryCode | category | - | serviceCode | amazon-dynamodb | - | severityCode | low | - Then I expect the response error code to be "InvalidParameterValueException" - And the error message should contain: - """ - Invalid category code - """ diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/swf/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/swf/client.go deleted file mode 100644 index 09020a2..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/swf/client.go +++ /dev/null @@ -1,16 +0,0 @@ -// +build integration - -//Package swf provides gucumber integration tests support. -package swf - -import ( - "github.com/aws/aws-sdk-go/awstesting/integration/smoke" - "github.com/aws/aws-sdk-go/service/swf" - "github.com/gucumber/gucumber" -) - -func init() { - gucumber.Before("@swf", func() { - gucumber.World["client"] = swf.New(smoke.Session) - }) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/swf/swf.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/swf/swf.feature deleted file mode 100644 index 1349c81..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/swf/swf.feature +++ /dev/null @@ -1,17 +0,0 @@ -# language: en -@swf @client -Feature: Amazon Simple Workflow Service - - Scenario: Making a request - When I call the "ListDomains" API with: - | registrationStatus | REGISTERED | - Then the value at "domainInfos" should be a list - - Scenario: Handling errors - When I attempt to call the "DescribeDomain" API with: - | name | fake_domain | - Then I expect the response error code to be "UnknownResourceFault" - And I expect the response error message to include: - """ - Unknown domain: fake_domain - """ diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/waf/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/waf/client.go deleted file mode 100644 index 898f848..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/waf/client.go +++ /dev/null @@ -1,16 +0,0 @@ -// +build integration - -//Package waf provides gucumber integration tests support. -package waf - -import ( - "github.com/aws/aws-sdk-go/awstesting/integration/smoke" - "github.com/aws/aws-sdk-go/service/waf" - "github.com/gucumber/gucumber" -) - -func init() { - gucumber.Before("@waf", func() { - gucumber.World["client"] = waf.New(smoke.Session) - }) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/waf/waf.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/waf/waf.feature deleted file mode 100644 index bf76fb6..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/waf/waf.feature +++ /dev/null @@ -1,20 +0,0 @@ -# language: en -@waf -Feature: AWS WAF - - Scenario: Making a request - When I call the "ListRules" API with JSON: - """ - {"Limit":20} - """ - Then the value at "Rules" should be a list - - Scenario: Handling errors - When I attempt to call the "CreateSqlInjectionMatchSet" API with: - | Name | fake_name | - | ChangeToken | fake_token | - Then I expect the response error code to be "WAFStaleDataException" - And I expect the response error message to include: - """ - The input token is no longer current - """ diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/workspaces/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/workspaces/client.go deleted file mode 100644 index 320fb1a..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/workspaces/client.go +++ /dev/null @@ -1,16 +0,0 @@ -// +build integration - -//Package workspaces provides gucumber integration tests support. -package workspaces - -import ( - "github.com/aws/aws-sdk-go/awstesting/integration/smoke" - "github.com/aws/aws-sdk-go/service/workspaces" - "github.com/gucumber/gucumber" -) - -func init() { - gucumber.Before("@workspaces", func() { - gucumber.World["client"] = workspaces.New(smoke.Session) - }) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/workspaces/workspaces.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/workspaces/workspaces.feature deleted file mode 100644 index 09ca884..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/workspaces/workspaces.feature +++ /dev/null @@ -1,18 +0,0 @@ -# language: en -@workspaces @client -Feature: Amazon WorkSpaces - - I want to use Amazon WorkSpaces - - Scenario: Making a request - When I call the "DescribeWorkspaces" API - Then the value at "Workspaces" should be a list - - Scenario: Handling errors - When I attempt to call the "DescribeWorkspaces" API with: - | DirectoryId | fake-id | - Then I expect the response error code to be "ValidationException" - And I expect the response error message to include: - """ - The Directory ID fake-id in the request is invalid. - """ diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/mock/mock.go b/vendor/github.com/aws/aws-sdk-go/awstesting/mock/mock.go deleted file mode 100644 index 1bc9290..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/mock/mock.go +++ /dev/null @@ -1,45 +0,0 @@ -package mock - -import ( - "net/http" - "net/http/httptest" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/session" -) - -// Session is a mock session which is used to hit the mock server -var Session = func() *session.Session { - // server is the mock server that simply writes a 200 status back to the client - server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - w.WriteHeader(http.StatusOK) - })) - - return session.Must(session.NewSession(&aws.Config{ - DisableSSL: aws.Bool(true), - Endpoint: aws.String(server.URL), - })) -}() - -// NewMockClient creates and initializes a client that will connect to the -// mock server -func NewMockClient(cfgs ...*aws.Config) *client.Client { - c := Session.ClientConfig("Mock", cfgs...) - - svc := client.New( - *c.Config, - metadata.ClientInfo{ - ServiceName: "Mock", - SigningRegion: c.SigningRegion, - Endpoint: c.Endpoint, - APIVersion: "2015-12-08", - JSONVersion: "1.1", - TargetPrefix: "MockServer", - }, - c.Handlers, - ) - - return svc -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/performance/benchmarks.go b/vendor/github.com/aws/aws-sdk-go/awstesting/performance/benchmarks.go deleted file mode 100644 index de13658..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/performance/benchmarks.go +++ /dev/null @@ -1,122 +0,0 @@ -// +build integration - -package performance - -import ( - "errors" - "fmt" - "os" - "reflect" - "runtime" - "strings" - "testing" - - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/awstesting/mock" - "github.com/gucumber/gucumber" -) - -// mapCreateClients allows for the creation of clients -func mapCreateClients() { - clientFns := []func(){} - for _, c := range clients { - clientFns = append(clientFns, func() { c.Call([]reflect.Value{reflect.ValueOf(mock.Session)}) }) - } - - gucumber.World["services"] = clientFns -} - -func buildAnArrayOfClients() { - methods := []reflect.Value{} - params := [][]reflect.Value{} - - for _, c := range clients { - method, param, err := findAndGetMethod(c.Call([]reflect.Value{reflect.ValueOf(mock.Session)})) - if err == nil { - methods = append(methods, method) - params = append(params, param) - } - } - - fns := []func(){} - for i := 0; i < len(methods); i++ { - m := methods[i] - p := params[i] - f := func() { - reqs := m.Call(p) - resp := reqs[0].Interface().(*request.Request).Send() - fmt.Println(resp) - } - fns = append(fns, f) - } - gucumber.World["clientFns"] = fns -} - -// findAndGetMethod will grab the method, params to be passed to the method, and an error. -// The method that is found, is a method that doesn't have any required input -func findAndGetMethod(client interface{}) (reflect.Value, []reflect.Value, error) { - v := reflect.ValueOf(client).Type() - n := v.NumMethod() - -outer: - for i := 0; i < n; i++ { - method := v.Method(i) - if method.Type.NumIn() != 2 || strings.HasSuffix(method.Name, "Request") { - continue - } - param := reflect.New(method.Type.In(1).Elem()) - for j := 0; j < param.Elem().NumField(); j++ { - field := param.Elem().Type().Field(j) - req := field.Tag.Get("required") - - if req == "true" { - continue outer - } - } - - params := []reflect.Value{reflect.ValueOf(client), param} - return method.Func, params, nil - } - - return reflect.Value{}, nil, errors.New("No method found") -} - -// benchmarkTask takes a unique key to write to the logger with the benchmark -// result's data -func benchmarkTask(key string, fns []func(), i1 int) error { - gucumber.World["error"] = nil - memStatStart := &runtime.MemStats{} - runtime.ReadMemStats(memStatStart) - - results := testing.Benchmark(func(b *testing.B) { - for _, f := range fns { - for i := 0; i < i1; i++ { - f() - } - } - }) - - results.N = i1 - memStatEnd := &runtime.MemStats{} - runtime.ReadMemStats(memStatEnd) - l, err := newBenchmarkLogger("stdout") - if err != nil { - return err - } - l.log(key, results) - - toDynamodb := os.Getenv("AWS_TESTING_LOG_RESULTS") == "true" - if toDynamodb { - l, err := newBenchmarkLogger("dynamodb") - if err != nil { - return err - } - l.log(key+"_start_benchmarks", memStatStart) - l.log(key+"_end_benchmarks", memStatEnd) - } - - if memStatStart.Alloc < memStatEnd.Alloc { - return errors.New("Leaked memory") - } - return nil -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/performance/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/performance/client.go deleted file mode 100644 index 00c2e81..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/performance/client.go +++ /dev/null @@ -1,13 +0,0 @@ -// +build integration - -//Package performance provides gucumber integration tests support. -package performance - -import ( - "github.com/gucumber/gucumber" -) - -func init() { - gucumber.Before("@performance", func() { - }) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/performance/clients.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/performance/clients.feature deleted file mode 100644 index c248329..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/performance/clients.feature +++ /dev/null @@ -1,17 +0,0 @@ -# language: en -@performance @clients -Feature: Client Performance - Background: - Given I have loaded my SDK and its dependencies - And I have a list of services - And I take a snapshot of my resources - - Scenario: Creating and then cleaning up clients doesn't leak resources - When I create and discard 100 clients for each service - Then I should not have leaked any resources - - Scenario: Sending requests doesn't leak resources - When I create a client for each service - And I execute 100 command(s) on each client - And I destroy all the clients - Then I should not have leaked any resources diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/performance/clients.go b/vendor/github.com/aws/aws-sdk-go/awstesting/performance/clients.go deleted file mode 100644 index 6baa444..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/performance/clients.go +++ /dev/null @@ -1,137 +0,0 @@ -// +build integration - -package performance - -import ( - "reflect" - - "github.com/aws/aws-sdk-go/service/acm" - "github.com/aws/aws-sdk-go/service/apigateway" - "github.com/aws/aws-sdk-go/service/autoscaling" - "github.com/aws/aws-sdk-go/service/cloudformation" - "github.com/aws/aws-sdk-go/service/cloudfront" - "github.com/aws/aws-sdk-go/service/cloudhsm" - "github.com/aws/aws-sdk-go/service/cloudsearch" - "github.com/aws/aws-sdk-go/service/cloudsearchdomain" - "github.com/aws/aws-sdk-go/service/cloudtrail" - "github.com/aws/aws-sdk-go/service/cloudwatch" - "github.com/aws/aws-sdk-go/service/cloudwatchevents" - "github.com/aws/aws-sdk-go/service/cloudwatchlogs" - "github.com/aws/aws-sdk-go/service/codecommit" - "github.com/aws/aws-sdk-go/service/codedeploy" - "github.com/aws/aws-sdk-go/service/codepipeline" - "github.com/aws/aws-sdk-go/service/cognitoidentity" - "github.com/aws/aws-sdk-go/service/cognitosync" - "github.com/aws/aws-sdk-go/service/configservice" - "github.com/aws/aws-sdk-go/service/datapipeline" - "github.com/aws/aws-sdk-go/service/devicefarm" - "github.com/aws/aws-sdk-go/service/directconnect" - "github.com/aws/aws-sdk-go/service/directoryservice" - "github.com/aws/aws-sdk-go/service/dynamodb" - "github.com/aws/aws-sdk-go/service/dynamodbstreams" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/aws/aws-sdk-go/service/ecr" - "github.com/aws/aws-sdk-go/service/ecs" - "github.com/aws/aws-sdk-go/service/efs" - "github.com/aws/aws-sdk-go/service/elasticache" - "github.com/aws/aws-sdk-go/service/elasticbeanstalk" - "github.com/aws/aws-sdk-go/service/elasticsearchservice" - "github.com/aws/aws-sdk-go/service/elastictranscoder" - "github.com/aws/aws-sdk-go/service/elb" - "github.com/aws/aws-sdk-go/service/emr" - "github.com/aws/aws-sdk-go/service/firehose" - "github.com/aws/aws-sdk-go/service/glacier" - "github.com/aws/aws-sdk-go/service/iam" - "github.com/aws/aws-sdk-go/service/inspector" - "github.com/aws/aws-sdk-go/service/iot" - "github.com/aws/aws-sdk-go/service/iotdataplane" - "github.com/aws/aws-sdk-go/service/kinesis" - "github.com/aws/aws-sdk-go/service/kms" - "github.com/aws/aws-sdk-go/service/lambda" - "github.com/aws/aws-sdk-go/service/machinelearning" - "github.com/aws/aws-sdk-go/service/marketplacecommerceanalytics" - "github.com/aws/aws-sdk-go/service/mobileanalytics" - "github.com/aws/aws-sdk-go/service/opsworks" - "github.com/aws/aws-sdk-go/service/rds" - "github.com/aws/aws-sdk-go/service/redshift" - "github.com/aws/aws-sdk-go/service/route53" - "github.com/aws/aws-sdk-go/service/route53domains" - "github.com/aws/aws-sdk-go/service/s3" - "github.com/aws/aws-sdk-go/service/ses" - "github.com/aws/aws-sdk-go/service/simpledb" - "github.com/aws/aws-sdk-go/service/sns" - "github.com/aws/aws-sdk-go/service/sqs" - "github.com/aws/aws-sdk-go/service/ssm" - "github.com/aws/aws-sdk-go/service/storagegateway" - "github.com/aws/aws-sdk-go/service/sts" - "github.com/aws/aws-sdk-go/service/support" - "github.com/aws/aws-sdk-go/service/swf" - "github.com/aws/aws-sdk-go/service/waf" - "github.com/aws/aws-sdk-go/service/workspaces" -) - -var clients = []reflect.Value{ - reflect.ValueOf(acm.New), - reflect.ValueOf(apigateway.New), - reflect.ValueOf(autoscaling.New), - reflect.ValueOf(cloudformation.New), - reflect.ValueOf(cloudfront.New), - reflect.ValueOf(cloudhsm.New), - reflect.ValueOf(cloudsearch.New), - reflect.ValueOf(cloudsearchdomain.New), - reflect.ValueOf(cloudtrail.New), - reflect.ValueOf(cloudwatch.New), - reflect.ValueOf(cloudwatchevents.New), - reflect.ValueOf(cloudwatchlogs.New), - reflect.ValueOf(codecommit.New), - reflect.ValueOf(codedeploy.New), - reflect.ValueOf(codepipeline.New), - reflect.ValueOf(cognitoidentity.New), - reflect.ValueOf(cognitosync.New), - reflect.ValueOf(configservice.New), - reflect.ValueOf(datapipeline.New), - reflect.ValueOf(devicefarm.New), - reflect.ValueOf(directconnect.New), - reflect.ValueOf(directoryservice.New), - reflect.ValueOf(dynamodb.New), - reflect.ValueOf(dynamodbstreams.New), - reflect.ValueOf(ec2.New), - reflect.ValueOf(ecr.New), - reflect.ValueOf(ecs.New), - reflect.ValueOf(efs.New), - reflect.ValueOf(elasticache.New), - reflect.ValueOf(elasticbeanstalk.New), - reflect.ValueOf(elasticsearchservice.New), - reflect.ValueOf(elastictranscoder.New), - reflect.ValueOf(elb.New), - reflect.ValueOf(emr.New), - reflect.ValueOf(firehose.New), - reflect.ValueOf(glacier.New), - reflect.ValueOf(iam.New), - reflect.ValueOf(inspector.New), - reflect.ValueOf(iot.New), - reflect.ValueOf(iotdataplane.New), - reflect.ValueOf(kinesis.New), - reflect.ValueOf(kms.New), - reflect.ValueOf(lambda.New), - reflect.ValueOf(machinelearning.New), - reflect.ValueOf(marketplacecommerceanalytics.New), - reflect.ValueOf(mobileanalytics.New), - reflect.ValueOf(opsworks.New), - reflect.ValueOf(rds.New), - reflect.ValueOf(redshift.New), - reflect.ValueOf(route53.New), - reflect.ValueOf(route53domains.New), - reflect.ValueOf(s3.New), - reflect.ValueOf(ses.New), - reflect.ValueOf(simpledb.New), - reflect.ValueOf(sns.New), - reflect.ValueOf(sqs.New), - reflect.ValueOf(ssm.New), - reflect.ValueOf(storagegateway.New), - reflect.ValueOf(sts.New), - reflect.ValueOf(support.New), - reflect.ValueOf(swf.New), - reflect.ValueOf(waf.New), - reflect.ValueOf(workspaces.New), -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/performance/init.go b/vendor/github.com/aws/aws-sdk-go/awstesting/performance/init.go deleted file mode 100644 index 81596d1..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/performance/init.go +++ /dev/null @@ -1,93 +0,0 @@ -// +build integration - -package performance - -import ( - "bytes" - "errors" - "fmt" - "runtime" - - "github.com/gucumber/gucumber" - "github.com/stretchr/testify/assert" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/awstesting/mock" - "github.com/aws/aws-sdk-go/service/s3" -) - -func init() { - // Go loads all of its dependecies on compile - gucumber.Given(`^I have loaded my SDK and its dependencies$`, func() { - }) - - // Performance - gucumber.When(`^I create and discard (\d+) clients for each service$`, func(i1 int) { - services := gucumber.World["services"].([]func()) - err := benchmarkTask(fmt.Sprintf("%d_create_and_discard_clients", i1), services, i1) - gucumber.World["error"] = err - }) - - gucumber.Then(`^I should not have leaked any resources$`, func() { - runtime.GC() - err, ok := gucumber.World["error"].(awserr.Error) - assert.False(gucumber.T, ok, "error returned") - assert.NoError(gucumber.T, err) - }) - - gucumber.And(`^I have a list of services$`, func() { - mapCreateClients() - }) - - gucumber.And(`^I take a snapshot of my resources$`, func() { - // Can't take a memory snapshot here, because gucumber does some - // allocation between each instruction leading to unreliable numbers - }) - - gucumber.When(`^I create a client for each service$`, func() { - buildAnArrayOfClients() - }) - - gucumber.And("^I execute (\\d+) command\\(s\\) on each client$", func(i1 int) { - clientFns := gucumber.World["clientFns"].([]func()) - err := benchmarkTask(fmt.Sprintf("%d_commands_on_clients", i1), clientFns, i1) - gucumber.World["error"] = err - }) - - gucumber.And(`^I destroy all the clients$`, func() { - delete(gucumber.World, "clientFns") - runtime.GC() - }) - - gucumber.Given(`^I have a (\d+) byte file$`, func(i1 int) { - gucumber.World["file"] = make([]byte, i1) - }) - - gucumber.When(`^I upload the file$`, func() { - svc := s3.New(mock.Session) - memStatStart := &runtime.MemStats{} - runtime.ReadMemStats(memStatStart) - gucumber.World["start"] = memStatStart - - svc.PutObjectRequest(&s3.PutObjectInput{ - Bucket: aws.String("bucketmesilly"), - Key: aws.String("testKey"), - Body: bytes.NewReader(gucumber.World["file"].([]byte)), - }) - }) - - gucumber.And(`then download the file$`, func() { - svc := s3.New(mock.Session) - svc.GetObjectRequest(&s3.GetObjectInput{ - Bucket: aws.String("bucketmesilly"), - Key: aws.String("testKey"), - }) - memStatEnd := &runtime.MemStats{} - runtime.ReadMemStats(memStatEnd) - memStatStart := gucumber.World["start"].(*runtime.MemStats) - if memStatStart.Alloc < memStatEnd.Alloc { - gucumber.World["error"] = errors.New("Leaked memory") - } - }) -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/performance/logging.go b/vendor/github.com/aws/aws-sdk-go/awstesting/performance/logging.go deleted file mode 100644 index 03c885f..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/performance/logging.go +++ /dev/null @@ -1,122 +0,0 @@ -// +build integration - -// Package performance contains shared step definitions that are used for performance testing -package performance - -import ( - "errors" - "fmt" - "os" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/awstesting/unit" - "github.com/aws/aws-sdk-go/service/dynamodb" - "github.com/aws/aws-sdk-go/service/dynamodb/dynamodbattribute" -) - -// benchmarkLogger handles all benchmark logging -type benchmarkLogger struct { - outputer -} - -// logger interface that handles any logging to an output -type logger interface { - log(key string, data map[string]interface{}) error -} - -// init initializes the logger and uses dependency injection for the -// outputer -func newBenchmarkLogger(output string) (*benchmarkLogger, error) { - b := &benchmarkLogger{} - switch output { - case "dynamodb": - region := os.Getenv("AWS_TESTING_REGION") - if region == "" { - return b, errors.New("No region specified. Please export AWS_TESTING_REGION") - } - - table := os.Getenv("AWS_TESTING_DB_TABLE") - if table == "" { - return b, errors.New("No table specified. Please export AWS_TESTING_DB_TABLE") - } - b.outputer = newDynamodbOut(table, region) - case "stdout": - b.outputer = stdout{} - default: - return b, errors.New("Unsupported outputer") - } - return b, nil -} - -type record struct { - Key string - Data interface{} -} - -// log calls the output command and building a data structure -// to pass into its output formatter -func (b benchmarkLogger) log(key, data interface{}) error { - formatData := record{ - Key: fmt.Sprintf("%d-%v", time.Now().Unix(), key.(string)), - Data: data, - } - - return b.output(formatData) -} - -// outputer is a simple interface that'll handle output -// to whatever system like dynamodb or stdout -type outputer interface { - output(record) error -} - -// dyanmodbOut handles simple writes to dynamodb -type dynamodbOut struct { - table string // table to write to in dynamodb - region string - db *dynamodb.DynamoDB // the dynamodb -} - -// init initializes dynamodbOut -func newDynamodbOut(table, region string) *dynamodbOut { - out := dynamodbOut{ - table: table, - region: region, - } - - out.db = dynamodb.New( - unit.Session, - &aws.Config{Region: &out.region}, - ) - return &out -} - -// output just writes to dynamodb -func (out dynamodbOut) output(data record) error { - input := &dynamodb.PutItemInput{ - TableName: aws.String(out.table), - } - - item, err := dynamodbattribute.ConvertToMap(data) - if err != nil { - return err - } - - input.Item = item - _, err = out.db.PutItem(input) - return err -} - -// stdout handles writes to stdout -type stdout struct{} - -// output expects key value data to print to stdout -func (out stdout) output(data record) error { - item, err := dynamodbattribute.ConvertToMap(data.Data) - if err != nil { - return err - } - fmt.Println(item) - return nil -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/performance/streaming.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/performance/streaming.feature deleted file mode 100644 index cd24cb7..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/performance/streaming.feature +++ /dev/null @@ -1,26 +0,0 @@ -# language: en -@performance @streaming -Feature: Streaming transfers consume a fixed amount of memory - - Scenario Outline: Streaming uploads are O(1) in memory usage - Given I have a byte file - And I take a snapshot of my resources - When I upload the file - Then I should not have leaked any resources - - Examples: - | bytes | - | 2097152 | - | 209715200 | - - Scenario Outline: Streaming download are O(1) in memory usage - Given I have a byte file - And I take a snapshot of my resources - When I upload the file - And then download the file - Then I should not have leaked any resources - - Examples: - | bytes | - | 2097152 | - | 209715200 | diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/sandbox/Dockerfile.golang-tip b/vendor/github.com/aws/aws-sdk-go/awstesting/sandbox/Dockerfile.golang-tip deleted file mode 100644 index 6d51663..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/sandbox/Dockerfile.golang-tip +++ /dev/null @@ -1,41 +0,0 @@ -# Based on docker-library's golang 1.6 alpine and wheezy docker files. -# https://github.com/docker-library/golang/blob/master/1.6/alpine/Dockerfile -# https://github.com/docker-library/golang/blob/master/1.6/wheezy/Dockerfile -FROM buildpack-deps:wheezy-scm - -ENV GOLANG_SRC_REPO_URL https://github.com/golang/go - -ENV GOLANG_BOOTSTRAP_URL https://storage.googleapis.com/golang/go1.4.3.linux-amd64.tar.gz -ENV GOLANG_BOOTSTRAP_SHA256 ce3140662f45356eb78bc16a88fc7cfb29fb00e18d7c632608245b789b2086d2 -ENV GOLANG_BOOTSTRAP_PATH /usr/local/bootstrap - -# gcc for cgo -RUN apt-get update && apt-get install -y --no-install-recommends \ - g++ \ - gcc \ - libc6-dev \ - make \ - git \ - && rm -rf /var/lib/apt/lists/* - -# Setup the Bootstrap -RUN mkdir -p "$GOLANG_BOOTSTRAP_PATH" \ - && curl -fsSL "$GOLANG_BOOTSTRAP_URL" -o golang.tar.gz \ - && echo "$GOLANG_BOOTSTRAP_SHA256 golang.tar.gz" | sha256sum -c - \ - && tar -C "$GOLANG_BOOTSTRAP_PATH" -xzf golang.tar.gz \ - && rm golang.tar.gz - -# Get and build Go tip -RUN export GOROOT_BOOTSTRAP=$GOLANG_BOOTSTRAP_PATH/go \ - && git clone "$GOLANG_SRC_REPO_URL" /usr/local/go \ - && cd /usr/local/go/src \ - && ./make.bash \ - && rm -rf "$GOLANG_BOOTSTRAP_PATH" /usr/local/go/pkg/bootstrap - -# Build Go workspace and environment -ENV GOPATH /go -ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH -RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" \ - && chmod -R 777 "$GOPATH" - -WORKDIR $GOPATH diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/sandbox/Dockerfile.test.go1.4 b/vendor/github.com/aws/aws-sdk-go/awstesting/sandbox/Dockerfile.test.go1.4 deleted file mode 100644 index eda0a97..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/sandbox/Dockerfile.test.go1.4 +++ /dev/null @@ -1,11 +0,0 @@ -FROM ubuntu:12.04 -FROM golang:1.4 - -ADD . /go/src/github.com/aws/aws-sdk-go - -RUN apt-get update && apt-get install -y --no-install-recommends \ - vim \ - && rm -rf /var/list/apt/lists/* - -WORKDIR /go/src/github.com/aws/aws-sdk-go -CMD ["make", "get-deps", "unit"] diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/sandbox/Dockerfile.test.go1.5-novendorexp b/vendor/github.com/aws/aws-sdk-go/awstesting/sandbox/Dockerfile.test.go1.5-novendorexp deleted file mode 100644 index 9ec9f16..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/sandbox/Dockerfile.test.go1.5-novendorexp +++ /dev/null @@ -1,7 +0,0 @@ -FROM ubuntu:12.04 -FROM golang:1.5 - -ADD . /go/src/github.com/aws/aws-sdk-go - -WORKDIR /go/src/github.com/aws/aws-sdk-go -CMD ["make", "get-deps", "unit"] diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/sandbox/Dockerfile.test.go1.7 b/vendor/github.com/aws/aws-sdk-go/awstesting/sandbox/Dockerfile.test.go1.7 deleted file mode 100644 index 11db3be..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/sandbox/Dockerfile.test.go1.7 +++ /dev/null @@ -1,11 +0,0 @@ -FROM ubuntu:12.04 -FROM golang:1.7 - -ADD . /go/src/github.com/aws/aws-sdk-go - -RUN apt-get update && apt-get install -y --no-install-recommends \ - vim \ - && rm -rf /var/list/apt/lists/* - -WORKDIR /go/src/github.com/aws/aws-sdk-go -CMD ["make", "unit"] diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/sandbox/Dockerfile.test.gotip b/vendor/github.com/aws/aws-sdk-go/awstesting/sandbox/Dockerfile.test.gotip deleted file mode 100644 index b6d2c9e..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/sandbox/Dockerfile.test.gotip +++ /dev/null @@ -1,11 +0,0 @@ -FROM ubuntu:12.04 -FROM aws-golang:tip - -ADD . /go/src/github.com/aws/aws-sdk-go - -RUN apt-get update && apt-get install -y --no-install-recommends \ - vim \ - && rm -rf /var/list/apt/lists/* - -WORKDIR /go/src/github.com/aws/aws-sdk-go -CMD ["make", "unit"] diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/unit/unit.go b/vendor/github.com/aws/aws-sdk-go/awstesting/unit/unit.go deleted file mode 100644 index 1c6e605..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/unit/unit.go +++ /dev/null @@ -1,13 +0,0 @@ -// Package unit performs initialization and validation for unit tests -package unit - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/credentials" - "github.com/aws/aws-sdk-go/aws/session" -) - -// Session is a shared session for unit tests to use. -var Session = session.Must(session.NewSession(aws.NewConfig(). - WithCredentials(credentials.NewStaticCredentials("AKID", "SECRET", "SESSION")). - WithRegion("mock-region"))) diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/util.go b/vendor/github.com/aws/aws-sdk-go/awstesting/util.go deleted file mode 100644 index fde4dcc..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/util.go +++ /dev/null @@ -1,94 +0,0 @@ -package awstesting - -import ( - "io" - "time" - - "github.com/aws/aws-sdk-go/private/util" -) - -// ZeroReader is a io.Reader which will always write zeros to the byte slice provided. -type ZeroReader struct{} - -// Read fills the provided byte slice with zeros returning the number of bytes written. -func (r *ZeroReader) Read(b []byte) (int, error) { - for i := 0; i < len(b); i++ { - b[i] = 0 - } - return len(b), nil -} - -// ReadCloser is a io.ReadCloser for unit testing. -// Designed to test for leaks and whether a handle has -// been closed -type ReadCloser struct { - Size int - Closed bool - set bool - FillData func(bool, []byte, int, int) -} - -// Read will call FillData and fill it with whatever data needed. -// Decrements the size until zero, then return io.EOF. -func (r *ReadCloser) Read(b []byte) (int, error) { - if r.Closed { - return 0, io.EOF - } - - delta := len(b) - if delta > r.Size { - delta = r.Size - } - r.Size -= delta - - for i := 0; i < delta; i++ { - b[i] = 'a' - } - - if r.FillData != nil { - r.FillData(r.set, b, r.Size, delta) - } - r.set = true - - if r.Size > 0 { - return delta, nil - } - return delta, io.EOF -} - -// Close sets Closed to true and returns no error -func (r *ReadCloser) Close() error { - r.Closed = true - return nil -} - -// SortedKeys returns a sorted slice of keys of a map. -func SortedKeys(m map[string]interface{}) []string { - return util.SortedKeys(m) -} - -// A FakeContext provides a simple stub implementation of a Context -type FakeContext struct { - Error error - DoneCh chan struct{} -} - -// Deadline always will return not set -func (c *FakeContext) Deadline() (deadline time.Time, ok bool) { - return time.Time{}, false -} - -// Done returns a read channel for listening to the Done event -func (c *FakeContext) Done() <-chan struct{} { - return c.DoneCh -} - -// Err returns the error, is nil if not set. -func (c *FakeContext) Err() error { - return c.Error -} - -// Value ignores the Value and always returns nil -func (c *FakeContext) Value(key interface{}) interface{} { - return nil -} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/util_test.go b/vendor/github.com/aws/aws-sdk-go/awstesting/util_test.go deleted file mode 100644 index 4b03db0..0000000 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/util_test.go +++ /dev/null @@ -1,49 +0,0 @@ -package awstesting_test - -import ( - "io" - "testing" - - "github.com/stretchr/testify/assert" - - "github.com/aws/aws-sdk-go/awstesting" -) - -func TestReadCloserClose(t *testing.T) { - rc := awstesting.ReadCloser{Size: 1} - err := rc.Close() - - assert.Nil(t, err) - assert.True(t, rc.Closed) - assert.Equal(t, rc.Size, 1) -} - -func TestReadCloserRead(t *testing.T) { - rc := awstesting.ReadCloser{Size: 5} - b := make([]byte, 2) - - n, err := rc.Read(b) - - assert.Nil(t, err) - assert.Equal(t, n, 2) - assert.False(t, rc.Closed) - assert.Equal(t, rc.Size, 3) - - err = rc.Close() - assert.Nil(t, err) - n, err = rc.Read(b) - assert.Equal(t, err, io.EOF) - assert.Equal(t, n, 0) -} - -func TestReadCloserReadAll(t *testing.T) { - rc := awstesting.ReadCloser{Size: 5} - b := make([]byte, 5) - - n, err := rc.Read(b) - - assert.Equal(t, err, io.EOF) - assert.Equal(t, n, 5) - assert.False(t, rc.Closed) - assert.Equal(t, rc.Size, 0) -} diff --git a/vendor/github.com/aws/aws-sdk-go/buildspec.yml b/vendor/github.com/aws/aws-sdk-go/buildspec.yml new file mode 100644 index 0000000..2defb7f --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/buildspec.yml @@ -0,0 +1,21 @@ +version: 0.2 + +phases: + build: + commands: + - echo Build started on `date` + - export GOPATH=/go + - export SDK_CB_ROOT=`pwd` + - export SDK_GO_ROOT=/go/src/github.com/aws/aws-sdk-go + - mkdir -p /go/src/github.com/aws + - ln -s $SDK_CB_ROOT $SDK_GO_ROOT + - cd $SDK_GO_ROOT + - make ci-test + - cd $SDK_CB_ROOT + - #echo Compiling the Go code... + post_build: + commands: + - echo Build completed on `date` +#artifacts: +# files: +# - hello diff --git a/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/callgraph.html b/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/callgraph.html deleted file mode 100644 index c56b2ef..0000000 --- a/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/callgraph.html +++ /dev/null @@ -1,15 +0,0 @@ - diff --git a/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/codewalk.html b/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/codewalk.html deleted file mode 100644 index 37d4c10..0000000 --- a/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/codewalk.html +++ /dev/null @@ -1,53 +0,0 @@ - - - - - -
-
-
-
-
- -
-
- -
-
-
- code on leftright - code width 70% - filepaths shownhidden -
-
-
-
- {{range .Step}} -
- -
{{html .Title}}
-
- {{with .Err}} - ERROR LOADING FILE: {{html .}}

- {{end}} - {{.XML}} -
-
{{html .}}
-
- {{end}} -
-
- previous step - • - next step -
-
-
diff --git a/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/codewalkdir.html b/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/codewalkdir.html deleted file mode 100644 index b7674c6..0000000 --- a/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/codewalkdir.html +++ /dev/null @@ -1,16 +0,0 @@ - - - -{{range .}} - - {{$name_html := html .Name}} - - - - -{{end}} -
{{$name_html}} {{html .Title}}
diff --git a/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/dirlist.html b/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/dirlist.html deleted file mode 100644 index a3e1a2f..0000000 --- a/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/dirlist.html +++ /dev/null @@ -1,31 +0,0 @@ - - -

- - - - - - - - - - - -{{range .}} - - {{$name_html := fileInfoName . | html}} - - - - - - -{{end}} - -
File Bytes Modified
..
{{$name_html}}{{html .Size}}{{fileInfoTime . | html}}
-

diff --git a/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/error.html b/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/error.html deleted file mode 100644 index 7573aa2..0000000 --- a/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/error.html +++ /dev/null @@ -1,9 +0,0 @@ - - -

-{{html .}} -

diff --git a/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/example.html b/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/example.html deleted file mode 100644 index 4f4e09e..0000000 --- a/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/example.html +++ /dev/null @@ -1,30 +0,0 @@ -
- -
-

Example{{example_suffix .Name}}

- {{with .Doc}}

{{html .}}

{{end}} - {{$output := .Output}} - {{with .Play}} -
-
-
{{html $output}}
-
- Run - Format - {{if $.Share}} - - {{end}} -
-
- {{else}} -

Code:

-
{{.Code}}
- {{with .Output}} -

Output:

-
{{html .}}
- {{end}} - {{end}} -
-
diff --git a/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/godoc.html b/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/godoc.html deleted file mode 100644 index 7d81f71..0000000 --- a/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/godoc.html +++ /dev/null @@ -1,157 +0,0 @@ - - - - - - -{{with .Tabtitle}} - {{html .}} - Amazon Web Services - Go SDK -{{else}} - Amazon Web Services - Go SDK -{{end}} - - - - - - - - - - - - - - - - - - - - - - -
-... -
- -
- - - -
-
- -{{/* The Table of Contents is automatically inserted in this
. - Do not delete this
. */}} -{{ if not .NoTOC }} - -{{ end }} -
-
- -{{/* Body is HTML-escaped elsewhere */}} -{{printf "%s" .Body}} -
-
-
- -
-
- - - - - diff --git a/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/godocs.js b/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/godocs.js deleted file mode 100644 index ec9f37a..0000000 --- a/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/godocs.js +++ /dev/null @@ -1,571 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -/* A little code to ease navigation of these documents. - * - * On window load we: - * + Bind search box hint placeholder show/hide events (bindSearchEvents) - * + Generate a table of contents (generateTOC) - * + Bind foldable sections (bindToggles) - * + Bind links to foldable sections (bindToggleLinks) - */ - -(function() { -'use strict'; - -// Mobile-friendly topbar menu -$(function() { - var menu = $('#menu'); - var menuButton = $('#menu-button'); - var menuButtonArrow = $('#menu-button-arrow'); - menuButton.click(function(event) { - menu.toggleClass('menu-visible'); - menuButtonArrow.toggleClass('vertical-flip'); - event.preventDefault(); - return false; - }); -}); - -function bindSearchEvents() { - - var search = $('#search'); - if (search.length === 0) { - return; // no search box - } - - function clearInactive() { - if (search.is('.inactive')) { - search.val(''); - search.removeClass('inactive'); - } - } - - function restoreInactive() { - if (search.val() !== '') { - return; - } - search.val(search.attr('placeholder')); - search.addClass('inactive'); - } - - search.on('focus', clearInactive); - search.on('blur', restoreInactive); - - restoreInactive(); -} - -/* Generates a table of contents: looks for h2 and h3 elements and generates - * links. "Decorates" the element with id=="nav" with this table of contents. - */ -function generateTOC() { - if ($('#manual-nav').length > 0) { - return; - } - - var nav = $('#nav'); - if (nav.length === 0) { - return; - } - - var toc_items = []; - $(nav).nextAll('h2, h3').each(function() { - var node = this; - if (node.id == '') - node.id = 'tmp_' + toc_items.length; - var link = $('').attr('href', '#' + node.id).text($(node).text()); - var item; - if ($(node).is('h2')) { - item = $('
'); - } else { // h3 - item = $('
'); - } - item.append(link); - toc_items.push(item); - }); - if (toc_items.length <= 1) { - return; - } - - var dl1 = $('
'); - var dl2 = $('
'); - - var split_index = (toc_items.length / 2) + 1; - if (split_index < 8) { - split_index = toc_items.length; - } - for (var i = 0; i < split_index; i++) { - dl1.append(toc_items[i]); - } - for (/* keep using i */; i < toc_items.length; i++) { - dl2.append(toc_items[i]); - } - - var tocTable = $('').appendTo(nav); - var tocBody = $('').appendTo(tocTable); - var tocRow = $('').appendTo(tocBody); - - // 1st column - $(']","i"),bv=/^(?:checkbox|radio)$/,bw=/checked\s*(?:[^=]|=\s*.checked.)/i,bx=/\/(java|ecma)script/i,by=/^\s*\s*$/g,bz={option:[1,""],legend:[1,"
","
"],thead:[1,"
').appendTo(tocRow).append(dl1); - // 2nd column - $('').appendTo(tocRow).append(dl2); -} - -function bindToggle(el) { - $('.toggleButton', el).click(function() { - if ($(el).is('.toggle')) { - $(el).addClass('toggleVisible').removeClass('toggle'); - } else { - $(el).addClass('toggle').removeClass('toggleVisible'); - } - }); -} -function bindToggles(selector) { - $(selector).each(function(i, el) { - bindToggle(el); - }); -} - -function bindToggleLink(el, prefix) { - $(el).click(function() { - var href = $(el).attr('href'); - var i = href.indexOf('#'+prefix); - if (i < 0) { - return; - } - var id = '#' + prefix + href.slice(i+1+prefix.length); - if ($(id).is('.toggle')) { - $(id).find('.toggleButton').first().click(); - } - }); -} -function bindToggleLinks(selector, prefix) { - $(selector).each(function(i, el) { - bindToggleLink(el, prefix); - }); -} - -function setupDropdownPlayground() { - if (!$('#page').is('.wide')) { - return; // don't show on front page - } - var button = $('#playgroundButton'); - var div = $('#playground'); - var setup = false; - button.toggle(function() { - button.addClass('active'); - div.show(); - if (setup) { - return; - } - setup = true; - playground({ - 'codeEl': $('.code', div), - 'outputEl': $('.output', div), - 'runEl': $('.run', div), - 'fmtEl': $('.fmt', div), - 'shareEl': $('.share', div), - 'shareRedirect': '//play.golang.org/p/' - }); - }, - function() { - button.removeClass('active'); - div.hide(); - }); - button.show(); - $('#menu').css('min-width', '+=60'); -} - -function setupInlinePlayground() { - 'use strict'; - // Set up playground when each element is toggled. - $('div.play').each(function (i, el) { - // Set up playground for this example. - var setup = function() { - var code = $('.code', el); - playground({ - 'codeEl': code, - 'outputEl': $('.output', el), - 'runEl': $('.run', el), - 'fmtEl': $('.fmt', el), - 'shareEl': $('.share', el), - 'shareRedirect': '//play.golang.org/p/' - }); - - // Make the code textarea resize to fit content. - var resize = function() { - code.height(0); - var h = code[0].scrollHeight; - code.height(h+20); // minimize bouncing. - code.closest('.input').height(h); - }; - code.on('keydown', resize); - code.on('keyup', resize); - code.keyup(); // resize now. - }; - - // If example already visible, set up playground now. - if ($(el).is(':visible')) { - setup(); - return; - } - - // Otherwise, set up playground when example is expanded. - var built = false; - $(el).closest('.toggle').click(function() { - // Only set up once. - if (!built) { - setup(); - built = true; - } - }); - }); -} - -// fixFocus tries to put focus to div#page so that keyboard navigation works. -function fixFocus() { - var page = $('div#page'); - var topbar = $('div#topbar'); - page.css('outline', 0); // disable outline when focused - page.attr('tabindex', -1); // and set tabindex so that it is focusable - $(window).resize(function (evt) { - // only focus page when the topbar is at fixed position (that is, it's in - // front of page, and keyboard event will go to the former by default.) - // by focusing page, keyboard event will go to page so that up/down arrow, - // space, etc. will work as expected. - if (topbar.css('position') == "fixed") - page.focus(); - }).resize(); -} - -function toggleHash() { - var hash = $(window.location.hash); - if (hash.is('.toggle')) { - hash.find('.toggleButton').first().click(); - } -} - -function personalizeInstallInstructions() { - var prefix = '?download='; - var s = window.location.search; - if (s.indexOf(prefix) != 0) { - // No 'download' query string; bail. - return; - } - - var filename = s.substr(prefix.length); - var filenameRE = /^go1\.\d+(\.\d+)?([a-z0-9]+)?\.([a-z0-9]+)(-[a-z0-9]+)?(-osx10\.[68])?\.([a-z.]+)$/; - $('.downloadFilename').text(filename); - $('.hideFromDownload').hide(); - var m = filenameRE.exec(filename); - if (!m) { - // Can't interpret file name; bail. - return; - } - - var os = m[3]; - var ext = m[6]; - if (ext != 'tar.gz') { - $('#tarballInstructions').hide(); - } - if (os != 'darwin' || ext != 'pkg') { - $('#darwinPackageInstructions').hide(); - } - if (os != 'windows') { - $('#windowsInstructions').hide(); - $('.testUnix').show(); - $('.testWindows').hide(); - } else { - if (ext != 'msi') { - $('#windowsInstallerInstructions').hide(); - } - if (ext != 'zip') { - $('#windowsZipInstructions').hide(); - } - $('.testUnix').hide(); - $('.testWindows').show(); - } - - var download = "https://storage.googleapis.com/golang/" + filename; - - var message = $('

'+ - 'Your download should begin shortly. '+ - 'If it does not, click this link.

'); - message.find('a').attr('href', download); - message.insertAfter('#nav'); - - window.location = download; -} - -$(document).ready(function() { - bindSearchEvents(); - generateTOC(); - bindToggles(".toggle"); - bindToggles(".toggleVisible"); - bindToggleLinks(".exampleLink", "example_"); - bindToggleLinks(".overviewLink", ""); - bindToggleLinks(".examplesLink", ""); - bindToggleLinks(".indexLink", ""); - setupDropdownPlayground(); - setupInlinePlayground(); - fixFocus(); - setupTypeInfo(); - setupCallgraphs(); - toggleHash(); - personalizeInstallInstructions(); - - // godoc.html defines window.initFuncs in the tag, and root.html and - // codewalk.js push their on-page-ready functions to the list. - // We execute those functions here, to avoid loading jQuery until the page - // content is loaded. - for (var i = 0; i < window.initFuncs.length; i++) window.initFuncs[i](); -}); - -// -- analysis --------------------------------------------------------- - -// escapeHTML returns HTML for s, with metacharacters quoted. -// It is safe for use in both elements and attributes -// (unlike the "set innerText, read innerHTML" trick). -function escapeHTML(s) { - return s.replace(/&/g, '&'). - replace(/\"/g, '"'). - replace(/\'/g, '''). - replace(//g, '>'); -} - -// makeAnchor returns HTML for an element, given an anchorJSON object. -function makeAnchor(json) { - var html = escapeHTML(json.Text); - if (json.Href != "") { - html = "" + html + ""; - } - return html; -} - -function showLowFrame(html) { - var lowframe = document.getElementById('lowframe'); - lowframe.style.height = "200px"; - lowframe.innerHTML = "

" + html + "

\n" + - "
" -}; - -document.hideLowFrame = function() { - var lowframe = document.getElementById('lowframe'); - lowframe.style.height = "0px"; -} - -// onClickCallers is the onclick action for the 'func' tokens of a -// function declaration. -document.onClickCallers = function(index) { - var data = document.ANALYSIS_DATA[index] - if (data.Callers.length == 1 && data.Callers[0].Sites.length == 1) { - document.location = data.Callers[0].Sites[0].Href; // jump to sole caller - return; - } - - var html = "Callers of " + escapeHTML(data.Callee) + ":
\n"; - for (var i = 0; i < data.Callers.length; i++) { - var caller = data.Callers[i]; - html += "" + escapeHTML(caller.Func) + ""; - var sites = caller.Sites; - if (sites != null && sites.length > 0) { - html += " at line "; - for (var j = 0; j < sites.length; j++) { - if (j > 0) { - html += ", "; - } - html += "" + makeAnchor(sites[j]) + ""; - } - } - html += "
\n"; - } - showLowFrame(html); -}; - -// onClickCallees is the onclick action for the '(' token of a function call. -document.onClickCallees = function(index) { - var data = document.ANALYSIS_DATA[index] - if (data.Callees.length == 1) { - document.location = data.Callees[0].Href; // jump to sole callee - return; - } - - var html = "Callees of this " + escapeHTML(data.Descr) + ":
\n"; - for (var i = 0; i < data.Callees.length; i++) { - html += "" + makeAnchor(data.Callees[i]) + "
\n"; - } - showLowFrame(html); -}; - -// onClickTypeInfo is the onclick action for identifiers declaring a named type. -document.onClickTypeInfo = function(index) { - var data = document.ANALYSIS_DATA[index]; - var html = "Type " + data.Name + ": " + - "      (size=" + data.Size + ", align=" + data.Align + ")
\n"; - html += implementsHTML(data); - html += methodsetHTML(data); - showLowFrame(html); -}; - -// implementsHTML returns HTML for the implements relation of the -// specified TypeInfoJSON value. -function implementsHTML(info) { - var html = ""; - if (info.ImplGroups != null) { - for (var i = 0; i < info.ImplGroups.length; i++) { - var group = info.ImplGroups[i]; - var x = "" + escapeHTML(group.Descr) + " "; - for (var j = 0; j < group.Facts.length; j++) { - var fact = group.Facts[j]; - var y = "" + makeAnchor(fact.Other) + ""; - if (fact.ByKind != null) { - html += escapeHTML(fact.ByKind) + " type " + y + " implements " + x; - } else { - html += x + " implements " + y; - } - html += "
\n"; - } - } - } - return html; -} - - -// methodsetHTML returns HTML for the methodset of the specified -// TypeInfoJSON value. -function methodsetHTML(info) { - var html = ""; - if (info.Methods != null) { - for (var i = 0; i < info.Methods.length; i++) { - html += "" + makeAnchor(info.Methods[i]) + "
\n"; - } - } - return html; -} - -// onClickComm is the onclick action for channel "make" and "<-" -// send/receive tokens. -document.onClickComm = function(index) { - var ops = document.ANALYSIS_DATA[index].Ops - if (ops.length == 1) { - document.location = ops[0].Op.Href; // jump to sole element - return; - } - - var html = "Operations on this channel:
\n"; - for (var i = 0; i < ops.length; i++) { - html += makeAnchor(ops[i].Op) + " by " + escapeHTML(ops[i].Fn) + "
\n"; - } - if (ops.length == 0) { - html += "(none)
\n"; - } - showLowFrame(html); -}; - -$(window).load(function() { - // Scroll window so that first selection is visible. - // (This means we don't need to emit id='L%d' spans for each line.) - // TODO(adonovan): ideally, scroll it so that it's under the pointer, - // but I don't know how to get the pointer y coordinate. - var elts = document.getElementsByClassName("selection"); - if (elts.length > 0) { - elts[0].scrollIntoView() - } -}); - -// setupTypeInfo populates the "Implements" and "Method set" toggle for -// each type in the package doc. -function setupTypeInfo() { - for (var i in document.ANALYSIS_DATA) { - var data = document.ANALYSIS_DATA[i]; - - var el = document.getElementById("implements-" + i); - if (el != null) { - // el != null => data is TypeInfoJSON. - if (data.ImplGroups != null) { - el.innerHTML = implementsHTML(data); - el.parentNode.parentNode.style.display = "block"; - } - } - - var el = document.getElementById("methodset-" + i); - if (el != null) { - // el != null => data is TypeInfoJSON. - if (data.Methods != null) { - el.innerHTML = methodsetHTML(data); - el.parentNode.parentNode.style.display = "block"; - } - } - } -} - -function setupCallgraphs() { - if (document.CALLGRAPH == null) { - return - } - document.getElementById("pkg-callgraph").style.display = "block"; - - var treeviews = document.getElementsByClassName("treeview"); - for (var i = 0; i < treeviews.length; i++) { - var tree = treeviews[i]; - if (tree.id == null || tree.id.indexOf("callgraph-") != 0) { - continue; - } - var id = tree.id.substring("callgraph-".length); - $(tree).treeview({collapsed: true, animated: "fast"}); - document.cgAddChildren(tree, tree, [id]); - tree.parentNode.parentNode.style.display = "block"; - } -} - -document.cgAddChildren = function(tree, ul, indices) { - if (indices != null) { - for (var i = 0; i < indices.length; i++) { - var li = cgAddChild(tree, ul, document.CALLGRAPH[indices[i]]); - if (i == indices.length - 1) { - $(li).addClass("last"); - } - } - } - $(tree).treeview({animated: "fast", add: ul}); -} - -// cgAddChild adds an
  • element for document.CALLGRAPH node cgn to -// the parent
      element ul. tree is the tree's root
        element. -function cgAddChild(tree, ul, cgn) { - var li = document.createElement("li"); - ul.appendChild(li); - li.className = "closed"; - - var code = document.createElement("code"); - - if (cgn.Callees != null) { - $(li).addClass("expandable"); - - // Event handlers and innerHTML updates don't play nicely together, - // hence all this explicit DOM manipulation. - var hitarea = document.createElement("div"); - hitarea.className = "hitarea expandable-hitarea"; - li.appendChild(hitarea); - - li.appendChild(code); - - var childUL = document.createElement("ul"); - li.appendChild(childUL); - childUL.setAttribute('style', "display: none;"); - - var onClick = function() { - document.cgAddChildren(tree, childUL, cgn.Callees); - hitarea.removeEventListener('click', onClick) - }; - hitarea.addEventListener('click', onClick); - - } else { - li.appendChild(code); - } - code.innerHTML += " " + makeAnchor(cgn.Func); - return li -} - -})(); diff --git a/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/implements.html b/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/implements.html deleted file mode 100644 index 5f65b86..0000000 --- a/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/implements.html +++ /dev/null @@ -1,9 +0,0 @@ - diff --git a/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/jquery.js b/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/jquery.js deleted file mode 100644 index bc3fbc8..0000000 --- a/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/jquery.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! jQuery v1.8.2 jquery.com | jquery.org/license */ -(function(a,b){function G(a){var b=F[a]={};return p.each(a.split(s),function(a,c){b[c]=!0}),b}function J(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(I,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:+d+""===d?+d:H.test(d)?p.parseJSON(d):d}catch(f){}p.data(a,c,d)}else d=b}return d}function K(a){var b;for(b in a){if(b==="data"&&p.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function ba(){return!1}function bb(){return!0}function bh(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function bi(a,b){do a=a[b];while(a&&a.nodeType!==1);return a}function bj(a,b,c){b=b||0;if(p.isFunction(b))return p.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return p.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=p.grep(a,function(a){return a.nodeType===1});if(be.test(b))return p.filter(b,d,!c);b=p.filter(b,d)}return p.grep(a,function(a,d){return p.inArray(a,b)>=0===c})}function bk(a){var b=bl.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function bC(a,b){return a.getElementsByTagName(b)[0]||a.appendChild(a.ownerDocument.createElement(b))}function bD(a,b){if(b.nodeType!==1||!p.hasData(a))return;var c,d,e,f=p._data(a),g=p._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;d").appendTo(e.body),c=b.css("display");b.remove();if(c==="none"||c===""){bI=e.body.appendChild(bI||p.extend(e.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!bJ||!bI.createElement)bJ=(bI.contentWindow||bI.contentDocument).document,bJ.write(""),bJ.close();b=bJ.body.appendChild(bJ.createElement(a)),c=bH(b,"display"),e.body.removeChild(bI)}return bS[a]=c,c}function ci(a,b,c,d){var e;if(p.isArray(b))p.each(b,function(b,e){c||ce.test(a)?d(a,e):ci(a+"["+(typeof e=="object"?b:"")+"]",e,c,d)});else if(!c&&p.type(b)==="object")for(e in b)ci(a+"["+e+"]",b[e],c,d);else d(a,b)}function cz(a){return function(b,c){typeof b!="string"&&(c=b,b="*");var d,e,f,g=b.toLowerCase().split(s),h=0,i=g.length;if(p.isFunction(c))for(;h)[^>]*$|#([\w\-]*)$)/,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,y=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,z=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,A=/^-ms-/,B=/-([\da-z])/gi,C=function(a,b){return(b+"").toUpperCase()},D=function(){e.addEventListener?(e.removeEventListener("DOMContentLoaded",D,!1),p.ready()):e.readyState==="complete"&&(e.detachEvent("onreadystatechange",D),p.ready())},E={};p.fn=p.prototype={constructor:p,init:function(a,c,d){var f,g,h,i;if(!a)return this;if(a.nodeType)return this.context=this[0]=a,this.length=1,this;if(typeof a=="string"){a.charAt(0)==="<"&&a.charAt(a.length-1)===">"&&a.length>=3?f=[null,a,null]:f=u.exec(a);if(f&&(f[1]||!c)){if(f[1])return c=c instanceof p?c[0]:c,i=c&&c.nodeType?c.ownerDocument||c:e,a=p.parseHTML(f[1],i,!0),v.test(f[1])&&p.isPlainObject(c)&&this.attr.call(a,c,!0),p.merge(this,a);g=e.getElementById(f[2]);if(g&&g.parentNode){if(g.id!==f[2])return d.find(a);this.length=1,this[0]=g}return this.context=e,this.selector=a,this}return!c||c.jquery?(c||d).find(a):this.constructor(c).find(a)}return p.isFunction(a)?d.ready(a):(a.selector!==b&&(this.selector=a.selector,this.context=a.context),p.makeArray(a,this))},selector:"",jquery:"1.8.2",length:0,size:function(){return this.length},toArray:function(){return k.call(this)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=p.merge(this.constructor(),a);return d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")"),d},each:function(a,b){return p.each(this,a,b)},ready:function(a){return p.ready.promise().done(a),this},eq:function(a){return a=+a,a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(k.apply(this,arguments),"slice",k.call(arguments).join(","))},map:function(a){return this.pushStack(p.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:j,sort:[].sort,splice:[].splice},p.fn.init.prototype=p.fn,p.extend=p.fn.extend=function(){var a,c,d,e,f,g,h=arguments[0]||{},i=1,j=arguments.length,k=!1;typeof h=="boolean"&&(k=h,h=arguments[1]||{},i=2),typeof h!="object"&&!p.isFunction(h)&&(h={}),j===i&&(h=this,--i);for(;i0)return;d.resolveWith(e,[p]),p.fn.trigger&&p(e).trigger("ready").off("ready")},isFunction:function(a){return p.type(a)==="function"},isArray:Array.isArray||function(a){return p.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):E[m.call(a)]||"object"},isPlainObject:function(a){if(!a||p.type(a)!=="object"||a.nodeType||p.isWindow(a))return!1;try{if(a.constructor&&!n.call(a,"constructor")&&!n.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||n.call(a,d)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},error:function(a){throw new Error(a)},parseHTML:function(a,b,c){var d;return!a||typeof a!="string"?null:(typeof b=="boolean"&&(c=b,b=0),b=b||e,(d=v.exec(a))?[b.createElement(d[1])]:(d=p.buildFragment([a],b,c?null:[]),p.merge([],(d.cacheable?p.clone(d.fragment):d.fragment).childNodes)))},parseJSON:function(b){if(!b||typeof b!="string")return null;b=p.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(w.test(b.replace(y,"@").replace(z,"]").replace(x,"")))return(new Function("return "+b))();p.error("Invalid JSON: "+b)},parseXML:function(c){var d,e;if(!c||typeof c!="string")return null;try{a.DOMParser?(e=new DOMParser,d=e.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(f){d=b}return(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&p.error("Invalid XML: "+c),d},noop:function(){},globalEval:function(b){b&&r.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(A,"ms-").replace(B,C)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,c,d){var e,f=0,g=a.length,h=g===b||p.isFunction(a);if(d){if(h){for(e in a)if(c.apply(a[e],d)===!1)break}else for(;f0&&a[0]&&a[i-1]||i===0||p.isArray(a));if(j)for(;h-1)i.splice(c,1),e&&(c<=g&&g--,c<=h&&h--)}),this},has:function(a){return p.inArray(a,i)>-1},empty:function(){return i=[],this},disable:function(){return i=j=c=b,this},disabled:function(){return!i},lock:function(){return j=b,c||l.disable(),this},locked:function(){return!j},fireWith:function(a,b){return b=b||[],b=[a,b.slice?b.slice():b],i&&(!d||j)&&(e?j.push(b):k(b)),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!d}};return l},p.extend({Deferred:function(a){var b=[["resolve","done",p.Callbacks("once memory"),"resolved"],["reject","fail",p.Callbacks("once memory"),"rejected"],["notify","progress",p.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return p.Deferred(function(c){p.each(b,function(b,d){var f=d[0],g=a[b];e[d[1]](p.isFunction(g)?function(){var a=g.apply(this,arguments);a&&p.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f+"With"](this===e?c:this,[a])}:c[f])}),a=null}).promise()},promise:function(a){return a!=null?p.extend(a,d):d}},e={};return d.pipe=d.then,p.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[a^1][2].disable,b[2][2].lock),e[f[0]]=g.fire,e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=k.call(arguments),d=c.length,e=d!==1||a&&p.isFunction(a.promise)?d:0,f=e===1?a:p.Deferred(),g=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?k.call(arguments):d,c===h?f.notifyWith(b,c):--e||f.resolveWith(b,c)}},h,i,j;if(d>1){h=new Array(d),i=new Array(d),j=new Array(d);for(;b
        a",c=n.getElementsByTagName("*"),d=n.getElementsByTagName("a")[0],d.style.cssText="top:1px;float:left;opacity:.5";if(!c||!c.length)return{};f=e.createElement("select"),g=f.appendChild(e.createElement("option")),h=n.getElementsByTagName("input")[0],b={leadingWhitespace:n.firstChild.nodeType===3,tbody:!n.getElementsByTagName("tbody").length,htmlSerialize:!!n.getElementsByTagName("link").length,style:/top/.test(d.getAttribute("style")),hrefNormalized:d.getAttribute("href")==="/a",opacity:/^0.5/.test(d.style.opacity),cssFloat:!!d.style.cssFloat,checkOn:h.value==="on",optSelected:g.selected,getSetAttribute:n.className!=="t",enctype:!!e.createElement("form").enctype,html5Clone:e.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",boxModel:e.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},h.checked=!0,b.noCloneChecked=h.cloneNode(!0).checked,f.disabled=!0,b.optDisabled=!g.disabled;try{delete n.test}catch(o){b.deleteExpando=!1}!n.addEventListener&&n.attachEvent&&n.fireEvent&&(n.attachEvent("onclick",m=function(){b.noCloneEvent=!1}),n.cloneNode(!0).fireEvent("onclick"),n.detachEvent("onclick",m)),h=e.createElement("input"),h.value="t",h.setAttribute("type","radio"),b.radioValue=h.value==="t",h.setAttribute("checked","checked"),h.setAttribute("name","t"),n.appendChild(h),i=e.createDocumentFragment(),i.appendChild(n.lastChild),b.checkClone=i.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=h.checked,i.removeChild(h),i.appendChild(n);if(n.attachEvent)for(k in{submit:!0,change:!0,focusin:!0})j="on"+k,l=j in n,l||(n.setAttribute(j,"return;"),l=typeof n[j]=="function"),b[k+"Bubbles"]=l;return p(function(){var c,d,f,g,h="padding:0;margin:0;border:0;display:block;overflow:hidden;",i=e.getElementsByTagName("body")[0];if(!i)return;c=e.createElement("div"),c.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",i.insertBefore(c,i.firstChild),d=e.createElement("div"),c.appendChild(d),d.innerHTML="
        t
        ",f=d.getElementsByTagName("td"),f[0].style.cssText="padding:0;margin:0;border:0;display:none",l=f[0].offsetHeight===0,f[0].style.display="",f[1].style.display="none",b.reliableHiddenOffsets=l&&f[0].offsetHeight===0,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",b.boxSizing=d.offsetWidth===4,b.doesNotIncludeMarginInBodyOffset=i.offsetTop!==1,a.getComputedStyle&&(b.pixelPosition=(a.getComputedStyle(d,null)||{}).top!=="1%",b.boxSizingReliable=(a.getComputedStyle(d,null)||{width:"4px"}).width==="4px",g=e.createElement("div"),g.style.cssText=d.style.cssText=h,g.style.marginRight=g.style.width="0",d.style.width="1px",d.appendChild(g),b.reliableMarginRight=!parseFloat((a.getComputedStyle(g,null)||{}).marginRight)),typeof d.style.zoom!="undefined"&&(d.innerHTML="",d.style.cssText=h+"width:1px;padding:1px;display:inline;zoom:1",b.inlineBlockNeedsLayout=d.offsetWidth===3,d.style.display="block",d.style.overflow="visible",d.innerHTML="
        ",d.firstChild.style.width="5px",b.shrinkWrapBlocks=d.offsetWidth!==3,c.style.zoom=1),i.removeChild(c),c=d=f=g=null}),i.removeChild(n),c=d=f=g=h=i=n=null,b}();var H=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,I=/([A-Z])/g;p.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(p.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){return a=a.nodeType?p.cache[a[p.expando]]:a[p.expando],!!a&&!K(a)},data:function(a,c,d,e){if(!p.acceptData(a))return;var f,g,h=p.expando,i=typeof c=="string",j=a.nodeType,k=j?p.cache:a,l=j?a[h]:a[h]&&h;if((!l||!k[l]||!e&&!k[l].data)&&i&&d===b)return;l||(j?a[h]=l=p.deletedIds.pop()||p.guid++:l=h),k[l]||(k[l]={},j||(k[l].toJSON=p.noop));if(typeof c=="object"||typeof c=="function")e?k[l]=p.extend(k[l],c):k[l].data=p.extend(k[l].data,c);return f=k[l],e||(f.data||(f.data={}),f=f.data),d!==b&&(f[p.camelCase(c)]=d),i?(g=f[c],g==null&&(g=f[p.camelCase(c)])):g=f,g},removeData:function(a,b,c){if(!p.acceptData(a))return;var d,e,f,g=a.nodeType,h=g?p.cache:a,i=g?a[p.expando]:p.expando;if(!h[i])return;if(b){d=c?h[i]:h[i].data;if(d){p.isArray(b)||(b in d?b=[b]:(b=p.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,f=b.length;e1,null,!1))},removeData:function(a){return this.each(function(){p.removeData(this,a)})}}),p.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=p._data(a,b),c&&(!d||p.isArray(c)?d=p._data(a,b,p.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=p.queue(a,b),d=c.length,e=c.shift(),f=p._queueHooks(a,b),g=function(){p.dequeue(a,b)};e==="inprogress"&&(e=c.shift(),d--),e&&(b==="fx"&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return p._data(a,c)||p._data(a,c,{empty:p.Callbacks("once memory").add(function(){p.removeData(a,b+"queue",!0),p.removeData(a,c,!0)})})}}),p.fn.extend({queue:function(a,c){var d=2;return typeof a!="string"&&(c=a,a="fx",d--),arguments.length1)},removeAttr:function(a){return this.each(function(){p.removeAttr(this,a)})},prop:function(a,b){return p.access(this,p.prop,a,b,arguments.length>1)},removeProp:function(a){return a=p.propFix[a]||a,this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,f,g,h;if(p.isFunction(a))return this.each(function(b){p(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(s);for(c=0,d=this.length;c=0)d=d.replace(" "+c[f]+" "," ");e.className=a?p.trim(d):""}}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";return p.isFunction(a)?this.each(function(c){p(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each(function(){if(c==="string"){var e,f=0,g=p(this),h=b,i=a.split(s);while(e=i[f++])h=d?h:!g.hasClass(e),g[h?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&p._data(this,"__className__",this.className),this.className=this.className||a===!1?"":p._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c=0)return!0;return!1},val:function(a){var c,d,e,f=this[0];if(!arguments.length){if(f)return c=p.valHooks[f.type]||p.valHooks[f.nodeName.toLowerCase()],c&&"get"in c&&(d=c.get(f,"value"))!==b?d:(d=f.value,typeof d=="string"?d.replace(P,""):d==null?"":d);return}return e=p.isFunction(a),this.each(function(d){var f,g=p(this);if(this.nodeType!==1)return;e?f=a.call(this,d,g.val()):f=a,f==null?f="":typeof f=="number"?f+="":p.isArray(f)&&(f=p.map(f,function(a){return a==null?"":a+""})),c=p.valHooks[this.type]||p.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,f,"value")===b)this.value=f})}}),p.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,f=a.selectedIndex,g=[],h=a.options,i=a.type==="select-one";if(f<0)return null;c=i?f:0,d=i?f+1:h.length;for(;c=0}),c.length||(a.selectedIndex=-1),c}}},attrFn:{},attr:function(a,c,d,e){var f,g,h,i=a.nodeType;if(!a||i===3||i===8||i===2)return;if(e&&p.isFunction(p.fn[c]))return p(a)[c](d);if(typeof a.getAttribute=="undefined")return p.prop(a,c,d);h=i!==1||!p.isXMLDoc(a),h&&(c=c.toLowerCase(),g=p.attrHooks[c]||(T.test(c)?M:L));if(d!==b){if(d===null){p.removeAttr(a,c);return}return g&&"set"in g&&h&&(f=g.set(a,d,c))!==b?f:(a.setAttribute(c,d+""),d)}return g&&"get"in g&&h&&(f=g.get(a,c))!==null?f:(f=a.getAttribute(c),f===null?b:f)},removeAttr:function(a,b){var c,d,e,f,g=0;if(b&&a.nodeType===1){d=b.split(s);for(;g=0}})});var V=/^(?:textarea|input|select)$/i,W=/^([^\.]*|)(?:\.(.+)|)$/,X=/(?:^|\s)hover(\.\S+|)\b/,Y=/^key/,Z=/^(?:mouse|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=function(a){return p.event.special.hover?a:a.replace(X,"mouseenter$1 mouseleave$1")};p.event={add:function(a,c,d,e,f){var g,h,i,j,k,l,m,n,o,q,r;if(a.nodeType===3||a.nodeType===8||!c||!d||!(g=p._data(a)))return;d.handler&&(o=d,d=o.handler,f=o.selector),d.guid||(d.guid=p.guid++),i=g.events,i||(g.events=i={}),h=g.handle,h||(g.handle=h=function(a){return typeof p!="undefined"&&(!a||p.event.triggered!==a.type)?p.event.dispatch.apply(h.elem,arguments):b},h.elem=a),c=p.trim(_(c)).split(" ");for(j=0;j=0&&(s=s.slice(0,-1),i=!0),s.indexOf(".")>=0&&(t=s.split("."),s=t.shift(),t.sort());if((!f||p.event.customEvent[s])&&!p.event.global[s])return;c=typeof c=="object"?c[p.expando]?c:new p.Event(s,c):new p.Event(s),c.type=s,c.isTrigger=!0,c.exclusive=i,c.namespace=t.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+t.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,m=s.indexOf(":")<0?"on"+s:"";if(!f){h=p.cache;for(j in h)h[j].events&&h[j].events[s]&&p.event.trigger(c,d,h[j].handle.elem,!0);return}c.result=b,c.target||(c.target=f),d=d!=null?p.makeArray(d):[],d.unshift(c),n=p.event.special[s]||{};if(n.trigger&&n.trigger.apply(f,d)===!1)return;q=[[f,n.bindType||s]];if(!g&&!n.noBubble&&!p.isWindow(f)){r=n.delegateType||s,k=$.test(r+s)?f:f.parentNode;for(l=f;k;k=k.parentNode)q.push([k,r]),l=k;l===(f.ownerDocument||e)&&q.push([l.defaultView||l.parentWindow||a,r])}for(j=0;j=0:p.find(m,this,null,[f]).length),h[m]&&j.push(l);j.length&&u.push({elem:f,matches:j})}o.length>q&&u.push({elem:this,matches:o.slice(q)});for(d=0;d0?this.on(b,null,a,c):this.trigger(b)},Y.test(b)&&(p.event.fixHooks[b]=p.event.keyHooks),Z.test(b)&&(p.event.fixHooks[b]=p.event.mouseHooks)}),function(a,b){function bc(a,b,c,d){c=c||[],b=b||r;var e,f,i,j,k=b.nodeType;if(!a||typeof a!="string")return c;if(k!==1&&k!==9)return[];i=g(b);if(!i&&!d)if(e=P.exec(a))if(j=e[1]){if(k===9){f=b.getElementById(j);if(!f||!f.parentNode)return c;if(f.id===j)return c.push(f),c}else if(b.ownerDocument&&(f=b.ownerDocument.getElementById(j))&&h(b,f)&&f.id===j)return c.push(f),c}else{if(e[2])return w.apply(c,x.call(b.getElementsByTagName(a),0)),c;if((j=e[3])&&_&&b.getElementsByClassName)return w.apply(c,x.call(b.getElementsByClassName(j),0)),c}return bp(a.replace(L,"$1"),b,c,d,i)}function bd(a){return function(b){var c=b.nodeName.toLowerCase();return c==="input"&&b.type===a}}function be(a){return function(b){var c=b.nodeName.toLowerCase();return(c==="input"||c==="button")&&b.type===a}}function bf(a){return z(function(b){return b=+b,z(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function bg(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}function bh(a,b){var c,d,f,g,h,i,j,k=C[o][a];if(k)return b?0:k.slice(0);h=a,i=[],j=e.preFilter;while(h){if(!c||(d=M.exec(h)))d&&(h=h.slice(d[0].length)),i.push(f=[]);c=!1;if(d=N.exec(h))f.push(c=new q(d.shift())),h=h.slice(c.length),c.type=d[0].replace(L," ");for(g in e.filter)(d=W[g].exec(h))&&(!j[g]||(d=j[g](d,r,!0)))&&(f.push(c=new q(d.shift())),h=h.slice(c.length),c.type=g,c.matches=d);if(!c)break}return b?h.length:h?bc.error(a):C(a,i).slice(0)}function bi(a,b,d){var e=b.dir,f=d&&b.dir==="parentNode",g=u++;return b.first?function(b,c,d){while(b=b[e])if(f||b.nodeType===1)return a(b,c,d)}:function(b,d,h){if(!h){var i,j=t+" "+g+" ",k=j+c;while(b=b[e])if(f||b.nodeType===1){if((i=b[o])===k)return b.sizset;if(typeof i=="string"&&i.indexOf(j)===0){if(b.sizset)return b}else{b[o]=k;if(a(b,d,h))return b.sizset=!0,b;b.sizset=!1}}}else while(b=b[e])if(f||b.nodeType===1)if(a(b,d,h))return b}}function bj(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function bk(a,b,c,d,e){var f,g=[],h=0,i=a.length,j=b!=null;for(;h-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==l)||((b=c).nodeType?j(a,c,d):k(a,c,d))}];for(;i1&&bj(m),i>1&&a.slice(0,i-1).join("").replace(L,"$1"),c,i0,f=a.length>0,g=function(h,i,j,k,m){var n,o,p,q=[],s=0,u="0",x=h&&[],y=m!=null,z=l,A=h||f&&e.find.TAG("*",m&&i.parentNode||i),B=t+=z==null?1:Math.E;y&&(l=i!==r&&i,c=g.el);for(;(n=A[u])!=null;u++){if(f&&n){for(o=0;p=a[o];o++)if(p(n,i,j)){k.push(n);break}y&&(t=B,c=++g.el)}d&&((n=!p&&n)&&s--,h&&x.push(n))}s+=u;if(d&&u!==s){for(o=0;p=b[o];o++)p(x,q,i,j);if(h){if(s>0)while(u--)!x[u]&&!q[u]&&(q[u]=v.call(k));q=bk(q)}w.apply(k,q),y&&!h&&q.length>0&&s+b.length>1&&bc.uniqueSort(k)}return y&&(t=B,l=z),x};return g.el=0,d?z(g):g}function bo(a,b,c,d){var e=0,f=b.length;for(;e2&&(j=h[0]).type==="ID"&&b.nodeType===9&&!f&&e.relative[h[1].type]){b=e.find.ID(j.matches[0].replace(V,""),b,f)[0];if(!b)return c;a=a.slice(h.shift().length)}for(g=W.POS.test(a)?-1:h.length-1;g>=0;g--){j=h[g];if(e.relative[k=j.type])break;if(l=e.find[k])if(d=l(j.matches[0].replace(V,""),R.test(h[0].type)&&b.parentNode||b,f)){h.splice(g,1),a=d.length&&h.join("");if(!a)return w.apply(c,x.call(d,0)),c;break}}}return i(a,m)(d,b,f,c,R.test(a)),c}function bq(){}var c,d,e,f,g,h,i,j,k,l,m=!0,n="undefined",o=("sizcache"+Math.random()).replace(".",""),q=String,r=a.document,s=r.documentElement,t=0,u=0,v=[].pop,w=[].push,x=[].slice,y=[].indexOf||function(a){var b=0,c=this.length;for(;be.cacheLength&&delete a[b.shift()],a[c]=d},a)},B=A(),C=A(),D=A(),E="[\\x20\\t\\r\\n\\f]",F="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",G=F.replace("w","w#"),H="([*^$|!~]?=)",I="\\["+E+"*("+F+")"+E+"*(?:"+H+E+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+G+")|)|)"+E+"*\\]",J=":("+F+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+I+")|[^:]|\\\\.)*|.*))\\)|)",K=":(even|odd|eq|gt|lt|nth|first|last)(?:\\("+E+"*((?:-\\d)?\\d*)"+E+"*\\)|)(?=[^-]|$)",L=new RegExp("^"+E+"+|((?:^|[^\\\\])(?:\\\\.)*)"+E+"+$","g"),M=new RegExp("^"+E+"*,"+E+"*"),N=new RegExp("^"+E+"*([\\x20\\t\\r\\n\\f>+~])"+E+"*"),O=new RegExp(J),P=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,Q=/^:not/,R=/[\x20\t\r\n\f]*[+~]/,S=/:not\($/,T=/h\d/i,U=/input|select|textarea|button/i,V=/\\(?!\\)/g,W={ID:new RegExp("^#("+F+")"),CLASS:new RegExp("^\\.("+F+")"),NAME:new RegExp("^\\[name=['\"]?("+F+")['\"]?\\]"),TAG:new RegExp("^("+F.replace("w","w*")+")"),ATTR:new RegExp("^"+I),PSEUDO:new RegExp("^"+J),POS:new RegExp(K,"i"),CHILD:new RegExp("^:(only|nth|first|last)-child(?:\\("+E+"*(even|odd|(([+-]|)(\\d*)n|)"+E+"*(?:([+-]|)"+E+"*(\\d+)|))"+E+"*\\)|)","i"),needsContext:new RegExp("^"+E+"*[>+~]|"+K,"i")},X=function(a){var b=r.createElement("div");try{return a(b)}catch(c){return!1}finally{b=null}},Y=X(function(a){return a.appendChild(r.createComment("")),!a.getElementsByTagName("*").length}),Z=X(function(a){return a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!==n&&a.firstChild.getAttribute("href")==="#"}),$=X(function(a){a.innerHTML="";var b=typeof a.lastChild.getAttribute("multiple");return b!=="boolean"&&b!=="string"}),_=X(function(a){return a.innerHTML="",!a.getElementsByClassName||!a.getElementsByClassName("e").length?!1:(a.lastChild.className="e",a.getElementsByClassName("e").length===2)}),ba=X(function(a){a.id=o+0,a.innerHTML="
        ",s.insertBefore(a,s.firstChild);var b=r.getElementsByName&&r.getElementsByName(o).length===2+r.getElementsByName(o+0).length;return d=!r.getElementById(o),s.removeChild(a),b});try{x.call(s.childNodes,0)[0].nodeType}catch(bb){x=function(a){var b,c=[];for(;b=this[a];a++)c.push(b);return c}}bc.matches=function(a,b){return bc(a,null,null,b)},bc.matchesSelector=function(a,b){return bc(b,null,null,[a]).length>0},f=bc.getText=function(a){var b,c="",d=0,e=a.nodeType;if(e){if(e===1||e===9||e===11){if(typeof a.textContent=="string")return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=f(a)}else if(e===3||e===4)return a.nodeValue}else for(;b=a[d];d++)c+=f(b);return c},g=bc.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?b.nodeName!=="HTML":!1},h=bc.contains=s.contains?function(a,b){var c=a.nodeType===9?a.documentElement:a,d=b&&b.parentNode;return a===d||!!(d&&d.nodeType===1&&c.contains&&c.contains(d))}:s.compareDocumentPosition?function(a,b){return b&&!!(a.compareDocumentPosition(b)&16)}:function(a,b){while(b=b.parentNode)if(b===a)return!0;return!1},bc.attr=function(a,b){var c,d=g(a);return d||(b=b.toLowerCase()),(c=e.attrHandle[b])?c(a):d||$?a.getAttribute(b):(c=a.getAttributeNode(b),c?typeof a[b]=="boolean"?a[b]?b:null:c.specified?c.value:null:null)},e=bc.selectors={cacheLength:50,createPseudo:z,match:W,attrHandle:Z?{}:{href:function(a){return a.getAttribute("href",2)},type:function(a){return a.getAttribute("type")}},find:{ID:d?function(a,b,c){if(typeof b.getElementById!==n&&!c){var d=b.getElementById(a);return d&&d.parentNode?[d]:[]}}:function(a,c,d){if(typeof c.getElementById!==n&&!d){var e=c.getElementById(a);return e?e.id===a||typeof e.getAttributeNode!==n&&e.getAttributeNode("id").value===a?[e]:b:[]}},TAG:Y?function(a,b){if(typeof b.getElementsByTagName!==n)return b.getElementsByTagName(a)}:function(a,b){var c=b.getElementsByTagName(a);if(a==="*"){var d,e=[],f=0;for(;d=c[f];f++)d.nodeType===1&&e.push(d);return e}return c},NAME:ba&&function(a,b){if(typeof b.getElementsByName!==n)return b.getElementsByName(name)},CLASS:_&&function(a,b,c){if(typeof b.getElementsByClassName!==n&&!c)return b.getElementsByClassName(a)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(V,""),a[3]=(a[4]||a[5]||"").replace(V,""),a[2]==="~="&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),a[1]==="nth"?(a[2]||bc.error(a[0]),a[3]=+(a[3]?a[4]+(a[5]||1):2*(a[2]==="even"||a[2]==="odd")),a[4]=+(a[6]+a[7]||a[2]==="odd")):a[2]&&bc.error(a[0]),a},PSEUDO:function(a){var b,c;if(W.CHILD.test(a[0]))return null;if(a[3])a[2]=a[3];else if(b=a[4])O.test(b)&&(c=bh(b,!0))&&(c=b.indexOf(")",b.length-c)-b.length)&&(b=b.slice(0,c),a[0]=a[0].slice(0,c)),a[2]=b;return a.slice(0,3)}},filter:{ID:d?function(a){return a=a.replace(V,""),function(b){return b.getAttribute("id")===a}}:function(a){return a=a.replace(V,""),function(b){var c=typeof b.getAttributeNode!==n&&b.getAttributeNode("id");return c&&c.value===a}},TAG:function(a){return a==="*"?function(){return!0}:(a=a.replace(V,"").toLowerCase(),function(b){return b.nodeName&&b.nodeName.toLowerCase()===a})},CLASS:function(a){var b=B[o][a];return b||(b=B(a,new RegExp("(^|"+E+")"+a+"("+E+"|$)"))),function(a){return b.test(a.className||typeof a.getAttribute!==n&&a.getAttribute("class")||"")}},ATTR:function(a,b,c){return function(d,e){var f=bc.attr(d,a);return f==null?b==="!=":b?(f+="",b==="="?f===c:b==="!="?f!==c:b==="^="?c&&f.indexOf(c)===0:b==="*="?c&&f.indexOf(c)>-1:b==="$="?c&&f.substr(f.length-c.length)===c:b==="~="?(" "+f+" ").indexOf(c)>-1:b==="|="?f===c||f.substr(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d){return a==="nth"?function(a){var b,e,f=a.parentNode;if(c===1&&d===0)return!0;if(f){e=0;for(b=f.firstChild;b;b=b.nextSibling)if(b.nodeType===1){e++;if(a===b)break}}return e-=d,e===c||e%c===0&&e/c>=0}:function(b){var c=b;switch(a){case"only":case"first":while(c=c.previousSibling)if(c.nodeType===1)return!1;if(a==="first")return!0;c=b;case"last":while(c=c.nextSibling)if(c.nodeType===1)return!1;return!0}}},PSEUDO:function(a,b){var c,d=e.pseudos[a]||e.setFilters[a.toLowerCase()]||bc.error("unsupported pseudo: "+a);return d[o]?d(b):d.length>1?(c=[a,a,"",b],e.setFilters.hasOwnProperty(a.toLowerCase())?z(function(a,c){var e,f=d(a,b),g=f.length;while(g--)e=y.call(a,f[g]),a[e]=!(c[e]=f[g])}):function(a){return d(a,0,c)}):d}},pseudos:{not:z(function(a){var b=[],c=[],d=i(a.replace(L,"$1"));return d[o]?z(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)if(f=g[h])a[h]=!(b[h]=f)}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:z(function(a){return function(b){return bc(a,b).length>0}}),contains:z(function(a){return function(b){return(b.textContent||b.innerText||f(b)).indexOf(a)>-1}}),enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&!!a.checked||b==="option"&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},parent:function(a){return!e.pseudos.empty(a)},empty:function(a){var b;a=a.firstChild;while(a){if(a.nodeName>"@"||(b=a.nodeType)===3||b===4)return!1;a=a.nextSibling}return!0},header:function(a){return T.test(a.nodeName)},text:function(a){var b,c;return a.nodeName.toLowerCase()==="input"&&(b=a.type)==="text"&&((c=a.getAttribute("type"))==null||c.toLowerCase()===b)},radio:bd("radio"),checkbox:bd("checkbox"),file:bd("file"),password:bd("password"),image:bd("image"),submit:be("submit"),reset:be("reset"),button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&a.type==="button"||b==="button"},input:function(a){return U.test(a.nodeName)},focus:function(a){var b=a.ownerDocument;return a===b.activeElement&&(!b.hasFocus||b.hasFocus())&&(!!a.type||!!a.href)},active:function(a){return a===a.ownerDocument.activeElement},first:bf(function(a,b,c){return[0]}),last:bf(function(a,b,c){return[b-1]}),eq:bf(function(a,b,c){return[c<0?c+b:c]}),even:bf(function(a,b,c){for(var d=0;d=0;)a.push(d);return a}),gt:bf(function(a,b,c){for(var d=c<0?c+b:c;++d",a.querySelectorAll("[selected]").length||e.push("\\["+E+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),a.querySelectorAll(":checked").length||e.push(":checked")}),X(function(a){a.innerHTML="

        ",a.querySelectorAll("[test^='']").length&&e.push("[*^$]="+E+"*(?:\"\"|'')"),a.innerHTML="",a.querySelectorAll(":enabled").length||e.push(":enabled",":disabled")}),e=new RegExp(e.join("|")),bp=function(a,d,f,g,h){if(!g&&!h&&(!e||!e.test(a))){var i,j,k=!0,l=o,m=d,n=d.nodeType===9&&a;if(d.nodeType===1&&d.nodeName.toLowerCase()!=="object"){i=bh(a),(k=d.getAttribute("id"))?l=k.replace(c,"\\$&"):d.setAttribute("id",l),l="[id='"+l+"'] ",j=i.length;while(j--)i[j]=l+i[j].join("");m=R.test(a)&&d.parentNode||d,n=i.join(",")}if(n)try{return w.apply(f,x.call(m.querySelectorAll(n),0)),f}catch(p){}finally{k||d.removeAttribute("id")}}return b(a,d,f,g,h)},h&&(X(function(b){a=h.call(b,"div");try{h.call(b,"[test!='']:sizzle"),f.push("!=",J)}catch(c){}}),f=new RegExp(f.join("|")),bc.matchesSelector=function(b,c){c=c.replace(d,"='$1']");if(!g(b)&&!f.test(c)&&(!e||!e.test(c)))try{var i=h.call(b,c);if(i||a||b.document&&b.document.nodeType!==11)return i}catch(j){}return bc(c,null,null,[b]).length>0})}(),e.pseudos.nth=e.pseudos.eq,e.filters=bq.prototype=e.pseudos,e.setFilters=new bq,bc.attr=p.attr,p.find=bc,p.expr=bc.selectors,p.expr[":"]=p.expr.pseudos,p.unique=bc.uniqueSort,p.text=bc.getText,p.isXMLDoc=bc.isXML,p.contains=bc.contains}(a);var bc=/Until$/,bd=/^(?:parents|prev(?:Until|All))/,be=/^.[^:#\[\.,]*$/,bf=p.expr.match.needsContext,bg={children:!0,contents:!0,next:!0,prev:!0};p.fn.extend({find:function(a){var b,c,d,e,f,g,h=this;if(typeof a!="string")return p(a).filter(function(){for(b=0,c=h.length;b0)for(e=d;e=0:p.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c,d=0,e=this.length,f=[],g=bf.test(a)||typeof a!="string"?p(a,b||this.context):0;for(;d-1:p.find.matchesSelector(c,a)){f.push(c);break}c=c.parentNode}}return f=f.length>1?p.unique(f):f,this.pushStack(f,"closest",a)},index:function(a){return a?typeof a=="string"?p.inArray(this[0],p(a)):p.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(a,b){var c=typeof a=="string"?p(a,b):p.makeArray(a&&a.nodeType?[a]:a),d=p.merge(this.get(),c);return this.pushStack(bh(c[0])||bh(d[0])?d:p.unique(d))},addBack:function(a){return this.add(a==null?this.prevObject:this.prevObject.filter(a))}}),p.fn.andSelf=p.fn.addBack,p.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return p.dir(a,"parentNode")},parentsUntil:function(a,b,c){return p.dir(a,"parentNode",c)},next:function(a){return bi(a,"nextSibling")},prev:function(a){return bi(a,"previousSibling")},nextAll:function(a){return p.dir(a,"nextSibling")},prevAll:function(a){return p.dir(a,"previousSibling")},nextUntil:function(a,b,c){return p.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return p.dir(a,"previousSibling",c)},siblings:function(a){return p.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return p.sibling(a.firstChild)},contents:function(a){return p.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:p.merge([],a.childNodes)}},function(a,b){p.fn[a]=function(c,d){var e=p.map(this,b,c);return bc.test(a)||(d=c),d&&typeof d=="string"&&(e=p.filter(d,e)),e=this.length>1&&!bg[a]?p.unique(e):e,this.length>1&&bd.test(a)&&(e=e.reverse()),this.pushStack(e,a,k.call(arguments).join(","))}}),p.extend({filter:function(a,b,c){return c&&(a=":not("+a+")"),b.length===1?p.find.matchesSelector(b[0],a)?[b[0]]:[]:p.find.matches(a,b)},dir:function(a,c,d){var e=[],f=a[c];while(f&&f.nodeType!==9&&(d===b||f.nodeType!==1||!p(f).is(d)))f.nodeType===1&&e.push(f),f=f[c];return e},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var bl="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",bm=/ jQuery\d+="(?:null|\d+)"/g,bn=/^\s+/,bo=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bp=/<([\w:]+)/,bq=/
  • ","
    "],tr:[2,"","
    "],td:[3,"","
    "],col:[2,"","
    "],area:[1,"",""],_default:[0,"",""]},bA=bk(e),bB=bA.appendChild(e.createElement("div"));bz.optgroup=bz.option,bz.tbody=bz.tfoot=bz.colgroup=bz.caption=bz.thead,bz.th=bz.td,p.support.htmlSerialize||(bz._default=[1,"X
    ","
    "]),p.fn.extend({text:function(a){return p.access(this,function(a){return a===b?p.text(this):this.empty().append((this[0]&&this[0].ownerDocument||e).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(p.isFunction(a))return this.each(function(b){p(this).wrapAll(a.call(this,b))});if(this[0]){var b=p(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return p.isFunction(a)?this.each(function(b){p(this).wrapInner(a.call(this,b))}):this.each(function(){var b=p(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=p.isFunction(a);return this.each(function(c){p(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){p.nodeName(this,"body")||p(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){(this.nodeType===1||this.nodeType===11)&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(a,this.firstChild)})},before:function(){if(!bh(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=p.clean(arguments);return this.pushStack(p.merge(a,this),"before",this.selector)}},after:function(){if(!bh(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=p.clean(arguments);return this.pushStack(p.merge(this,a),"after",this.selector)}},remove:function(a,b){var c,d=0;for(;(c=this[d])!=null;d++)if(!a||p.filter(a,[c]).length)!b&&c.nodeType===1&&(p.cleanData(c.getElementsByTagName("*")),p.cleanData([c])),c.parentNode&&c.parentNode.removeChild(c);return this},empty:function(){var a,b=0;for(;(a=this[b])!=null;b++){a.nodeType===1&&p.cleanData(a.getElementsByTagName("*"));while(a.firstChild)a.removeChild(a.firstChild)}return this},clone:function(a,b){return a=a==null?!1:a,b=b==null?a:b,this.map(function(){return p.clone(this,a,b)})},html:function(a){return p.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(bm,""):b;if(typeof a=="string"&&!bs.test(a)&&(p.support.htmlSerialize||!bu.test(a))&&(p.support.leadingWhitespace||!bn.test(a))&&!bz[(bp.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(bo,"<$1>");try{for(;d1&&typeof j=="string"&&bw.test(j))return this.each(function(){p(this).domManip(a,c,d)});if(p.isFunction(j))return this.each(function(e){var f=p(this);a[0]=j.call(this,e,c?f.html():b),f.domManip(a,c,d)});if(this[0]){e=p.buildFragment(a,this,k),g=e.fragment,f=g.firstChild,g.childNodes.length===1&&(g=f);if(f){c=c&&p.nodeName(f,"tr");for(h=e.cacheable||l-1;i0?this.clone(!0):this).get(),p(g[e])[b](d),f=f.concat(d);return this.pushStack(f,a,g.selector)}}),p.extend({clone:function(a,b,c){var d,e,f,g;p.support.html5Clone||p.isXMLDoc(a)||!bu.test("<"+a.nodeName+">")?g=a.cloneNode(!0):(bB.innerHTML=a.outerHTML,bB.removeChild(g=bB.firstChild));if((!p.support.noCloneEvent||!p.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!p.isXMLDoc(a)){bE(a,g),d=bF(a),e=bF(g);for(f=0;d[f];++f)e[f]&&bE(d[f],e[f])}if(b){bD(a,g);if(c){d=bF(a),e=bF(g);for(f=0;d[f];++f)bD(d[f],e[f])}}return d=e=null,g},clean:function(a,b,c,d){var f,g,h,i,j,k,l,m,n,o,q,r,s=b===e&&bA,t=[];if(!b||typeof b.createDocumentFragment=="undefined")b=e;for(f=0;(h=a[f])!=null;f++){typeof h=="number"&&(h+="");if(!h)continue;if(typeof h=="string")if(!br.test(h))h=b.createTextNode(h);else{s=s||bk(b),l=b.createElement("div"),s.appendChild(l),h=h.replace(bo,"<$1>"),i=(bp.exec(h)||["",""])[1].toLowerCase(),j=bz[i]||bz._default,k=j[0],l.innerHTML=j[1]+h+j[2];while(k--)l=l.lastChild;if(!p.support.tbody){m=bq.test(h),n=i==="table"&&!m?l.firstChild&&l.firstChild.childNodes:j[1]===""&&!m?l.childNodes:[];for(g=n.length-1;g>=0;--g)p.nodeName(n[g],"tbody")&&!n[g].childNodes.length&&n[g].parentNode.removeChild(n[g])}!p.support.leadingWhitespace&&bn.test(h)&&l.insertBefore(b.createTextNode(bn.exec(h)[0]),l.firstChild),h=l.childNodes,l.parentNode.removeChild(l)}h.nodeType?t.push(h):p.merge(t,h)}l&&(h=l=s=null);if(!p.support.appendChecked)for(f=0;(h=t[f])!=null;f++)p.nodeName(h,"input")?bG(h):typeof h.getElementsByTagName!="undefined"&&p.grep(h.getElementsByTagName("input"),bG);if(c){q=function(a){if(!a.type||bx.test(a.type))return d?d.push(a.parentNode?a.parentNode.removeChild(a):a):c.appendChild(a)};for(f=0;(h=t[f])!=null;f++)if(!p.nodeName(h,"script")||!q(h))c.appendChild(h),typeof h.getElementsByTagName!="undefined"&&(r=p.grep(p.merge([],h.getElementsByTagName("script")),q),t.splice.apply(t,[f+1,0].concat(r)),f+=r.length)}return t},cleanData:function(a,b){var c,d,e,f,g=0,h=p.expando,i=p.cache,j=p.support.deleteExpando,k=p.event.special;for(;(e=a[g])!=null;g++)if(b||p.acceptData(e)){d=e[h],c=d&&i[d];if(c){if(c.events)for(f in c.events)k[f]?p.event.remove(e,f):p.removeEvent(e,f,c.handle);i[d]&&(delete i[d],j?delete e[h]:e.removeAttribute?e.removeAttribute(h):e[h]=null,p.deletedIds.push(d))}}}}),function(){var a,b;p.uaMatch=function(a){a=a.toLowerCase();var b=/(chrome)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},a=p.uaMatch(g.userAgent),b={},a.browser&&(b[a.browser]=!0,b.version=a.version),b.chrome?b.webkit=!0:b.webkit&&(b.safari=!0),p.browser=b,p.sub=function(){function a(b,c){return new a.fn.init(b,c)}p.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function c(c,d){return d&&d instanceof p&&!(d instanceof a)&&(d=a(d)),p.fn.init.call(this,c,d,b)},a.fn.init.prototype=a.fn;var b=a(e);return a}}();var bH,bI,bJ,bK=/alpha\([^)]*\)/i,bL=/opacity=([^)]*)/,bM=/^(top|right|bottom|left)$/,bN=/^(none|table(?!-c[ea]).+)/,bO=/^margin/,bP=new RegExp("^("+q+")(.*)$","i"),bQ=new RegExp("^("+q+")(?!px)[a-z%]+$","i"),bR=new RegExp("^([-+])=("+q+")","i"),bS={},bT={position:"absolute",visibility:"hidden",display:"block"},bU={letterSpacing:0,fontWeight:400},bV=["Top","Right","Bottom","Left"],bW=["Webkit","O","Moz","ms"],bX=p.fn.toggle;p.fn.extend({css:function(a,c){return p.access(this,function(a,c,d){return d!==b?p.style(a,c,d):p.css(a,c)},a,c,arguments.length>1)},show:function(){return b$(this,!0)},hide:function(){return b$(this)},toggle:function(a,b){var c=typeof a=="boolean";return p.isFunction(a)&&p.isFunction(b)?bX.apply(this,arguments):this.each(function(){(c?a:bZ(this))?p(this).show():p(this).hide()})}}),p.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bH(a,"opacity");return c===""?"1":c}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":p.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!a||a.nodeType===3||a.nodeType===8||!a.style)return;var f,g,h,i=p.camelCase(c),j=a.style;c=p.cssProps[i]||(p.cssProps[i]=bY(j,i)),h=p.cssHooks[c]||p.cssHooks[i];if(d===b)return h&&"get"in h&&(f=h.get(a,!1,e))!==b?f:j[c];g=typeof d,g==="string"&&(f=bR.exec(d))&&(d=(f[1]+1)*f[2]+parseFloat(p.css(a,c)),g="number");if(d==null||g==="number"&&isNaN(d))return;g==="number"&&!p.cssNumber[i]&&(d+="px");if(!h||!("set"in h)||(d=h.set(a,d,e))!==b)try{j[c]=d}catch(k){}},css:function(a,c,d,e){var f,g,h,i=p.camelCase(c);return c=p.cssProps[i]||(p.cssProps[i]=bY(a.style,i)),h=p.cssHooks[c]||p.cssHooks[i],h&&"get"in h&&(f=h.get(a,!0,e)),f===b&&(f=bH(a,c)),f==="normal"&&c in bU&&(f=bU[c]),d||e!==b?(g=parseFloat(f),d||p.isNumeric(g)?g||0:f):f},swap:function(a,b,c){var d,e,f={};for(e in b)f[e]=a.style[e],a.style[e]=b[e];d=c.call(a);for(e in b)a.style[e]=f[e];return d}}),a.getComputedStyle?bH=function(b,c){var d,e,f,g,h=a.getComputedStyle(b,null),i=b.style;return h&&(d=h[c],d===""&&!p.contains(b.ownerDocument,b)&&(d=p.style(b,c)),bQ.test(d)&&bO.test(c)&&(e=i.width,f=i.minWidth,g=i.maxWidth,i.minWidth=i.maxWidth=i.width=d,d=h.width,i.width=e,i.minWidth=f,i.maxWidth=g)),d}:e.documentElement.currentStyle&&(bH=function(a,b){var c,d,e=a.currentStyle&&a.currentStyle[b],f=a.style;return e==null&&f&&f[b]&&(e=f[b]),bQ.test(e)&&!bM.test(b)&&(c=f.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":e,e=f.pixelLeft+"px",f.left=c,d&&(a.runtimeStyle.left=d)),e===""?"auto":e}),p.each(["height","width"],function(a,b){p.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth===0&&bN.test(bH(a,"display"))?p.swap(a,bT,function(){return cb(a,b,d)}):cb(a,b,d)},set:function(a,c,d){return b_(a,c,d?ca(a,b,d,p.support.boxSizing&&p.css(a,"boxSizing")==="border-box"):0)}}}),p.support.opacity||(p.cssHooks.opacity={get:function(a,b){return bL.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=p.isNumeric(b)?"alpha(opacity="+b*100+")":"",f=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&p.trim(f.replace(bK,""))===""&&c.removeAttribute){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bK.test(f)?f.replace(bK,e):f+" "+e}}),p(function(){p.support.reliableMarginRight||(p.cssHooks.marginRight={get:function(a,b){return p.swap(a,{display:"inline-block"},function(){if(b)return bH(a,"marginRight")})}}),!p.support.pixelPosition&&p.fn.position&&p.each(["top","left"],function(a,b){p.cssHooks[b]={get:function(a,c){if(c){var d=bH(a,b);return bQ.test(d)?p(a).position()[b]+"px":d}}}})}),p.expr&&p.expr.filters&&(p.expr.filters.hidden=function(a){return a.offsetWidth===0&&a.offsetHeight===0||!p.support.reliableHiddenOffsets&&(a.style&&a.style.display||bH(a,"display"))==="none"},p.expr.filters.visible=function(a){return!p.expr.filters.hidden(a)}),p.each({margin:"",padding:"",border:"Width"},function(a,b){p.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bV[d]+b]=e[d]||e[d-2]||e[0];return f}},bO.test(a)||(p.cssHooks[a+b].set=b_)});var cd=/%20/g,ce=/\[\]$/,cf=/\r?\n/g,cg=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,ch=/^(?:select|textarea)/i;p.fn.extend({serialize:function(){return p.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?p.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ch.test(this.nodeName)||cg.test(this.type))}).map(function(a,b){var c=p(this).val();return c==null?null:p.isArray(c)?p.map(c,function(a,c){return{name:b.name,value:a.replace(cf,"\r\n")}}):{name:b.name,value:c.replace(cf,"\r\n")}}).get()}}),p.param=function(a,c){var d,e=[],f=function(a,b){b=p.isFunction(b)?b():b==null?"":b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=p.ajaxSettings&&p.ajaxSettings.traditional);if(p.isArray(a)||a.jquery&&!p.isPlainObject(a))p.each(a,function(){f(this.name,this.value)});else for(d in a)ci(d,a[d],c,f);return e.join("&").replace(cd,"+")};var cj,ck,cl=/#.*$/,cm=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,cn=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,co=/^(?:GET|HEAD)$/,cp=/^\/\//,cq=/\?/,cr=/)<[^<]*)*<\/script>/gi,cs=/([?&])_=[^&]*/,ct=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,cu=p.fn.load,cv={},cw={},cx=["*/"]+["*"];try{ck=f.href}catch(cy){ck=e.createElement("a"),ck.href="",ck=ck.href}cj=ct.exec(ck.toLowerCase())||[],p.fn.load=function(a,c,d){if(typeof a!="string"&&cu)return cu.apply(this,arguments);if(!this.length)return this;var e,f,g,h=this,i=a.indexOf(" ");return i>=0&&(e=a.slice(i,a.length),a=a.slice(0,i)),p.isFunction(c)?(d=c,c=b):c&&typeof c=="object"&&(f="POST"),p.ajax({url:a,type:f,dataType:"html",data:c,complete:function(a,b){d&&h.each(d,g||[a.responseText,b,a])}}).done(function(a){g=arguments,h.html(e?p("
    ").append(a.replace(cr,"")).find(e):a)}),this},p.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){p.fn[b]=function(a){return this.on(b,a)}}),p.each(["get","post"],function(a,c){p[c]=function(a,d,e,f){return p.isFunction(d)&&(f=f||e,e=d,d=b),p.ajax({type:c,url:a,data:d,success:e,dataType:f})}}),p.extend({getScript:function(a,c){return p.get(a,b,c,"script")},getJSON:function(a,b,c){return p.get(a,b,c,"json")},ajaxSetup:function(a,b){return b?cB(a,p.ajaxSettings):(b=a,a=p.ajaxSettings),cB(a,b),a},ajaxSettings:{url:ck,isLocal:cn.test(cj[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":cx},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":p.parseJSON,"text xml":p.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:cz(cv),ajaxTransport:cz(cw),ajax:function(a,c){function y(a,c,f,i){var k,s,t,u,w,y=c;if(v===2)return;v=2,h&&clearTimeout(h),g=b,e=i||"",x.readyState=a>0?4:0,f&&(u=cC(l,x,f));if(a>=200&&a<300||a===304)l.ifModified&&(w=x.getResponseHeader("Last-Modified"),w&&(p.lastModified[d]=w),w=x.getResponseHeader("Etag"),w&&(p.etag[d]=w)),a===304?(y="notmodified",k=!0):(k=cD(l,u),y=k.state,s=k.data,t=k.error,k=!t);else{t=y;if(!y||a)y="error",a<0&&(a=0)}x.status=a,x.statusText=(c||y)+"",k?o.resolveWith(m,[s,y,x]):o.rejectWith(m,[x,y,t]),x.statusCode(r),r=b,j&&n.trigger("ajax"+(k?"Success":"Error"),[x,l,k?s:t]),q.fireWith(m,[x,y]),j&&(n.trigger("ajaxComplete",[x,l]),--p.active||p.event.trigger("ajaxStop"))}typeof a=="object"&&(c=a,a=b),c=c||{};var d,e,f,g,h,i,j,k,l=p.ajaxSetup({},c),m=l.context||l,n=m!==l&&(m.nodeType||m instanceof p)?p(m):p.event,o=p.Deferred(),q=p.Callbacks("once memory"),r=l.statusCode||{},t={},u={},v=0,w="canceled",x={readyState:0,setRequestHeader:function(a,b){if(!v){var c=a.toLowerCase();a=u[c]=u[c]||a,t[a]=b}return this},getAllResponseHeaders:function(){return v===2?e:null},getResponseHeader:function(a){var c;if(v===2){if(!f){f={};while(c=cm.exec(e))f[c[1].toLowerCase()]=c[2]}c=f[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){return v||(l.mimeType=a),this},abort:function(a){return a=a||w,g&&g.abort(a),y(0,a),this}};o.promise(x),x.success=x.done,x.error=x.fail,x.complete=q.add,x.statusCode=function(a){if(a){var b;if(v<2)for(b in a)r[b]=[r[b],a[b]];else b=a[x.status],x.always(b)}return this},l.url=((a||l.url)+"").replace(cl,"").replace(cp,cj[1]+"//"),l.dataTypes=p.trim(l.dataType||"*").toLowerCase().split(s),l.crossDomain==null&&(i=ct.exec(l.url.toLowerCase())||!1,l.crossDomain=i&&i.join(":")+(i[3]?"":i[1]==="http:"?80:443)!==cj.join(":")+(cj[3]?"":cj[1]==="http:"?80:443)),l.data&&l.processData&&typeof l.data!="string"&&(l.data=p.param(l.data,l.traditional)),cA(cv,l,c,x);if(v===2)return x;j=l.global,l.type=l.type.toUpperCase(),l.hasContent=!co.test(l.type),j&&p.active++===0&&p.event.trigger("ajaxStart");if(!l.hasContent){l.data&&(l.url+=(cq.test(l.url)?"&":"?")+l.data,delete l.data),d=l.url;if(l.cache===!1){var z=p.now(),A=l.url.replace(cs,"$1_="+z);l.url=A+(A===l.url?(cq.test(l.url)?"&":"?")+"_="+z:"")}}(l.data&&l.hasContent&&l.contentType!==!1||c.contentType)&&x.setRequestHeader("Content-Type",l.contentType),l.ifModified&&(d=d||l.url,p.lastModified[d]&&x.setRequestHeader("If-Modified-Since",p.lastModified[d]),p.etag[d]&&x.setRequestHeader("If-None-Match",p.etag[d])),x.setRequestHeader("Accept",l.dataTypes[0]&&l.accepts[l.dataTypes[0]]?l.accepts[l.dataTypes[0]]+(l.dataTypes[0]!=="*"?", "+cx+"; q=0.01":""):l.accepts["*"]);for(k in l.headers)x.setRequestHeader(k,l.headers[k]);if(!l.beforeSend||l.beforeSend.call(m,x,l)!==!1&&v!==2){w="abort";for(k in{success:1,error:1,complete:1})x[k](l[k]);g=cA(cw,l,c,x);if(!g)y(-1,"No Transport");else{x.readyState=1,j&&n.trigger("ajaxSend",[x,l]),l.async&&l.timeout>0&&(h=setTimeout(function(){x.abort("timeout")},l.timeout));try{v=1,g.send(t,y)}catch(B){if(v<2)y(-1,B);else throw B}}return x}return x.abort()},active:0,lastModified:{},etag:{}});var cE=[],cF=/\?/,cG=/(=)\?(?=&|$)|\?\?/,cH=p.now();p.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=cE.pop()||p.expando+"_"+cH++;return this[a]=!0,a}}),p.ajaxPrefilter("json jsonp",function(c,d,e){var f,g,h,i=c.data,j=c.url,k=c.jsonp!==!1,l=k&&cG.test(j),m=k&&!l&&typeof i=="string"&&!(c.contentType||"").indexOf("application/x-www-form-urlencoded")&&cG.test(i);if(c.dataTypes[0]==="jsonp"||l||m)return f=c.jsonpCallback=p.isFunction(c.jsonpCallback)?c.jsonpCallback():c.jsonpCallback,g=a[f],l?c.url=j.replace(cG,"$1"+f):m?c.data=i.replace(cG,"$1"+f):k&&(c.url+=(cF.test(j)?"&":"?")+c.jsonp+"="+f),c.converters["script json"]=function(){return h||p.error(f+" was not called"),h[0]},c.dataTypes[0]="json",a[f]=function(){h=arguments},e.always(function(){a[f]=g,c[f]&&(c.jsonpCallback=d.jsonpCallback,cE.push(f)),h&&p.isFunction(g)&&g(h[0]),h=g=b}),"script"}),p.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){return p.globalEval(a),a}}}),p.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),p.ajaxTransport("script",function(a){if(a.crossDomain){var c,d=e.head||e.getElementsByTagName("head")[0]||e.documentElement;return{send:function(f,g){c=e.createElement("script"),c.async="async",a.scriptCharset&&(c.charset=a.scriptCharset),c.src=a.url,c.onload=c.onreadystatechange=function(a,e){if(e||!c.readyState||/loaded|complete/.test(c.readyState))c.onload=c.onreadystatechange=null,d&&c.parentNode&&d.removeChild(c),c=b,e||g(200,"success")},d.insertBefore(c,d.firstChild)},abort:function(){c&&c.onload(0,1)}}}});var cI,cJ=a.ActiveXObject?function(){for(var a in cI)cI[a](0,1)}:!1,cK=0;p.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&cL()||cM()}:cL,function(a){p.extend(p.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(p.ajaxSettings.xhr()),p.support.ajax&&p.ajaxTransport(function(c){if(!c.crossDomain||p.support.cors){var d;return{send:function(e,f){var g,h,i=c.xhr();c.username?i.open(c.type,c.url,c.async,c.username,c.password):i.open(c.type,c.url,c.async);if(c.xhrFields)for(h in c.xhrFields)i[h]=c.xhrFields[h];c.mimeType&&i.overrideMimeType&&i.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(h in e)i.setRequestHeader(h,e[h])}catch(j){}i.send(c.hasContent&&c.data||null),d=function(a,e){var h,j,k,l,m;try{if(d&&(e||i.readyState===4)){d=b,g&&(i.onreadystatechange=p.noop,cJ&&delete cI[g]);if(e)i.readyState!==4&&i.abort();else{h=i.status,k=i.getAllResponseHeaders(),l={},m=i.responseXML,m&&m.documentElement&&(l.xml=m);try{l.text=i.responseText}catch(a){}try{j=i.statusText}catch(n){j=""}!h&&c.isLocal&&!c.crossDomain?h=l.text?200:404:h===1223&&(h=204)}}}catch(o){e||f(-1,o)}l&&f(h,j,l,k)},c.async?i.readyState===4?setTimeout(d,0):(g=++cK,cJ&&(cI||(cI={},p(a).unload(cJ)),cI[g]=d),i.onreadystatechange=d):d()},abort:function(){d&&d(0,1)}}}});var cN,cO,cP=/^(?:toggle|show|hide)$/,cQ=new RegExp("^(?:([-+])=|)("+q+")([a-z%]*)$","i"),cR=/queueHooks$/,cS=[cY],cT={"*":[function(a,b){var c,d,e=this.createTween(a,b),f=cQ.exec(b),g=e.cur(),h=+g||0,i=1,j=20;if(f){c=+f[2],d=f[3]||(p.cssNumber[a]?"":"px");if(d!=="px"&&h){h=p.css(e.elem,a,!0)||c||1;do i=i||".5",h=h/i,p.style(e.elem,a,h+d);while(i!==(i=e.cur()/g)&&i!==1&&--j)}e.unit=d,e.start=h,e.end=f[1]?h+(f[1]+1)*c:c}return e}]};p.Animation=p.extend(cW,{tweener:function(a,b){p.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");var c,d=0,e=a.length;for(;d-1,j={},k={},l,m;i?(k=e.position(),l=k.top,m=k.left):(l=parseFloat(g)||0,m=parseFloat(h)||0),p.isFunction(b)&&(b=b.call(a,c,f)),b.top!=null&&(j.top=b.top-f.top+l),b.left!=null&&(j.left=b.left-f.left+m),"using"in b?b.using.call(a,j):e.css(j)}},p.fn.extend({position:function(){if(!this[0])return;var a=this[0],b=this.offsetParent(),c=this.offset(),d=c_.test(b[0].nodeName)?{top:0,left:0}:b.offset();return c.top-=parseFloat(p.css(a,"marginTop"))||0,c.left-=parseFloat(p.css(a,"marginLeft"))||0,d.top+=parseFloat(p.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(p.css(b[0],"borderLeftWidth"))||0,{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||e.body;while(a&&!c_.test(a.nodeName)&&p.css(a,"position")==="static")a=a.offsetParent;return a||e.body})}}),p.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);p.fn[a]=function(e){return p.access(this,function(a,e,f){var g=da(a);if(f===b)return g?c in g?g[c]:g.document.documentElement[e]:a[e];g?g.scrollTo(d?p(g).scrollLeft():f,d?f:p(g).scrollTop()):a[e]=f},a,e,arguments.length,null)}}),p.each({Height:"height",Width:"width"},function(a,c){p.each({padding:"inner"+a,content:c,"":"outer"+a},function(d,e){p.fn[e]=function(e,f){var g=arguments.length&&(d||typeof e!="boolean"),h=d||(e===!0||f===!0?"margin":"border");return p.access(this,function(c,d,e){var f;return p.isWindow(c)?c.document.documentElement["client"+a]:c.nodeType===9?(f=c.documentElement,Math.max(c.body["scroll"+a],f["scroll"+a],c.body["offset"+a],f["offset"+a],f["client"+a])):e===b?p.css(c,d,e,h):p.style(c,d,e,h)},c,g?e:b,g,null)}})}),a.jQuery=a.$=p,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return p})})(window); \ No newline at end of file diff --git a/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/jquery.treeview.css b/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/jquery.treeview.css deleted file mode 100644 index e76af86..0000000 --- a/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/jquery.treeview.css +++ /dev/null @@ -1,57 +0,0 @@ -/* https://github.com/jzaefferer/jquery-treeview/blob/master/jquery.treeview.css */ -/* License: MIT. */ -.treeview, .treeview ul { - padding: 0; - margin: 0; - list-style: none; -} - -.treeview ul { - background-color: white; - margin-top: 4px; -} - -.treeview .hitarea { - height: 16px; - width: 16px; - margin-left: -16px; - float: left; - cursor: pointer; -} -/* fix for IE6 */ -* html .hitarea { - display: inline; - float:none; -} - -.treeview li { - margin: 0; - padding: 3px 0pt 3px 16px; -} - -.treeview a.selected { - background-color: #eee; -} - -#treecontrol { margin: 1em 0; display: none; } - -.treeview .hover { color: red; cursor: pointer; } - -.treeview li.collapsable, .treeview li.expandable { background-position: 0 -176px; } - -.treeview .expandable-hitarea { background-position: -80px -3px; } - -.treeview li.last { background-position: 0 -1766px } -.treeview li.lastCollapsable { background-position: 0 -111px } -.treeview li.lastExpandable { background-position: -32px -67px } - -.treeview div.lastCollapsable-hitarea, .treeview div.lastExpandable-hitarea { background-position: 0; } - -.treeview .placeholder { - height: 16px; - width: 16px; - display: block; -} - -.filetree li { padding: 3px 0 2px 16px; } -.filetree span.folder, .filetree span.file { padding: 1px 0 1px 16px; display: block; } diff --git a/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/jquery.treeview.edit.js b/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/jquery.treeview.edit.js deleted file mode 100644 index 9895b02..0000000 --- a/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/jquery.treeview.edit.js +++ /dev/null @@ -1,39 +0,0 @@ -/* https://github.com/jzaefferer/jquery-treeview/blob/master/jquery.treeview.edit.js */ -/* License: MIT. */ -(function($) { - var CLASSES = $.treeview.classes; - var proxied = $.fn.treeview; - $.fn.treeview = function(settings) { - settings = $.extend({}, settings); - if (settings.add) { - return this.trigger("add", [settings.add]); - } - if (settings.remove) { - return this.trigger("remove", [settings.remove]); - } - return proxied.apply(this, arguments).bind("add", function(event, branches) { - $(branches).prev() - .removeClass(CLASSES.last) - .removeClass(CLASSES.lastCollapsable) - .removeClass(CLASSES.lastExpandable) - .find(">.hitarea") - .removeClass(CLASSES.lastCollapsableHitarea) - .removeClass(CLASSES.lastExpandableHitarea); - $(branches).find("li").andSelf().prepareBranches(settings).applyClasses(settings, $(this).data("toggler")); - }).bind("remove", function(event, branches) { - var prev = $(branches).prev(); - var parent = $(branches).parent(); - $(branches).remove(); - prev.filter(":last-child").addClass(CLASSES.last) - .filter("." + CLASSES.expandable).replaceClass(CLASSES.last, CLASSES.lastExpandable).end() - .find(">.hitarea").replaceClass(CLASSES.expandableHitarea, CLASSES.lastExpandableHitarea).end() - .filter("." + CLASSES.collapsable).replaceClass(CLASSES.last, CLASSES.lastCollapsable).end() - .find(">.hitarea").replaceClass(CLASSES.collapsableHitarea, CLASSES.lastCollapsableHitarea); - if (parent.is(":not(:has(>))") && parent[0] != this) { - parent.parent().removeClass(CLASSES.collapsable).removeClass(CLASSES.expandable) - parent.siblings(".hitarea").andSelf().remove(); - } - }); - }; - -})(jQuery); diff --git a/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/jquery.treeview.js b/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/jquery.treeview.js deleted file mode 100644 index 356af23..0000000 --- a/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/jquery.treeview.js +++ /dev/null @@ -1,256 +0,0 @@ -/* - * Treeview 1.4.1 - jQuery plugin to hide and show branches of a tree - * - * http://bassistance.de/jquery-plugins/jquery-plugin-treeview/ - * http://docs.jquery.com/Plugins/Treeview - * - * Copyright (c) 2007 Jörn Zaefferer - * - * Dual licensed under the MIT and GPL licenses: - * http://www.opensource.org/licenses/mit-license.php - * http://www.gnu.org/licenses/gpl.html - * - * Revision: $Id: jquery.treeview.js 5759 2008-07-01 07:50:28Z joern.zaefferer $ - * - */ - -;(function($) { - - // TODO rewrite as a widget, removing all the extra plugins - $.extend($.fn, { - swapClass: function(c1, c2) { - var c1Elements = this.filter('.' + c1); - this.filter('.' + c2).removeClass(c2).addClass(c1); - c1Elements.removeClass(c1).addClass(c2); - return this; - }, - replaceClass: function(c1, c2) { - return this.filter('.' + c1).removeClass(c1).addClass(c2).end(); - }, - hoverClass: function(className) { - className = className || "hover"; - return this.hover(function() { - $(this).addClass(className); - }, function() { - $(this).removeClass(className); - }); - }, - heightToggle: function(animated, callback) { - animated ? - this.animate({ height: "toggle" }, animated, callback) : - this.each(function(){ - jQuery(this)[ jQuery(this).is(":hidden") ? "show" : "hide" ](); - if(callback) - callback.apply(this, arguments); - }); - }, - heightHide: function(animated, callback) { - if (animated) { - this.animate({ height: "hide" }, animated, callback); - } else { - this.hide(); - if (callback) - this.each(callback); - } - }, - prepareBranches: function(settings) { - if (!settings.prerendered) { - // mark last tree items - this.filter(":last-child:not(ul)").addClass(CLASSES.last); - // collapse whole tree, or only those marked as closed, anyway except those marked as open - this.filter((settings.collapsed ? "" : "." + CLASSES.closed) + ":not(." + CLASSES.open + ")").find(">ul").hide(); - } - // return all items with sublists - return this.filter(":has(>ul)"); - }, - applyClasses: function(settings, toggler) { - // TODO use event delegation - this.filter(":has(>ul):not(:has(>a))").find(">span").unbind("click.treeview").bind("click.treeview", function(event) { - // don't handle click events on children, eg. checkboxes - if ( this == event.target ) - toggler.apply($(this).next()); - }).add( $("a", this) ).hoverClass(); - - if (!settings.prerendered) { - // handle closed ones first - this.filter(":has(>ul:hidden)") - .addClass(CLASSES.expandable) - .replaceClass(CLASSES.last, CLASSES.lastExpandable); - - // handle open ones - this.not(":has(>ul:hidden)") - .addClass(CLASSES.collapsable) - .replaceClass(CLASSES.last, CLASSES.lastCollapsable); - - // create hitarea if not present - var hitarea = this.find("div." + CLASSES.hitarea); - if (!hitarea.length) - hitarea = this.prepend("
    ").find("div." + CLASSES.hitarea); - hitarea.removeClass().addClass(CLASSES.hitarea).each(function() { - var classes = ""; - $.each($(this).parent().attr("class").split(" "), function() { - classes += this + "-hitarea "; - }); - $(this).addClass( classes ); - }) - } - - // apply event to hitarea - this.find("div." + CLASSES.hitarea).click( toggler ); - }, - treeview: function(settings) { - - settings = $.extend({ - cookieId: "treeview" - }, settings); - - if ( settings.toggle ) { - var callback = settings.toggle; - settings.toggle = function() { - return callback.apply($(this).parent()[0], arguments); - }; - } - - // factory for treecontroller - function treeController(tree, control) { - // factory for click handlers - function handler(filter) { - return function() { - // reuse toggle event handler, applying the elements to toggle - // start searching for all hitareas - toggler.apply( $("div." + CLASSES.hitarea, tree).filter(function() { - // for plain toggle, no filter is provided, otherwise we need to check the parent element - return filter ? $(this).parent("." + filter).length : true; - }) ); - return false; - }; - } - // click on first element to collapse tree - $("a:eq(0)", control).click( handler(CLASSES.collapsable) ); - // click on second to expand tree - $("a:eq(1)", control).click( handler(CLASSES.expandable) ); - // click on third to toggle tree - $("a:eq(2)", control).click( handler() ); - } - - // handle toggle event - function toggler() { - $(this) - .parent() - // swap classes for hitarea - .find(">.hitarea") - .swapClass( CLASSES.collapsableHitarea, CLASSES.expandableHitarea ) - .swapClass( CLASSES.lastCollapsableHitarea, CLASSES.lastExpandableHitarea ) - .end() - // swap classes for parent li - .swapClass( CLASSES.collapsable, CLASSES.expandable ) - .swapClass( CLASSES.lastCollapsable, CLASSES.lastExpandable ) - // find child lists - .find( ">ul" ) - // toggle them - .heightToggle( settings.animated, settings.toggle ); - if ( settings.unique ) { - $(this).parent() - .siblings() - // swap classes for hitarea - .find(">.hitarea") - .replaceClass( CLASSES.collapsableHitarea, CLASSES.expandableHitarea ) - .replaceClass( CLASSES.lastCollapsableHitarea, CLASSES.lastExpandableHitarea ) - .end() - .replaceClass( CLASSES.collapsable, CLASSES.expandable ) - .replaceClass( CLASSES.lastCollapsable, CLASSES.lastExpandable ) - .find( ">ul" ) - .heightHide( settings.animated, settings.toggle ); - } - } - this.data("toggler", toggler); - - function serialize() { - function binary(arg) { - return arg ? 1 : 0; - } - var data = []; - branches.each(function(i, e) { - data[i] = $(e).is(":has(>ul:visible)") ? 1 : 0; - }); - $.cookie(settings.cookieId, data.join(""), settings.cookieOptions ); - } - - function deserialize() { - var stored = $.cookie(settings.cookieId); - if ( stored ) { - var data = stored.split(""); - branches.each(function(i, e) { - $(e).find(">ul")[ parseInt(data[i]) ? "show" : "hide" ](); - }); - } - } - - // add treeview class to activate styles - this.addClass("treeview"); - - // prepare branches and find all tree items with child lists - var branches = this.find("li").prepareBranches(settings); - - switch(settings.persist) { - case "cookie": - var toggleCallback = settings.toggle; - settings.toggle = function() { - serialize(); - if (toggleCallback) { - toggleCallback.apply(this, arguments); - } - }; - deserialize(); - break; - case "location": - var current = this.find("a").filter(function() { - return this.href.toLowerCase() == location.href.toLowerCase(); - }); - if ( current.length ) { - // TODO update the open/closed classes - var items = current.addClass("selected").parents("ul, li").add( current.next() ).show(); - if (settings.prerendered) { - // if prerendered is on, replicate the basic class swapping - items.filter("li") - .swapClass( CLASSES.collapsable, CLASSES.expandable ) - .swapClass( CLASSES.lastCollapsable, CLASSES.lastExpandable ) - .find(">.hitarea") - .swapClass( CLASSES.collapsableHitarea, CLASSES.expandableHitarea ) - .swapClass( CLASSES.lastCollapsableHitarea, CLASSES.lastExpandableHitarea ); - } - } - break; - } - - branches.applyClasses(settings, toggler); - - // if control option is set, create the treecontroller and show it - if ( settings.control ) { - treeController(this, settings.control); - $(settings.control).show(); - } - - return this; - } - }); - - // classes used by the plugin - // need to be styled via external stylesheet, see first example - $.treeview = {}; - var CLASSES = ($.treeview.classes = { - open: "open", - closed: "closed", - expandable: "expandable", - expandableHitarea: "expandable-hitarea", - lastExpandableHitarea: "lastExpandable-hitarea", - collapsable: "collapsable", - collapsableHitarea: "collapsable-hitarea", - lastCollapsableHitarea: "lastCollapsable-hitarea", - lastCollapsable: "lastCollapsable", - lastExpandable: "lastExpandable", - last: "last", - hitarea: "hitarea" - }); - -})(jQuery); diff --git a/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/methodset.html b/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/methodset.html deleted file mode 100644 index 1b339e3..0000000 --- a/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/methodset.html +++ /dev/null @@ -1,9 +0,0 @@ - diff --git a/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/opensearch.xml b/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/opensearch.xml deleted file mode 100644 index 1b652db..0000000 --- a/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/opensearch.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - godoc - The Go Programming Language - go golang - - - /favicon.ico - UTF-8 - UTF-8 - diff --git a/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/package_default.html b/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/package_default.html deleted file mode 100644 index 427ce82..0000000 --- a/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/package_default.html +++ /dev/null @@ -1,244 +0,0 @@ - - -{{with .PDoc}} - - - {{if $.IsMain}} - {{/* command documentation */}} - {{comment_html .Doc}} - {{else}} - {{/* package documentation */}} -
    -
    -
    import "github.com/aws/aws-sdk-go/{{html .ImportPath}}"
    -
    -
    -
    Overview
    -
    Index
    - {{if $.Examples}} -
    Examples
    - {{end}} -
    -
    - -
    - -
    -

    Overview ▾

    - {{comment_html .Doc}} -
    -
    - {{example_html $ ""}} - -
    - -
    -

    Index ▾

    - - -
    -
    - {{if .Consts}} -
    Constants
    - {{end}} - {{if .Vars}} -
    Variables
    - {{end}} - {{range .Funcs}} - {{$name_html := html .Name}} -
    {{node_html $ .Decl false | sanitize}}
    - {{end}} - {{range .Types}} - {{$tname_html := html .Name}} -
    type {{$tname_html}}
    - {{range .Funcs}} - {{$name_html := html .Name}} -
        {{node_html $ .Decl false | sanitize}}
    - {{end}} - {{range .Methods}} - {{$name_html := html .Name}} -
        {{node_html $ .Decl false | sanitize}}
    - {{end}} - {{end}} - {{if $.Notes}} - {{range $marker, $item := $.Notes}} -
    {{noteTitle $marker | html}}s
    - {{end}} - {{end}} -
    -
    - - {{if $.Examples}} -
    -

    Examples

    -
    - {{range $.Examples}} -
    {{example_name .Name}}
    - {{end}} -
    -
    - {{end}} - - {{with .Filenames}} -

    Package files

    -

    - - {{range .}} - {{.|filename|html}} - {{end}} - -

    - {{end}} -
    -
    - - - - {{with .Consts}} -

    Constants

    - {{range .}} -
    {{node_html $ .Decl true}}
    - {{comment_html .Doc}} - {{end}} - {{end}} - {{with .Vars}} -

    Variables

    - {{range .}} -
    {{node_html $ .Decl true}}
    - {{comment_html .Doc}} - {{end}} - {{end}} - {{range .Funcs}} - {{/* Name is a string - no need for FSet */}} - {{$name_html := html .Name}} -

    func {{$name_html}}

    -
    {{node_html $ .Decl true}}
    - {{comment_html .Doc}} - {{example_html $ .Name}} - {{callgraph_html $ "" .Name}} - - {{end}} - {{range .Types}} - {{$tname := .Name}} - {{$tname_html := html .Name}} -

    type {{$tname_html}}

    -
    {{node_html $ .Decl true}}
    - {{comment_html .Doc}} - - {{range .Consts}} -
    {{node_html $ .Decl true}}
    - {{comment_html .Doc}} - {{end}} - - {{range .Vars}} -
    {{node_html $ .Decl true}}
    - {{comment_html .Doc}} - {{end}} - - {{example_html $ $tname}} - {{implements_html $ $tname}} - {{methodset_html $ $tname}} - - {{range .Funcs}} - {{$name_html := html .Name}} -

    func {{$name_html}}

    -
    {{node_html $ .Decl true}}
    - {{comment_html .Doc}} - {{example_html $ .Name}} - {{callgraph_html $ "" .Name}} - {{end}} - - {{range .Methods}} - {{$name_html := html .Name}} -

    func ({{html .Recv}}) {{$name_html}}

    -
    {{node_html $ .Decl true}}
    - {{comment_html .Doc}} - {{$name := printf "%s_%s" $tname .Name}} - {{example_html $ $name}} - {{callgraph_html $ .Recv .Name}} - {{end}} - {{end}} - {{end}} - - {{with $.Notes}} - {{range $marker, $content := .}} -

    {{noteTitle $marker | html}}s

    -
      - {{range .}} -
    • {{html .Body}}
    • - {{end}} -
    - {{end}} - {{end}} -{{end}} - -{{with .PAst}} - {{range $filename, $ast := .}} - {{$filename|filename|html}}:
    {{node_html $ $ast false}}
    - {{end}} -{{end}} - -{{with .Dirs}} - {{if eq $.Dirname "/src"}} - -

    Standard library

    - {{end}} -{{end}} diff --git a/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/package_service.html b/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/package_service.html deleted file mode 100644 index 83b260c..0000000 --- a/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/package_service.html +++ /dev/null @@ -1,289 +0,0 @@ - - -{{with .PDoc}} - - {{if $.IsMain}} - {{/* command documentation */}} - {{comment_html .Doc}} - {{else}} - {{/* package documentation */}} -
    -
    -
    import "github.com/aws/aws-sdk-go/{{html .ImportPath}}"
    -
    -
    -
    Overview
    - {{if .Consts}} -
    Constants
    - {{end}} - {{if $.Examples}} -
    Examples
    - {{end}} -
    -
    - -
    - -
    -

    Overview ▾

    - {{comment_html .Doc}} -

    - {{if ne $.IfaceLink ""}} - The stub package, {{$.PDoc.Name}}iface, can be used to provide alternative implementations of service clients, - such as mocking the client for testing. - {{end}} - -

    -
    - {{example_html $ ""}} - -
    - -
    -

    Operations ▾

    - - -
    -
    - {{range .Funcs}} - {{$name_html := html .Name}} -
    {{node_html $ .Decl false | sanitize}}
    - {{end}} - {{range .Types}} - {{$tname_html := html .Name}} - {{range .Funcs}} - {{$name_html := html .Name}} -
    {{node_html $ .Decl false | sanitize}}
    - {{end}} - {{range .Methods}} - {{if (and (ne .Name "String") (ne .Name "GoString")) }} - {{ if (not (is_setter $.PDoc.Name .)) }} - {{ if (not (is_paginator .)) }} - {{ if (ne .Name "Validate") }} - {{$name_html := html .Name}} - {{ if not (is_op_deprecated $.PDoc.Name .Name) -}} -
    {{client_html $ .Decl false | sanitize}}
    - {{ end -}} - {{end}} - {{end}} - {{end}} - {{end}} - {{end}} - {{if $.Notes}} - {{range $marker, $item := $.Notes}} -
    {{noteTitle $marker | html}}s
    - {{end}} - {{end}} - {{end}} -
    -
    -
    -
    - {{ if $.HasPaginators }} -
    - -
    -

    Paginators ▾

    - {{range .Types -}} - {{$tname_html := html .Name}} - {{range .Methods -}} - {{if is_paginator . -}} - {{$name_html := html .Name}} -
    {{client_html $ .Decl false | sanitize}}
    - {{end }} - {{ end }} - {{ end }} -
    -
    - {{ end }} -
    - -
    -

    Types ▾

    - {{if .Vars}} -
    Variables
    - {{end}} -
    - {{range .Types}} - {{$tname_html := html .Name}} -
    type {{$tname_html}} - {{range .Methods}} - {{ if is_setter $.PDoc.Name .}} - {{$name_html := html .Name}} -
    {{name_only_html $ . | sanitize}}
    - {{end}} - {{end}} - {{end}} -
    -
    -
    - - {{if $.Examples}} -
    - -
    -

    Examples ▾

    -
    -
    - {{range $.Examples}} -
    {{example_name .Name}}
    - {{end}} -
    -
    -
    -
    - {{end}} - - - - {{with .Consts}} -
    - -
    -

    Constants ▾

    - {{range .}} -
    {{node_html $ .Decl true}}
    - {{comment_html .Doc}} - {{end}} -
    -
    - {{end}} - {{with .Vars}} -

    Variables

    - {{range .}} -
    {{node_html $ .Decl true}}
    - {{comment_html .Doc}} - {{end}} - {{end}} - {{range .Funcs}} - {{/* Name is a string - no need for FSet */}} - {{$name_html := html .Name}} -

    func {{$name_html}}

    -
    {{node_html $ .Decl true}}
    - {{comment_html .Doc}} - {{example_html $ .Name}} - {{callgraph_html $ "" .Name}} - - {{end}} - {{range .Types}} - {{$tname := .Name}} - {{$tname_html := html .Name}} -

    type {{$tname_html}}

    -
    {{node_html $ .Decl true}}
    - {{comment_html .Doc}} - - {{range .Consts}} -
    {{node_html $ .Decl true}}
    - {{comment_html .Doc}} - {{end}} - - {{range .Vars}} -
    {{node_html $ .Decl true}}
    - {{comment_html .Doc}} - {{end}} - - {{example_html $ $tname}} - {{implements_html $ $tname}} - {{methodset_html $ $tname}} - - {{range .Funcs}} - {{$name_html := html .Name}} -

    func {{$name_html}}

    -
    {{node_html $ .Decl true}}
    - {{comment_html .Doc}} - {{example_html $ .Name}} - {{callgraph_html $ "" .Name}} - {{end}} - - {{range .Methods}} - {{$name_html := html .Name}} - {{ if is_op_deprecated $.PDoc.Name .Name -}} -

    func ({{html .Recv}}) {{$name_html}}
    Deprecated

    - {{ else }} -

    func ({{html .Recv}}) {{$name_html}}

    - {{ end -}} -
    {{node_html $ .Decl true}}
    - {{comment_html .Doc}} - {{$name := printf "%s_%s" $tname .Name}} - {{example_html $ $name}} - {{callgraph_html $ .Recv .Name}} - {{end}} - {{end}} - {{end}} - - {{with $.Notes}} - {{range $marker, $content := .}} -

    {{noteTitle $marker | html}}s

    -
      - {{range .}} -
    • {{html .Body}}
    • - {{end}} -
    - {{end}} - {{end}} -{{end}} - -{{with .PAst}} - {{range $filename, $ast := .}} - {{$filename|filename|html}}:
    {{node_html $ $ast false}}
    - {{end}} -{{end}} diff --git a/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/pkglist.html b/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/pkglist.html deleted file mode 100644 index 68c2a80..0000000 --- a/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/pkglist.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - -
    -
    -
    - - -
    - -
    -
    - - diff --git a/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/search.html b/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/search.html deleted file mode 100644 index e0d13b9..0000000 --- a/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/search.html +++ /dev/null @@ -1,18 +0,0 @@ - -{{with .Alert}} -

    - {{html .}} -

    -{{end}} -{{with .Alt}} -

    - Did you mean: - {{range .Alts}} - {{html .}} - {{end}} -

    -{{end}} diff --git a/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/searchcode.html b/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/searchcode.html deleted file mode 100644 index a032e64..0000000 --- a/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/searchcode.html +++ /dev/null @@ -1,64 +0,0 @@ - -{{$query_url := urlquery .Query}} -{{if not .Idents}} - {{with .Pak}} -

    Package {{html $.Query}}

    -

    -

    - {{range .}} - {{$pkg_html := pkgLink .Pak.Path | html}} - - {{end}} -
    {{$pkg_html}}
    -

    - {{end}} -{{end}} -{{with .Hit}} - {{with .Decls}} -

    Package-level declarations

    - {{range .}} - {{$pkg_html := pkgLink .Pak.Path | html}} -

    package {{html .Pak.Name}}

    - {{range .Files}} - {{$file := .File.Path}} - {{range .Groups}} - {{range .}} - {{$line := infoLine .}} - {{$file}}:{{$line}} - {{infoSnippet_html .}} - {{end}} - {{end}} - {{end}} - {{end}} - {{end}} - {{with .Others}} -

    Local declarations and uses

    - {{range .}} - {{$pkg_html := pkgLink .Pak.Path | html}} -

    package {{html .Pak.Name}}

    - {{range .Files}} - {{$file := .File.Path}} - {{$file}} - - {{range .Groups}} - - - - - - - {{end}} -
    {{index . 0 | infoKind_html}} - {{range .}} - {{$line := infoLine .}} - {{$line}} - {{end}} -
    - {{end}} - {{end}} - {{end}} -{{end}} diff --git a/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/searchdoc.html b/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/searchdoc.html deleted file mode 100644 index 679c02c..0000000 --- a/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/searchdoc.html +++ /dev/null @@ -1,24 +0,0 @@ - -{{range $key, $val := .Idents}} - {{if $val}} -

    {{$key.Name}}

    - {{range $val}} - {{$pkg_html := pkgLink .Path | html}} - {{if eq "Packages" $key.Name}} - {{html .Path}} - {{else}} - {{$doc_html := docLink .Path .Name| html}} - {{html .Package}}.{{.Name}} - {{end}} - {{if .Doc}} -

    {{comment_html .Doc}}

    - {{else}} -

    No documentation available

    - {{end}} - {{end}} - {{end}} -{{end}} diff --git a/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/searchtxt.html b/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/searchtxt.html deleted file mode 100644 index 7e4a978..0000000 --- a/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/searchtxt.html +++ /dev/null @@ -1,42 +0,0 @@ - -{{$query_url := urlquery .Query}} -{{with .Textual}} - {{if $.Complete}} -

    {{html $.Found}} textual occurrences

    - {{else}} -

    More than {{html $.Found}} textual occurrences

    -

    - Not all files or lines containing "{{html $.Query}}" are shown. -

    - {{end}} -

    - - {{range .}} - {{$file := .Filename}} - - - - - - - - {{end}} - {{if not $.Complete}} - - {{end}} -
    - {{$file}}: - {{len .Lines}} - {{range .Lines}} - {{html .}} - {{end}} - {{if not $.Complete}} - ... - {{end}} -
    ...
    -

    -{{end}} diff --git a/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/style.css b/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/style.css deleted file mode 100644 index fb3c356..0000000 --- a/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/style.css +++ /dev/null @@ -1,1057 +0,0 @@ -.container-body { - width: 100%; - overflow:hidden; -} - -div.deprecated { - background-color: #a39f9f; - border-radius: 5px; - font-weight: bold; - display: inline; - padding: 2px; - overflow: auto; - color: #ffffff; - font-family: "Georgia", Times, serif; - text-align: center; - font-size: small; - margin-left: 5px; -} - -a > img { - max-height:70%; - float:left; - padding-left:22px; - padding-top:8px; -} - -.packages { - margin:0; - padding:0; - display:inline; - text-align: left; - width: 100%; - list-style-type: none; -} -.packages li { - margin: 0; - line-height: 1.25; - font-size: larger; -} -.packages li:nth-child(odd) { - background-color: #eee; -} - -body { - margin: 0; - font-family: HelveticaNeueBold,Helvetica,Helvetica,Arial,sans-serif; - font-size: 16px; - background-color: #fff; - line-height: 1.3em; -} -pre, -code { - font-family: Menlo, monospace; - font-size: 14px; -} -pre { - line-height: 1.4em; - overflow-x: auto; -} -pre .comment { - color: #006600; -} -pre .highlight, -pre .highlight-comment, -pre .selection-highlight, -pre .selection-highlight-comment { - background: #FFFF00; -} -pre .selection, -pre .selection-comment { - background: #FF9632; -} -pre .ln { - color: #999; -} - -body { - color: #222; -} -a, -.exampleHeading .text { - color: #375EAB; - text-decoration: none; -} -a:hover, -.exampleHeading .text:hover { - text-decoration: underline; -} -p, li { - max-width: 800px; - word-wrap: break-word; -} -p, -pre, -ul, -ol { - display: inherit; - margin: 20px; -} -pre { - background: #EFEFEF; - padding: 10px; - - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - border-radius: 5px; -} -.title { - font-family: HelveticaNeueBold,Helvetica,Helvetica,Arial,sans-serif; - text-shadow: rgba(0,0,0,0.8) 0 -1px 0; - color: #fff; - -webkit-font-smoothing: antialiased; - margin:20px; - display:inherit; -} - -h1, -h2, -h3, -h4, -.rootHeading { - margin: 20px 0 20px; - padding: 0; - color: #375EAB; - font-weight: bold; -} -h1 { - font-size: 28px; - line-height: 1; -} -h2 { - font-size: 20px; - background: #E0EBF5; - padding: 8px; - line-height: 1.25; - font-weight: normal; -} -h2 a { - font-weight: bold; -} -h3 { - font-size: 20px; -} -h3, -h4 { - margin: 20px 5px; -} -h4 { - font-size: 16px; -} -.rootHeading { - font-size: 20px; - margin: 0; -} - -dl { - margin: 20px; -} -dd { - margin: 0 0 0 20px; -} -dl, -dd { - font-size: 14px; -} -div#nav table td { - vertical-align: top; -} - -div#mobile_container { - display:inline-block; - font-size: 15px; - margin-left:auto; - margin-right:auto; - line-height:100%; -} - -div#mobile-nav { - display:none; -} - -div#logo_container { - height:100%; - display:table-cell; - float:left; - vertical-align:middle; -} - -div#mobile_only { - display:none; -} - -div#fixed { - position: fixed; - width: 100%; - height: 100%; -} - -div .top_link { - float:right; - overflow:auto; - display:inline; - padding-top:2px; -} - -.pkg-dir { - width: 20%; - max-width:400px; - min-width:325px; - height: calc(100% - 64px); - position: relative; - background: #F6F6F6; - overflow:hidden; - float: left; - display: inline-block; - box-sizing: border-box; - border-top-style:hidden; - border-left-style:hidden; - border-bottom-style:hidden; -} - -.pkg-dir table { - border-collapse: collapse; - border-spacing: 0; -} -.pkg-name { - padding-right: 20px; -} -.alert { - color: #AA0000; -} - -.top-heading { - float: left; - padding: 21px 0; - font-size: 20px; - font-weight: normal; -} -.top-heading a { - color: #222; - text-decoration: none; -} - -div#topbar { - background: #444; - height: 64px; - overflow: hidden; - position: relative; -} - -div#page { - box-sizing: border-box; - height:calc(100% - 64px); - overflow:auto; -} -div#page > .container, -div#topbar > .container { - text-align: left; - padding: 0 20px; -} -div#topbar > .container, -div#page > .container { -} -div#page.wide > .container, -div#topbar.wide > .container { -} -div#plusone { - float: right; - clear: right; - margin-top: 5px; -} - -div#footer { - text-align: center; - color: #666; - font-size: 14px; - margin: 40px 0; -} - -div#menu > a, -div#menu > input, -div#learn .buttons a, -div.play .buttons a, -div#blog .read a, -#menu-button { - padding: 10px; - - text-decoration: none; - font-size: 16px; - - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - border-radius: 5px; -} -div#playground .buttons a, -div#menu > a, -div#menu > input, -#menu-button { - border: 1px solid #375EAB; -} -div#playground .buttons a, -div#menu > a, -#menu-button { - color: white; - background: #375EAB; -} -#playgroundButton.active { - background: white; - color: #375EAB; -} -a#start, -div#learn .buttons a, -div.play .buttons a, -div#blog .read a { - color: #222; - border: 1px solid #375EAB; - background: #E0EBF5; -} -.download { - width: 150px; -} - -div#menu { - display: inline; - float: right; - padding: 10px; - white-space: nowrap; -} -div#menu.menu-visible { - max-height: 500px; -} -div#menu > a, -#menu-button { - margin: 10px 2px; - padding: 10px; -} -div#menu > input { - position: relative; - top: 1px; - width: 140px; - background: white; - color: #222; - box-sizing: border-box; -} -div#menu > input.inactive { - color: #999; -} - -#menu-button { - display: none; - position: absolute; - right: 5px; - top: 0; - margin-right: 5px; -} -#menu-button-arrow { - display: inline-block; -} -.vertical-flip { - transform: rotate(-180deg); -} - -div.left { - float: left; - clear: left; - margin-right: 2.5%; -} -div.right { - float: right; - clear: right; - margin-left: 2.5%; -} -div.left, -div.right { - width: 45%; -} - -div#learn, -div#about { - padding-top: 20px; -} -div#learn h2, -div#about { - margin: 0; -} -div#about { - font-size: 20px; - margin: 0 auto 30px; -} -div#gopher { - background-position: center top; - height: 155px; -} -a#start { - display: block; - padding: 10px; - - text-align: center; - text-decoration: none; - - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - border-radius: 5px; -} -a#start .big { - display: block; - font-weight: bold; - font-size: 20px; -} -a#start .desc { - display: block; - font-size: 14px; - font-weight: normal; - margin-top: 5px; -} - -div#learn .popout { - float: right; - display: block; - cursor: pointer; - font-size: 12px; - background-position: right top; - padding: 5px 27px; -} -div#learn pre, -div#learn textarea { - padding: 0; - margin: 0; - font-family: Menlo, monospace; - font-size: 14px; -} -div#learn .input { - padding: 10px; - margin-top: 10px; - height: 150px; - - -webkit-border-top-left-radius: 5px; - -webkit-border-top-right-radius: 5px; - -moz-border-radius-topleft: 5px; - -moz-border-radius-topright: 5px; - border-top-left-radius: 5px; - border-top-right-radius: 5px; -} -div#learn .input textarea { - width: 100%; - height: 100%; - border: none; - outline: none; - resize: none; -} -div#learn .output { - border-top: none !important; - - padding: 10px; - height: 59px; - overflow: auto; - - -webkit-border-bottom-right-radius: 5px; - -webkit-border-bottom-left-radius: 5px; - -moz-border-radius-bottomright: 5px; - -moz-border-radius-bottomleft: 5px; - border-bottom-right-radius: 5px; - border-bottom-left-radius: 5px; -} -div#learn .output pre { - padding: 0; - - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} -div#learn .input, -div#learn .input textarea, -div#learn .output, -div#learn .output pre { - background: #FFFFD8; -} -div#learn .input, -div#learn .output { - border: 1px solid #375EAB; -} -div#learn .buttons { - float: right; - padding: 20px 0 10px 0; - text-align: right; -} -div#learn .buttons a { - height: 16px; - margin-left: 5px; - padding: 10px; -} -div#learn .toys { - margin-top: 8px; -} -div#learn .toys select { - border: 1px solid #375EAB; - margin: 0; -} -div#learn .output .exit { - display: none; -} - -div#video { - max-width: 100%; -} -div#blog, -div#video { - margin-top: 40px; -} -div#blog > a, -div#blog > div, -div#blog > h2, -div#video > a, -div#video > div, -div#video > h2 { - margin-bottom: 10px; -} -div#blog .title, -div#video .title { - display: block; - font-size: 20px; -} -div#blog .when { - color: #666; - font-size: 14px; -} -div#blog .read { - text-align: right; -} - -.toggleButton { cursor: pointer; } -.toggle .collapsed { display: block; } -.toggle .expanded { display: none; } -.toggleVisible .collapsed { display: none; } -.toggleVisible .expanded { display: block; } - -table.codetable { margin-left: auto; margin-right: auto; border-style: none; } -table.codetable td { padding-right: 10px; } -hr { border-style: none; border-top: 1px solid black; } -img.gopher { - float: right; - margin-left: 10px; - margin-bottom: 10px; - z-index: -1; -} -h2 { clear: right; } - -/* example and drop-down playground */ -div.play { - padding: 0 20px 40px 20px; -} -div.play pre, -div.play textarea, -div.play .lines { - padding: 0; - margin: 0; - font-family: Menlo, monospace; - font-size: 14px; -} -div.play .input { - padding: 10px; - margin-top: 10px; - - -webkit-border-top-left-radius: 5px; - -webkit-border-top-right-radius: 5px; - -moz-border-radius-topleft: 5px; - -moz-border-radius-topright: 5px; - border-top-left-radius: 5px; - border-top-right-radius: 5px; - - overflow: hidden; -} -div.play .input textarea { - width: 100%; - height: 100%; - border: none; - outline: none; - resize: none; - - overflow: hidden; -} -div#playground .input textarea { - overflow: auto; - resize: auto; -} -div.play .output { - border-top: none !important; - - padding: 10px; - max-height: 200px; - overflow: auto; - - -webkit-border-bottom-right-radius: 5px; - -webkit-border-bottom-left-radius: 5px; - -moz-border-radius-bottomright: 5px; - -moz-border-radius-bottomleft: 5px; - border-bottom-right-radius: 5px; - border-bottom-left-radius: 5px; -} -div.play .output pre { - padding: 0; - - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} -div.play .input, -div.play .input textarea, -div.play .output, -div.play .output pre { - background: #FFFFD8; -} -div.play .input, -div.play .output { - border: 1px solid #375EAB; -} -div.play .buttons { - float: right; - padding: 20px 0 10px 0; - text-align: right; -} -div.play .buttons a { - height: 16px; - margin-left: 5px; - padding: 10px; - cursor: pointer; -} -.output .stderr { - color: #933; -} -.output .system { - color: #999; -} - -/* drop-down playground */ -#playgroundButton, -div#playground { - /* start hidden; revealed by javascript */ - display: none; -} -div#playground { - position: absolute; - top: 63px; - right: 20px; - padding: 0 10px 10px 10px; - z-index: 1; - text-align: left; - background: #E0EBF5; - - border: 1px solid #B0BBC5; - border-top: none; - - -webkit-border-bottom-left-radius: 5px; - -webkit-border-bottom-right-radius: 5px; - -moz-border-radius-bottomleft: 5px; - -moz-border-radius-bottomright: 5px; - border-bottom-left-radius: 5px; - border-bottom-right-radius: 5px; -} -div#playground .code { - width: 520px; - height: 200px; -} -div#playground .output { - height: 100px; -} - -/* Inline runnable snippets (play.js/initPlayground) */ -#content .code pre, #content .playground pre, #content .output pre { - margin: 0; - padding: 0; - background: none; - border: none; - outline: 0px solid transparent; - overflow: auto; -} -#content .playground .number, #content .code .number { - color: #999; -} -#content .code, #content .playground, #content .output { - width: auto; - margin: 20px; - padding: 10px; - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - border-radius: 5px; -} -#content .code, #content .playground { - background: #e9e9e9; -} -#content .output { - background: #202020; -} -#content .output .stdout, #content .output pre { - color: #e6e6e6; -} -#content .output .stderr, #content .output .error { - color: rgb(244, 74, 63); -} -#content .output .system, #content .output .exit { - color: rgb(255, 209, 77) -} -#content .buttons { - position: relative; - float: right; - top: -50px; - right: 30px; -} -#content .output .buttons { - top: -60px; - right: 0; - height: 0; -} -#content .buttons .kill { - display: none; - visibility: hidden; -} -a.error { - font-weight: bold; - color: white; - background-color: darkred; - border-bottom-left-radius: 4px; - border-bottom-right-radius: 4px; - border-top-left-radius: 4px; - border-top-right-radius: 4px; - padding: 2px 4px 2px 4px; /* TRBL */ -} - - -#heading-narrow { - display: none; -} - -.downloading { - background: #F9F9BE; - padding: 10px; - text-align: center; - border-radius: 5px; -} - -@media (max-width: 930px) { - #heading-wide { - display: none; - } - #heading-narrow { - display: block; - } - - .pkg-dir { - display: none; - } - - .title { - margin:5px; - } - - div#page { - box-sizing: border-box; - width:100%; - height:calc(100% - 64px); - float:right; - display:inline-block; - overflow:auto - } - - div#menu { - display: none; - } - - div#topbar { - height: 30px; - padding: 10px; - } - - a > img { - max-height:100%; - float:left; - padding-left:10px; - padding-top:2px; - } - - div#mobile-nav { - display:inline-block; - float:right; - border-bottom: 13px double white; - border-top: 4px solid white; - content:""; - height: 5px; - width:30px; - } - - div#mobile_container { - display:inline-block; - width: 100%; - } -} - - -@media (max-width: 760px) { - .container .left, - .container .right { - width: auto; - float: none; - } - - div#about { - max-width: 500px; - text-align: center; - } - - .title { - margin:5px; - } - - .pkg-dir { - display: none; - } - - div#page { - box-sizing: border-box; - width:100%; - height:calc(100% - 64px); - float:right; - display:inline-block; - overflow:auto - } - - div#menu { - display: none; - } - - div#topbar { - height: 30px; - padding: 10px; - } - - div#mobile-nav { - display:inline-block; - float:right; - border-bottom: 13px double white; - border-top: 4px solid white; - content:""; - height: 5px; - width:30px; - padding-left:20px; - padding-top:10px; - } -} - -@media (min-width: 700px) and (max-width: 1000px) { - div#menu > a { - margin: 5px 0; - font-size: 14px; - } - - div#menu > input { - font-size: 14px; - } - - .title { - margin:5px; - } - - .pkg-dir { - display: none; - } - - div#page { - box-sizing: border-box; - width:100%; - height:calc(100% - 64px); - float:right; - display:inline-block; - overflow:auto - } - - div#menu { - display: none; - } - - div#topbar { - height: 30px; - padding: 10px; - } - - div#mobile-nav { - display:inline-block; - float:right; - border-bottom: 13px double white; - border-top: 4px solid white; - content:""; - height: 5px; - width:30px; - } -} - -@media (max-width: 700px) { - body { - font-size: 15px; - } - - pre, - code { - font-size: 13px; - } - - div#page > .container { - padding: 0 10px; - } - - div#topbar { - padding: 10px; - } - - div#topbar > .container { - padding: 0; - } - - #heading-wide { - display: block; - } - #heading-narrow { - display: none; - } - - .top-heading { - float: none; - display: inline-block; - padding: 12px; - } - - div#menu { - padding: 0; - min-width: 0; - text-align: left; - float: left; - } - - div#menu > a, - div#menu > input { - display: block; - margin-left: 0; - margin-right: 0; - } - - div#menu > input { - width: 100%; - } - - #menu-button { - display: inline-block; - } - - p, - pre, - ul, - ol { - margin: 10px; - } - - .pkg-synopsis { - display: none; - } - - img.gopher { - display: none; - } - - .pkg-dir { - display: none; - } - - .title { - margin:5px; - } - - div#page { - box-sizing: border-box; - width:100%; - height:calc(100% - 64px); - float:right; - display:inline-block; - overflow:auto - } - - div#menu { - display: none; - } - - div#topbar { - height: 30px; - padding: 10px; - } - - div#mobile-nav { - display:inline-block; - float:right; - border-bottom: 13px double white; - border-top: 4px solid white; - content:""; - height: 5px; - width:30px; - } -} - -@media (max-width: 480px) { - #heading-wide { - display: none; - } - #heading-narrow { - display: block; - } - - .pkg-dir { - display: none; - } - - .title { - margin:5px; - } - - div#page { - box-sizing: border-box; - width:100%; - height:calc(100% - 64px); - float:right; - display:inline-block; - overflow:auto - } - - div#menu { - display: none; - } - - div#topbar { - height: 30px; - padding: 10px; - } - - div#mobile-nav { - display:inline-block; - float:right; - border-bottom: 13px double white; - border-top: 4px solid white; - content:""; - height: 5px; - width:30px; - } -} - -@media print { - pre { - background: #FFF; - border: 1px solid #BBB; - white-space: pre-wrap; - } -} diff --git a/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/user_guide_example.html b/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/user_guide_example.html deleted file mode 100644 index 2e1f042..0000000 --- a/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/user_guide_example.html +++ /dev/null @@ -1,82 +0,0 @@ - - - -

    AWS SDK for Go

    -

    - aws-sdk-go is the official AWS SDK for the Go programming language. - - Checkout our release notes for information about the latest bug fixes, updates, and features added to the SDK. -

    -

    Installing

    -

    - If you are using Go 1.5 with the GO15VENDOREXPERIMENT=1 vendoring flag you can use the following to get the SDK as the SDK's runtime dependencies are vendored in the vendor folder. -

    -
     $ go get -u github.com/aws/aws-sdk-go 
    -

    - Otherwise you'll need to tell Go to get the SDK and all of its dependencies. -

    -
     $ go get -u github.com/aws/aws-sdk-go/...  
    -

    Configuring Credentials

    -

    - Before using the SDK, ensure that you've configured credentials. The best way to configure credentials on a development machine is to use the ~/.aws/credentials file, which might look like: -

    -
    -				[default]
    -				aws_access_key_id = AKID1234567890
    -				aws_secret_access_key = MY-SECRET-KEY
    -			
    -

    - You can learn more about the credentials file from this blog post. - - Alternatively, you can set the following environment variables: -

    -
    -				AWS_ACCESS_KEY_ID=AKID1234567890
    -				AWS_SECRET_ACCESS_KEY=MY-SECRET-KEY
    -			
    -

    AWS CLI config file (~/aws/config)

    -

    - The AWS SDK for Go does not support the AWS CLI's config file. The SDK will not use any contents from this file. The SDK only supports the shared credentials file (~/aws/credentials). #384 tracks this feature request discussion. -

    -

    Using the Go SDK

    -

    - To use a service in the SDK, create a service variable by calling the New() function. Once you have a service client, you can call API operations which each return response data and a possible error. - - To list a set of instance IDs from EC2, you could run: -

    -
    -				package main
    -
    -				import (
    -						"fmt"
    -
    -						"github.com/aws/aws-sdk-go/aws"
    -						"github.com/aws/aws-sdk-go/aws/session"
    -						"github.com/aws/aws-sdk-go/service/ec2"
    -				)
    -
    -				func main() {
    -						// Create an EC2 service object in the "us-west-2" region
    -						// Note that you can also configure your region globally by
    -						// exporting the AWS_REGION environment variable
    -						svc := ec2.New(session.New(), &aws.Config{Region: aws.String("us-west-2")})
    -
    -						// Call the DescribeInstances Operation
    -						resp, err := svc.DescribeInstances(nil)
    -						if err != nil {
    -								panic(err)
    -						}
    -
    -						// resp has all of the response data, pull out instance IDs:
    -						fmt.Println("> Number of reservation sets: ", len(resp.Reservations))
    -						for idx, res := range resp.Reservations {
    -								fmt.Println("  > Number of instances: ", len(res.Instances))
    -								for _, inst := range resp.Reservations[idx].Instances {
    -										fmt.Println("    - Instance ID: ", *inst.InstanceId)
    -								}
    -						}
    -				}
    -			
    - - - diff --git a/vendor/github.com/aws/aws-sdk-go/doc-src/plugin/plugin.rb b/vendor/github.com/aws/aws-sdk-go/doc-src/plugin/plugin.rb deleted file mode 100644 index 9882707..0000000 --- a/vendor/github.com/aws/aws-sdk-go/doc-src/plugin/plugin.rb +++ /dev/null @@ -1,187 +0,0 @@ -require 'yard' -require 'yard-go' - -module GoLinksHelper - def signature(obj, link = true, show_extras = true, full_attr_name = true) - case obj - when YARDGo::CodeObjects::FuncObject - if link && obj.has_tag?(:service_operation) - ret = signature_types(obj, !link) - args = obj.parameters.map {|m| m[0].split(/\s+/).last }.join(", ") - line = "#{obj.name}(#{args}) #{ret}" - return link ? linkify(obj, line) : line - end - end - - super(obj, link, show_extras, full_attr_name) - end - - def html_syntax_highlight(source, type = nil) - src = super(source, type || :go) - object.has_tag?(:service_operation) ? link_types(src) : src - end -end - -YARD::Templates::Helpers::HtmlHelper.send(:prepend, GoLinksHelper) -YARD::Templates::Engine.register_template_path(File.dirname(__FILE__) + '/templates') - -YARD::Parser::SourceParser.after_parse_list do - YARD::Registry.all(:struct).each do |obj| - if obj.file =~ /\/?service\/(.+?)\/(service|api)\.go$/ - obj.add_tag YARD::Tags::Tag.new(:service, $1) - obj.groups = ["Constructor Functions", "Service Operations", "Request Methods", "Pagination Methods"] - end - end - - YARD::Registry.all(:method).each do |obj| - if obj.file =~ /service\/.+?\/api\.go$/ && obj.scope == :instance - if obj.name.to_s =~ /Pages$/ - obj.group = "Pagination Methods" - opname = obj.name.to_s.sub(/Pages$/, '') - obj.docstring = <<-eof -#{obj.name} iterates over the pages of a {#{opname} #{opname}()} operation, calling the `fn` -function callback with the response data in each page. To stop iterating, return `false` from -the function callback. - -@note This operation can generate multiple requests to a service. -@example Iterating over at most 3 pages of a #{opname} operation - pageNum := 0 - err := client.#{obj.name}(params, func(page *#{obj.parent.parent.name}.#{obj.parameters[1][0].split("*").last}, lastPage bool) bool { - pageNum++ - fmt.Println(page) - return pageNum <= 3 - }) -@see #{opname} -eof - obj.add_tag YARD::Tags::Tag.new(:paginator, '') - elsif obj.name.to_s =~ /Request$/ - obj.group = "Request Methods" - obj.signature = obj.name.to_s - obj.parameters = [] - opname = obj.name.to_s.sub(/Request$/, '') - obj.docstring = <<-eof -#{obj.name} generates a {aws/request.Request} object representing the client request for -the {#{opname} #{opname}()} operation. The `output` return value can be used to capture -response data after {aws/request.Request.Send Request.Send()} is called. - -Creating a request object using this method should be used when you want to inject -custom logic into the request lifecycle using a custom handler, or if you want to -access properties on the request object before or after sending the request. If -you just want the service response, call the {#{opname} service operation method} -directly instead. - -@note You must call the {aws/request.Request.Send Send()} method on the returned - request object in order to execute the request. -@example Sending a request using the #{obj.name}() method - req, resp := client.#{obj.name}(params) - err := req.Send() - - if err == nil { // resp is now filled - fmt.Println(resp) - } -eof - obj.add_tag YARD::Tags::Tag.new(:request_method, '') - else - obj.group = "Service Operations" - obj.add_tag YARD::Tags::Tag.new(:service_operation, '') - if ex = obj.tag(:example) - ex.name = "Calling the #{obj.name} operation" - end - end - end - end - - apply_docs -end - -def apply_docs - svc_pkg = YARD::Registry.at('service') - return if svc_pkg.nil? - - pkgs = svc_pkg.children.select {|t| t.type == :package } - pkgs.each do |pkg| - svc = pkg.children.find {|t| t.has_tag?(:service) } - ctor = P(svc, ".New") - svc_name = ctor.source[/ServiceName:\s*"(.+?)",/, 1] - api_ver = ctor.source[/APIVersion:\s*"(.+?)",/, 1] - log.progress "Parsing service documentation for #{svc_name} (#{api_ver})" - file = Dir.glob("models/apis/#{svc_name}/#{api_ver}/docs-2.json").sort.last - next if file.nil? - - next if svc.nil? - exmeth = svc.children.find {|s| s.has_tag?(:service_operation) } - pkg.docstring += <<-eof - -@example Sending a request using the {#{svc.name}} client - client := #{pkg.name}.New(nil) - params := &#{pkg.name}.#{exmeth.parameters.first[0].split("*").last}{...} - resp, err := client.#{exmeth.name}(params) -@see #{svc.name} -@version #{api_ver} -eof - - ctor.docstring += <<-eof - -@example Constructing a client using default configuration - client := #{pkg.name}.New(nil) - -@example Constructing a client with custom configuration - config := aws.NewConfig().WithRegion("us-west-2") - client := #{pkg.name}.New(config) -eof - - json = JSON.parse(File.read(file)) - if svc - apply_doc(svc, json["service"]) - end - - json["operations"].each do |op, doc| - if doc && obj = svc.children.find {|t| t.name.to_s.downcase == op.downcase } - apply_doc(obj, doc) - end - end - - json["shapes"].each do |shape, data| - shape = shape_name(shape) - if obj = pkg.children.find {|t| t.name.to_s.downcase == shape.downcase } - apply_doc(obj, data["base"]) - end - - data["refs"].each do |refname, doc| - refshape, member = *refname.split("$") - refshape = shape_name(refshape) - if refobj = pkg.children.find {|t| t.name.to_s.downcase == refshape.downcase } - if m = refobj.children.find {|t| t.name.to_s.downcase == member.downcase } - apply_doc(m, doc || data["base"]) - end - end - end if data["refs"] - end - end -end - -def apply_doc(obj, doc) - tags = obj.docstring.tags || [] - obj.docstring = clean_docstring(doc) - tags.each {|t| obj.docstring.add_tag(t) } -end - -def shape_name(shape) - shape.sub(/Request$/, "Input").sub(/Response$/, "Output") -end - -def clean_docstring(docs) - return nil unless docs - docs = docs.gsub(//m, '') - docs = docs.gsub(/.+?<\/fullname?>/m, '') - docs = docs.gsub(/.+?<\/examples?>/m, '') - docs = docs.gsub(/\s*<\/note>/m, '') - docs = docs.gsub(/(.+?)<\/a>/, '\1') - docs = docs.gsub(/(.+?)<\/note>/m) do - text = $1.gsub(/<\/?p>/, '') - "
    Note: #{text}
    " - end - docs = docs.gsub(/\{(.+?)\}/, '`{\1}`') - docs = docs.gsub(/\s+/, ' ').strip - docs == '' ? nil : docs -end diff --git a/vendor/github.com/aws/aws-sdk-go/doc-src/plugin/templates/default/layout/html/footer.erb b/vendor/github.com/aws/aws-sdk-go/doc-src/plugin/templates/default/layout/html/footer.erb deleted file mode 100644 index d5839b7..0000000 --- a/vendor/github.com/aws/aws-sdk-go/doc-src/plugin/templates/default/layout/html/footer.erb +++ /dev/null @@ -1,31 +0,0 @@ -
    - - - - - - - - - - - diff --git a/vendor/github.com/aws/aws-sdk-go/doc-src/plugin/templates/default/module/html/client.erb b/vendor/github.com/aws/aws-sdk-go/doc-src/plugin/templates/default/module/html/client.erb deleted file mode 100644 index aa6831c..0000000 --- a/vendor/github.com/aws/aws-sdk-go/doc-src/plugin/templates/default/module/html/client.erb +++ /dev/null @@ -1,4 +0,0 @@ -

    Client Structure collapse

    -
      - <%= yieldall :item => @client %> -
    diff --git a/vendor/github.com/aws/aws-sdk-go/doc-src/plugin/templates/default/module/html/item_summary.erb b/vendor/github.com/aws/aws-sdk-go/doc-src/plugin/templates/default/module/html/item_summary.erb deleted file mode 100644 index f9ad2eb..0000000 --- a/vendor/github.com/aws/aws-sdk-go/doc-src/plugin/templates/default/module/html/item_summary.erb +++ /dev/null @@ -1,28 +0,0 @@ -<% if !@item.has_tag?(:paginator) %> -
  • - <%= signature(@item) %> - <% if object != @item.namespace %> - - <%= @item.namespace.type == :class ? 'inherited' : (@item.scope == :class ? 'extended' : 'included') %> - from <%= linkify @item, object.relative_path(@item.namespace) %> - - <% end %> - <% if @item.type == :enum %>enum<% end %> - <% if @item.type == :bare_struct || @item.type == :struct %>struct<% end %> - <% if @item.has_tag?(:service) %>client<% end %> - <% if @item.has_tag?(:service_operation) %>operation<% end %> - <% if @item.type == :interface %>interface<% end %> - <% if @item.has_tag?(:readonly) %>readonly<% end %> - <% if @item.has_tag?(:writeonly) %>writeonly<% end %> - <% if @item.visibility != :public %><%= @item.visibility %><% end %> - <% if @item.has_tag?(:abstract) %>interface<% end %> - <% if @item.has_tag?(:deprecated) %>deprecated<% end %> - <% if @item.has_tag?(:api) && @item.tag(:api).text == 'private' %>private<% end %> - - <% if @item.has_tag?(:deprecated) %> - Deprecated. <%= htmlify_line @item.tag(:deprecated).text %> - <% else %> - <%= htmlify_line docstring_summary(@item) %> - <% end %> -
  • -<% end %> diff --git a/vendor/github.com/aws/aws-sdk-go/doc-src/plugin/templates/default/module/html/setup.rb b/vendor/github.com/aws/aws-sdk-go/doc-src/plugin/templates/default/module/html/setup.rb deleted file mode 100644 index 8a8b49b..0000000 --- a/vendor/github.com/aws/aws-sdk-go/doc-src/plugin/templates/default/module/html/setup.rb +++ /dev/null @@ -1,9 +0,0 @@ -def init - super - sections.place(:client, [:item_summary]).before(:constant_summary) -end - -def client - @client = object.children.find {|c| c.has_tag?(:service) } - erb(:client) if @client -end diff --git a/vendor/github.com/aws/aws-sdk-go/doc-src/plugin/templates/default/package/html/setup.rb b/vendor/github.com/aws/aws-sdk-go/doc-src/plugin/templates/default/package/html/setup.rb deleted file mode 100644 index ff777d2..0000000 --- a/vendor/github.com/aws/aws-sdk-go/doc-src/plugin/templates/default/package/html/setup.rb +++ /dev/null @@ -1,8 +0,0 @@ -def type_summary - @items = object.children. - select {|c| c.type == :bare_struct || c.type == :struct || c.type == :enum }. - reject {|c| c.has_tag?(:service) }. - sort_by {|c| c.name.to_s } - @name = "Type" - erb :list_summary -end diff --git a/vendor/github.com/aws/aws-sdk-go/doc-src/plugin/templates/default/struct/html/paginators.erb b/vendor/github.com/aws/aws-sdk-go/doc-src/plugin/templates/default/struct/html/paginators.erb deleted file mode 100644 index 053f762..0000000 --- a/vendor/github.com/aws/aws-sdk-go/doc-src/plugin/templates/default/struct/html/paginators.erb +++ /dev/null @@ -1,4 +0,0 @@ -
    -

    Pagination Methods

    -

    <%= @items.map {|pkg| link_object(pkg, pkg.name) }.join(" ") %>

    -
    diff --git a/vendor/github.com/aws/aws-sdk-go/doc-src/plugin/templates/default/struct/html/request_methods.erb b/vendor/github.com/aws/aws-sdk-go/doc-src/plugin/templates/default/struct/html/request_methods.erb deleted file mode 100644 index 1edbb66..0000000 --- a/vendor/github.com/aws/aws-sdk-go/doc-src/plugin/templates/default/struct/html/request_methods.erb +++ /dev/null @@ -1,4 +0,0 @@ -
    -

    Request Methods

    -

    <%= @items.map {|pkg| link_object(pkg, pkg.name) }.join(" ") %>

    -
    diff --git a/vendor/github.com/aws/aws-sdk-go/doc-src/plugin/templates/default/struct/html/setup.rb b/vendor/github.com/aws/aws-sdk-go/doc-src/plugin/templates/default/struct/html/setup.rb deleted file mode 100644 index 9038945..0000000 --- a/vendor/github.com/aws/aws-sdk-go/doc-src/plugin/templates/default/struct/html/setup.rb +++ /dev/null @@ -1,20 +0,0 @@ -def init - super - sections.place(:request_methods, :paginators).after(:method_summary) -end - -def groups(list, type = "Method") - super(list.reject {|o| o.has_tag?(:paginator) || o.has_tag?(:request_method) }, type) -end - -def paginators - @items = object.children.select {|o| o.has_tag?(:paginator) } - return if @items.size == 0 - erb(:paginators) -end - -def request_methods - @items = object.children.select {|o| o.has_tag?(:request_method) } - return if @items.size == 0 - erb(:request_methods) -end diff --git a/vendor/github.com/aws/aws-sdk-go/doc.go b/vendor/github.com/aws/aws-sdk-go/doc.go new file mode 100644 index 0000000..32b806a --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/doc.go @@ -0,0 +1,405 @@ +// Package sdk is the official AWS SDK for the Go programming language. +// +// The AWS SDK for Go provides APIs and utilities that developers can use to +// build Go applications that use AWS services, such as Amazon Elastic Compute +// Cloud (Amazon EC2) and Amazon Simple Storage Service (Amazon S3). +// +// The SDK removes the complexity of coding directly against a web service +// interface. It hides a lot of the lower-level plumbing, such as authentication, +// request retries, and error handling. +// +// The SDK also includes helpful utilities on top of the AWS APIs that add additional +// capabilities and functionality. For example, the Amazon S3 Download and Upload +// Manager will automatically split up large objects into multiple parts and +// transfer them concurrently. +// +// See the s3manager package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/s3/s3manager/ +// +// Getting More Information +// +// Checkout the Getting Started Guide and API Reference Docs detailed the SDK's +// components and details on each AWS client the SDK supports. +// +// The Getting Started Guide provides examples and detailed description of how +// to get setup with the SDK. +// https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/welcome.html +// +// The API Reference Docs include a detailed breakdown of the SDK's components +// such as utilities and AWS clients. Use this as a reference of the Go types +// included with the SDK, such as AWS clients, API operations, and API parameters. +// https://docs.aws.amazon.com/sdk-for-go/api/ +// +// Overview of SDK's Packages +// +// The SDK is composed of two main components, SDK core, and service clients. +// The SDK core packages are all available under the aws package at the root of +// the SDK. Each client for a supported AWS service is available within its own +// package under the service folder at the root of the SDK. +// +// * aws - SDK core, provides common shared types such as Config, Logger, +// and utilities to make working with API parameters easier. +// +// * awserr - Provides the error interface that the SDK will use for all +// errors that occur in the SDK's processing. This includes service API +// response errors as well. The Error type is made up of a code and message. +// Cast the SDK's returned error type to awserr.Error and call the Code +// method to compare returned error to specific error codes. See the package's +// documentation for additional values that can be extracted such as RequestId. +// +// * credentials - Provides the types and built in credentials providers +// the SDK will use to retrieve AWS credentials to make API requests with. +// Nested under this folder are also additional credentials providers such as +// stscreds for assuming IAM roles, and ec2rolecreds for EC2 Instance roles. +// +// * endpoints - Provides the AWS Regions and Endpoints metadata for the SDK. +// Use this to lookup AWS service endpoint information such as which services +// are in a region, and what regions a service is in. Constants are also provided +// for all region identifiers, e.g UsWest2RegionID for "us-west-2". +// +// * session - Provides initial default configuration, and load +// configuration from external sources such as environment and shared +// credentials file. +// +// * request - Provides the API request sending, and retry logic for the SDK. +// This package also includes utilities for defining your own request +// retryer, and configuring how the SDK processes the request. +// +// * service - Clients for AWS services. All services supported by the SDK are +// available under this folder. +// +// How to Use the SDK's AWS Service Clients +// +// The SDK includes the Go types and utilities you can use to make requests to +// AWS service APIs. Within the service folder at the root of the SDK you'll find +// a package for each AWS service the SDK supports. All service clients follows +// a common pattern of creation and usage. +// +// When creating a client for an AWS service you'll first need to have a Session +// value constructed. The Session provides shared configuration that can be shared +// between your service clients. When service clients are created you can pass +// in additional configuration via the aws.Config type to override configuration +// provided by in the Session to create service client instances with custom +// configuration. +// +// Once the service's client is created you can use it to make API requests the +// AWS service. These clients are safe to use concurrently. +// +// Configuring the SDK +// +// In the AWS SDK for Go, you can configure settings for service clients, such +// as the log level and maximum number of retries. Most settings are optional; +// however, for each service client, you must specify a region and your credentials. +// The SDK uses these values to send requests to the correct AWS region and sign +// requests with the correct credentials. You can specify these values as part +// of a session or as environment variables. +// +// See the SDK's configuration guide for more information. +// https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html +// +// See the session package documentation for more information on how to use Session +// with the SDK. +// https://docs.aws.amazon.com/sdk-for-go/api/aws/session/ +// +// See the Config type in the aws package for more information on configuration +// options. +// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config +// +// Configuring Credentials +// +// When using the SDK you'll generally need your AWS credentials to authenticate +// with AWS services. The SDK supports multiple methods of supporting these +// credentials. By default the SDK will source credentials automatically from +// its default credential chain. See the session package for more information +// on this chain, and how to configure it. The common items in the credential +// chain are the following: +// +// * Environment Credentials - Set of environment variables that are useful +// when sub processes are created for specific roles. +// +// * Shared Credentials file (~/.aws/credentials) - This file stores your +// credentials based on a profile name and is useful for local development. +// +// * EC2 Instance Role Credentials - Use EC2 Instance Role to assign credentials +// to application running on an EC2 instance. This removes the need to manage +// credential files in production. +// +// Credentials can be configured in code as well by setting the Config's Credentials +// value to a custom provider or using one of the providers included with the +// SDK to bypass the default credential chain and use a custom one. This is +// helpful when you want to instruct the SDK to only use a specific set of +// credentials or providers. +// +// This example creates a credential provider for assuming an IAM role, "myRoleARN" +// and configures the S3 service client to use that role for API requests. +// +// // Initial credentials loaded from SDK's default credential chain. Such as +// // the environment, shared credentials (~/.aws/credentials), or EC2 Instance +// // Role. These credentials will be used to to make the STS Assume Role API. +// sess := session.Must(session.NewSession()) +// +// // Create the credentials from AssumeRoleProvider to assume the role +// // referenced by the "myRoleARN" ARN. +// creds := stscreds.NewCredentials(sess, "myRoleArn") +// +// // Create service client value configured for credentials +// // from assumed role. +// svc := s3.New(sess, &aws.Config{Credentials: creds})/ +// +// See the credentials package documentation for more information on credential +// providers included with the SDK, and how to customize the SDK's usage of +// credentials. +// https://docs.aws.amazon.com/sdk-for-go/api/aws/credentials +// +// The SDK has support for the shared configuration file (~/.aws/config). This +// support can be enabled by setting the environment variable, "AWS_SDK_LOAD_CONFIG=1", +// or enabling the feature in code when creating a Session via the +// Option's SharedConfigState parameter. +// +// sess := session.Must(session.NewSessionWithOptions(session.Options{ +// SharedConfigState: session.SharedConfigEnable, +// })) +// +// Configuring AWS Region +// +// In addition to the credentials you'll need to specify the region the SDK +// will use to make AWS API requests to. In the SDK you can specify the region +// either with an environment variable, or directly in code when a Session or +// service client is created. The last value specified in code wins if the region +// is specified multiple ways. +// +// To set the region via the environment variable set the "AWS_REGION" to the +// region you want to the SDK to use. Using this method to set the region will +// allow you to run your application in multiple regions without needing additional +// code in the application to select the region. +// +// AWS_REGION=us-west-2 +// +// The endpoints package includes constants for all regions the SDK knows. The +// values are all suffixed with RegionID. These values are helpful, because they +// reduce the need to type the region string manually. +// +// To set the region on a Session use the aws package's Config struct parameter +// Region to the AWS region you want the service clients created from the session to +// use. This is helpful when you want to create multiple service clients, and +// all of the clients make API requests to the same region. +// +// sess := session.Must(session.NewSession(&aws.Config{ +// Region: aws.String(endpoints.UsWest2RegionID), +// })) +// +// See the endpoints package for the AWS Regions and Endpoints metadata. +// https://docs.aws.amazon.com/sdk-for-go/api/aws/endpoints/ +// +// In addition to setting the region when creating a Session you can also set +// the region on a per service client bases. This overrides the region of a +// Session. This is helpful when you want to create service clients in specific +// regions different from the Session's region. +// +// svc := s3.New(sess, &aws.Config{ +// Region: aws.String(endpoints.UsWest2RegionID), +// }) +// +// See the Config type in the aws package for more information and additional +// options such as setting the Endpoint, and other service client configuration options. +// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config +// +// Making API Requests +// +// Once the client is created you can make an API request to the service. +// Each API method takes a input parameter, and returns the service response +// and an error. The SDK provides methods for making the API call in multiple ways. +// +// In this list we'll use the S3 ListObjects API as an example for the different +// ways of making API requests. +// +// * ListObjects - Base API operation that will make the API request to the service. +// +// * ListObjectsRequest - API methods suffixed with Request will construct the +// API request, but not send it. This is also helpful when you want to get a +// presigned URL for a request, and share the presigned URL instead of your +// application making the request directly. +// +// * ListObjectsPages - Same as the base API operation, but uses a callback to +// automatically handle pagination of the API's response. +// +// * ListObjectsWithContext - Same as base API operation, but adds support for +// the Context pattern. This is helpful for controlling the canceling of in +// flight requests. See the Go standard library context package for more +// information. This method also takes request package's Option functional +// options as the variadic argument for modifying how the request will be +// made, or extracting information from the raw HTTP response. +// +// * ListObjectsPagesWithContext - same as ListObjectsPages, but adds support for +// the Context pattern. Similar to ListObjectsWithContext this method also +// takes the request package's Option function option types as the variadic +// argument. +// +// In addition to the API operations the SDK also includes several higher level +// methods that abstract checking for and waiting for an AWS resource to be in +// a desired state. In this list we'll use WaitUntilBucketExists to demonstrate +// the different forms of waiters. +// +// * WaitUntilBucketExists. - Method to make API request to query an AWS service for +// a resource's state. Will return successfully when that state is accomplished. +// +// * WaitUntilBucketExistsWithContext - Same as WaitUntilBucketExists, but adds +// support for the Context pattern. In addition these methods take request +// package's WaiterOptions to configure the waiter, and how underlying request +// will be made by the SDK. +// +// The API method will document which error codes the service might return for +// the operation. These errors will also be available as const strings prefixed +// with "ErrCode" in the service client's package. If there are no errors listed +// in the API's SDK documentation you'll need to consult the AWS service's API +// documentation for the errors that could be returned. +// +// ctx := context.Background() +// +// result, err := svc.GetObjectWithContext(ctx, &s3.GetObjectInput{ +// Bucket: aws.String("my-bucket"), +// Key: aws.String("my-key"), +// }) +// if err != nil { +// // Cast err to awserr.Error to handle specific error codes. +// aerr, ok := err.(awserr.Error) +// if ok && aerr.Code() == s3.ErrCodeNoSuchKey { +// // Specific error code handling +// } +// return err +// } +// +// // Make sure to close the body when done with it for S3 GetObject APIs or +// // will leak connections. +// defer result.Body.Close() +// +// fmt.Println("Object Size:", aws.StringValue(result.ContentLength)) +// +// API Request Pagination and Resource Waiters +// +// Pagination helper methods are suffixed with "Pages", and provide the +// functionality needed to round trip API page requests. Pagination methods +// take a callback function that will be called for each page of the API's response. +// +// objects := []string{} +// err := svc.ListObjectsPagesWithContext(ctx, &s3.ListObjectsInput{ +// Bucket: aws.String(myBucket), +// }, func(p *s3.ListObjectsOutput, lastPage bool) bool { +// for _, o := range p.Contents { +// objects = append(objects, aws.StringValue(o.Key)) +// } +// return true // continue paging +// }) +// if err != nil { +// panic(fmt.Sprintf("failed to list objects for bucket, %s, %v", myBucket, err)) +// } +// +// fmt.Println("Objects in bucket:", objects) +// +// Waiter helper methods provide the functionality to wait for an AWS resource +// state. These methods abstract the logic needed to to check the state of an +// AWS resource, and wait until that resource is in a desired state. The waiter +// will block until the resource is in the state that is desired, an error occurs, +// or the waiter times out. If a resource times out the error code returned will +// be request.WaiterResourceNotReadyErrorCode. +// +// err := svc.WaitUntilBucketExistsWithContext(ctx, &s3.HeadBucketInput{ +// Bucket: aws.String(myBucket), +// }) +// if err != nil { +// aerr, ok := err.(awserr.Error) +// if ok && aerr.Code() == request.WaiterResourceNotReadyErrorCode { +// fmt.Fprintf(os.Stderr, "timed out while waiting for bucket to exist") +// } +// panic(fmt.Errorf("failed to wait for bucket to exist, %v", err)) +// } +// fmt.Println("Bucket", myBucket, "exists") +// +// Complete SDK Example +// +// This example shows a complete working Go file which will upload a file to S3 +// and use the Context pattern to implement timeout logic that will cancel the +// request if it takes too long. This example highlights how to use sessions, +// create a service client, make a request, handle the error, and process the +// response. +// +// package main +// +// import ( +// "context" +// "flag" +// "fmt" +// "os" +// "time" +// +// "github.com/aws/aws-sdk-go/aws" +// "github.com/aws/aws-sdk-go/aws/awserr" +// "github.com/aws/aws-sdk-go/aws/request" +// "github.com/aws/aws-sdk-go/aws/session" +// "github.com/aws/aws-sdk-go/service/s3" +// ) +// +// // Uploads a file to S3 given a bucket and object key. Also takes a duration +// // value to terminate the update if it doesn't complete within that time. +// // +// // The AWS Region needs to be provided in the AWS shared config or on the +// // environment variable as `AWS_REGION`. Credentials also must be provided +// // Will default to shared config file, but can load from environment if provided. +// // +// // Usage: +// // # Upload myfile.txt to myBucket/myKey. Must complete within 10 minutes or will fail +// // go run withContext.go -b mybucket -k myKey -d 10m < myfile.txt +// func main() { +// var bucket, key string +// var timeout time.Duration +// +// flag.StringVar(&bucket, "b", "", "Bucket name.") +// flag.StringVar(&key, "k", "", "Object key name.") +// flag.DurationVar(&timeout, "d", 0, "Upload timeout.") +// flag.Parse() +// +// // All clients require a Session. The Session provides the client with +// // shared configuration such as region, endpoint, and credentials. A +// // Session should be shared where possible to take advantage of +// // configuration and credential caching. See the session package for +// // more information. +// sess := session.Must(session.NewSession()) +// +// // Create a new instance of the service's client with a Session. +// // Optional aws.Config values can also be provided as variadic arguments +// // to the New function. This option allows you to provide service +// // specific configuration. +// svc := s3.New(sess) +// +// // Create a context with a timeout that will abort the upload if it takes +// // more than the passed in timeout. +// ctx := context.Background() +// var cancelFn func() +// if timeout > 0 { +// ctx, cancelFn = context.WithTimeout(ctx, timeout) +// } +// // Ensure the context is canceled to prevent leaking. +// // See context package for more information, https://golang.org/pkg/context/ +// defer cancelFn() +// +// // Uploads the object to S3. The Context will interrupt the request if the +// // timeout expires. +// _, err := svc.PutObjectWithContext(ctx, &s3.PutObjectInput{ +// Bucket: aws.String(bucket), +// Key: aws.String(key), +// Body: os.Stdin, +// }) +// if err != nil { +// if aerr, ok := err.(awserr.Error); ok && aerr.Code() == request.CanceledErrorCode { +// // If the SDK can determine the request or retry delay was canceled +// // by a context the CanceledErrorCode error code will be returned. +// fmt.Fprintf(os.Stderr, "upload canceled due to timeout, %v\n", err) +// } else { +// fmt.Fprintf(os.Stderr, "failed to upload object, %v\n", err) +// } +// os.Exit(1) +// } +// +// fmt.Printf("successfully uploaded file to %s/%s\n", bucket, key) +// } +package sdk diff --git a/vendor/github.com/aws/aws-sdk-go/example/aws/endpoints/customEndpoint/README.md b/vendor/github.com/aws/aws-sdk-go/example/aws/endpoints/customEndpoint/README.md deleted file mode 100644 index 1930681..0000000 --- a/vendor/github.com/aws/aws-sdk-go/example/aws/endpoints/customEndpoint/README.md +++ /dev/null @@ -1,14 +0,0 @@ -Custom Endpoint Example -=== - -This example provides examples on how you can provide custom endpoints, and logic to how endpoints are resolved by the SDK. - -The example creates multiple clients with different endpoint configuration. From a custom endpoint resolver that wraps the default resolver so that any Amazon S3 service client created uses the custom endpoint, to how you can provide your own logic to a single service's endpoint resolving. - - -Usage ---- - -```sh -go run -tags example customeEndpoint.go -``` diff --git a/vendor/github.com/aws/aws-sdk-go/example/aws/endpoints/customEndpoint/customEndpoint.go b/vendor/github.com/aws/aws-sdk-go/example/aws/endpoints/customEndpoint/customEndpoint.go deleted file mode 100644 index 6163172..0000000 --- a/vendor/github.com/aws/aws-sdk-go/example/aws/endpoints/customEndpoint/customEndpoint.go +++ /dev/null @@ -1,77 +0,0 @@ -// +build example - -package main - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/endpoints" - "github.com/aws/aws-sdk-go/aws/session" - "github.com/aws/aws-sdk-go/service/dynamodb" - "github.com/aws/aws-sdk-go/service/s3" - "github.com/aws/aws-sdk-go/service/sqs" -) - -func main() { - defaultResolver := endpoints.DefaultResolver() - s3CustResolverFn := func(service, region string, optFns ...func(*endpoints.Options)) (endpoints.ResolvedEndpoint, error) { - if service == "s3" { - return endpoints.ResolvedEndpoint{ - URL: "s3.custom.endpoint.com", - SigningRegion: "custom-signing-region", - }, nil - } - - return defaultResolver.EndpointFor(service, region, optFns...) - } - sess := session.Must(session.NewSessionWithOptions(session.Options{ - Config: aws.Config{ - Region: aws.String("us-west-2"), - EndpointResolver: endpoints.ResolverFunc(s3CustResolverFn), - }, - })) - - // Create the S3 service client with the shared session. This will - // automatically use the S3 custom endpoint configured in the custom - // endpoint resolver wrapping the default endpoint resolver. - s3Svc := s3.New(sess) - // Operation calls will be made to the custom endpoint. - s3Svc.GetObject(&s3.GetObjectInput{ - Bucket: aws.String("myBucket"), - Key: aws.String("myObjectKey"), - }) - - // Create the SQS service client with the shared session. This will - // fallback to the default endpoint resolver because the customization - // passes any non S3 service endpoint resolve to the default resolver. - sqsSvc := sqs.New(sess) - // Operation calls will be made to the default endpoint for SQS for the - // region configured. - sqsSvc.ReceiveMessage(&sqs.ReceiveMessageInput{ - QueueUrl: aws.String("my-queue-url"), - }) - - // Create a DynamoDB service client that will use a custom endpoint - // resolver that overrides the shared session's. This is useful when - // custom endpoints are generated, or multiple endpoints are switched on - // by a region value. - ddbCustResolverFn := func(service, region string, optFns ...func(*endpoints.Options)) (endpoints.ResolvedEndpoint, error) { - return endpoints.ResolvedEndpoint{ - URL: "dynamodb.custom.endpoint", - SigningRegion: "custom-signing-region", - }, nil - } - ddbSvc := dynamodb.New(sess, &aws.Config{ - EndpointResolver: endpoints.ResolverFunc(ddbCustResolverFn), - }) - // Operation calls will be made to the custom endpoint set in the - // ddCustResolverFn. - ddbSvc.ListTables(&dynamodb.ListTablesInput{}) - - // Setting Config's Endpoint will override the EndpointResolver. Forcing - // the service clien to make all operation to the endpoint specified - // the in the config. - ddbSvcLocal := dynamodb.New(sess, &aws.Config{ - Endpoint: aws.String("http://localhost:8088"), - }) - ddbSvcLocal.ListTables(&dynamodb.ListTablesInput{}) -} diff --git a/vendor/github.com/aws/aws-sdk-go/example/aws/endpoints/enumEndpoints/README.md b/vendor/github.com/aws/aws-sdk-go/example/aws/endpoints/enumEndpoints/README.md deleted file mode 100644 index 4f8744c..0000000 --- a/vendor/github.com/aws/aws-sdk-go/example/aws/endpoints/enumEndpoints/README.md +++ /dev/null @@ -1,37 +0,0 @@ -Enumerate Regions and Endpoints Example -=== - -Demonstrates how the SDK's endpoints can be enumerated over to discover regions, services, and endpoints defined by the SDK's Regions and Endpoints metadata. - -Usage ---- - -The following parameters can be used to enumerate the SDK's partition metadata. - -Example: - - go run -tags example enumEndpoints.go -p aws -services -r us-west-2 - -Output: - - Services with endpoint us-west-2 in aws: - ec2 - dynamodb - s3 - ... - -CLI parameters ---- - -``` - -p=id partition id, e.g: aws - -r=id region id, e.g: us-west-2 - -s=id service id, e.g: s3 - - -partitions Lists all partitions. - -regions Lists all regions in a partition. Requires partition ID. - If service ID is also provided will show endpoints for a service. - -services Lists all services in a partition. Requires partition ID. - If region ID is also provided, will show services available in that region. -``` - diff --git a/vendor/github.com/aws/aws-sdk-go/example/aws/endpoints/enumEndpoints/enumEndpoints.go b/vendor/github.com/aws/aws-sdk-go/example/aws/endpoints/enumEndpoints/enumEndpoints.go deleted file mode 100644 index 4310701..0000000 --- a/vendor/github.com/aws/aws-sdk-go/example/aws/endpoints/enumEndpoints/enumEndpoints.go +++ /dev/null @@ -1,126 +0,0 @@ -// +build example - -package main - -import ( - "flag" - "fmt" - "os" - - "github.com/aws/aws-sdk-go/aws/endpoints" -) - -// Demostrates how the SDK's endpoints can be enumerated over to discover -// regions, services, and endpoints defined by the SDK's Regions and Endpoints -// metadata. -// -// Usage: -// -p=id partition id, e.g: aws -// -r=id region id, e.g: us-west-2 -// -s=id service id, e.g: s3 -// -// -partitions Lists all partitions. -// -regions Lists all regions in a partition. Requires partition ID. -// If service ID is also provided will show endpoints for a service. -// -services Lists all services in a partition. Requires partition ID. -// If region ID is also provided, will show services available in that region. -// -// Example: -// go run enumEndpoints.go -p aws -services -r us-west-2 -// -// Output: -// Services with endpoint us-west-2 in aws: -// ... -func main() { - var partitionID, regionID, serviceID string - flag.StringVar(&partitionID, "p", "", "Partition ID") - flag.StringVar(®ionID, "r", "", "Region ID") - flag.StringVar(&serviceID, "s", "", "Service ID") - - var cmdPartitions, cmdRegions, cmdServices bool - flag.BoolVar(&cmdPartitions, "partitions", false, "Lists partitions.") - flag.BoolVar(&cmdRegions, "regions", false, "Lists regions of a partition. Requires partition ID to be provided. Will filter by a service if '-s' is set.") - flag.BoolVar(&cmdServices, "services", false, "Lists services for a partition. Requires partition ID to be provided. Will filter by a region if '-r' is set.") - flag.Parse() - - partitions := endpoints.DefaultResolver().(endpoints.EnumPartitions).Partitions() - - if cmdPartitions { - printPartitions(partitions) - } - - if !(cmdRegions || cmdServices) { - return - } - - p, ok := findPartition(partitions, partitionID) - if !ok { - fmt.Fprintf(os.Stderr, "Partition %q not found", partitionID) - os.Exit(1) - } - - if cmdRegions { - printRegions(p, serviceID) - } - - if cmdServices { - printServices(p, regionID) - } -} - -func printPartitions(ps []endpoints.Partition) { - fmt.Println("Partitions:") - for _, p := range ps { - fmt.Println(p.ID()) - } -} - -func printRegions(p endpoints.Partition, serviceID string) { - if len(serviceID) != 0 { - s, ok := p.Services()[serviceID] - if !ok { - fmt.Fprintf(os.Stderr, "service %q does not exist in partition %q", serviceID, p.ID()) - os.Exit(1) - } - es := s.Endpoints() - fmt.Printf("Endpoints for %s in %s:\n", serviceID, p.ID()) - for _, e := range es { - r, _ := e.ResolveEndpoint() - fmt.Printf("%s: %s\n", e.ID(), r.URL) - } - - } else { - rs := p.Regions() - fmt.Printf("Regions in %s:\n", p.ID()) - for _, r := range rs { - fmt.Println(r.ID()) - } - } -} - -func printServices(p endpoints.Partition, endpointID string) { - ss := p.Services() - - if len(endpointID) > 0 { - fmt.Printf("Services with endpoint %s in %s:\n", endpointID, p.ID()) - } else { - fmt.Printf("Services in %s:\n", p.ID()) - } - - for id, s := range ss { - if _, ok := s.Endpoints()[endpointID]; !ok && len(endpointID) > 0 { - continue - } - fmt.Println(id) - } -} - -func findPartition(ps []endpoints.Partition, partitionID string) (endpoints.Partition, bool) { - for _, p := range ps { - if p.ID() == partitionID { - return p, true - } - } - - return endpoints.Partition{}, false -} diff --git a/vendor/github.com/aws/aws-sdk-go/example/aws/request/handleServiceErrorCodes/README.md b/vendor/github.com/aws/aws-sdk-go/example/aws/request/handleServiceErrorCodes/README.md deleted file mode 100644 index afc7063..0000000 --- a/vendor/github.com/aws/aws-sdk-go/example/aws/request/handleServiceErrorCodes/README.md +++ /dev/null @@ -1,17 +0,0 @@ -# Handling Specific Service Error Codes - -This examples highlights how you can use the `awserr.Error` type to perform logic based on specific error codes returned by service API operations. - -In this example the `S3` `GetObject` API operation is used to request the contents of a object in S3. The example handles the `NoSuchBucket` and `NoSuchKey` error codes printing custom messages to stderr. If Any other error is received a generic message is printed. - -## Usage - -Will make a request to S3 for the contents of an object. If the request was successful, and the object was found the object's path and size will be printed to stdout. - -If the object's bucket or key does not exist a specific error message will be printed to stderr for the error. - -Any other error will be printed as an unknown error. - -```sh -go run -tags example handleServiceErrorCodes.go mybucket mykey -``` diff --git a/vendor/github.com/aws/aws-sdk-go/example/aws/request/handleServiceErrorCodes/handleServiceErrorCodes.go b/vendor/github.com/aws/aws-sdk-go/example/aws/request/handleServiceErrorCodes/handleServiceErrorCodes.go deleted file mode 100644 index ee1da3a..0000000 --- a/vendor/github.com/aws/aws-sdk-go/example/aws/request/handleServiceErrorCodes/handleServiceErrorCodes.go +++ /dev/null @@ -1,66 +0,0 @@ -// +build example - -package main - -import ( - "fmt" - "os" - "path/filepath" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/aws/session" - "github.com/aws/aws-sdk-go/service/s3" -) - -func exitErrorf(msg string, args ...interface{}) { - fmt.Fprintf(os.Stderr, msg+"\n", args...) - os.Exit(1) -} - -// Will make a request to S3 for the contents of an object. If the request -// was successful, and the object was found the object's path and size will be -// printed to stdout. -// -// If the object's bucket or key does not exist a specific error message will -// be printed to stderr for the error. -// -// Any other error will be printed as an unknown error. -// -// Usage: handleServiceErrorCodes -func main() { - if len(os.Args) < 3 { - exitErrorf("Usage: %s ", filepath.Base(os.Args[0])) - } - sess := session.Must(session.NewSession()) - - svc := s3.New(sess) - resp, err := svc.GetObject(&s3.GetObjectInput{ - Bucket: aws.String(os.Args[1]), - Key: aws.String(os.Args[2]), - }) - - if err != nil { - // Casting to the awserr.Error type will allow you to inspect the error - // code returned by the service in code. The error code can be used - // to switch on context specific functionality. In this case a context - // specific error message is printed to the user based on the bucket - // and key existing. - // - // For information on other S3 API error codes see: - // http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html - if aerr, ok := err.(awserr.Error); ok { - switch aerr.Code() { - case s3.ErrCodeNoSuchBucket: - exitErrorf("bucket %s does not exist", os.Args[1]) - case s3.ErrCodeNoSuchKey: - exitErrorf("object with key %s does not exist in bucket %s", os.Args[2], os.Args[1]) - } - } - exitErrorf("unknown error occurred, %v", err) - } - defer resp.Body.Close() - - fmt.Printf("s3://%s/%s exists. size: %d\n", os.Args[1], os.Args[2], - aws.Int64Value(resp.ContentLength)) -} diff --git a/vendor/github.com/aws/aws-sdk-go/example/aws/request/withContext/README.md b/vendor/github.com/aws/aws-sdk-go/example/aws/request/withContext/README.md deleted file mode 100644 index 062aeec..0000000 --- a/vendor/github.com/aws/aws-sdk-go/example/aws/request/withContext/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Example - -Uploads a file to S3 given a bucket and object key. Also takes a duration -value to terminate the update if it doesn't complete within that time. - -The AWS Region needs to be provided in the AWS shared config or on the -environment variable as `AWS_REGION`. Credentials also must be provided -Will default to shared config file, but can load from environment if provided. - -## Usage: - - # Upload myfile.txt to myBucket/myKey. Must complete within 10 minutes or will fail - go run -tags example withContext.go -b mybucket -k myKey -d 10m < myfile.txt diff --git a/vendor/github.com/aws/aws-sdk-go/example/aws/request/withContext/withContext.go b/vendor/github.com/aws/aws-sdk-go/example/aws/request/withContext/withContext.go deleted file mode 100644 index e629221..0000000 --- a/vendor/github.com/aws/aws-sdk-go/example/aws/request/withContext/withContext.go +++ /dev/null @@ -1,71 +0,0 @@ -// +build example,go1.7 - -package main - -import ( - "context" - "flag" - "fmt" - "os" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/session" - "github.com/aws/aws-sdk-go/service/s3" -) - -// Uploads a file to S3 given a bucket and object key. Also takes a duration -// value to terminate the update if it doesn't complete within that time. -// -// The AWS Region needs to be provided in the AWS shared config or on the -// environment variable as `AWS_REGION`. Credentials also must be provided -// Will default to shared config file, but can load from environment if provided. -// -// Usage: -// # Upload myfile.txt to myBucket/myKey. Must complete within 10 minutes or will fail -// go run withContext.go -b mybucket -k myKey -d 10m < myfile.txt -func main() { - var bucket, key string - var timeout time.Duration - - flag.StringVar(&bucket, "b", "", "Bucket name.") - flag.StringVar(&key, "k", "", "Object key name.") - flag.DurationVar(&timeout, "d", 0, "Upload timeout.") - flag.Parse() - - sess := session.Must(session.NewSession()) - svc := s3.New(sess) - - // Create a context with a timeout that will abort the upload if it takes - // more than the passed in timeout. - ctx := context.Background() - var cancelFn func() - if timeout > 0 { - ctx, cancelFn = context.WithTimeout(ctx, timeout) - } - // Ensure the context is canceled to prevent leaking. - // See context package for more information, https://golang.org/pkg/context/ - defer cancelFn() - - // Uploads the object to S3. The Context will interrupt the request if the - // timeout expires. - _, err := svc.PutObjectWithContext(ctx, &s3.PutObjectInput{ - Bucket: aws.String(bucket), - Key: aws.String(key), - Body: os.Stdin, - }) - if err != nil { - if aerr, ok := err.(awserr.Error); ok && aerr.Code() == request.CanceledErrorCode { - // If the SDK can determine the request or retry delay was canceled - // by a context the CanceledErrorCode error code will be returned. - fmt.Fprintf(os.Stderr, "upload canceled due to timeout, %v\n", err) - } else { - fmt.Fprintf(os.Stderr, "failed to upload object, %v\n", err) - } - os.Exit(1) - } - - fmt.Printf("successfully uploaded file to %s/%s\n", bucket, key) -} diff --git a/vendor/github.com/aws/aws-sdk-go/example/service/cloudfront/signCookies/README.md b/vendor/github.com/aws/aws-sdk-go/example/service/cloudfront/signCookies/README.md deleted file mode 100644 index 567d226..0000000 --- a/vendor/github.com/aws/aws-sdk-go/example/service/cloudfront/signCookies/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# Example - -This example shows how the CloudFront CookieSigner can be used to generate signed cookies to provided short term access to restricted resourced fronted by CloudFront. - -# Usage -Makes a request for object using CloudFront cookie signing, and outputs the contents of the object to stdout. - -```sh -go run -tags example signCookies.go -file -id -r -g -``` - - diff --git a/vendor/github.com/aws/aws-sdk-go/example/service/cloudfront/signCookies/signCookies.go b/vendor/github.com/aws/aws-sdk-go/example/service/cloudfront/signCookies/signCookies.go deleted file mode 100644 index 70bd335..0000000 --- a/vendor/github.com/aws/aws-sdk-go/example/service/cloudfront/signCookies/signCookies.go +++ /dev/null @@ -1,79 +0,0 @@ -// +build example - -package main - -import ( - "flag" - "fmt" - "io/ioutil" - "net/http" - "time" - - "github.com/aws/aws-sdk-go/service/cloudfront/sign" -) - -// Makes a request for object using CloudFront cookie signing, and outputs -// the contents of the object to stdout. -// -// Usage example: -// signCookies -file -id -r -g -func main() { - var keyFile string // Private key PEM file - var keyID string // Key pair ID of CloudFront key pair - var resource string // CloudFront resource pattern - var object string // S3 object frontented by CloudFront - - flag.StringVar(&keyFile, "file", "", "private key file") - flag.StringVar(&keyID, "id", "", "key pair id") - flag.StringVar(&resource, "r", "", "resource to request") - flag.StringVar(&object, "g", "", "object to get") - flag.Parse() - - // Load the PEM file into memory so it can be used by the signer - privKey, err := sign.LoadPEMPrivKeyFile(keyFile) - if err != nil { - fmt.Println("failed to load key,", err) - return - } - - // Create the new CookieSigner to get signed cookies for CloudFront - // resource requests - signer := sign.NewCookieSigner(keyID, privKey) - - // Get the cookies for the resource. These will be used - // to make the requests with - cookies, err := signer.Sign(resource, time.Now().Add(1*time.Hour)) - if err != nil { - fmt.Println("failed to sign cookies", err) - return - } - - // Use the cookies in a http.Client to show how they allow the client - // to request resources from CloudFront. - req, err := http.NewRequest("GET", object, nil) - fmt.Println("Cookies:") - for _, c := range cookies { - fmt.Printf("%s=%s;\n", c.Name, c.Value) - req.AddCookie(c) - } - - // Send and handle the response. For a successful response the object's - // content will be written to stdout. The same process could be applied - // to a http service written cookies to the response but using - // http.SetCookie(w, c,) on the ResponseWriter. - resp, err := http.DefaultClient.Do(req) - if err != nil { - fmt.Println("failed to send request", err) - return - } - defer resp.Body.Close() - - b, err := ioutil.ReadAll(resp.Body) - if err != nil { - fmt.Println("failed to read requested body", err) - return - } - - fmt.Println("Response:", resp.Status) - fmt.Println(string(b)) -} diff --git a/vendor/github.com/aws/aws-sdk-go/example/service/dynamodb/scanItems/README.md b/vendor/github.com/aws/aws-sdk-go/example/service/dynamodb/scanItems/README.md deleted file mode 100644 index 8935926..0000000 --- a/vendor/github.com/aws/aws-sdk-go/example/service/dynamodb/scanItems/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# Example - -`scanItems` is an example how to use Amazon DynamoDB's Scan API operation with the SDK's `dynamodbattributes.UnmarshalListOfMaps` to unmarshal the Scan response's `Items` `[]map[string]*dynamodb.AttributeValue` field. This unmarshaler can be used with all `[]map[string]*dynamodb.AttributeValue` type fields. - -## Go Type - -The `Item` time will be used by the example to unmarshal the DynamoDB table's items to. - -```go -type Item struct { - Key int - Desc string - Data map[string]interface{} -} -``` -Use Go tags to define what the name is of the attribute in your DynamoDB table. See [AWS SDK for Go API Reference: Marshal](https://docs.aws.amazon.com/sdk-for-go/api/service/dynamodb/dynamodbattribute/#Marshal) for more information. - -In DynamoDB the structure of the item to be returned will be: -```json -{ - "Data": { - "Value 1": "abc", - "Value 2": 1234567890 - }, - "Desc": "First ddb item", - "Key": 1 -} -``` - -## Usage - -`go run -tags example scanItems.go -table "" -region ""` - -## Output - -``` -0: Key: 123, Desc: An item in the DynamoDB table - Num Data Values: 0 -1: Key: 2, Desc: Second ddb item - Num Data Values: 2 - - "A Field": 123 - - "Another Field": abc -2: Key: 1, Desc: First ddb item - Num Data Values: 2 - - "Value 1": abc - - "Value 2": 1234567890 -``` diff --git a/vendor/github.com/aws/aws-sdk-go/example/service/dynamodb/scanItems/scanItems.go b/vendor/github.com/aws/aws-sdk-go/example/service/dynamodb/scanItems/scanItems.go deleted file mode 100644 index 5fec426..0000000 --- a/vendor/github.com/aws/aws-sdk-go/example/service/dynamodb/scanItems/scanItems.go +++ /dev/null @@ -1,98 +0,0 @@ -// +build example - -package main - -import ( - "flag" - "fmt" - "os" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/session" - "github.com/aws/aws-sdk-go/service/dynamodb" - "github.com/aws/aws-sdk-go/service/dynamodb/dynamodbattribute" -) - -func exitWithError(err error) { - fmt.Fprintln(os.Stderr, err) - os.Exit(1) -} - -func main() { - cfg := Config{} - if err := cfg.Load(); err != nil { - exitWithError(fmt.Errorf("failed to load config, %v", err)) - } - - // Create the config specifying the Region for the DynamoDB table. - // If Config.Region is not set the region must come from the shared - // config or AWS_REGION environment variable. - awscfg := &aws.Config{} - if len(cfg.Region) > 0 { - awscfg.WithRegion(cfg.Region) - } - - // Create the session that the DynamoDB service will use. - sess := session.Must(session.NewSession(awscfg)) - - // Create the DynamoDB service client to make the query request with. - svc := dynamodb.New(sess) - - // Build the query input parameters - params := &dynamodb.ScanInput{ - TableName: aws.String(cfg.Table), - } - if cfg.Limit > 0 { - params.Limit = aws.Int64(cfg.Limit) - } - - // Make the DynamoDB Query API call - result, err := svc.Scan(params) - if err != nil { - exitWithError(fmt.Errorf("failed to make Query API call, %v", err)) - } - - items := []Item{} - - // Unmarshal the Items field in the result value to the Item Go type. - err = dynamodbattribute.UnmarshalListOfMaps(result.Items, &items) - if err != nil { - exitWithError(fmt.Errorf("failed to unmarshal Query result items, %v", err)) - } - - // Print out the items returned - for i, item := range items { - fmt.Printf("%d: Key: %d, Desc: %s\n", i, item.Key, item.Desc) - fmt.Printf("\tNum Data Values: %d\n", len(item.Data)) - for k, v := range item.Data { - fmt.Printf("\t- %q: %v\n", k, v) - } - } -} - -type Item struct { - Key int - Desc string - Data map[string]interface{} -} - -type Config struct { - Table string // required - Region string // optional - Limit int64 // optional - -} - -func (c *Config) Load() error { - flag.Int64Var(&c.Limit, "limit", 0, "Limit is the max items to be returned, 0 is no limit") - flag.StringVar(&c.Table, "table", "", "Table to Query on") - flag.StringVar(&c.Region, "region", "", "AWS Region the table is in") - flag.Parse() - - if len(c.Table) == 0 { - flag.PrintDefaults() - return fmt.Errorf("table name is required.") - } - - return nil -} diff --git a/vendor/github.com/aws/aws-sdk-go/example/service/dynamodb/unitTest/README.md b/vendor/github.com/aws/aws-sdk-go/example/service/dynamodb/unitTest/README.md deleted file mode 100644 index 3c60051..0000000 --- a/vendor/github.com/aws/aws-sdk-go/example/service/dynamodb/unitTest/README.md +++ /dev/null @@ -1,52 +0,0 @@ -# Example -You can instantiate `*dynamodb.DynamoDB` and pass that as a parameter to all -methods connecting to DynamoDB, or as `unitTest` demonstrates, create your own -`type` and pass it along as a field. - -## Test-compatible DynamoDB field -If you use `*dynamodb.DynamoDB` as a field, you will be unable to unit test it, -as documented in #88. Cast it instead as `dynamodbiface.DynamoDBAPI`: - -```go -type ItemGetter struct { - DynamoDB dynamodbiface.DynamoDBAPI -} -``` - -## Querying actual DynamoDB -You'll need an `*aws.Config` and `*session.Session` for these to work correctly: - -```go -// Setup -var getter = new(ItemGetter) -var config *aws.Config = &aws.Config{Region: aws.String("us-west-2"),} -var sess *session.Session = session.NewSession(config) -var svc *dynamodb.DynamoDB = dynamodb.New() -getter.DynamoDB = dynamodbiface.DynamoDBAPI(svc) -// Finally -getter.DynamoDB.GetItem(/* ... */) -``` - -## Querying in tests -Construct a `fakeDynamoDB` and add the necessary methods for each of those -structs (custom ones for `ItemGetter` and [whatever methods you're using for -DynamoDB](https://github.com/aws/aws-sdk-go/blob/master/service/dynamodb/dynamodbiface/interface.go)), -and you're good to go! - -```go -type fakeDynamoDB struct { - dynamodbiface.DynamoDBAPI -} -var getter = new(ItemGetter) -getter.DynamoDB = &fakeDynamoDB{} -// And to run it (assuming you've mocked fakeDynamoDB.GetItem) -getter.DynamoDB.GetItem(/* ... */) -``` - -## Output -``` -$ go test -tags example -cover -PASS -coverage: 100.0% of statements -ok _/Users/shatil/workspace/aws-sdk-go/example/service/dynamodb/unitTest 0.008s -``` diff --git a/vendor/github.com/aws/aws-sdk-go/example/service/dynamodb/unitTest/unitTest.go b/vendor/github.com/aws/aws-sdk-go/example/service/dynamodb/unitTest/unitTest.go deleted file mode 100644 index 74e65f9..0000000 --- a/vendor/github.com/aws/aws-sdk-go/example/service/dynamodb/unitTest/unitTest.go +++ /dev/null @@ -1,41 +0,0 @@ -// +build example - -// Package unitTest demonstrates how to unit test, without needing to pass a -// connector to every function, code that uses DynamoDB. -package unitTest - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/dynamodb" - "github.com/aws/aws-sdk-go/service/dynamodb/dynamodbattribute" - "github.com/aws/aws-sdk-go/service/dynamodb/dynamodbiface" -) - -// ItemGetter can be assigned a DynamoDB connector like: -// svc := dynamodb.DynamoDB(sess) -// getter.DynamoDB = dynamodbiface.DynamoDBAPI(svc) -type ItemGetter struct { - DynamoDB dynamodbiface.DynamoDBAPI -} - -// Get a value from a DynamoDB table containing entries like: -// {"id": "my primary key", "value": "valuable value"} -func (ig *ItemGetter) Get(id string) (value string) { - var input = &dynamodb.GetItemInput{ - Key: map[string]*dynamodb.AttributeValue{ - "id": { - S: aws.String(id), - }, - }, - TableName: aws.String("my_table"), - AttributesToGet: []*string{ - aws.String("value"), - }, - } - if output, err := ig.DynamoDB.GetItem(input); err == nil { - if _, ok := output.Item["value"]; ok { - dynamodbattribute.Unmarshal(output.Item["value"], &value) - } - } - return -} diff --git a/vendor/github.com/aws/aws-sdk-go/example/service/dynamodb/unitTest/unitTest_test.go b/vendor/github.com/aws/aws-sdk-go/example/service/dynamodb/unitTest/unitTest_test.go deleted file mode 100644 index 83078ac..0000000 --- a/vendor/github.com/aws/aws-sdk-go/example/service/dynamodb/unitTest/unitTest_test.go +++ /dev/null @@ -1,59 +0,0 @@ -// +build example - -// Unit tests for package unitTest. -package unitTest - -import ( - "errors" - "testing" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/dynamodb" - "github.com/aws/aws-sdk-go/service/dynamodb/dynamodbiface" -) - -// A fakeDynamoDB instance. During testing, instatiate ItemGetter, then simply -// assign an instance of fakeDynamoDB to it. -type fakeDynamoDB struct { - dynamodbiface.DynamoDBAPI - payload map[string]string // Store expected return values - err error -} - -// Mock GetItem such that the output returned carries values identical to input. -func (fd *fakeDynamoDB) GetItem(input *dynamodb.GetItemInput) (*dynamodb.GetItemOutput, error) { - output := new(dynamodb.GetItemOutput) - output.Item = make(map[string]*dynamodb.AttributeValue) - for key, value := range fd.payload { - output.Item[key] = &dynamodb.AttributeValue{ - S: aws.String(value), - } - } - return output, fd.err -} - -func TestItemGetterGet(t *testing.T) { - expectedKey := "expected key" - expectedValue := "expected value" - getter := new(ItemGetter) - getter.DynamoDB = &fakeDynamoDB{ - payload: map[string]string{"id": expectedKey, "value": expectedValue}, - } - if actualValue := getter.Get(expectedKey); actualValue != expectedValue { - t.Errorf("Expected %q but got %q", expectedValue, actualValue) - } -} - -// When DynamoDB.GetItem returns a non-nil error, expect an empty string. -func TestItemGetterGetFail(t *testing.T) { - expectedKey := "expected key" - expectedValue := "expected value" - getter := new(ItemGetter) - getter.DynamoDB = &fakeDynamoDB{ - payload: map[string]string{"id": expectedKey, "value": expectedValue}, - err: errors.New("any error"), - } - if actualValue := getter.Get(expectedKey); len(actualValue) > 0 { - t.Errorf("Expected %q but got %q", expectedValue, actualValue) - } -} diff --git a/vendor/github.com/aws/aws-sdk-go/example/service/ec2/filterInstances/README.md b/vendor/github.com/aws/aws-sdk-go/example/service/ec2/filterInstances/README.md deleted file mode 100644 index 7471626..0000000 --- a/vendor/github.com/aws/aws-sdk-go/example/service/ec2/filterInstances/README.md +++ /dev/null @@ -1,31 +0,0 @@ -# Example - -This is an example using the AWS SDK for Go to list ec2 instances that match provided tag name filter. - - -# Usage - -The example uses the bucket name provided, and lists all object keys in a bucket. - -```sh -go run -tags example filter_ec2_by_tag.go -``` - -Output: -``` -listing instances with tag vpn in: us-east-1 -[{ - Instances: [{ - AmiLaunchIndex: 0, - Architecture: "x86_64", - BlockDeviceMappings: [{ - DeviceName: "/dev/xvda", - Ebs: { - AttachTime: 2016-07-06 18:04:53 +0000 UTC, - DeleteOnTermination: true, - Status: "attached", - VolumeId: "vol-xxxx" - } - }], - ... -``` diff --git a/vendor/github.com/aws/aws-sdk-go/example/service/ec2/filterInstances/filter_ec2_by_tag.go b/vendor/github.com/aws/aws-sdk-go/example/service/ec2/filterInstances/filter_ec2_by_tag.go deleted file mode 100644 index c01946d..0000000 --- a/vendor/github.com/aws/aws-sdk-go/example/service/ec2/filterInstances/filter_ec2_by_tag.go +++ /dev/null @@ -1,43 +0,0 @@ -// +build example - -package main - -import ( - "fmt" - "log" - "os" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/session" - "github.com/aws/aws-sdk-go/service/ec2" -) - -// This example will list instances with a filter -// -// Usage: -// filter_ec2_by_tag -func main() { - sess := session.Must(session.NewSession()) - - nameFilter := os.Args[1] - awsRegion := "us-east-1" - svc := ec2.New(sess, &aws.Config{Region: aws.String(awsRegion)}) - fmt.Printf("listing instances with tag %v in: %v\n", nameFilter, awsRegion) - params := &ec2.DescribeInstancesInput{ - Filters: []*ec2.Filter{ - { - Name: aws.String("tag:Name"), - Values: []*string{ - aws.String(strings.Join([]string{"*", nameFilter, "*"}, "")), - }, - }, - }, - } - resp, err := svc.DescribeInstances(params) - if err != nil { - fmt.Println("there was an error listing instances in", awsRegion, err.Error()) - log.Fatal(err.Error()) - } - fmt.Printf("%+v\n", *resp) -} diff --git a/vendor/github.com/aws/aws-sdk-go/example/service/s3/concatObjects/README.md b/vendor/github.com/aws/aws-sdk-go/example/service/s3/concatObjects/README.md deleted file mode 100644 index 6db01eb..0000000 --- a/vendor/github.com/aws/aws-sdk-go/example/service/s3/concatObjects/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# Example - -This is an example using the AWS SDK for Go to concatenate two objects together. -We use `UploadPartCopy` which uses an object for a part. Here in this example we have two parts, or in other words -two objects that we want to concatenate together. - - -# Usage - -The example uses the bucket name provided, two keys for each object, and lastly the output key. - -```sh -AWS_REGION= go run -tags example concatenateObjects.go -``` diff --git a/vendor/github.com/aws/aws-sdk-go/example/service/s3/concatObjects/concatObjects.go b/vendor/github.com/aws/aws-sdk-go/example/service/s3/concatObjects/concatObjects.go deleted file mode 100644 index 47cba60..0000000 --- a/vendor/github.com/aws/aws-sdk-go/example/service/s3/concatObjects/concatObjects.go +++ /dev/null @@ -1,104 +0,0 @@ -// +build example - -package main - -import ( - "log" - "net/url" - "os" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/session" - "github.com/aws/aws-sdk-go/service/s3" -) - -type client struct { - s3Client *s3.S3 - bucket *string -} - -// concatenate will contenate key1's object to key2's object under the key testKey -func (c *client) concatenate(key1, key2, key3 string, uploadID *string) (*string, *string, error) { - // The first part to be uploaded which is represented as part number 1 - foo, err := c.s3Client.UploadPartCopy(&s3.UploadPartCopyInput{ - Bucket: c.bucket, - CopySource: aws.String(url.QueryEscape(*c.bucket + "/" + key1)), - PartNumber: aws.Int64(1), - Key: &key3, - UploadId: uploadID, - }) - if err != nil { - return nil, nil, err - } - - // The second part that is going to be appended to the newly created testKey - // object. - bar, err := c.s3Client.UploadPartCopy(&s3.UploadPartCopyInput{ - Bucket: c.bucket, - CopySource: aws.String(url.QueryEscape(*c.bucket + "/" + key2)), - PartNumber: aws.Int64(2), - Key: &key3, - UploadId: uploadID, - }) - if err != nil { - return nil, nil, err - } - // The ETags are needed to complete the process - return foo.CopyPartResult.ETag, bar.CopyPartResult.ETag, nil -} - -func main() { - if len(os.Args) < 4 { - log.Println("USAGE ERROR: AWS_REGION=us-east-1 go run concatenateObjects.go ") - return - } - - bucket := os.Args[1] - key1 := os.Args[2] - key2 := os.Args[3] - key3 := os.Args[4] - sess := session.New(&aws.Config{}) - svc := s3.New(sess) - - c := client{svc, &bucket} - - // We let the service know that we want to do a multipart upload - output, err := c.s3Client.CreateMultipartUpload(&s3.CreateMultipartUploadInput{ - Bucket: &bucket, - Key: &key3, - }) - - if err != nil { - log.Println("ERROR:", err) - return - } - - foo, bar, err := c.concatenate(key1, key2, key3, output.UploadId) - if err != nil { - log.Println("ERROR:", err) - return - } - - // We finally complete the multipart upload. - _, err = c.s3Client.CompleteMultipartUpload(&s3.CompleteMultipartUploadInput{ - Bucket: &bucket, - Key: &key3, - UploadId: output.UploadId, - MultipartUpload: &s3.CompletedMultipartUpload{ - Parts: []*s3.CompletedPart{ - { - ETag: foo, - PartNumber: aws.Int64(1), - }, - { - ETag: bar, - PartNumber: aws.Int64(2), - }, - }, - }, - }) - if err != nil { - log.Println("ERROR:", err) - return - } -} diff --git a/vendor/github.com/aws/aws-sdk-go/example/service/s3/listObjects/README.md b/vendor/github.com/aws/aws-sdk-go/example/service/s3/listObjects/README.md deleted file mode 100644 index 6def7ac..0000000 --- a/vendor/github.com/aws/aws-sdk-go/example/service/s3/listObjects/README.md +++ /dev/null @@ -1,27 +0,0 @@ -# Example - -This is an example using the AWS SDK for Go to list objects' key in a S3 bucket. - - -# Usage - -The example uses the bucket name provided, and lists all object keys in a bucket. - -```sh -go run -tags example listObjects.go -``` - -Output: -``` -Page, 0 -Object: myKey -Object: mykey.txt -Object: resources/0001/item-01 -Object: resources/0001/item-02 -Object: resources/0001/item-03 -Object: resources/0002/item-01 -Object: resources/0002/item-02 -Object: resources/0002/item-03 -Object: resources/0002/item-04 -Object: resources/0002/item-05 -``` diff --git a/vendor/github.com/aws/aws-sdk-go/example/service/s3/listObjects/listObjects.go b/vendor/github.com/aws/aws-sdk-go/example/service/s3/listObjects/listObjects.go deleted file mode 100644 index 3ed5eed..0000000 --- a/vendor/github.com/aws/aws-sdk-go/example/service/s3/listObjects/listObjects.go +++ /dev/null @@ -1,43 +0,0 @@ -// +build example - -package main - -import ( - "fmt" - "os" - - "github.com/aws/aws-sdk-go/aws/session" - "github.com/aws/aws-sdk-go/service/s3" -) - -// Lists all objects in a bucket using pagination -// -// Usage: -// listObjects -func main() { - if len(os.Args) < 2 { - fmt.Println("you must specify a bucket") - return - } - - sess := session.Must(session.NewSession()) - - svc := s3.New(sess) - - i := 0 - err := svc.ListObjectsPages(&s3.ListObjectsInput{ - Bucket: &os.Args[1], - }, func(p *s3.ListObjectsOutput, last bool) (shouldContinue bool) { - fmt.Println("Page,", i) - i++ - - for _, obj := range p.Contents { - fmt.Println("Object:", *obj.Key) - } - return true - }) - if err != nil { - fmt.Println("failed to list objects", err) - return - } -} diff --git a/vendor/github.com/aws/aws-sdk-go/example/service/s3/listObjectsConcurrently/README.md b/vendor/github.com/aws/aws-sdk-go/example/service/s3/listObjectsConcurrently/README.md deleted file mode 100644 index fad5b94..0000000 --- a/vendor/github.com/aws/aws-sdk-go/example/service/s3/listObjectsConcurrently/README.md +++ /dev/null @@ -1,13 +0,0 @@ -## Example - -This is an example using the AWS SDK for Go concurrently to list the encrypted objects in the S3 buckets owned by an account. - -## Usage - -The example's `accounts` string slice contains a list of the SharedCredentials profiles which will be used to look up the buckets owned by each profile. Each bucket's objects will be queried. - -``` -AWS_REGION=us-east-1 go run -tags example listObjectsConcurrentlv.go -``` - - diff --git a/vendor/github.com/aws/aws-sdk-go/example/service/s3/listObjectsConcurrently/listObjectsConcurrently.go b/vendor/github.com/aws/aws-sdk-go/example/service/s3/listObjectsConcurrently/listObjectsConcurrently.go deleted file mode 100644 index d399f54..0000000 --- a/vendor/github.com/aws/aws-sdk-go/example/service/s3/listObjectsConcurrently/listObjectsConcurrently.go +++ /dev/null @@ -1,236 +0,0 @@ -// +build example - -package main - -import ( - "fmt" - "os" - "sort" - "sync" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/session" - "github.com/aws/aws-sdk-go/service/s3" -) - -func exit(msg ...interface{}) { - fmt.Fprintln(os.Stderr, msg...) - os.Exit(1) -} - -// Lists all encrypted objects owned by an account. The `accounts` string -// contains a list of profiles to use. -// -// Usage: -// listObjectsConcurrentlv -func main() { - accounts := []string{"default", "default2", "otherprofile"} - - // Spin off a worker for each account to retrieve that account's - bucketCh := make(chan *Bucket, 5) - var wg sync.WaitGroup - for _, acc := range accounts { - wg.Add(1) - go func(acc string) { - defer wg.Done() - - sess, err := session.NewSessionWithOptions(session.Options{ - Profile: acc, - }) - if err != nil { - fmt.Fprintf(os.Stderr, "failed to create session for account, %s, %v\n", acc, err) - return - } - if err = getAccountBuckets(sess, bucketCh, acc); err != nil { - fmt.Fprintf(os.Stderr, "failed to get account %s's bucket info, %v\n", acc, err) - } - }(acc) - } - // Spin off a goroutine which will wait until all account buckets have been collected and - // added to the bucketCh. Close the bucketCh so the for range below will exit once all - // bucket info is printed. - go func() { - wg.Wait() - close(bucketCh) - }() - - // Receive from the bucket channel printing the information for each bucket to the console - // when the bucketCh channel is drained. - buckets := []*Bucket{} - for b := range bucketCh { - buckets = append(buckets, b) - } - - sortBuckets(buckets) - for _, b := range buckets { - if b.Error != nil { - fmt.Printf("Bucket %s, owned by: %s, failed: %v\n", b.Name, b.Owner, b.Error) - continue - } - - encObjs := b.encryptedObjects() - fmt.Printf("Bucket: %s, owned by: %s, total objects: %d, failed objects: %d, encrypted objects: %d\n", - b.Name, b.Owner, len(b.Objects), len(b.ErrObjects), len(encObjs)) - if len(encObjs) > 0 { - for _, encObj := range encObjs { - fmt.Printf("\t%s %s:%s/%s\n", encObj.EncryptionType, b.Region, b.Name, encObj.Key) - } - } - } -} - -func sortBuckets(buckets []*Bucket) { - s := sortalbeBuckets(buckets) - sort.Sort(s) -} - -type sortalbeBuckets []*Bucket - -func (s sortalbeBuckets) Len() int { return len(s) } -func (s sortalbeBuckets) Swap(a, b int) { s[a], s[b] = s[b], s[a] } -func (s sortalbeBuckets) Less(a, b int) bool { - if s[a].Owner == s[b].Owner && s[a].Name < s[b].Name { - return true - } - - if s[a].Owner < s[b].Owner { - return true - } - - return false -} - -func getAccountBuckets(sess *session.Session, bucketCh chan<- *Bucket, owner string) error { - svc := s3.New(sess) - buckets, err := listBuckets(svc) - if err != nil { - return fmt.Errorf("failed to list buckets, %v", err) - } - for _, bucket := range buckets { - bucket.Owner = owner - if bucket.Error != nil { - continue - } - - bckSvc := s3.New(sess, &aws.Config{ - Region: aws.String(bucket.Region), - Credentials: svc.Config.Credentials, - }) - bucketDetails(bckSvc, bucket) - bucketCh <- bucket - } - - return nil -} - -func bucketDetails(svc *s3.S3, bucket *Bucket) { - objs, errObjs, err := listBucketObjects(svc, bucket.Name) - if err != nil { - bucket.Error = err - } else { - bucket.Objects = objs - bucket.ErrObjects = errObjs - } -} - -// A Object provides details of an S3 object -type Object struct { - Bucket string - Key string - Encrypted bool - EncryptionType string -} - -// An ErrObject provides details of the error occurred retrieving -// an object's status. -type ErrObject struct { - Bucket string - Key string - Error error -} - -// A Bucket provides details about a bucket and its objects -type Bucket struct { - Owner string - Name string - CreationDate time.Time - Region string - Objects []Object - Error error - ErrObjects []ErrObject -} - -func (b *Bucket) encryptedObjects() []Object { - encObjs := []Object{} - for _, obj := range b.Objects { - if obj.Encrypted { - encObjs = append(encObjs, obj) - } - } - return encObjs -} - -func listBuckets(svc *s3.S3) ([]*Bucket, error) { - res, err := svc.ListBuckets(&s3.ListBucketsInput{}) - if err != nil { - return nil, err - } - - buckets := make([]*Bucket, len(res.Buckets)) - for i, b := range res.Buckets { - buckets[i] = &Bucket{ - Name: *b.Name, - CreationDate: *b.CreationDate, - } - - locRes, err := svc.GetBucketLocation(&s3.GetBucketLocationInput{ - Bucket: b.Name, - }) - if err != nil { - buckets[i].Error = err - continue - } - - if locRes.LocationConstraint == nil { - buckets[i].Region = "us-east-1" - } else { - buckets[i].Region = *locRes.LocationConstraint - } - } - - return buckets, nil -} - -func listBucketObjects(svc *s3.S3, bucket string) ([]Object, []ErrObject, error) { - listRes, err := svc.ListObjects(&s3.ListObjectsInput{ - Bucket: &bucket, - }) - if err != nil { - return nil, nil, err - } - - objs := make([]Object, 0, len(listRes.Contents)) - errObjs := []ErrObject{} - for _, listObj := range listRes.Contents { - objData, err := svc.HeadObject(&s3.HeadObjectInput{ - Bucket: &bucket, - Key: listObj.Key, - }) - - if err != nil { - errObjs = append(errObjs, ErrObject{Bucket: bucket, Key: *listObj.Key, Error: err}) - continue - } - - obj := Object{Bucket: bucket, Key: *listObj.Key} - if objData.ServerSideEncryption != nil { - obj.Encrypted = true - obj.EncryptionType = *objData.ServerSideEncryption - } - - objs = append(objs, obj) - } - - return objs, errObjs, nil -} diff --git a/vendor/github.com/aws/aws-sdk-go/example/service/s3/putObjectAcl/README.md b/vendor/github.com/aws/aws-sdk-go/example/service/s3/putObjectAcl/README.md deleted file mode 100644 index 8a696be..0000000 --- a/vendor/github.com/aws/aws-sdk-go/example/service/s3/putObjectAcl/README.md +++ /dev/null @@ -1,40 +0,0 @@ -# Example - -putObjectAcl is an example using the AWS SDK for Go to put an ACL on an S3 object. - -# Usage - -```sh -putBucketAcl - -region // required - -bucket // required - -key // required - -owner-name - -owner-id - -grantee-type // required - -uri - -email - -user-id - -display-name -``` - -```sh -go run -tags example putObjectAcl.go - -bucket - -key - -owner-name - -owner-id - -grantee-type - -user-id -``` - -Depending on the type is used depends on which of the three, `uri`, `email`, or `user-id`, needs to be used. -* `s3.TypeCanonicalUser`: `user-id` or `display-name` must be used -* `s3.TypeAmazonCustomerByEmail`: `email` must be used -* `s3.TypeGroup`: `uri` must be used - -Output: -``` -success { -} nil -``` diff --git a/vendor/github.com/aws/aws-sdk-go/example/service/s3/putObjectAcl/putObjectAcl.go b/vendor/github.com/aws/aws-sdk-go/example/service/s3/putObjectAcl/putObjectAcl.go deleted file mode 100644 index c32aef5..0000000 --- a/vendor/github.com/aws/aws-sdk-go/example/service/s3/putObjectAcl/putObjectAcl.go +++ /dev/null @@ -1,91 +0,0 @@ -// +build example - -package main - -import ( - "flag" - "fmt" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/session" - "github.com/aws/aws-sdk-go/service/s3" -) - -// Put an ACL on an S3 object -// -// Usage: -// putBucketAcl -// -region // required -// -bucket // required -// -key // required -// -owner-name -// -owner-id -// -grantee-type // required -// -uri -// -email -// -user-id -func main() { - regionPtr := flag.String("region", "", "region of your request") - bucketPtr := flag.String("bucket", "", "name of your bucket") - keyPtr := flag.String("key", "", "of your object") - ownerNamePtr := flag.String("owner-name", "", "of your request") - ownerIDPtr := flag.String("owner-id", "", "of your request") - granteeTypePtr := flag.String("grantee-type", "", "of your request") - uriPtr := flag.String("uri", "", "of your grantee type") - emailPtr := flag.String("email", "", "of your grantee type") - userPtr := flag.String("user-id", "", "of your grantee type") - displayNamePtr := flag.String("display-name", "", "of your grantee type") - flag.Parse() - - // Based off the type, fields must be excluded. - switch *granteeTypePtr { - case s3.TypeCanonicalUser: - emailPtr, uriPtr = nil, nil - if *displayNamePtr == "" { - displayNamePtr = nil - } - - if *userPtr == "" { - userPtr = nil - } - case s3.TypeAmazonCustomerByEmail: - uriPtr, userPtr = nil, nil - case s3.TypeGroup: - emailPtr, userPtr = nil, nil - } - - sess := session.Must(session.NewSession(&aws.Config{ - Region: regionPtr, - })) - - svc := s3.New(sess) - - resp, err := svc.PutObjectAcl(&s3.PutObjectAclInput{ - Bucket: bucketPtr, - Key: keyPtr, - AccessControlPolicy: &s3.AccessControlPolicy{ - Owner: &s3.Owner{ - DisplayName: ownerNamePtr, - ID: ownerIDPtr, - }, - Grants: []*s3.Grant{ - { - Grantee: &s3.Grantee{ - Type: granteeTypePtr, - DisplayName: displayNamePtr, - URI: uriPtr, - EmailAddress: emailPtr, - ID: userPtr, - }, - Permission: aws.String(s3.BucketLogsPermissionFullControl), - }, - }, - }, - }) - - if err != nil { - fmt.Println("failed", err) - } else { - fmt.Println("success", resp) - } -} diff --git a/vendor/github.com/aws/aws-sdk-go/example/service/sqs/mockingClientsForTests/README.md b/vendor/github.com/aws/aws-sdk-go/example/service/sqs/mockingClientsForTests/README.md deleted file mode 100644 index 144bd38..0000000 --- a/vendor/github.com/aws/aws-sdk-go/example/service/sqs/mockingClientsForTests/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# Example - -This example shows how the SDK's API interfaces can be used by your code instead of the concrete service client type directly. Using this pattern allows you to mock out your code's usage of the SDK's service client for testing. - -# Usage - -Use the `go test` tool to verify the `Queue` type's `GetMessages` function correctly unmarshals the SQS message responses. - -`go test -tags example ifaceExample.go` diff --git a/vendor/github.com/aws/aws-sdk-go/example/service/sqs/mockingClientsForTests/ifaceExample.go b/vendor/github.com/aws/aws-sdk-go/example/service/sqs/mockingClientsForTests/ifaceExample.go deleted file mode 100644 index 2e186e7..0000000 --- a/vendor/github.com/aws/aws-sdk-go/example/service/sqs/mockingClientsForTests/ifaceExample.go +++ /dev/null @@ -1,79 +0,0 @@ -// +build example - -package main - -import ( - "encoding/json" - "fmt" - "os" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/session" - "github.com/aws/aws-sdk-go/service/sqs" - "github.com/aws/aws-sdk-go/service/sqs/sqsiface" -) - -func main() { - if len(os.Args) < 2 { - fmt.Fprintln(os.Stderr, "Queue URL required.") - os.Exit(1) - } - - sess := session.Must(session.NewSession()) - - q := Queue{ - Client: sqs.New(sess), - URL: os.Args[1], - } - - msgs, err := q.GetMessages(20) - if err != nil { - fmt.Fprintln(os.Stderr, err.Error()) - os.Exit(1) - } - - fmt.Println("Messages:") - for _, msg := range msgs { - fmt.Printf("%s>%s: %s\n", msg.From, msg.To, msg.Msg) - } -} - -// Queue provides the ability to handle SQS messages. -type Queue struct { - Client sqsiface.SQSAPI - URL string -} - -// Message is a concrete representation of the SQS message -type Message struct { - From string `json:"from"` - To string `json:"to"` - Msg string `json:"msg"` -} - -// GetMessages returns the parsed messages from SQS if any. If an error -// occurs that error will be returned. -func (q *Queue) GetMessages(waitTimeout int64) ([]Message, error) { - params := sqs.ReceiveMessageInput{ - QueueUrl: aws.String(q.URL), - } - if waitTimeout > 0 { - params.WaitTimeSeconds = aws.Int64(waitTimeout) - } - resp, err := q.Client.ReceiveMessage(¶ms) - if err != nil { - return nil, fmt.Errorf("failed to get messages, %v", err) - } - - msgs := make([]Message, len(resp.Messages)) - for i, msg := range resp.Messages { - parsedMsg := Message{} - if err := json.Unmarshal([]byte(aws.StringValue(msg.Body)), &parsedMsg); err != nil { - return nil, fmt.Errorf("failed to unmarshal message, %v", err) - } - - msgs[i] = parsedMsg - } - - return msgs, nil -} diff --git a/vendor/github.com/aws/aws-sdk-go/example/service/sqs/mockingClientsForTests/ifaceExample_test.go b/vendor/github.com/aws/aws-sdk-go/example/service/sqs/mockingClientsForTests/ifaceExample_test.go deleted file mode 100644 index b2b32f8..0000000 --- a/vendor/github.com/aws/aws-sdk-go/example/service/sqs/mockingClientsForTests/ifaceExample_test.go +++ /dev/null @@ -1,65 +0,0 @@ -// +build example - -package main - -import ( - "fmt" - "testing" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/sqs" - "github.com/aws/aws-sdk-go/service/sqs/sqsiface" -) - -type mockedReceiveMsgs struct { - sqsiface.SQSAPI - Resp sqs.ReceiveMessageOutput -} - -func (m mockedReceiveMsgs) ReceiveMessage(in *sqs.ReceiveMessageInput) (*sqs.ReceiveMessageOutput, error) { - // Only need to return mocked response output - return &m.Resp, nil -} - -func TestQueueGetMessage(t *testing.T) { - cases := []struct { - Resp sqs.ReceiveMessageOutput - Expected []Message - }{ - { // Case 1, expect parsed responses - Resp: sqs.ReceiveMessageOutput{ - Messages: []*sqs.Message{ - {Body: aws.String(`{"from":"user_1","to":"room_1","msg":"Hello!"}`)}, - {Body: aws.String(`{"from":"user_2","to":"room_1","msg":"Hi user_1 :)"}`)}, - }, - }, - Expected: []Message{ - {From: "user_1", To: "room_1", Msg: "Hello!"}, - {From: "user_2", To: "room_1", Msg: "Hi user_1 :)"}, - }, - }, - { // Case 2, not messages returned - Resp: sqs.ReceiveMessageOutput{}, - Expected: []Message{}, - }, - } - - for i, c := range cases { - q := Queue{ - Client: mockedReceiveMsgs{Resp: c.Resp}, - URL: fmt.Sprintf("mockURL_%d", i), - } - msgs, err := q.GetMessages(20) - if err != nil { - t.Fatalf("%d, unexpected error, %v", i, err) - } - if a, e := len(msgs), len(c.Expected); a != e { - t.Fatalf("%d, expected %d messages, got %d", i, e, a) - } - for j, msg := range msgs { - if a, e := msg, c.Expected[j]; a != e { - t.Errorf("%d, expected %v message, got %v", i, e, a) - } - } - } -} diff --git a/vendor/github.com/aws/aws-sdk-go/internal/sdkio/io_go1.6.go b/vendor/github.com/aws/aws-sdk-go/internal/sdkio/io_go1.6.go new file mode 100644 index 0000000..5aa9137 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/sdkio/io_go1.6.go @@ -0,0 +1,10 @@ +// +build !go1.7 + +package sdkio + +// Copy of Go 1.7 io package's Seeker constants. +const ( + SeekStart = 0 // seek relative to the origin of the file + SeekCurrent = 1 // seek relative to the current offset + SeekEnd = 2 // seek relative to the end +) diff --git a/vendor/github.com/aws/aws-sdk-go/internal/sdkio/io_go1.7.go b/vendor/github.com/aws/aws-sdk-go/internal/sdkio/io_go1.7.go new file mode 100644 index 0000000..e5f0056 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/sdkio/io_go1.7.go @@ -0,0 +1,12 @@ +// +build go1.7 + +package sdkio + +import "io" + +// Alias for Go 1.7 io package Seeker constants +const ( + SeekStart = io.SeekStart // seek relative to the origin of the file + SeekCurrent = io.SeekCurrent // seek relative to the current offset + SeekEnd = io.SeekEnd // seek relative to the end +) diff --git a/vendor/github.com/aws/aws-sdk-go/internal/sdkrand/locked_source.go b/vendor/github.com/aws/aws-sdk-go/internal/sdkrand/locked_source.go new file mode 100644 index 0000000..0c9802d --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/sdkrand/locked_source.go @@ -0,0 +1,29 @@ +package sdkrand + +import ( + "math/rand" + "sync" + "time" +) + +// lockedSource is a thread-safe implementation of rand.Source +type lockedSource struct { + lk sync.Mutex + src rand.Source +} + +func (r *lockedSource) Int63() (n int64) { + r.lk.Lock() + n = r.src.Int63() + r.lk.Unlock() + return +} + +func (r *lockedSource) Seed(seed int64) { + r.lk.Lock() + r.src.Seed(seed) + r.lk.Unlock() +} + +// SeededRand is a new RNG using a thread safe implementation of rand.Source +var SeededRand = rand.New(&lockedSource{src: rand.NewSource(time.Now().UnixNano())}) diff --git a/vendor/github.com/aws/aws-sdk-go/internal/shareddefaults/shared_config.go b/vendor/github.com/aws/aws-sdk-go/internal/shareddefaults/shared_config.go new file mode 100644 index 0000000..ebcbc2b --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/shareddefaults/shared_config.go @@ -0,0 +1,40 @@ +package shareddefaults + +import ( + "os" + "path/filepath" + "runtime" +) + +// SharedCredentialsFilename returns the SDK's default file path +// for the shared credentials file. +// +// Builds the shared config file path based on the OS's platform. +// +// - Linux/Unix: $HOME/.aws/credentials +// - Windows: %USERPROFILE%\.aws\credentials +func SharedCredentialsFilename() string { + return filepath.Join(UserHomeDir(), ".aws", "credentials") +} + +// SharedConfigFilename returns the SDK's default file path for +// the shared config file. +// +// Builds the shared config file path based on the OS's platform. +// +// - Linux/Unix: $HOME/.aws/config +// - Windows: %USERPROFILE%\.aws\config +func SharedConfigFilename() string { + return filepath.Join(UserHomeDir(), ".aws", "config") +} + +// UserHomeDir returns the home directory for the user the process is +// running under. +func UserHomeDir() string { + if runtime.GOOS == "windows" { // Windows + return os.Getenv("USERPROFILE") + } + + // *nix + return os.Getenv("HOME") +} diff --git a/vendor/github.com/aws/aws-sdk-go/internal/shareddefaults/shared_config_other_test.go b/vendor/github.com/aws/aws-sdk-go/internal/shareddefaults/shared_config_other_test.go new file mode 100644 index 0000000..a2fd455 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/shareddefaults/shared_config_other_test.go @@ -0,0 +1,40 @@ +package shareddefaults_test + +import ( + "os" + "path/filepath" + "testing" + + "github.com/aws/aws-sdk-go/awstesting" + "github.com/aws/aws-sdk-go/internal/shareddefaults" +) + +func TestSharedCredsFilename(t *testing.T) { + env := awstesting.StashEnv() + defer awstesting.PopEnv(env) + + os.Setenv("HOME", "home_dir") + os.Setenv("USERPROFILE", "profile_dir") + + expect := filepath.Join("home_dir", ".aws", "credentials") + + name := shareddefaults.SharedCredentialsFilename() + if e, a := expect, name; e != a { + t.Errorf("expect %q shared creds filename, got %q", e, a) + } +} + +func TestSharedConfigFilename(t *testing.T) { + env := awstesting.StashEnv() + defer awstesting.PopEnv(env) + + os.Setenv("HOME", "home_dir") + os.Setenv("USERPROFILE", "profile_dir") + + expect := filepath.Join("home_dir", ".aws", "config") + + name := shareddefaults.SharedConfigFilename() + if e, a := expect, name; e != a { + t.Errorf("expect %q shared config filename, got %q", e, a) + } +} diff --git a/vendor/github.com/aws/aws-sdk-go/internal/shareddefaults/shared_config_windows_test.go b/vendor/github.com/aws/aws-sdk-go/internal/shareddefaults/shared_config_windows_test.go new file mode 100644 index 0000000..afe96b1 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/shareddefaults/shared_config_windows_test.go @@ -0,0 +1,40 @@ +package shareddefaults_test + +import ( + "os" + "path/filepath" + "testing" + + "github.com/aws/aws-sdk-go/awstesting" + "github.com/aws/aws-sdk-go/internal/shareddefaults" +) + +func TestSharedCredsFilename(t *testing.T) { + env := awstesting.StashEnv() + defer awstesting.PopEnv(env) + + os.Setenv("HOME", "home_dir") + os.Setenv("USERPROFILE", "profile_dir") + + expect := filepath.Join("profile_dir", ".aws", "credentials") + + name := shareddefaults.SharedCredentialsFilename() + if e, a := expect, name; e != a { + t.Errorf("expect %q shared creds filename, got %q", e, a) + } +} + +func TestSharedConfigFilename(t *testing.T) { + env := awstesting.StashEnv() + defer awstesting.PopEnv(env) + + os.Setenv("HOME", "home_dir") + os.Setenv("USERPROFILE", "profile_dir") + + expect := filepath.Join("profile_dir", ".aws", "config") + + name := shareddefaults.SharedConfigFilename() + if e, a := expect, name; e != a { + t.Errorf("expect %q shared config filename, got %q", e, a) + } +} diff --git a/vendor/github.com/aws/aws-sdk-go/models/endpoints/generate.go b/vendor/github.com/aws/aws-sdk-go/models/endpoints/generate.go deleted file mode 100644 index f00db98..0000000 --- a/vendor/github.com/aws/aws-sdk-go/models/endpoints/generate.go +++ /dev/null @@ -1,6 +0,0 @@ -// Package endpoints contains the models for endpoints that should be used -// to generate endpoint definition files for the SDK. -package endpoints - -//go:generate go run -tags codegen ../../private/model/cli/gen-endpoints/main.go -model ./endpoints.json -out ../../aws/endpoints/defaults.go -//go:generate gofmt -s -w ../../aws/endpoints diff --git a/vendor/github.com/aws/aws-sdk-go/models/protocol_tests/generate.go b/vendor/github.com/aws/aws-sdk-go/models/protocol_tests/generate.go deleted file mode 100644 index 4991466..0000000 --- a/vendor/github.com/aws/aws-sdk-go/models/protocol_tests/generate.go +++ /dev/null @@ -1,500 +0,0 @@ -// +build codegen - -package main - -import ( - "bytes" - "encoding/json" - "fmt" - "net/url" - "os" - "os/exec" - "reflect" - "regexp" - "sort" - "strconv" - "strings" - "text/template" - - "github.com/aws/aws-sdk-go/private/model/api" - "github.com/aws/aws-sdk-go/private/util" -) - -// TestSuiteTypeInput input test -// TestSuiteTypeInput output test -const ( - TestSuiteTypeInput = iota - TestSuiteTypeOutput -) - -type testSuite struct { - *api.API - Description string - Cases []testCase - Type uint - title string -} - -type testCase struct { - TestSuite *testSuite - Given *api.Operation - Params interface{} `json:",omitempty"` - Data interface{} `json:"result,omitempty"` - InputTest testExpectation `json:"serialized"` - OutputTest testExpectation `json:"response"` -} - -type testExpectation struct { - Body string - URI string - Headers map[string]string - JSONValues map[string]string - StatusCode uint `json:"status_code"` -} - -const preamble = ` -var _ bytes.Buffer // always import bytes -var _ http.Request -var _ json.Marshaler -var _ time.Time -var _ xmlutil.XMLNode -var _ xml.Attr -var _ = ioutil.Discard -var _ = util.Trim("") -var _ = url.Values{} -var _ = io.EOF -var _ = aws.String -var _ = fmt.Println -var _ = reflect.Value{} - -func init() { - protocol.RandReader = &awstesting.ZeroReader{} -} -` - -var reStripSpace = regexp.MustCompile(`\s(\w)`) - -var reImportRemoval = regexp.MustCompile(`(?s:import \((.+?)\))`) - -func removeImports(code string) string { - return reImportRemoval.ReplaceAllString(code, "") -} - -var extraImports = []string{ - "bytes", - "encoding/json", - "encoding/xml", - "fmt", - "io", - "io/ioutil", - "net/http", - "testing", - "time", - "reflect", - "net/url", - "", - "github.com/aws/aws-sdk-go/awstesting", - "github.com/aws/aws-sdk-go/awstesting/unit", - "github.com/aws/aws-sdk-go/private/protocol", - "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil", - "github.com/aws/aws-sdk-go/private/util", - "github.com/stretchr/testify/assert", -} - -func addImports(code string) string { - importNames := make([]string, len(extraImports)) - for i, n := range extraImports { - if n != "" { - importNames[i] = fmt.Sprintf("%q", n) - } - } - - str := reImportRemoval.ReplaceAllString(code, "import (\n"+strings.Join(importNames, "\n")+"$1\n)") - return str -} - -func (t *testSuite) TestSuite() string { - var buf bytes.Buffer - - t.title = reStripSpace.ReplaceAllStringFunc(t.Description, func(x string) string { - return strings.ToUpper(x[1:]) - }) - t.title = regexp.MustCompile(`\W`).ReplaceAllString(t.title, "") - - for idx, c := range t.Cases { - c.TestSuite = t - buf.WriteString(c.TestCase(idx) + "\n") - } - return buf.String() -} - -var tplInputTestCase = template.Must(template.New("inputcase").Parse(` -func Test{{ .OpName }}(t *testing.T) { - svc := New{{ .TestCase.TestSuite.API.StructName }}(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - {{ if ne .ParamsString "" }}input := {{ .ParamsString }} - {{ range $k, $v := .JSONValues -}} - input.{{ $k }} = {{ $v }} - {{ end -}} - req, _ := svc.{{ .TestCase.Given.ExportedName }}Request(input){{ else }}req, _ := svc.{{ .TestCase.Given.ExportedName }}Request(nil){{ end }} - r := req.HTTPRequest - - // build request - {{ .TestCase.TestSuite.API.ProtocolPackage }}.Build(req) - assert.NoError(t, req.Error) - - {{ if ne .TestCase.InputTest.Body "" }}// assert body - assert.NotNil(t, r.Body) - {{ .BodyAssertions }}{{ end }} - - {{ if ne .TestCase.InputTest.URI "" }}// assert URL - awstesting.AssertURL(t, "https://test{{ .TestCase.InputTest.URI }}", r.URL.String()){{ end }} - - // assert headers -{{ range $k, $v := .TestCase.InputTest.Headers }}assert.Equal(t, "{{ $v }}", r.Header.Get("{{ $k }}")) -{{ end }} -} -`)) - -type tplInputTestCaseData struct { - TestCase *testCase - JSONValues map[string]string - OpName, ParamsString string -} - -func (t tplInputTestCaseData) BodyAssertions() string { - code := &bytes.Buffer{} - protocol := t.TestCase.TestSuite.API.Metadata.Protocol - - // Extract the body bytes - switch protocol { - case "rest-xml": - fmt.Fprintln(code, "body := util.SortXML(r.Body)") - default: - fmt.Fprintln(code, "body, _ := ioutil.ReadAll(r.Body)") - } - - // Generate the body verification code - expectedBody := util.Trim(t.TestCase.InputTest.Body) - switch protocol { - case "ec2", "query": - fmt.Fprintf(code, "awstesting.AssertQuery(t, `%s`, util.Trim(string(body)))", - expectedBody) - case "rest-xml": - if strings.HasPrefix(expectedBody, "<") { - fmt.Fprintf(code, "awstesting.AssertXML(t, `%s`, util.Trim(string(body)), %s{})", - expectedBody, t.TestCase.Given.InputRef.ShapeName) - } else { - fmt.Fprintf(code, "assert.Equal(t, `%s`, util.Trim(string(body)))", - expectedBody) - } - case "json", "jsonrpc", "rest-json": - if strings.HasPrefix(expectedBody, "{") { - fmt.Fprintf(code, "awstesting.AssertJSON(t, `%s`, util.Trim(string(body)))", - expectedBody) - } else { - fmt.Fprintf(code, "assert.Equal(t, `%s`, util.Trim(string(body)))", - expectedBody) - } - default: - fmt.Fprintf(code, "assert.Equal(t, `%s`, util.Trim(string(body)))", - expectedBody) - } - - return code.String() -} - -var tplOutputTestCase = template.Must(template.New("outputcase").Parse(` -func Test{{ .OpName }}(t *testing.T) { - svc := New{{ .TestCase.TestSuite.API.StructName }}(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - - buf := bytes.NewReader([]byte({{ .Body }})) - req, out := svc.{{ .TestCase.Given.ExportedName }}Request(nil) - req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} - - // set headers - {{ range $k, $v := .TestCase.OutputTest.Headers }}req.HTTPResponse.Header.Set("{{ $k }}", "{{ $v }}") - {{ end }} - - // unmarshal response - {{ .TestCase.TestSuite.API.ProtocolPackage }}.UnmarshalMeta(req) - {{ .TestCase.TestSuite.API.ProtocolPackage }}.Unmarshal(req) - assert.NoError(t, req.Error) - - // assert response - assert.NotNil(t, out) // ensure out variable is used - {{ .Assertions }} -} -`)) - -type tplOutputTestCaseData struct { - TestCase *testCase - Body, OpName, Assertions string -} - -func (i *testCase) TestCase(idx int) string { - var buf bytes.Buffer - - opName := i.TestSuite.API.StructName() + i.TestSuite.title + "Case" + strconv.Itoa(idx+1) - - if i.TestSuite.Type == TestSuiteTypeInput { // input test - // query test should sort body as form encoded values - switch i.TestSuite.API.Metadata.Protocol { - case "query", "ec2": - m, _ := url.ParseQuery(i.InputTest.Body) - i.InputTest.Body = m.Encode() - case "rest-xml": - i.InputTest.Body = util.SortXML(bytes.NewReader([]byte(i.InputTest.Body))) - case "json", "rest-json": - i.InputTest.Body = strings.Replace(i.InputTest.Body, " ", "", -1) - } - - jsonValues := buildJSONValues(i.Given.InputRef.Shape) - var params interface{} - if m, ok := i.Params.(map[string]interface{}); ok { - paramsMap := map[string]interface{}{} - for k, v := range m { - if _, ok := jsonValues[k]; !ok { - paramsMap[k] = v - } else { - if i.InputTest.JSONValues == nil { - i.InputTest.JSONValues = map[string]string{} - } - i.InputTest.JSONValues[k] = serializeJSONValue(v.(map[string]interface{})) - } - } - params = paramsMap - } else { - params = i.Params - } - input := tplInputTestCaseData{ - TestCase: i, - OpName: strings.ToUpper(opName[0:1]) + opName[1:], - ParamsString: api.ParamsStructFromJSON(params, i.Given.InputRef.Shape, false), - JSONValues: i.InputTest.JSONValues, - } - - if err := tplInputTestCase.Execute(&buf, input); err != nil { - panic(err) - } - } else if i.TestSuite.Type == TestSuiteTypeOutput { - output := tplOutputTestCaseData{ - TestCase: i, - Body: fmt.Sprintf("%q", i.OutputTest.Body), - OpName: strings.ToUpper(opName[0:1]) + opName[1:], - Assertions: GenerateAssertions(i.Data, i.Given.OutputRef.Shape, "out"), - } - - if err := tplOutputTestCase.Execute(&buf, output); err != nil { - panic(err) - } - } - - return buf.String() -} - -func serializeJSONValue(m map[string]interface{}) string { - str := "aws.JSONValue" - str += walkMap(m) - return str -} - -func walkMap(m map[string]interface{}) string { - str := "{" - for k, v := range m { - str += fmt.Sprintf("%q:", k) - switch v.(type) { - case bool: - str += fmt.Sprintf("%b,\n", v.(bool)) - case string: - str += fmt.Sprintf("%q,\n", v.(string)) - case int: - str += fmt.Sprintf("%d,\n", v.(int)) - case float64: - str += fmt.Sprintf("%f,\n", v.(float64)) - case map[string]interface{}: - str += walkMap(v.(map[string]interface{})) - } - } - str += "}" - return str -} - -func buildJSONValues(shape *api.Shape) map[string]struct{} { - keys := map[string]struct{}{} - for key, field := range shape.MemberRefs { - if field.JSONValue { - keys[key] = struct{}{} - } - } - return keys -} - -// generateTestSuite generates a protocol test suite for a given configuration -// JSON protocol test file. -func generateTestSuite(filename string) string { - inout := "Input" - if strings.Contains(filename, "output/") { - inout = "Output" - } - - var suites []testSuite - f, err := os.Open(filename) - if err != nil { - panic(err) - } - - err = json.NewDecoder(f).Decode(&suites) - if err != nil { - panic(err) - } - - var buf bytes.Buffer - buf.WriteString("package " + suites[0].ProtocolPackage() + "_test\n\n") - - var innerBuf bytes.Buffer - innerBuf.WriteString("//\n// Tests begin here\n//\n\n\n") - - for i, suite := range suites { - svcPrefix := inout + "Service" + strconv.Itoa(i+1) - suite.API.Metadata.ServiceAbbreviation = svcPrefix + "ProtocolTest" - suite.API.Operations = map[string]*api.Operation{} - for idx, c := range suite.Cases { - c.Given.ExportedName = svcPrefix + "TestCaseOperation" + strconv.Itoa(idx+1) - suite.API.Operations[c.Given.ExportedName] = c.Given - } - - suite.Type = getType(inout) - suite.API.NoInitMethods = true // don't generate init methods - suite.API.NoStringerMethods = true // don't generate stringer methods - suite.API.NoConstServiceNames = true // don't generate service names - suite.API.Setup() - suite.API.Metadata.EndpointPrefix = suite.API.PackageName() - - // Sort in order for deterministic test generation - names := make([]string, 0, len(suite.API.Shapes)) - for n := range suite.API.Shapes { - names = append(names, n) - } - sort.Strings(names) - for _, name := range names { - s := suite.API.Shapes[name] - s.Rename(svcPrefix + "TestShape" + name) - } - - svcCode := addImports(suite.API.ServiceGoCode()) - if i == 0 { - importMatch := reImportRemoval.FindStringSubmatch(svcCode) - buf.WriteString(importMatch[0] + "\n\n") - buf.WriteString(preamble + "\n\n") - } - svcCode = removeImports(svcCode) - svcCode = strings.Replace(svcCode, "func New(", "func New"+suite.API.StructName()+"(", -1) - svcCode = strings.Replace(svcCode, "func newClient(", "func new"+suite.API.StructName()+"Client(", -1) - svcCode = strings.Replace(svcCode, "return newClient(", "return new"+suite.API.StructName()+"Client(", -1) - buf.WriteString(svcCode + "\n\n") - - apiCode := removeImports(suite.API.APIGoCode()) - apiCode = strings.Replace(apiCode, "var oprw sync.Mutex", "", -1) - apiCode = strings.Replace(apiCode, "oprw.Lock()", "", -1) - apiCode = strings.Replace(apiCode, "defer oprw.Unlock()", "", -1) - buf.WriteString(apiCode + "\n\n") - - innerBuf.WriteString(suite.TestSuite() + "\n") - } - - return buf.String() + innerBuf.String() -} - -// findMember searches the shape for the member with the matching key name. -func findMember(shape *api.Shape, key string) string { - for actualKey := range shape.MemberRefs { - if strings.ToLower(key) == strings.ToLower(actualKey) { - return actualKey - } - } - return "" -} - -// GenerateAssertions builds assertions for a shape based on its type. -// -// The shape's recursive values also will have assertions generated for them. -func GenerateAssertions(out interface{}, shape *api.Shape, prefix string) string { - if shape == nil { - return "" - } - switch t := out.(type) { - case map[string]interface{}: - keys := util.SortedKeys(t) - - code := "" - if shape.Type == "map" { - for _, k := range keys { - v := t[k] - s := shape.ValueRef.Shape - code += GenerateAssertions(v, s, prefix+"[\""+k+"\"]") - } - } else if shape.Type == "jsonvalue" { - code += fmt.Sprintf("reflect.DeepEqual(%s, map[string]interface{}%s)", prefix, walkMap(out.(map[string]interface{}))) - } else { - for _, k := range keys { - v := t[k] - m := findMember(shape, k) - s := shape.MemberRefs[m].Shape - code += GenerateAssertions(v, s, prefix+"."+m+"") - } - } - return code - case []interface{}: - code := "" - for i, v := range t { - s := shape.MemberRef.Shape - code += GenerateAssertions(v, s, prefix+"["+strconv.Itoa(i)+"]") - } - return code - default: - switch shape.Type { - case "timestamp": - return fmt.Sprintf("assert.Equal(t, time.Unix(%#v, 0).UTC().String(), %s.String())\n", out, prefix) - case "blob": - return fmt.Sprintf("assert.Equal(t, %#v, string(%s))\n", out, prefix) - case "integer", "long": - return fmt.Sprintf("assert.Equal(t, int64(%#v), *%s)\n", out, prefix) - default: - if !reflect.ValueOf(out).IsValid() { - return fmt.Sprintf("assert.Nil(t, %s)\n", prefix) - } - return fmt.Sprintf("assert.Equal(t, %#v, *%s)\n", out, prefix) - } - } -} - -func getType(t string) uint { - switch t { - case "Input": - return TestSuiteTypeInput - case "Output": - return TestSuiteTypeOutput - default: - panic("Invalid type for test suite") - } -} - -func main() { - out := generateTestSuite(os.Args[1]) - if len(os.Args) == 3 { - f, err := os.Create(os.Args[2]) - defer f.Close() - if err != nil { - panic(err) - } - f.WriteString(util.GoFmt(out)) - f.Close() - - c := exec.Command("gofmt", "-s", "-w", os.Args[2]) - if err := c.Run(); err != nil { - panic(err) - } - } else { - fmt.Println(out) - } -} diff --git a/vendor/github.com/aws/aws-sdk-go/private/model/api/api.go b/vendor/github.com/aws/aws-sdk-go/private/model/api/api.go deleted file mode 100644 index 638436c..0000000 --- a/vendor/github.com/aws/aws-sdk-go/private/model/api/api.go +++ /dev/null @@ -1,694 +0,0 @@ -// +build codegen - -// Package api represents API abstractions for rendering service generated files. -package api - -import ( - "bytes" - "encoding/json" - "fmt" - "io/ioutil" - "path" - "path/filepath" - "regexp" - "sort" - "strings" - "text/template" -) - -// An API defines a service API's definition. and logic to serialize the definition. -type API struct { - Metadata Metadata - Operations map[string]*Operation - Shapes map[string]*Shape - Waiters []Waiter - Documentation string - - // Set to true to avoid removing unused shapes - NoRemoveUnusedShapes bool - - // Set to true to avoid renaming to 'Input/Output' postfixed shapes - NoRenameToplevelShapes bool - - // Set to true to ignore service/request init methods (for testing) - NoInitMethods bool - - // Set to true to ignore String() and GoString methods (for generated tests) - NoStringerMethods bool - - // Set to true to not generate API service name constants - NoConstServiceNames bool - - // Set to true to not generate validation shapes - NoValidataShapeMethods bool - - // Set to true to not generate struct field accessors - NoGenStructFieldAccessors bool - - SvcClientImportPath string - - initialized bool - imports map[string]bool - name string - path string - - BaseCrosslinkURL string -} - -// A Metadata is the metadata about an API's definition. -type Metadata struct { - APIVersion string - EndpointPrefix string - SigningName string - ServiceAbbreviation string - ServiceFullName string - SignatureVersion string - JSONVersion string - TargetPrefix string - Protocol string - UID string - EndpointsID string - - NoResolveEndpoint bool -} - -var serviceAliases map[string]string - -func Bootstrap() error { - b, err := ioutil.ReadFile(filepath.Join("..", "models", "customizations", "service-aliases.json")) - if err != nil { - return err - } - - return json.Unmarshal(b, &serviceAliases) -} - -// PackageName name of the API package -func (a *API) PackageName() string { - return strings.ToLower(a.StructName()) -} - -// InterfacePackageName returns the package name for the interface. -func (a *API) InterfacePackageName() string { - return a.PackageName() + "iface" -} - -var nameRegex = regexp.MustCompile(`^Amazon|AWS\s*|\(.*|\s+|\W+`) - -// StructName returns the struct name for a given API. -func (a *API) StructName() string { - if a.name == "" { - name := a.Metadata.ServiceAbbreviation - if name == "" { - name = a.Metadata.ServiceFullName - } - - name = nameRegex.ReplaceAllString(name, "") - - a.name = name - if name, ok := serviceAliases[strings.ToLower(name)]; ok { - a.name = name - } - } - return a.name -} - -// UseInitMethods returns if the service's init method should be rendered. -func (a *API) UseInitMethods() bool { - return !a.NoInitMethods -} - -// NiceName returns the human friendly API name. -func (a *API) NiceName() string { - if a.Metadata.ServiceAbbreviation != "" { - return a.Metadata.ServiceAbbreviation - } - return a.Metadata.ServiceFullName -} - -// ProtocolPackage returns the package name of the protocol this API uses. -func (a *API) ProtocolPackage() string { - switch a.Metadata.Protocol { - case "json": - return "jsonrpc" - case "ec2": - return "ec2query" - default: - return strings.Replace(a.Metadata.Protocol, "-", "", -1) - } -} - -// OperationNames returns a slice of API operations supported. -func (a *API) OperationNames() []string { - i, names := 0, make([]string, len(a.Operations)) - for n := range a.Operations { - names[i] = n - i++ - } - sort.Strings(names) - return names -} - -// OperationList returns a slice of API operation pointers -func (a *API) OperationList() []*Operation { - list := make([]*Operation, len(a.Operations)) - for i, n := range a.OperationNames() { - list[i] = a.Operations[n] - } - return list -} - -// OperationHasOutputPlaceholder returns if any of the API operation input -// or output shapes are place holders. -func (a *API) OperationHasOutputPlaceholder() bool { - for _, op := range a.Operations { - if op.OutputRef.Shape.Placeholder { - return true - } - } - return false -} - -// ShapeNames returns a slice of names for each shape used by the API. -func (a *API) ShapeNames() []string { - i, names := 0, make([]string, len(a.Shapes)) - for n := range a.Shapes { - names[i] = n - i++ - } - sort.Strings(names) - return names -} - -// ShapeList returns a slice of shape pointers used by the API. -// -// Will exclude error shapes from the list of shapes returned. -func (a *API) ShapeList() []*Shape { - list := make([]*Shape, 0, len(a.Shapes)) - for _, n := range a.ShapeNames() { - // Ignore error shapes in list - if s := a.Shapes[n]; !s.IsError { - list = append(list, s) - } - } - return list -} - -// ShapeListErrors returns a list of the errors defined by the API model -func (a *API) ShapeListErrors() []*Shape { - list := []*Shape{} - for _, n := range a.ShapeNames() { - // Ignore error shapes in list - if s := a.Shapes[n]; s.IsError { - list = append(list, s) - } - } - return list -} - -// resetImports resets the import map to default values. -func (a *API) resetImports() { - a.imports = map[string]bool{ - "github.com/aws/aws-sdk-go/aws": true, - } -} - -// importsGoCode returns the generated Go import code. -func (a *API) importsGoCode() string { - if len(a.imports) == 0 { - return "" - } - - corePkgs, extPkgs := []string{}, []string{} - for i := range a.imports { - if strings.Contains(i, ".") { - extPkgs = append(extPkgs, i) - } else { - corePkgs = append(corePkgs, i) - } - } - sort.Strings(corePkgs) - sort.Strings(extPkgs) - - code := "import (\n" - for _, i := range corePkgs { - code += fmt.Sprintf("\t%q\n", i) - } - if len(corePkgs) > 0 { - code += "\n" - } - for _, i := range extPkgs { - code += fmt.Sprintf("\t%q\n", i) - } - code += ")\n\n" - return code -} - -// A tplAPI is the top level template for the API -var tplAPI = template.Must(template.New("api").Parse(` -{{ range $_, $o := .OperationList }} -{{ $o.GoCode }} - -{{ end }} - -{{ range $_, $s := .ShapeList }} -{{ if and $s.IsInternal (eq $s.Type "structure") }}{{ $s.GoCode }}{{ end }} - -{{ end }} - -{{ range $_, $s := .ShapeList }} -{{ if $s.IsEnum }}{{ $s.GoCode }}{{ end }} - -{{ end }} -`)) - -// APIGoCode renders the API in Go code. Returning it as a string -func (a *API) APIGoCode() string { - a.resetImports() - a.imports["github.com/aws/aws-sdk-go/aws/awsutil"] = true - a.imports["github.com/aws/aws-sdk-go/aws/request"] = true - if a.OperationHasOutputPlaceholder() { - a.imports["github.com/aws/aws-sdk-go/private/protocol/"+a.ProtocolPackage()] = true - a.imports["github.com/aws/aws-sdk-go/private/protocol"] = true - } - - for _, op := range a.Operations { - if op.AuthType == "none" { - a.imports["github.com/aws/aws-sdk-go/aws/credentials"] = true - break - } - } - - var buf bytes.Buffer - err := tplAPI.Execute(&buf, a) - if err != nil { - panic(err) - } - - code := a.importsGoCode() + strings.TrimSpace(buf.String()) - return code -} - -var noCrossLinkServices = map[string]struct{}{ - "apigateway": struct{}{}, - "budgets": struct{}{}, - "cloudsearch": struct{}{}, - "cloudsearchdomain": struct{}{}, - "discovery": struct{}{}, - "elastictranscoder": struct{}{}, - "es": struct{}{}, - "glacier": struct{}{}, - "importexport": struct{}{}, - "iot": struct{}{}, - "iot-data": struct{}{}, - "lambda": struct{}{}, - "machinelearning": struct{}{}, - "rekognition": struct{}{}, - "sdb": struct{}{}, - "swf": struct{}{}, -} - -func GetCrosslinkURL(baseURL, name, uid string, params ...string) string { - _, ok := noCrossLinkServices[strings.ToLower(name)] - if uid != "" && baseURL != "" && !ok { - return strings.Join(append([]string{baseURL, "goto", "WebAPI", uid}, params...), "/") - } - return "" -} - -func (a *API) APIName() string { - return a.name -} - -// A tplService defines the template for the service generated code. -var tplService = template.Must(template.New("service").Funcs(template.FuncMap{ - "ServiceNameValue": func(a *API) string { - if a.NoConstServiceNames { - return fmt.Sprintf("%q", a.Metadata.EndpointPrefix) - } - return "ServiceName" - }, - "GetCrosslinkURL": GetCrosslinkURL, - "EndpointsIDConstValue": func(a *API) string { - if a.NoConstServiceNames { - return fmt.Sprintf("%q", a.Metadata.EndpointPrefix) - } - if a.Metadata.EndpointPrefix == a.Metadata.EndpointsID { - return "ServiceName" - } - return fmt.Sprintf("%q", a.Metadata.EndpointsID) - }, - "EndpointsIDValue": func(a *API) string { - if a.NoConstServiceNames { - return fmt.Sprintf("%q", a.Metadata.EndpointPrefix) - } - - return "EndpointsID" - }, -}).Parse(` -{{ .Documentation }}// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -{{ $crosslinkURL := GetCrosslinkURL $.BaseCrosslinkURL $.APIName $.Metadata.UID -}} -{{ if ne $crosslinkURL "" -}} -// Please also see {{ $crosslinkURL }} -{{ end -}} -type {{ .StructName }} struct { - *client.Client -} - -{{ if .UseInitMethods }}// Used for custom client initialization logic -var initClient func(*client.Client) - -// Used for custom request initialization logic -var initRequest func(*request.Request) -{{ end }} - - -{{ if not .NoConstServiceNames -}} -// Service information constants -const ( - ServiceName = "{{ .Metadata.EndpointPrefix }}" // Service endpoint prefix API calls made to. - EndpointsID = {{ EndpointsIDConstValue . }} // Service ID for Regions and Endpoints metadata. -) -{{- end }} - -// New creates a new instance of the {{ .StructName }} client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a {{ .StructName }} client from just a session. -// svc := {{ .PackageName }}.New(mySession) -// -// // Create a {{ .StructName }} client with additional configuration -// svc := {{ .PackageName }}.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *{{ .StructName }} { - {{ if .Metadata.NoResolveEndpoint -}} - var c client.Config - if v, ok := p.(client.ConfigNoResolveEndpointProvider); ok { - c = v.ClientConfigNoResolveEndpoint(cfgs...) - } else { - c = p.ClientConfig({{ EndpointsIDValue . }}, cfgs...) - } - {{- else -}} - c := p.ClientConfig({{ EndpointsIDValue . }}, cfgs...) - {{- end }} - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *{{ .StructName }} { - {{- if .Metadata.SigningName }} - if len(signingName) == 0 { - signingName = "{{ .Metadata.SigningName }}" - } - {{- end }} - svc := &{{ .StructName }}{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: {{ ServiceNameValue . }}, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "{{ .Metadata.APIVersion }}", - {{ if .Metadata.JSONVersion -}} - JSONVersion: "{{ .Metadata.JSONVersion }}", - {{- end }} - {{ if .Metadata.TargetPrefix -}} - TargetPrefix: "{{ .Metadata.TargetPrefix }}", - {{- end }} - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed({{if eq .Metadata.SignatureVersion "v2"}}v2{{else}}v4{{end}}.SignRequestHandler) - {{- if eq .Metadata.SignatureVersion "v2" }} - svc.Handlers.Sign.PushBackNamed(corehandlers.BuildContentLengthHandler) - {{- end }} - svc.Handlers.Build.PushBackNamed({{ .ProtocolPackage }}.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed({{ .ProtocolPackage }}.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed({{ .ProtocolPackage }}.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed({{ .ProtocolPackage }}.UnmarshalErrorHandler) - - {{ if .UseInitMethods }}// Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - {{ end }} - - return svc -} - -// newRequest creates a new request for a {{ .StructName }} operation and runs any -// custom request initialization. -func (c *{{ .StructName }}) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - {{ if .UseInitMethods }}// Run custom request initialization if present - if initRequest != nil { - initRequest(req) - } - {{ end }} - - return req -} -`)) - -// ServiceGoCode renders service go code. Returning it as a string. -func (a *API) ServiceGoCode() string { - a.resetImports() - a.imports["github.com/aws/aws-sdk-go/aws/client"] = true - a.imports["github.com/aws/aws-sdk-go/aws/client/metadata"] = true - a.imports["github.com/aws/aws-sdk-go/aws/request"] = true - if a.Metadata.SignatureVersion == "v2" { - a.imports["github.com/aws/aws-sdk-go/private/signer/v2"] = true - a.imports["github.com/aws/aws-sdk-go/aws/corehandlers"] = true - } else { - a.imports["github.com/aws/aws-sdk-go/aws/signer/v4"] = true - } - a.imports["github.com/aws/aws-sdk-go/private/protocol/"+a.ProtocolPackage()] = true - - var buf bytes.Buffer - err := tplService.Execute(&buf, a) - if err != nil { - panic(err) - } - - code := a.importsGoCode() + buf.String() - return code -} - -// ExampleGoCode renders service example code. Returning it as a string. -func (a *API) ExampleGoCode() string { - exs := []string{} - imports := map[string]bool{} - for _, o := range a.OperationList() { - o.imports = map[string]bool{} - exs = append(exs, o.Example()) - for k, v := range o.imports { - imports[k] = v - } - } - - code := fmt.Sprintf("import (\n%q\n%q\n%q\n\n%q\n%q\n%q\n", - "bytes", - "fmt", - "time", - "github.com/aws/aws-sdk-go/aws", - "github.com/aws/aws-sdk-go/aws/session", - path.Join(a.SvcClientImportPath, a.PackageName()), - ) - for k, _ := range imports { - code += fmt.Sprintf("%q\n", k) - } - code += ")\n\n" - code += "var _ time.Duration\nvar _ bytes.Buffer\n\n" - code += strings.Join(exs, "\n\n") - return code -} - -// A tplInterface defines the template for the service interface type. -var tplInterface = template.Must(template.New("interface").Parse(` -// {{ .StructName }}API provides an interface to enable mocking the -// {{ .PackageName }}.{{ .StructName }} service client's API operation, -// paginators, and waiters. This make unit testing your code that calls out -// to the SDK's service client's calls easier. -// -// The best way to use this interface is so the SDK's service client's calls -// can be stubbed out for unit testing your code with the SDK without needing -// to inject custom request handlers into the the SDK's request pipeline. -// -// // myFunc uses an SDK service client to make a request to -// // {{.Metadata.ServiceFullName}}. {{ $opts := .OperationList }}{{ $opt := index $opts 0 }} -// func myFunc(svc {{ .InterfacePackageName }}.{{ .StructName }}API) bool { -// // Make svc.{{ $opt.ExportedName }} request -// } -// -// func main() { -// sess := session.New() -// svc := {{ .PackageName }}.New(sess) -// -// myFunc(svc) -// } -// -// In your _test.go file: -// -// // Define a mock struct to be used in your unit tests of myFunc. -// type mock{{ .StructName }}Client struct { -// {{ .InterfacePackageName }}.{{ .StructName }}API -// } -// func (m *mock{{ .StructName }}Client) {{ $opt.ExportedName }}(input {{ $opt.InputRef.GoTypeWithPkgName }}) ({{ $opt.OutputRef.GoTypeWithPkgName }}, error) { -// // mock response/functionality -// } -// -// func TestMyFunc(t *testing.T) { -// // Setup Test -// mockSvc := &mock{{ .StructName }}Client{} -// -// myfunc(mockSvc) -// -// // Verify myFunc's functionality -// } -// -// It is important to note that this interface will have breaking changes -// when the service model is updated and adds new API operations, paginators, -// and waiters. Its suggested to use the pattern above for testing, or using -// tooling to generate mocks to satisfy the interfaces. -type {{ .StructName }}API interface { - {{ range $_, $o := .OperationList }} - {{ $o.InterfaceSignature }} - {{ end }} - {{ range $_, $w := .Waiters }} - {{ $w.InterfaceSignature }} - {{ end }} -} - -var _ {{ .StructName }}API = (*{{ .PackageName }}.{{ .StructName }})(nil) -`)) - -// InterfaceGoCode returns the go code for the service's API operations as an -// interface{}. Assumes that the interface is being created in a different -// package than the service API's package. -func (a *API) InterfaceGoCode() string { - a.resetImports() - a.imports = map[string]bool{ - "github.com/aws/aws-sdk-go/aws": true, - "github.com/aws/aws-sdk-go/aws/request": true, - path.Join(a.SvcClientImportPath, a.PackageName()): true, - } - - var buf bytes.Buffer - err := tplInterface.Execute(&buf, a) - - if err != nil { - panic(err) - } - - code := a.importsGoCode() + strings.TrimSpace(buf.String()) - return code -} - -// NewAPIGoCodeWithPkgName returns a string of instantiating the API prefixed -// with its package name. Takes a string depicting the Config. -func (a *API) NewAPIGoCodeWithPkgName(cfg string) string { - return fmt.Sprintf("%s.New(%s)", a.PackageName(), cfg) -} - -// computes the validation chain for all input shapes -func (a *API) addShapeValidations() { - for _, o := range a.Operations { - resolveShapeValidations(o.InputRef.Shape) - } -} - -// Updates the source shape and all nested shapes with the validations that -// could possibly be needed. -func resolveShapeValidations(s *Shape, ancestry ...*Shape) { - for _, a := range ancestry { - if a == s { - return - } - } - - children := []string{} - for _, name := range s.MemberNames() { - ref := s.MemberRefs[name] - - if s.IsRequired(name) && !s.Validations.Has(ref, ShapeValidationRequired) { - s.Validations = append(s.Validations, ShapeValidation{ - Name: name, Ref: ref, Type: ShapeValidationRequired, - }) - } - - if ref.Shape.Min != 0 && !s.Validations.Has(ref, ShapeValidationMinVal) { - s.Validations = append(s.Validations, ShapeValidation{ - Name: name, Ref: ref, Type: ShapeValidationMinVal, - }) - } - - switch ref.Shape.Type { - case "map", "list", "structure": - children = append(children, name) - } - } - - ancestry = append(ancestry, s) - for _, name := range children { - ref := s.MemberRefs[name] - // Since this is a grab bag we will just continue since - // we can't validate because we don't know the valued shape. - if ref.JSONValue { - continue - } - - nestedShape := ref.Shape.NestedShape() - - var v *ShapeValidation - if len(nestedShape.Validations) > 0 { - v = &ShapeValidation{ - Name: name, Ref: ref, Type: ShapeValidationNested, - } - } else { - resolveShapeValidations(nestedShape, ancestry...) - if len(nestedShape.Validations) > 0 { - v = &ShapeValidation{ - Name: name, Ref: ref, Type: ShapeValidationNested, - } - } - } - - if v != nil && !s.Validations.Has(v.Ref, v.Type) { - s.Validations = append(s.Validations, *v) - } - } - ancestry = ancestry[:len(ancestry)-1] -} - -// A tplAPIErrors is the top level template for the API -var tplAPIErrors = template.Must(template.New("api").Parse(` -const ( -{{ range $_, $s := $.ShapeListErrors }} - // {{ $s.ErrorCodeName }} for service response error code - // {{ printf "%q" $s.ErrorName }}. - {{ if $s.Docstring -}} - // - {{ $s.Docstring }} - {{ end -}} - {{ $s.ErrorCodeName }} = {{ printf "%q" $s.ErrorName }} -{{ end }} -) -`)) - -func (a *API) APIErrorsGoCode() string { - var buf bytes.Buffer - err := tplAPIErrors.Execute(&buf, a) - - if err != nil { - panic(err) - } - - return strings.TrimSpace(buf.String()) -} diff --git a/vendor/github.com/aws/aws-sdk-go/private/model/api/api_test.go b/vendor/github.com/aws/aws-sdk-go/private/model/api/api_test.go deleted file mode 100644 index e261ff4..0000000 --- a/vendor/github.com/aws/aws-sdk-go/private/model/api/api_test.go +++ /dev/null @@ -1,54 +0,0 @@ -// +build 1.6,codegen - -package api - -import ( - "testing" -) - -func TestStructNameWithFullName(t *testing.T) { - a := API{ - Metadata: Metadata{ - ServiceFullName: "Amazon Service Name-100", - }, - } - if a.StructName() != "ServiceName100" { - t.Errorf("API struct name should have been %s, but received %s", "ServiceName100", a.StructName()) - } -} - -func TestStructNameWithAbbreviation(t *testing.T) { - a := API{ - Metadata: Metadata{ - ServiceFullName: "AWS Service Name-100", - ServiceAbbreviation: "AWS SN100", - }, - } - if a.StructName() != "SN100" { - t.Errorf("API struct name should have been %s, but received %s", "SN100", a.StructName()) - } -} - -func TestStructNameForExceptions(t *testing.T) { - serviceAliases = map[string]string{} - serviceAliases["elasticloadbalancing"] = "ELB" - serviceAliases["config"] = "ConfigService" - - a := API{ - Metadata: Metadata{ - ServiceFullName: "Elastic Load Balancing", - }, - } - if a.StructName() != "ELB" { - t.Errorf("API struct name should have been %s, but received %s", "ELB", a.StructName()) - } - - a = API{ - Metadata: Metadata{ - ServiceFullName: "AWS Config", - }, - } - if a.StructName() != "ConfigService" { - t.Errorf("API struct name should have been %s, but received %s", "ConfigService", a.StructName()) - } -} diff --git a/vendor/github.com/aws/aws-sdk-go/private/model/api/customization_passes.go b/vendor/github.com/aws/aws-sdk-go/private/model/api/customization_passes.go deleted file mode 100644 index 273e7b1..0000000 --- a/vendor/github.com/aws/aws-sdk-go/private/model/api/customization_passes.go +++ /dev/null @@ -1,195 +0,0 @@ -// +build codegen - -package api - -import ( - "fmt" - "io/ioutil" - "path/filepath" - "strings" -) - -type service struct { - srcName string - dstName string - - serviceVersion string -} - -var mergeServices = map[string]service{ - "dynamodbstreams": service{ - dstName: "dynamodb", - srcName: "streams.dynamodb", - }, - "wafregional": service{ - dstName: "waf", - srcName: "waf-regional", - serviceVersion: "2015-08-24", - }, -} - -// customizationPasses Executes customization logic for the API by package name. -func (a *API) customizationPasses() { - var svcCustomizations = map[string]func(*API){ - "s3": s3Customizations, - "cloudfront": cloudfrontCustomizations, - "rds": rdsCustomizations, - - // Disable endpoint resolving for services that require customer - // to provide endpoint them selves. - "cloudsearchdomain": disableEndpointResolving, - "iotdataplane": disableEndpointResolving, - } - - for k, _ := range mergeServices { - svcCustomizations[k] = mergeServicesCustomizations - } - - if fn := svcCustomizations[a.PackageName()]; fn != nil { - fn(a) - } - - blobDocStringCustomizations(a) -} - -const base64MarshalDocStr = "// %s is automatically base64 encoded/decoded by the SDK.\n" - -func blobDocStringCustomizations(a *API) { - for _, s := range a.Shapes { - payloadMemberName := s.Payload - - for refName, ref := range s.MemberRefs { - if refName == payloadMemberName { - // Payload members have their own encoding and may - // be raw bytes or io.Reader - continue - } - if ref.Shape.Type == "blob" { - docStr := fmt.Sprintf(base64MarshalDocStr, refName) - if len(strings.TrimSpace(ref.Shape.Documentation)) != 0 { - ref.Shape.Documentation += "//\n" + docStr - } else if len(strings.TrimSpace(ref.Documentation)) != 0 { - ref.Documentation += "//\n" + docStr - } else { - ref.Documentation = docStr - } - } - } - } -} - -// s3Customizations customizes the API generation to replace values specific to S3. -func s3Customizations(a *API) { - var strExpires *Shape - - for name, s := range a.Shapes { - // Remove ContentMD5 members - if _, ok := s.MemberRefs["ContentMD5"]; ok { - delete(s.MemberRefs, "ContentMD5") - } - - // Expires should be a string not time.Time since the format is not - // enforced by S3, and any value can be set to this field outside of the SDK. - if strings.HasSuffix(name, "Output") { - if ref, ok := s.MemberRefs["Expires"]; ok { - if strExpires == nil { - newShape := *ref.Shape - strExpires = &newShape - strExpires.Type = "string" - strExpires.refs = []*ShapeRef{} - } - ref.Shape.removeRef(ref) - ref.Shape = strExpires - ref.Shape.refs = append(ref.Shape.refs, &s.MemberRef) - } - } - } - s3CustRemoveHeadObjectModeledErrors(a) -} - -// S3 HeadObject API call incorrect models NoSuchKey as valid -// error code that can be returned. This operation does not -// return error codes, all error codes are derived from HTTP -// status codes. -// -// aws/aws-sdk-go#1208 -func s3CustRemoveHeadObjectModeledErrors(a *API) { - op, ok := a.Operations["HeadObject"] - if !ok { - return - } - op.Documentation += ` -// -// See http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#RESTErrorResponses -// for more information on returned errors.` - op.ErrorRefs = []ShapeRef{} -} - -// cloudfrontCustomizations customized the API generation to replace values -// specific to CloudFront. -func cloudfrontCustomizations(a *API) { - // MaxItems members should always be integers - for _, s := range a.Shapes { - if ref, ok := s.MemberRefs["MaxItems"]; ok { - ref.ShapeName = "Integer" - ref.Shape = a.Shapes["Integer"] - } - } -} - -// mergeServicesCustomizations references any duplicate shapes from DynamoDB -func mergeServicesCustomizations(a *API) { - info := mergeServices[a.PackageName()] - - p := strings.Replace(a.path, info.srcName, info.dstName, -1) - - if info.serviceVersion != "" { - index := strings.LastIndex(p, "/") - files, _ := ioutil.ReadDir(p[:index]) - if len(files) > 1 { - panic("New version was introduced") - } - p = p[:index] + "/" + info.serviceVersion - } - - file := filepath.Join(p, "api-2.json") - - serviceAPI := API{} - serviceAPI.Attach(file) - serviceAPI.Setup() - - for n := range a.Shapes { - if _, ok := serviceAPI.Shapes[n]; ok { - a.Shapes[n].resolvePkg = "github.com/aws/aws-sdk-go/service/" + info.dstName - } - } -} - -// rdsCustomizations are customization for the service/rds. This adds non-modeled fields used for presigning. -func rdsCustomizations(a *API) { - inputs := []string{ - "CopyDBSnapshotInput", - "CreateDBInstanceReadReplicaInput", - "CopyDBClusterSnapshotInput", - "CreateDBClusterInput", - } - for _, input := range inputs { - if ref, ok := a.Shapes[input]; ok { - ref.MemberRefs["SourceRegion"] = &ShapeRef{ - Documentation: docstring(`SourceRegion is the source region where the resource exists. This is not sent over the wire and is only used for presigning. This value should always have the same region as the source ARN.`), - ShapeName: "String", - Shape: a.Shapes["String"], - Ignore: true, - } - ref.MemberRefs["DestinationRegion"] = &ShapeRef{ - Documentation: docstring(`DestinationRegion is used for presigning the request to a given region.`), - ShapeName: "String", - Shape: a.Shapes["String"], - } - } - } -} - -func disableEndpointResolving(a *API) { - a.Metadata.NoResolveEndpoint = true -} diff --git a/vendor/github.com/aws/aws-sdk-go/private/model/api/docstring.go b/vendor/github.com/aws/aws-sdk-go/private/model/api/docstring.go deleted file mode 100644 index ebdd741..0000000 --- a/vendor/github.com/aws/aws-sdk-go/private/model/api/docstring.go +++ /dev/null @@ -1,384 +0,0 @@ -// +build codegen - -package api - -import ( - "bytes" - "encoding/json" - "fmt" - "html" - "os" - "regexp" - "strings" - - xhtml "golang.org/x/net/html" -) - -type apiDocumentation struct { - *API - Operations map[string]string - Service string - Shapes map[string]shapeDocumentation -} - -type shapeDocumentation struct { - Base string - Refs map[string]string -} - -// AttachDocs attaches documentation from a JSON filename. -func (a *API) AttachDocs(filename string) { - d := apiDocumentation{API: a} - - f, err := os.Open(filename) - defer f.Close() - if err != nil { - panic(err) - } - err = json.NewDecoder(f).Decode(&d) - if err != nil { - panic(err) - } - - d.setup() - -} - -func (d *apiDocumentation) setup() { - d.API.Documentation = docstring(d.Service) - if d.Service == "" { - d.API.Documentation = - fmt.Sprintf("// %s is a client for %s.\n", d.API.StructName(), d.API.NiceName()) - } - - for op, doc := range d.Operations { - d.API.Operations[op].Documentation = strings.TrimSpace(docstring(doc)) - } - - for shape, info := range d.Shapes { - if sh := d.API.Shapes[shape]; sh != nil { - sh.Documentation = docstring(info.Base) - } - - for ref, doc := range info.Refs { - if doc == "" { - continue - } - - parts := strings.Split(ref, "$") - if sh := d.API.Shapes[parts[0]]; sh != nil { - if m := sh.MemberRefs[parts[1]]; m != nil { - m.Documentation = docstring(doc) - } - } - } - } -} - -var reNewline = regexp.MustCompile(`\r?\n`) -var reMultiSpace = regexp.MustCompile(`\s+`) -var reComments = regexp.MustCompile(``) -var reFullname = regexp.MustCompile(`\s*.+?<\/fullname?>\s*`) -var reExamples = regexp.MustCompile(`.+?<\/examples?>`) -var reEndNL = regexp.MustCompile(`\n+$`) - -// docstring rewrites a string to insert godocs formatting. -func docstring(doc string) string { - doc = reNewline.ReplaceAllString(doc, "") - doc = reMultiSpace.ReplaceAllString(doc, " ") - doc = reComments.ReplaceAllString(doc, "") - doc = reFullname.ReplaceAllString(doc, "") - doc = reExamples.ReplaceAllString(doc, "") - doc = generateDoc(doc) - doc = reEndNL.ReplaceAllString(doc, "") - if doc == "" { - return "\n" - } - - doc = html.UnescapeString(doc) - return commentify(doc) -} - -const ( - indent = " " -) - -// style is what we want to prefix a string with. -// For instance,
  • Foo
  • Bar
  • , will generate -// * Foo -// * Bar -var style = map[string]string{ - "ul": indent + "* ", - "li": indent + "* ", - "code": indent, - "pre": indent, -} - -// commentify converts a string to a Go comment -func commentify(doc string) string { - lines := strings.Split(doc, "\n") - out := []string{} - for i, line := range lines { - if i > 0 && line == "" && lines[i-1] == "" { - continue - } - out = append(out, "// "+line) - } - - return strings.Join(out, "\n") + "\n" -} - -// wrap returns a rewritten version of text to have line breaks -// at approximately length characters. Line breaks will only be -// inserted into whitespace. -func wrap(text string, length int, isIndented bool) string { - var buf bytes.Buffer - var last rune - var lastNL bool - var col int - - for _, c := range text { - switch c { - case '\r': // ignore this - continue // and also don't track `last` - case '\n': // ignore this too, but reset col - if col >= length || last == '\n' { - buf.WriteString("\n") - } - buf.WriteString("\n") - col = 0 - case ' ', '\t': // opportunity to split - if col >= length { - buf.WriteByte('\n') - col = 0 - if isIndented { - buf.WriteString(indent) - col += 3 - } - } else { - // We only want to write a leading space if the col is greater than zero. - // This will provide the proper spacing for documentation. - buf.WriteRune(c) - col++ // count column - } - default: - buf.WriteRune(c) - col++ - } - lastNL = c == '\n' - _ = lastNL - last = c - } - return buf.String() -} - -type tagInfo struct { - tag string - key string - val string - txt string - raw string - closingTag bool -} - -// generateDoc will generate the proper doc string for html encoded or plain text doc entries. -func generateDoc(htmlSrc string) string { - tokenizer := xhtml.NewTokenizer(strings.NewReader(htmlSrc)) - tokens := buildTokenArray(tokenizer) - scopes := findScopes(tokens) - return walk(scopes) -} - -func buildTokenArray(tokenizer *xhtml.Tokenizer) []tagInfo { - tokens := []tagInfo{} - for tt := tokenizer.Next(); tt != xhtml.ErrorToken; tt = tokenizer.Next() { - switch tt { - case xhtml.TextToken: - txt := string(tokenizer.Text()) - if len(tokens) == 0 { - info := tagInfo{ - raw: txt, - } - tokens = append(tokens, info) - } - tn, _ := tokenizer.TagName() - key, val, _ := tokenizer.TagAttr() - info := tagInfo{ - tag: string(tn), - key: string(key), - val: string(val), - txt: txt, - } - tokens = append(tokens, info) - case xhtml.StartTagToken: - tn, _ := tokenizer.TagName() - key, val, _ := tokenizer.TagAttr() - info := tagInfo{ - tag: string(tn), - key: string(key), - val: string(val), - } - tokens = append(tokens, info) - case xhtml.SelfClosingTagToken, xhtml.EndTagToken: - tn, _ := tokenizer.TagName() - key, val, _ := tokenizer.TagAttr() - info := tagInfo{ - tag: string(tn), - key: string(key), - val: string(val), - closingTag: true, - } - tokens = append(tokens, info) - } - } - return tokens -} - -// walk is used to traverse each scoped block. These scoped -// blocks will act as blocked text where we do most of our -// text manipulation. -func walk(scopes [][]tagInfo) string { - doc := "" - // Documentation will be chunked by scopes. - // Meaning, for each scope will be divided by one or more newlines. - for _, scope := range scopes { - indentStr, isIndented := priorityIndentation(scope) - block := "" - href := "" - after := false - level := 0 - lastTag := "" - for _, token := range scope { - if token.closingTag { - endl := closeTag(token, level) - block += endl - level-- - lastTag = "" - } else if token.txt == "" { - if token.val != "" { - href, after = formatText(token, "") - } - if level == 1 && isIndented { - block += indentStr - } - level++ - lastTag = token.tag - } else { - if token.txt != " " { - str, _ := formatText(token, lastTag) - block += str - if after { - block += href - after = false - } - } else { - fmt.Println(token.tag) - str, _ := formatText(tagInfo{}, lastTag) - block += str - } - } - } - if !isIndented { - block = strings.TrimPrefix(block, " ") - } - block = wrap(block, 72, isIndented) - doc += block - } - return doc -} - -// closeTag will divide up the blocks of documentation to be formated properly. -func closeTag(token tagInfo, level int) string { - switch token.tag { - case "pre", "li", "div": - return "\n" - case "p", "h1", "h2", "h3", "h4", "h5", "h6": - return "\n\n" - case "code": - // indented code is only at the 0th level. - if level == 0 { - return "\n" - } - } - return "" -} - -// formatText will format any sort of text based off of a tag. It will also return -// a boolean to add the string after the text token. -func formatText(token tagInfo, lastTag string) (string, bool) { - switch token.tag { - case "a": - if token.val != "" { - return fmt.Sprintf(" (%s)", token.val), true - } - } - - // We don't care about a single space nor no text. - if len(token.txt) == 0 || token.txt == " " { - return "", false - } - - // Here we want to indent code blocks that are newlines - if lastTag == "code" { - // Greater than one, because we don't care about newlines in the beginning - block := "" - if lines := strings.Split(token.txt, "\n"); len(lines) > 1 { - for _, line := range lines { - block += indent + line - } - block += "\n" - return block, false - } - } - return token.txt, false -} - -// This is a parser to check what type of indention is needed. -func priorityIndentation(blocks []tagInfo) (string, bool) { - if len(blocks) == 0 { - return "", false - } - - v, ok := style[blocks[0].tag] - return v, ok -} - -// Divides into scopes based off levels. -// For instance, -//

    Testing123

    • Foo
    -// This has 2 scopes, the

    and

      -func findScopes(tokens []tagInfo) [][]tagInfo { - level := 0 - scope := []tagInfo{} - scopes := [][]tagInfo{} - for _, token := range tokens { - // we will clear empty tagged tokens from the array - txt := strings.TrimSpace(token.txt) - tag := strings.TrimSpace(token.tag) - if len(txt) == 0 && len(tag) == 0 { - continue - } - - scope = append(scope, token) - - // If it is a closing tag then we check what level - // we are on. If it is 0, then that means we have found a - // scoped block. - if token.closingTag { - level-- - if level == 0 { - scopes = append(scopes, scope) - scope = []tagInfo{} - } - // Check opening tags and increment the level - } else if token.txt == "" { - level++ - } - } - // In this case, we did not run into a closing tag. This would mean - // we have plaintext for documentation. - if len(scopes) == 0 { - scopes = append(scopes, scope) - } - return scopes -} diff --git a/vendor/github.com/aws/aws-sdk-go/private/model/api/docstring_test.go b/vendor/github.com/aws/aws-sdk-go/private/model/api/docstring_test.go deleted file mode 100644 index 627ba47..0000000 --- a/vendor/github.com/aws/aws-sdk-go/private/model/api/docstring_test.go +++ /dev/null @@ -1,100 +0,0 @@ -// +build 1.6,codegen - -package api - -import ( - "testing" -) - -func TestNonHTMLDocGen(t *testing.T) { - doc := "Testing 1 2 3" - expected := "// Testing 1 2 3\n" - doc = docstring(doc) - - if expected != doc { - t.Errorf("Expected %s, but received %s", expected, doc) - } -} - -func TestListsHTMLDocGen(t *testing.T) { - doc := "
      • Testing 1 2 3
      • FooBar
      " - expected := "// * Testing 1 2 3\n// * FooBar\n" - doc = docstring(doc) - - if expected != doc { - t.Errorf("Expected %s, but received %s", expected, doc) - } - - doc = "
      • Testing 1 2 3
      • FooBar
      " - expected = "// * Testing 1 2 3\n// * FooBar\n" - doc = docstring(doc) - - if expected != doc { - t.Errorf("Expected %s, but received %s", expected, doc) - } - - // Test leading spaces - doc = "
      • Testing 1 2 3
      • FooBar
      " - doc = docstring(doc) - if expected != doc { - t.Errorf("Expected %s, but received %s", expected, doc) - } - - // Paragraph check - doc = "
      • Testing 1 2 3

      • FooBar

      " - expected = "// * Testing 1 2 3\n// \n// * FooBar\n" - doc = docstring(doc) - if expected != doc { - t.Errorf("Expected %s, but received %s", expected, doc) - } -} - -func TestInlineCodeHTMLDocGen(t *testing.T) { - doc := "
      • Testing: 1 2 3
      • FooBar
      " - expected := "// * Testing: 1 2 3\n// * FooBar\n" - doc = docstring(doc) - - if expected != doc { - t.Errorf("Expected %s, but received %s", expected, doc) - } -} - -func TestInlineCodeInParagraphHTMLDocGen(t *testing.T) { - doc := "

      Testing: 1 2 3

      " - expected := "// Testing: 1 2 3\n" - doc = docstring(doc) - - if expected != doc { - t.Errorf("Expected %s, but received %s", expected, doc) - } -} - -func TestEmptyPREInlineCodeHTMLDocGen(t *testing.T) { - doc := "
      Testing
      " - expected := "// Testing\n" - doc = docstring(doc) - - if expected != doc { - t.Errorf("Expected %s, but received %s", expected, doc) - } -} - -func TestParagraph(t *testing.T) { - doc := "

      Testing 1 2 3

      " - expected := "// Testing 1 2 3\n" - doc = docstring(doc) - - if expected != doc { - t.Errorf("Expected %s, but received %s", expected, doc) - } -} - -func TestComplexListParagraphCode(t *testing.T) { - doc := "
      • FOO Bar

      • Xyz ABC

      " - expected := "// * FOO Bar\n// \n// * Xyz ABC\n" - doc = docstring(doc) - - if expected != doc { - t.Errorf("Expected %s, but received %s", expected, doc) - } -} diff --git a/vendor/github.com/aws/aws-sdk-go/private/model/api/exportable_name.go b/vendor/github.com/aws/aws-sdk-go/private/model/api/exportable_name.go deleted file mode 100644 index 124e900..0000000 --- a/vendor/github.com/aws/aws-sdk-go/private/model/api/exportable_name.go +++ /dev/null @@ -1,14 +0,0 @@ -// +build codegen - -package api - -import "strings" - -// ExportableName a name which is exportable as a value or name in Go code -func (a *API) ExportableName(name string) string { - if name == "" { - return name - } - - return strings.ToUpper(name[0:1]) + name[1:] -} diff --git a/vendor/github.com/aws/aws-sdk-go/private/model/api/list_of_shame.go b/vendor/github.com/aws/aws-sdk-go/private/model/api/list_of_shame.go deleted file mode 100644 index 08ba242..0000000 --- a/vendor/github.com/aws/aws-sdk-go/private/model/api/list_of_shame.go +++ /dev/null @@ -1,495 +0,0 @@ -package api - -// shamelist is used to not rename certain operation's input and output shapes. -// We need to maintain backwards compatibility with pre-existing services. Since -// not generating unique input/output shapes is not desired, we will generate -// unique input/output shapes for new operations. -var shamelist = map[string]map[string]struct { - input bool - output bool -}{ - "APIGateway": { - "CreateApiKey": { - output: true, - }, - "CreateAuthorizer": { - output: true, - }, - "CreateBasePathMapping": { - output: true, - }, - "CreateDeployment": { - output: true, - }, - "CreateDocumentationPart": { - output: true, - }, - "CreateDocumentationVersion": { - output: true, - }, - "CreateDomainName": { - output: true, - }, - "CreateModel": { - output: true, - }, - "CreateResource": { - output: true, - }, - "CreateRestApi": { - output: true, - }, - "CreateStage": { - output: true, - }, - "CreateUsagePlan": { - output: true, - }, - "CreateUsagePlanKey": { - output: true, - }, - "GenerateClientCertificate": { - output: true, - }, - "GetAccount": { - output: true, - }, - "GetApiKey": { - output: true, - }, - "GetAuthorizer": { - output: true, - }, - "GetBasePathMapping": { - output: true, - }, - "GetClientCertificate": { - output: true, - }, - "GetDeployment": { - output: true, - }, - "GetDocumentationPart": { - output: true, - }, - "GetDocumentationVersion": { - output: true, - }, - "GetDomainName": { - output: true, - }, - "GetIntegration": { - output: true, - }, - "GetIntegrationResponse": { - output: true, - }, - "GetMethod": { - output: true, - }, - "GetMethodResponse": { - output: true, - }, - "GetModel": { - output: true, - }, - "GetResource": { - output: true, - }, - "GetRestApi": { - output: true, - }, - "GetSdkType": { - output: true, - }, - "GetStage": { - output: true, - }, - "GetUsage": { - output: true, - }, - "GetUsagePlan": { - output: true, - }, - "GetUsagePlanKey": { - output: true, - }, - "ImportRestApi": { - output: true, - }, - "PutIntegration": { - output: true, - }, - "PutIntegrationResponse": { - output: true, - }, - "PutMethod": { - output: true, - }, - "PutMethodResponse": { - output: true, - }, - "PutRestApi": { - output: true, - }, - "UpdateAccount": { - output: true, - }, - "UpdateApiKey": { - output: true, - }, - "UpdateAuthorizer": { - output: true, - }, - "UpdateBasePathMapping": { - output: true, - }, - "UpdateClientCertificate": { - output: true, - }, - "UpdateDeployment": { - output: true, - }, - "UpdateDocumentationPart": { - output: true, - }, - "UpdateDocumentationVersion": { - output: true, - }, - "UpdateDomainName": { - output: true, - }, - "UpdateIntegration": { - output: true, - }, - "UpdateIntegrationResponse": { - output: true, - }, - "UpdateMethod": { - output: true, - }, - "UpdateMethodResponse": { - output: true, - }, - "UpdateModel": { - output: true, - }, - "UpdateResource": { - output: true, - }, - "UpdateRestApi": { - output: true, - }, - "UpdateStage": { - output: true, - }, - "UpdateUsage": { - output: true, - }, - "UpdateUsagePlan": { - output: true, - }, - }, - "AutoScaling": { - "ResumeProcesses": { - input: true, - }, - "SuspendProcesses": { - input: true, - }, - }, - "CognitoIdentity": { - "CreateIdentityPool": { - output: true, - }, - "DescribeIdentity": { - output: true, - }, - "DescribeIdentityPool": { - output: true, - }, - "UpdateIdentityPool": { - input: true, - output: true, - }, - }, - "DirectConnect": { - "AllocateConnectionOnInterconnect": { - output: true, - }, - "AllocateHostedConnection": { - output: true, - }, - "AllocatePrivateVirtualInterface": { - output: true, - }, - "AllocatePublicVirtualInterface": { - output: true, - }, - "AssociateConnectionWithLag": { - output: true, - }, - "AssociateHostedConnection": { - output: true, - }, - "AssociateVirtualInterface": { - output: true, - }, - "CreateConnection": { - output: true, - }, - "CreateInterconnect": { - output: true, - }, - "CreateLag": { - output: true, - }, - "CreatePrivateVirtualInterface": { - output: true, - }, - "CreatePublicVirtualInterface": { - output: true, - }, - "DeleteConnection": { - output: true, - }, - "DeleteLag": { - output: true, - }, - "DescribeConnections": { - output: true, - }, - "DescribeConnectionsOnInterconnect": { - output: true, - }, - "DescribeHostedConnections": { - output: true, - }, - "DescribeLoa": { - output: true, - }, - "DisassociateConnectionFromLag": { - output: true, - }, - "UpdateLag": { - output: true, - }, - }, - "EC2": { - "AttachVolume": { - output: true, - }, - "CreateSnapshot": { - output: true, - }, - "CreateVolume": { - output: true, - }, - "DetachVolume": { - output: true, - }, - "RunInstances": { - output: true, - }, - }, - "EFS": { - "CreateFileSystem": { - output: true, - }, - "CreateMountTarget": { - output: true, - }, - }, - "ElastiCache": { - "AddTagsToResource": { - output: true, - }, - "ListTagsForResource": { - output: true, - }, - "ModifyCacheParameterGroup": { - output: true, - }, - "RemoveTagsFromResource": { - output: true, - }, - "ResetCacheParameterGroup": { - output: true, - }, - }, - "ElasticBeanstalk": { - "ComposeEnvironments": { - output: true, - }, - "CreateApplication": { - output: true, - }, - "CreateApplicationVersion": { - output: true, - }, - "CreateConfigurationTemplate": { - output: true, - }, - "CreateEnvironment": { - output: true, - }, - "DescribeEnvironments": { - output: true, - }, - "TerminateEnvironment": { - output: true, - }, - "UpdateApplication": { - output: true, - }, - "UpdateApplicationVersion": { - output: true, - }, - "UpdateConfigurationTemplate": { - output: true, - }, - "UpdateEnvironment": { - output: true, - }, - }, - "Glacier": { - "DescribeJob": { - output: true, - }, - "UploadArchive": { - output: true, - }, - "CompleteMultipartUpload": { - output: true, - }, - }, - "IAM": { - "GetContextKeysForCustomPolicy": { - output: true, - }, - "GetContextKeysForPrincipalPolicy": { - output: true, - }, - "SimulateCustomPolicy": { - output: true, - }, - "SimulatePrincipalPolicy": { - output: true, - }, - }, - "Kinesis": { - "DisableEnhancedMonitoring": { - output: true, - }, - "EnableEnhancedMonitoring": { - output: true, - }, - }, - "KMS": { - "ListGrants": { - output: true, - }, - "ListRetirableGrants": { - output: true, - }, - }, - "Lambda": { - "CreateAlias": { - output: true, - }, - "CreateEventSourceMapping": { - output: true, - }, - "CreateFunction": { - output: true, - }, - "DeleteEventSourceMapping": { - output: true, - }, - "GetAlias": { - output: true, - }, - "GetEventSourceMapping": { - output: true, - }, - "GetFunctionConfiguration": { - output: true, - }, - "PublishVersion": { - output: true, - }, - "UpdateAlias": { - output: true, - }, - "UpdateEventSourceMapping": { - output: true, - }, - "UpdateFunctionCode": { - output: true, - }, - "UpdateFunctionConfiguration": { - output: true, - }, - }, - "RDS": { - "ModifyDBClusterParameterGroup": { - output: true, - }, - "ModifyDBParameterGroup": { - output: true, - }, - "ResetDBClusterParameterGroup": { - output: true, - }, - "ResetDBParameterGroup": { - output: true, - }, - }, - "Redshift": { - "DescribeLoggingStatus": { - output: true, - }, - "DisableLogging": { - output: true, - }, - "EnableLogging": { - output: true, - }, - "ModifyClusterParameterGroup": { - output: true, - }, - "ResetClusterParameterGroup": { - output: true, - }, - }, - "S3": { - "GetBucketNotification": { - input: true, - output: true, - }, - "GetBucketNotificationConfiguration": { - input: true, - output: true, - }, - }, - "SWF": { - "CountClosedWorkflowExecutions": { - output: true, - }, - "CountOpenWorkflowExecutions": { - output: true, - }, - "CountPendingActivityTasks": { - output: true, - }, - "CountPendingDecisionTasks": { - output: true, - }, - "ListClosedWorkflowExecutions": { - output: true, - }, - "ListOpenWorkflowExecutions": { - output: true, - }, - }, -} diff --git a/vendor/github.com/aws/aws-sdk-go/private/model/api/load.go b/vendor/github.com/aws/aws-sdk-go/private/model/api/load.go deleted file mode 100644 index 5f3b9e2..0000000 --- a/vendor/github.com/aws/aws-sdk-go/private/model/api/load.go +++ /dev/null @@ -1,74 +0,0 @@ -// +build codegen - -package api - -import ( - "encoding/json" - "fmt" - "os" - "path/filepath" -) - -// Load takes a set of files for each filetype and returns an API pointer. -// The API will be initialized once all files have been loaded and parsed. -// -// Will panic if any failure opening the definition JSON files, or there -// are unrecognized exported names. -func Load(api, docs, paginators, waiters string) *API { - a := API{} - a.Attach(api) - a.Attach(docs) - a.Attach(paginators) - a.Attach(waiters) - a.Setup() - return &a -} - -// Attach opens a file by name, and unmarshal its JSON data. -// Will proceed to setup the API if not already done so. -func (a *API) Attach(filename string) { - a.path = filepath.Dir(filename) - f, err := os.Open(filename) - defer f.Close() - if err != nil { - panic(err) - } - if err := json.NewDecoder(f).Decode(a); err != nil { - panic(fmt.Errorf("failed to decode %s, err: %v", filename, err)) - } -} - -// AttachString will unmarshal a raw JSON string, and setup the -// API if not already done so. -func (a *API) AttachString(str string) { - json.Unmarshal([]byte(str), a) - - if !a.initialized { - a.Setup() - } -} - -// Setup initializes the API. -func (a *API) Setup() { - a.setMetadataEndpointsKey() - a.writeShapeNames() - a.resolveReferences() - a.fixStutterNames() - a.renameExportable() - if !a.NoRenameToplevelShapes { - a.renameToplevelShapes() - } - a.updateTopLevelShapeReferences() - a.createInputOutputShapes() - a.customizationPasses() - - if !a.NoRemoveUnusedShapes { - a.removeUnusedShapes() - } - - if !a.NoValidataShapeMethods { - a.addShapeValidations() - } - - a.initialized = true -} diff --git a/vendor/github.com/aws/aws-sdk-go/private/model/api/load_test.go b/vendor/github.com/aws/aws-sdk-go/private/model/api/load_test.go deleted file mode 100644 index db4d8b3..0000000 --- a/vendor/github.com/aws/aws-sdk-go/private/model/api/load_test.go +++ /dev/null @@ -1,32 +0,0 @@ -// +build 1.6,codegen - -package api - -import ( - "testing" -) - -func TestResolvedReferences(t *testing.T) { - json := `{ - "operations": { - "OperationName": { - "input": { "shape": "TestName" } - } - }, - "shapes": { - "TestName": { - "type": "structure", - "members": { - "memberName1": { "shape": "OtherTest" }, - "memberName2": { "shape": "OtherTest" } - } - }, - "OtherTest": { "type": "string" } - } - }` - a := API{} - a.AttachString(json) - if len(a.Shapes["OtherTest"].refs) != 2 { - t.Errorf("Expected %d, but received %d", 2, len(a.Shapes["OtherTest"].refs)) - } -} diff --git a/vendor/github.com/aws/aws-sdk-go/private/model/api/operation.go b/vendor/github.com/aws/aws-sdk-go/private/model/api/operation.go deleted file mode 100644 index 749b6e7..0000000 --- a/vendor/github.com/aws/aws-sdk-go/private/model/api/operation.go +++ /dev/null @@ -1,493 +0,0 @@ -// +build codegen - -package api - -import ( - "bytes" - "fmt" - "regexp" - "sort" - "strings" - "text/template" -) - -// An Operation defines a specific API Operation. -type Operation struct { - API *API `json:"-"` - ExportedName string - Name string - Documentation string - HTTP HTTPInfo - InputRef ShapeRef `json:"input"` - OutputRef ShapeRef `json:"output"` - ErrorRefs []ShapeRef `json:"errors"` - Paginator *Paginator - Deprecated bool `json:"deprecated"` - AuthType string `json:"authtype"` - imports map[string]bool -} - -// A HTTPInfo defines the method of HTTP request for the Operation. -type HTTPInfo struct { - Method string - RequestURI string - ResponseCode uint -} - -// HasInput returns if the Operation accepts an input paramater -func (o *Operation) HasInput() bool { - return o.InputRef.ShapeName != "" -} - -// HasOutput returns if the Operation accepts an output parameter -func (o *Operation) HasOutput() bool { - return o.OutputRef.ShapeName != "" -} - -func (o *Operation) GetSigner() string { - if o.AuthType == "v4-unsigned-body" { - o.API.imports["github.com/aws/aws-sdk-go/aws/signer/v4"] = true - } - - buf := bytes.NewBuffer(nil) - - switch o.AuthType { - case "none": - buf.WriteString("req.Config.Credentials = credentials.AnonymousCredentials") - case "v4-unsigned-body": - buf.WriteString("req.Handlers.Sign.Remove(v4.SignRequestHandler)\n") - buf.WriteString("handler := v4.BuildNamedHandler(\"v4.CustomSignerHandler\", v4.WithUnsignedPayload)\n") - buf.WriteString("req.Handlers.Sign.PushFrontNamed(handler)") - } - - buf.WriteString("\n") - return buf.String() -} - -// tplOperation defines a template for rendering an API Operation -var tplOperation = template.Must(template.New("operation").Funcs(template.FuncMap{ - "GetCrosslinkURL": GetCrosslinkURL, -}).Parse(` -const op{{ .ExportedName }} = "{{ .Name }}" - -// {{ .ExportedName }}Request generates a "aws/request.Request" representing the -// client's request for the {{ .ExportedName }} operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See {{ .ExportedName }} for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the {{ .ExportedName }} method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the {{ .ExportedName }}Request method. -// req, resp := client.{{ .ExportedName }}Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -{{ $crosslinkURL := GetCrosslinkURL $.API.BaseCrosslinkURL $.API.APIName $.API.Metadata.UID $.ExportedName -}} -{{ if ne $crosslinkURL "" -}} -// -// Please also see {{ $crosslinkURL }} -{{ end -}} -func (c *{{ .API.StructName }}) {{ .ExportedName }}Request(` + - `input {{ .InputRef.GoType }}) (req *request.Request, output {{ .OutputRef.GoType }}) { - {{ if (or .Deprecated (or .InputRef.Deprecated .OutputRef.Deprecated)) }}if c.Client.Config.Logger != nil { - c.Client.Config.Logger.Log("This operation, {{ .ExportedName }}, has been deprecated") - } - op := &request.Operation{ {{ else }} op := &request.Operation{ {{ end }} - Name: op{{ .ExportedName }}, - {{ if ne .HTTP.Method "" }}HTTPMethod: "{{ .HTTP.Method }}", - {{ end }}HTTPPath: {{ if ne .HTTP.RequestURI "" }}"{{ .HTTP.RequestURI }}"{{ else }}"/"{{ end }}, - {{ if .Paginator }}Paginator: &request.Paginator{ - InputTokens: {{ .Paginator.InputTokensString }}, - OutputTokens: {{ .Paginator.OutputTokensString }}, - LimitToken: "{{ .Paginator.LimitKey }}", - TruncationToken: "{{ .Paginator.MoreResults }}", - }, - {{ end }} - } - - if input == nil { - input = &{{ .InputRef.GoTypeElem }}{} - } - - 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 }} - {{ if ne .AuthType "" }}{{ .GetSigner }}{{ end -}} - return -} - -// {{ .ExportedName }} API operation for {{ .API.Metadata.ServiceFullName }}. -{{ if .Documentation -}} -// -{{ .Documentation }} -{{ end -}} -// -// 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 -// the error. -// -// See the AWS API reference guide for {{ .API.Metadata.ServiceFullName }}'s -// API operation {{ .ExportedName }} for usage and error information. -{{ if .ErrorRefs -}} -// -// Returned Error Codes: -{{ range $_, $err := .ErrorRefs -}} -// * {{ $err.Shape.ErrorCodeName }} "{{ $err.Shape.ErrorName}}" -{{ if $err.Docstring -}} -{{ $err.IndentedDocstring }} -{{ end -}} -// -{{ end -}} -{{ end -}} -{{ $crosslinkURL := GetCrosslinkURL $.API.BaseCrosslinkURL $.API.APIName $.API.Metadata.UID $.ExportedName -}} -{{ if ne $crosslinkURL "" -}} -// Please also see {{ $crosslinkURL }} -{{ end -}} -func (c *{{ .API.StructName }}) {{ .ExportedName }}(` + - `input {{ .InputRef.GoType }}) ({{ .OutputRef.GoType }}, error) { - req, out := c.{{ .ExportedName }}Request(input) - return out, req.Send() -} - -// {{ .ExportedName }}WithContext is the same as {{ .ExportedName }} with the addition of -// the ability to pass a context and additional request options. -// -// See {{ .ExportedName }} for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *{{ .API.StructName }}) {{ .ExportedName }}WithContext(` + - `ctx aws.Context, input {{ .InputRef.GoType }}, opts ...request.Option) ` + - `({{ .OutputRef.GoType }}, error) { - req, out := c.{{ .ExportedName }}Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -{{ if .Paginator }} -// {{ .ExportedName }}Pages iterates over the pages of a {{ .ExportedName }} operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See {{ .ExportedName }} method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a {{ .ExportedName }} operation. -// pageNum := 0 -// err := client.{{ .ExportedName }}Pages(params, -// func(page {{ .OutputRef.GoType }}, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *{{ .API.StructName }}) {{ .ExportedName }}Pages(` + - `input {{ .InputRef.GoType }}, fn func({{ .OutputRef.GoType }}, bool) bool) error { - return c.{{ .ExportedName }}PagesWithContext(aws.BackgroundContext(), input, fn) -} - -// {{ .ExportedName }}PagesWithContext same as {{ .ExportedName }}Pages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *{{ .API.StructName }}) {{ .ExportedName }}PagesWithContext(` + - `ctx aws.Context, ` + - `input {{ .InputRef.GoType }}, ` + - `fn func({{ .OutputRef.GoType }}, bool) bool, ` + - `opts ...request.Option) error { - p := request.Pagination { - NewRequest: func() (*request.Request, error) { - var inCpy {{ .InputRef.GoType }} - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.{{ .ExportedName }}Request(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().({{ .OutputRef.GoType }}), !p.HasNextPage()) - } - return p.Err() -} -{{ end }} -`)) - -// GoCode returns a string of rendered GoCode for this Operation -func (o *Operation) GoCode() string { - var buf bytes.Buffer - err := tplOperation.Execute(&buf, o) - if err != nil { - panic(err) - } - - return strings.TrimSpace(buf.String()) -} - -// tplInfSig defines the template for rendering an Operation's signature within an Interface definition. -var tplInfSig = template.Must(template.New("opsig").Parse(` -{{ .ExportedName }}({{ .InputRef.GoTypeWithPkgName }}) ({{ .OutputRef.GoTypeWithPkgName }}, error) -{{ .ExportedName }}WithContext(aws.Context, {{ .InputRef.GoTypeWithPkgName }}, ...request.Option) ({{ .OutputRef.GoTypeWithPkgName }}, error) -{{ .ExportedName }}Request({{ .InputRef.GoTypeWithPkgName }}) (*request.Request, {{ .OutputRef.GoTypeWithPkgName }}) - -{{ if .Paginator -}} -{{ .ExportedName }}Pages({{ .InputRef.GoTypeWithPkgName }}, func({{ .OutputRef.GoTypeWithPkgName }}, bool) bool) error -{{ .ExportedName }}PagesWithContext(aws.Context, {{ .InputRef.GoTypeWithPkgName }}, func({{ .OutputRef.GoTypeWithPkgName }}, bool) bool, ...request.Option) error -{{- end }} -`)) - -// InterfaceSignature returns a string representing the Operation's interface{} -// functional signature. -func (o *Operation) InterfaceSignature() string { - var buf bytes.Buffer - err := tplInfSig.Execute(&buf, o) - if err != nil { - panic(err) - } - - return strings.TrimSpace(buf.String()) -} - -// tplExample defines the template for rendering an Operation example -var tplExample = template.Must(template.New("operationExample").Parse(` -func Example{{ .API.StructName }}_{{ .ExportedName }}() { - sess := session.Must(session.NewSession()) - - svc := {{ .API.PackageName }}.New(sess) - - {{ .ExampleInput }} - resp, err := svc.{{ .ExportedName }}(params) - - if err != nil { - // Print the error, cast err to awserr.Error to get the Code and - // Message from an error. - fmt.Println(err.Error()) - return - } - - // Pretty-print the response data. - fmt.Println(resp) -} -`)) - -// Example returns a string of the rendered Go code for the Operation -func (o *Operation) Example() string { - var buf bytes.Buffer - err := tplExample.Execute(&buf, o) - if err != nil { - panic(err) - } - - return strings.TrimSpace(buf.String()) -} - -// ExampleInput return a string of the rendered Go code for an example's input parameters -func (o *Operation) ExampleInput() string { - if len(o.InputRef.Shape.MemberRefs) == 0 { - if strings.Contains(o.InputRef.GoTypeElem(), ".") { - o.imports["github.com/aws/aws-sdk-go/service/"+strings.Split(o.InputRef.GoTypeElem(), ".")[0]] = true - return fmt.Sprintf("var params *%s", o.InputRef.GoTypeElem()) - } - return fmt.Sprintf("var params *%s.%s", - o.API.PackageName(), o.InputRef.GoTypeElem()) - } - e := example{o, map[string]int{}} - return "params := " + e.traverseAny(o.InputRef.Shape, false, false) -} - -// A example provides -type example struct { - *Operation - visited map[string]int -} - -// traverseAny returns rendered Go code for the shape. -func (e *example) traverseAny(s *Shape, required, payload bool) string { - str := "" - e.visited[s.ShapeName]++ - - switch s.Type { - case "structure": - str = e.traverseStruct(s, required, payload) - case "list": - str = e.traverseList(s, required, payload) - case "map": - str = e.traverseMap(s, required, payload) - case "jsonvalue": - str = "aws.JSONValue{\"key\": \"value\"}" - if required { - str += " // Required" - } - default: - str = e.traverseScalar(s, required, payload) - } - - e.visited[s.ShapeName]-- - - return str -} - -var reType = regexp.MustCompile(`\b([A-Z])`) - -// traverseStruct returns rendered Go code for a structure type shape. -func (e *example) traverseStruct(s *Shape, required, payload bool) string { - var buf bytes.Buffer - - if s.resolvePkg != "" { - e.imports[s.resolvePkg] = true - buf.WriteString("&" + s.GoTypeElem() + "{") - } else { - buf.WriteString("&" + s.API.PackageName() + "." + s.GoTypeElem() + "{") - } - - if required { - buf.WriteString(" // Required") - } - buf.WriteString("\n") - - req := make([]string, len(s.Required)) - copy(req, s.Required) - sort.Strings(req) - - if e.visited[s.ShapeName] < 2 { - for _, n := range req { - m := s.MemberRefs[n].Shape - p := n == s.Payload && (s.MemberRefs[n].Streaming || m.Streaming) - buf.WriteString(n + ": " + e.traverseAny(m, true, p) + ",") - if m.Type != "list" && m.Type != "structure" && m.Type != "map" { - buf.WriteString(" // Required") - } - buf.WriteString("\n") - } - - for _, n := range s.MemberNames() { - if s.IsRequired(n) { - continue - } - m := s.MemberRefs[n].Shape - p := n == s.Payload && (s.MemberRefs[n].Streaming || m.Streaming) - buf.WriteString(n + ": " + e.traverseAny(m, false, p) + ",\n") - } - } else { - buf.WriteString("// Recursive values...\n") - } - - buf.WriteString("}") - return buf.String() -} - -// traverseMap returns rendered Go code for a map type shape. -func (e *example) traverseMap(s *Shape, required, payload bool) string { - var buf bytes.Buffer - - t := "" - if s.resolvePkg != "" { - e.imports[s.resolvePkg] = true - t = s.GoTypeElem() - } else { - t = reType.ReplaceAllString(s.GoTypeElem(), s.API.PackageName()+".$1") - } - buf.WriteString(t + "{") - if required { - buf.WriteString(" // Required") - } - buf.WriteString("\n") - - if e.visited[s.ShapeName] < 2 { - m := s.ValueRef.Shape - buf.WriteString("\"Key\": " + e.traverseAny(m, true, false) + ",") - if m.Type != "list" && m.Type != "structure" && m.Type != "map" { - buf.WriteString(" // Required") - } - buf.WriteString("\n// More values...\n") - } else { - buf.WriteString("// Recursive values...\n") - } - buf.WriteString("}") - - return buf.String() -} - -// traverseList returns rendered Go code for a list type shape. -func (e *example) traverseList(s *Shape, required, payload bool) string { - var buf bytes.Buffer - t := "" - if s.resolvePkg != "" { - e.imports[s.resolvePkg] = true - t = s.GoTypeElem() - } else { - t = reType.ReplaceAllString(s.GoTypeElem(), s.API.PackageName()+".$1") - } - - buf.WriteString(t + "{") - if required { - buf.WriteString(" // Required") - } - buf.WriteString("\n") - - if e.visited[s.ShapeName] < 2 { - m := s.MemberRef.Shape - buf.WriteString(e.traverseAny(m, true, false) + ",") - if m.Type != "list" && m.Type != "structure" && m.Type != "map" { - buf.WriteString(" // Required") - } - buf.WriteString("\n// More values...\n") - } else { - buf.WriteString("// Recursive values...\n") - } - buf.WriteString("}") - - return buf.String() -} - -// traverseScalar returns an AWS Type string representation initialized to a value. -// Will panic if s is an unsupported shape type. -func (e *example) traverseScalar(s *Shape, required, payload bool) string { - str := "" - switch s.Type { - case "integer", "long": - str = `aws.Int64(1)` - case "float", "double": - str = `aws.Float64(1.0)` - case "string", "character": - str = `aws.String("` + s.ShapeName + `")` - case "blob": - if payload { - str = `bytes.NewReader([]byte("PAYLOAD"))` - } else { - str = `[]byte("PAYLOAD")` - } - case "boolean": - str = `aws.Bool(true)` - case "timestamp": - str = `aws.Time(time.Now())` - default: - panic("unsupported shape " + s.Type) - } - - return str -} diff --git a/vendor/github.com/aws/aws-sdk-go/private/model/api/pagination.go b/vendor/github.com/aws/aws-sdk-go/private/model/api/pagination.go deleted file mode 100644 index 441a475..0000000 --- a/vendor/github.com/aws/aws-sdk-go/private/model/api/pagination.go +++ /dev/null @@ -1,91 +0,0 @@ -// +build codegen - -package api - -import ( - "encoding/json" - "fmt" - "os" -) - -// Paginator keeps track of pagination configuration for an API operation. -type Paginator struct { - InputTokens interface{} `json:"input_token"` - OutputTokens interface{} `json:"output_token"` - LimitKey string `json:"limit_key"` - MoreResults string `json:"more_results"` -} - -// InputTokensString returns output tokens formatted as a list -func (p *Paginator) InputTokensString() string { - str := p.InputTokens.([]string) - return fmt.Sprintf("%#v", str) -} - -// OutputTokensString returns output tokens formatted as a list -func (p *Paginator) OutputTokensString() string { - str := p.OutputTokens.([]string) - return fmt.Sprintf("%#v", str) -} - -// used for unmarshaling from the paginators JSON file -type paginationDefinitions struct { - *API - Pagination map[string]Paginator -} - -// AttachPaginators attaches pagination configuration from filename to the API. -func (a *API) AttachPaginators(filename string) { - p := paginationDefinitions{API: a} - - f, err := os.Open(filename) - defer f.Close() - if err != nil { - panic(err) - } - err = json.NewDecoder(f).Decode(&p) - if err != nil { - panic(err) - } - - p.setup() -} - -// setup runs post-processing on the paginator configuration. -func (p *paginationDefinitions) setup() { - for n, e := range p.Pagination { - if e.InputTokens == nil || e.OutputTokens == nil { - continue - } - paginator := e - - switch t := paginator.InputTokens.(type) { - case string: - paginator.InputTokens = []string{t} - case []interface{}: - toks := []string{} - for _, e := range t { - s := e.(string) - toks = append(toks, s) - } - paginator.InputTokens = toks - } - switch t := paginator.OutputTokens.(type) { - case string: - paginator.OutputTokens = []string{t} - case []interface{}: - toks := []string{} - for _, e := range t { - s := e.(string) - toks = append(toks, s) - } - paginator.OutputTokens = toks - } - - if o, ok := p.Operations[n]; ok { - o.Paginator = &paginator - } else { - panic("unknown operation for paginator " + n) - } - } -} diff --git a/vendor/github.com/aws/aws-sdk-go/private/model/api/param_filler.go b/vendor/github.com/aws/aws-sdk-go/private/model/api/param_filler.go deleted file mode 100644 index eb3edb9..0000000 --- a/vendor/github.com/aws/aws-sdk-go/private/model/api/param_filler.go +++ /dev/null @@ -1,133 +0,0 @@ -// +build codegen - -package api - -import ( - "fmt" - "reflect" - "strings" - - "github.com/aws/aws-sdk-go/private/util" -) - -// A paramFiller provides string formatting for a shape and its types. -type paramFiller struct { - prefixPackageName bool -} - -// typeName returns the type name of a shape. -func (f paramFiller) typeName(shape *Shape) string { - if f.prefixPackageName && shape.Type == "structure" { - return "*" + shape.API.PackageName() + "." + shape.GoTypeElem() - } - return shape.GoType() -} - -// ParamsStructFromJSON returns a JSON string representation of a structure. -func ParamsStructFromJSON(value interface{}, shape *Shape, prefixPackageName bool) string { - f := paramFiller{prefixPackageName: prefixPackageName} - return util.GoFmt(f.paramsStructAny(value, shape)) -} - -// paramsStructAny returns the string representation of any value. -func (f paramFiller) paramsStructAny(value interface{}, shape *Shape) string { - if value == nil { - return "" - } - - switch shape.Type { - case "structure": - if value != nil { - vmap := value.(map[string]interface{}) - return f.paramsStructStruct(vmap, shape) - } - case "list": - vlist := value.([]interface{}) - return f.paramsStructList(vlist, shape) - case "map": - vmap := value.(map[string]interface{}) - return f.paramsStructMap(vmap, shape) - case "string", "character": - v := reflect.Indirect(reflect.ValueOf(value)) - if v.IsValid() { - return fmt.Sprintf("aws.String(%#v)", v.Interface()) - } - case "blob": - v := reflect.Indirect(reflect.ValueOf(value)) - if v.IsValid() && shape.Streaming { - return fmt.Sprintf("bytes.NewReader([]byte(%#v))", v.Interface()) - } else if v.IsValid() { - return fmt.Sprintf("[]byte(%#v)", v.Interface()) - } - case "boolean": - v := reflect.Indirect(reflect.ValueOf(value)) - if v.IsValid() { - return fmt.Sprintf("aws.Bool(%#v)", v.Interface()) - } - case "integer", "long": - v := reflect.Indirect(reflect.ValueOf(value)) - if v.IsValid() { - return fmt.Sprintf("aws.Int64(%v)", v.Interface()) - } - case "float", "double": - v := reflect.Indirect(reflect.ValueOf(value)) - if v.IsValid() { - return fmt.Sprintf("aws.Float64(%v)", v.Interface()) - } - case "timestamp": - v := reflect.Indirect(reflect.ValueOf(value)) - if v.IsValid() { - return fmt.Sprintf("aws.Time(time.Unix(%d, 0))", int(v.Float())) - } - default: - panic("Unhandled type " + shape.Type) - } - return "" -} - -// paramsStructStruct returns the string representation of a structure -func (f paramFiller) paramsStructStruct(value map[string]interface{}, shape *Shape) string { - out := "&" + f.typeName(shape)[1:] + "{\n" - for _, n := range shape.MemberNames() { - ref := shape.MemberRefs[n] - name := findParamMember(value, n) - - if val := f.paramsStructAny(value[name], ref.Shape); val != "" { - out += fmt.Sprintf("%s: %s,\n", n, val) - } - } - out += "}" - return out -} - -// paramsStructMap returns the string representation of a map of values -func (f paramFiller) paramsStructMap(value map[string]interface{}, shape *Shape) string { - out := f.typeName(shape) + "{\n" - keys := util.SortedKeys(value) - for _, k := range keys { - v := value[k] - out += fmt.Sprintf("%q: %s,\n", k, f.paramsStructAny(v, shape.ValueRef.Shape)) - } - out += "}" - return out -} - -// paramsStructList returns the string representation of slice of values -func (f paramFiller) paramsStructList(value []interface{}, shape *Shape) string { - out := f.typeName(shape) + "{\n" - for _, v := range value { - out += fmt.Sprintf("%s,\n", f.paramsStructAny(v, shape.MemberRef.Shape)) - } - out += "}" - return out -} - -// findParamMember searches a map for a key ignoring case. Returns the map key if found. -func findParamMember(value map[string]interface{}, key string) string { - for actualKey := range value { - if strings.ToLower(key) == strings.ToLower(actualKey) { - return actualKey - } - } - return "" -} diff --git a/vendor/github.com/aws/aws-sdk-go/private/model/api/passes.go b/vendor/github.com/aws/aws-sdk-go/private/model/api/passes.go deleted file mode 100644 index 0363942..0000000 --- a/vendor/github.com/aws/aws-sdk-go/private/model/api/passes.go +++ /dev/null @@ -1,306 +0,0 @@ -// +build codegen - -package api - -import ( - "fmt" - "regexp" - "strings" -) - -// updateTopLevelShapeReferences moves resultWrapper, locationName, and -// xmlNamespace traits from toplevel shape references to the toplevel -// shapes for easier code generation -func (a *API) updateTopLevelShapeReferences() { - for _, o := range a.Operations { - // these are for REST-XML services - if o.InputRef.LocationName != "" { - o.InputRef.Shape.LocationName = o.InputRef.LocationName - } - if o.InputRef.Location != "" { - o.InputRef.Shape.Location = o.InputRef.Location - } - if o.InputRef.Payload != "" { - o.InputRef.Shape.Payload = o.InputRef.Payload - } - if o.InputRef.XMLNamespace.Prefix != "" { - o.InputRef.Shape.XMLNamespace.Prefix = o.InputRef.XMLNamespace.Prefix - } - if o.InputRef.XMLNamespace.URI != "" { - o.InputRef.Shape.XMLNamespace.URI = o.InputRef.XMLNamespace.URI - } - } - -} - -// writeShapeNames sets each shape's API and shape name values. Binding the -// shape to its parent API. -func (a *API) writeShapeNames() { - for n, s := range a.Shapes { - s.API = a - s.ShapeName = n - } -} - -func (a *API) resolveReferences() { - resolver := referenceResolver{API: a, visited: map[*ShapeRef]bool{}} - - for _, s := range a.Shapes { - resolver.resolveShape(s) - } - - for _, o := range a.Operations { - o.API = a // resolve parent reference - - resolver.resolveReference(&o.InputRef) - resolver.resolveReference(&o.OutputRef) - - // Resolve references for errors also - for i := range o.ErrorRefs { - resolver.resolveReference(&o.ErrorRefs[i]) - o.ErrorRefs[i].Shape.IsError = true - } - } -} - -// A referenceResolver provides a way to resolve shape references to -// shape definitions. -type referenceResolver struct { - *API - visited map[*ShapeRef]bool -} - -var jsonvalueShape = &Shape{ - ShapeName: "JSONValue", - Type: "jsonvalue", - ValueRef: ShapeRef{ - JSONValue: true, - }, -} - -// resolveReference updates a shape reference to reference the API and -// its shape definition. All other nested references are also resolved. -func (r *referenceResolver) resolveReference(ref *ShapeRef) { - if ref.ShapeName == "" { - return - } - - if shape, ok := r.API.Shapes[ref.ShapeName]; ok { - if ref.JSONValue { - ref.ShapeName = "JSONValue" - r.API.Shapes[ref.ShapeName] = jsonvalueShape - } - - ref.API = r.API // resolve reference back to API - ref.Shape = shape // resolve shape reference - - if r.visited[ref] { - return - } - r.visited[ref] = true - - shape.refs = append(shape.refs, ref) // register the ref - - // resolve shape's references, if it has any - r.resolveShape(shape) - } -} - -// resolveShape resolves a shape's Member Key Value, and nested member -// shape references. -func (r *referenceResolver) resolveShape(shape *Shape) { - r.resolveReference(&shape.MemberRef) - r.resolveReference(&shape.KeyRef) - r.resolveReference(&shape.ValueRef) - for _, m := range shape.MemberRefs { - r.resolveReference(m) - } -} - -// renameToplevelShapes renames all top level shapes of an API to their -// exportable variant. The shapes are also updated to include notations -// if they are Input or Outputs. -func (a *API) renameToplevelShapes() { - for _, v := range a.OperationList() { - if v.HasInput() { - name := v.ExportedName + "Input" - switch { - case a.Shapes[name] == nil: - if service, ok := shamelist[a.name]; ok { - if check, ok := service[v.Name]; ok && check.input { - break - } - } - v.InputRef.Shape.Rename(name) - } - } - if v.HasOutput() { - name := v.ExportedName + "Output" - switch { - case a.Shapes[name] == nil: - if service, ok := shamelist[a.name]; ok { - if check, ok := service[v.Name]; ok && check.output { - break - } - } - v.OutputRef.Shape.Rename(name) - } - } - v.InputRef.Payload = a.ExportableName(v.InputRef.Payload) - v.OutputRef.Payload = a.ExportableName(v.OutputRef.Payload) - } -} - -// fixStutterNames fixes all name struttering based on Go naming conventions. -// "Stuttering" is when the prefix of a structure or function matches the -// package name (case insensitive). -func (a *API) fixStutterNames() { - str, end := a.StructName(), "" - if len(str) > 1 { - l := len(str) - 1 - str, end = str[0:l], str[l:] - } - re := regexp.MustCompile(fmt.Sprintf(`\A(?i:%s)%s`, str, end)) - - for name, op := range a.Operations { - newName := re.ReplaceAllString(name, "") - if newName != name { - delete(a.Operations, name) - a.Operations[newName] = op - } - op.ExportedName = newName - } - - for k, s := range a.Shapes { - newName := re.ReplaceAllString(k, "") - if newName != s.ShapeName { - s.Rename(newName) - } - } -} - -// renameExportable renames all operation names to be exportable names. -// All nested Shape names are also updated to the exportable variant. -func (a *API) renameExportable() { - for name, op := range a.Operations { - newName := a.ExportableName(name) - if newName != name { - delete(a.Operations, name) - a.Operations[newName] = op - } - op.ExportedName = newName - } - - for k, s := range a.Shapes { - // FIXME SNS has lower and uppercased shape names with the same name, - // except the lowercased variant is used exclusively for string and - // other primitive types. Renaming both would cause a collision. - // We work around this by only renaming the structure shapes. - if s.Type == "string" { - continue - } - - for mName, member := range s.MemberRefs { - newName := a.ExportableName(mName) - if newName != mName { - delete(s.MemberRefs, mName) - s.MemberRefs[newName] = member - - // also apply locationName trait so we keep the old one - // but only if there's no locationName trait on ref or shape - if member.LocationName == "" && member.Shape.LocationName == "" { - member.LocationName = mName - } - } - - if newName == "_" { - panic("Shape " + s.ShapeName + " uses reserved member name '_'") - } - } - - newName := a.ExportableName(k) - if newName != s.ShapeName { - s.Rename(newName) - } - - s.Payload = a.ExportableName(s.Payload) - - // fix required trait names - for i, n := range s.Required { - s.Required[i] = a.ExportableName(n) - } - } - - for _, s := range a.Shapes { - // fix enum names - if s.IsEnum() { - s.EnumConsts = make([]string, len(s.Enum)) - for i := range s.Enum { - shape := s.ShapeName - shape = strings.ToUpper(shape[0:1]) + shape[1:] - s.EnumConsts[i] = shape + s.EnumName(i) - } - } - } -} - -// createInputOutputShapes creates toplevel input/output shapes if they -// have not been defined in the API. This normalizes all APIs to always -// have an input and output structure in the signature. -func (a *API) createInputOutputShapes() { - for _, op := range a.Operations { - if !op.HasInput() { - setAsPlacholderShape(&op.InputRef, op.ExportedName+"Input", a) - } - if !op.HasOutput() { - setAsPlacholderShape(&op.OutputRef, op.ExportedName+"Output", a) - } - } -} - -func setAsPlacholderShape(tgtShapeRef *ShapeRef, name string, a *API) { - shape := a.makeIOShape(name) - shape.Placeholder = true - *tgtShapeRef = ShapeRef{API: a, ShapeName: shape.ShapeName, Shape: shape} - shape.refs = append(shape.refs, tgtShapeRef) -} - -// makeIOShape returns a pointer to a new Shape initialized by the name provided. -func (a *API) makeIOShape(name string) *Shape { - shape := &Shape{ - API: a, ShapeName: name, Type: "structure", - MemberRefs: map[string]*ShapeRef{}, - } - a.Shapes[name] = shape - return shape -} - -// removeUnusedShapes removes shapes from the API which are not referenced by any -// other shape in the API. -func (a *API) removeUnusedShapes() { - for n, s := range a.Shapes { - if len(s.refs) == 0 { - delete(a.Shapes, n) - } - } -} - -// Represents the service package name to EndpointsID mapping -var custEndpointsKey = map[string]string{ - "applicationautoscaling": "application-autoscaling", -} - -// Sents the EndpointsID field of Metadata with the value of the -// EndpointPrefix if EndpointsID is not set. Also adds -// customizations for services if EndpointPrefix is not a valid key. -func (a *API) setMetadataEndpointsKey() { - if len(a.Metadata.EndpointsID) != 0 { - return - } - - if v, ok := custEndpointsKey[a.PackageName()]; ok { - a.Metadata.EndpointsID = v - } else { - a.Metadata.EndpointsID = a.Metadata.EndpointPrefix - } -} diff --git a/vendor/github.com/aws/aws-sdk-go/private/model/api/passes_test.go b/vendor/github.com/aws/aws-sdk-go/private/model/api/passes_test.go deleted file mode 100644 index 13559b0..0000000 --- a/vendor/github.com/aws/aws-sdk-go/private/model/api/passes_test.go +++ /dev/null @@ -1,169 +0,0 @@ -// +build 1.6,codegen - -package api - -import ( - "testing" -) - -func TestUniqueInputAndOutputs(t *testing.T) { - shamelist["FooService"] = map[string]struct { - input bool - output bool - }{} - v := shamelist["FooService"]["OpOutputNoRename"] - v.output = true - shamelist["FooService"]["OpOutputNoRename"] = v - v = shamelist["FooService"]["InputNoRename"] - v.input = true - shamelist["FooService"]["OpInputNoRename"] = v - v = shamelist["FooService"]["BothNoRename"] - v.input = true - v.output = true - shamelist["FooService"]["OpBothNoRename"] = v - - testCases := [][]struct { - expectedInput string - expectedOutput string - operation string - input string - inputRef string - output string - outputRef string - }{ - { - { - expectedInput: "FooOperationInput", - expectedOutput: "FooOperationOutput", - operation: "FooOperation", - input: "FooInputShape", - inputRef: "FooInputShapeRef", - output: "FooOutputShape", - outputRef: "FooOutputShapeRef", - }, - { - expectedInput: "BarOperationInput", - expectedOutput: "BarOperationOutput", - operation: "BarOperation", - input: "FooInputShape", - inputRef: "FooInputShapeRef", - output: "FooOutputShape", - outputRef: "FooOutputShapeRef", - }, - }, - { - { - expectedInput: "FooOperationInput", - expectedOutput: "FooOperationOutput", - operation: "FooOperation", - input: "FooInputShape", - inputRef: "FooInputShapeRef", - output: "FooOutputShape", - outputRef: "FooOutputShapeRef", - }, - { - expectedInput: "OpOutputNoRenameInput", - expectedOutput: "OpOutputNoRenameOutputShape", - operation: "OpOutputNoRename", - input: "OpOutputNoRenameInputShape", - inputRef: "OpOutputNoRenameInputRef", - output: "OpOutputNoRenameOutputShape", - outputRef: "OpOutputNoRenameOutputRef", - }, - }, - { - { - expectedInput: "FooOperationInput", - expectedOutput: "FooOperationOutput", - operation: "FooOperation", - input: "FooInputShape", - inputRef: "FooInputShapeRef", - output: "FooOutputShape", - outputRef: "FooOutputShapeRef", - }, - { - expectedInput: "OpInputNoRenameInputShape", - expectedOutput: "OpInputNoRenameOutput", - operation: "OpInputNoRename", - input: "OpInputNoRenameInputShape", - inputRef: "OpInputNoRenameInputRef", - output: "OpInputNoRenameOutputShape", - outputRef: "OpInputNoRenameOutputRef", - }, - }, - { - { - expectedInput: "FooOperationInput", - expectedOutput: "FooOperationOutput", - operation: "FooOperation", - input: "FooInputShape", - inputRef: "FooInputShapeRef", - output: "FooOutputShape", - outputRef: "FooOutputShapeRef", - }, - { - expectedInput: "OpInputNoRenameInputShape", - expectedOutput: "OpInputNoRenameOutputShape", - operation: "OpBothNoRename", - input: "OpInputNoRenameInputShape", - inputRef: "OpInputNoRenameInputRef", - output: "OpInputNoRenameOutputShape", - outputRef: "OpInputNoRenameOutputRef", - }, - }, - } - - for _, c := range testCases { - a := &API{ - name: "FooService", - Operations: map[string]*Operation{}, - } - - expected := map[string][]string{} - a.Shapes = map[string]*Shape{} - for _, op := range c { - a.Operations[op.operation] = &Operation{ - ExportedName: op.operation, - } - a.Operations[op.operation].Name = op.operation - a.Operations[op.operation].InputRef = ShapeRef{ - API: a, - ShapeName: op.inputRef, - Shape: &Shape{ - API: a, - ShapeName: op.input, - }, - } - a.Operations[op.operation].OutputRef = ShapeRef{ - API: a, - ShapeName: op.outputRef, - Shape: &Shape{ - API: a, - ShapeName: op.output, - }, - } - - a.Shapes[op.input] = &Shape{ - ShapeName: op.input, - } - a.Shapes[op.output] = &Shape{ - ShapeName: op.output, - } - - expected[op.operation] = append(expected[op.operation], op.expectedInput) - expected[op.operation] = append(expected[op.operation], op.expectedOutput) - } - - a.fixStutterNames() - a.renameToplevelShapes() - for k, v := range expected { - if a.Operations[k].InputRef.Shape.ShapeName != v[0] { - t.Errorf("Error %d case: Expected %q, but received %q", k, v[0], a.Operations[k].InputRef.Shape.ShapeName) - } - if a.Operations[k].OutputRef.Shape.ShapeName != v[1] { - t.Errorf("Error %d case: Expected %q, but received %q", k, v[1], a.Operations[k].OutputRef.Shape.ShapeName) - } - } - - } -} diff --git a/vendor/github.com/aws/aws-sdk-go/private/model/api/shape.go b/vendor/github.com/aws/aws-sdk-go/private/model/api/shape.go deleted file mode 100644 index f42521c..0000000 --- a/vendor/github.com/aws/aws-sdk-go/private/model/api/shape.go +++ /dev/null @@ -1,636 +0,0 @@ -// +build codegen - -package api - -import ( - "bytes" - "fmt" - "path" - "regexp" - "sort" - "strings" - "text/template" -) - -// A ShapeRef defines the usage of a shape within the API. -type ShapeRef struct { - API *API `json:"-"` - Shape *Shape `json:"-"` - Documentation string - ShapeName string `json:"shape"` - Location string - LocationName string - QueryName string - Flattened bool - Streaming bool - XMLAttribute bool - // Ignore, if set, will not be sent over the wire - Ignore bool - XMLNamespace XMLInfo - Payload string - IdempotencyToken bool `json:"idempotencyToken"` - JSONValue bool `json:"jsonvalue"` - Deprecated bool `json:"deprecated"` - - OrigShapeName string `json:"-"` -} - -// ErrorInfo represents the error block of a shape's structure -type ErrorInfo struct { - Code string - HTTPStatusCode int -} - -// A XMLInfo defines URL and prefix for Shapes when rendered as XML -type XMLInfo struct { - Prefix string - URI string -} - -// A Shape defines the definition of a shape type -type Shape struct { - API *API `json:"-"` - ShapeName string - Documentation string - MemberRefs map[string]*ShapeRef `json:"members"` - MemberRef ShapeRef `json:"member"` - KeyRef ShapeRef `json:"key"` - ValueRef ShapeRef `json:"value"` - Required []string - Payload string - Type string - Exception bool - Enum []string - EnumConsts []string - Flattened bool - Streaming bool - Location string - LocationName string - IdempotencyToken bool `json:"idempotencyToken"` - XMLNamespace XMLInfo - Min float64 // optional Minimum length (string, list) or value (number) - Max float64 // optional Maximum length (string, list) or value (number) - - refs []*ShapeRef // References to this shape - resolvePkg string // use this package in the goType() if present - - OrigShapeName string `json:"-"` - - // Defines if the shape is a placeholder and should not be used directly - Placeholder bool - - Deprecated bool `json:"deprecated"` - - Validations ShapeValidations - - // Error information that is set if the shape is an error shape. - IsError bool - ErrorInfo ErrorInfo `json:"error"` -} - -// ErrorCodeName will return the error shape's name formated for -// error code const. -func (s *Shape) ErrorCodeName() string { - return "ErrCode" + s.ShapeName -} - -// ErrorName will return the shape's name or error code if available based -// on the API's protocol. This is the error code string returned by the service. -func (s *Shape) ErrorName() string { - name := s.ShapeName - switch s.API.Metadata.Protocol { - case "query", "ec2query", "rest-xml": - if len(s.ErrorInfo.Code) > 0 { - name = s.ErrorInfo.Code - } - } - - return name -} - -// GoTags returns the struct tags for a shape. -func (s *Shape) GoTags(root, required bool) string { - ref := &ShapeRef{ShapeName: s.ShapeName, API: s.API, Shape: s} - return ref.GoTags(root, required) -} - -// Rename changes the name of the Shape to newName. Also updates -// the associated API's reference to use newName. -func (s *Shape) Rename(newName string) { - for _, r := range s.refs { - r.OrigShapeName = r.ShapeName - r.ShapeName = newName - } - - delete(s.API.Shapes, s.ShapeName) - s.OrigShapeName = s.ShapeName - s.API.Shapes[newName] = s - s.ShapeName = newName -} - -// MemberNames returns a slice of struct member names. -func (s *Shape) MemberNames() []string { - i, names := 0, make([]string, len(s.MemberRefs)) - for n := range s.MemberRefs { - names[i] = n - i++ - } - sort.Strings(names) - return names -} - -// GoTypeWithPkgName returns a shape's type as a string with the package name in -// . format. Package naming only applies to structures. -func (s *Shape) GoTypeWithPkgName() string { - return goType(s, true) -} - -// GenAccessors returns if the shape's reference should have setters generated. -func (s *ShapeRef) UseIndirection() bool { - switch s.Shape.Type { - case "map", "list", "blob", "structure", "jsonvalue": - return false - } - - if s.Streaming || s.Shape.Streaming { - return false - } - - if s.JSONValue { - return false - } - - return true -} - -// GoStructValueType returns the Shape's Go type value instead of a pointer -// for the type. -func (s *Shape) GoStructValueType(name string, ref *ShapeRef) string { - v := s.GoStructType(name, ref) - - if ref.UseIndirection() && v[0] == '*' { - return v[1:] - } - - return v -} - -// GoStructType returns the type of a struct field based on the API -// model definition. -func (s *Shape) GoStructType(name string, ref *ShapeRef) string { - if (ref.Streaming || ref.Shape.Streaming) && s.Payload == name { - rtype := "io.ReadSeeker" - if strings.HasSuffix(s.ShapeName, "Output") { - rtype = "io.ReadCloser" - } - - s.API.imports["io"] = true - return rtype - } - - if ref.JSONValue { - s.API.imports["github.com/aws/aws-sdk-go/aws"] = true - return "aws.JSONValue" - } - - for _, v := range s.Validations { - // TODO move this to shape validation resolution - if (v.Ref.Shape.Type == "map" || v.Ref.Shape.Type == "list") && v.Type == ShapeValidationNested { - s.API.imports["fmt"] = true - } - } - - return ref.GoType() -} - -// GoType returns a shape's Go type -func (s *Shape) GoType() string { - return goType(s, false) -} - -// GoType returns a shape ref's Go type. -func (ref *ShapeRef) GoType() string { - if ref.Shape == nil { - panic(fmt.Errorf("missing shape definition on reference for %#v", ref)) - } - - return ref.Shape.GoType() -} - -// GoTypeWithPkgName returns a shape's type as a string with the package name in -// . format. Package naming only applies to structures. -func (ref *ShapeRef) GoTypeWithPkgName() string { - if ref.Shape == nil { - panic(fmt.Errorf("missing shape definition on reference for %#v", ref)) - } - - return ref.Shape.GoTypeWithPkgName() -} - -// Returns a string version of the Shape's type. -// If withPkgName is true, the package name will be added as a prefix -func goType(s *Shape, withPkgName bool) string { - switch s.Type { - case "structure": - if withPkgName || s.resolvePkg != "" { - pkg := s.resolvePkg - if pkg != "" { - s.API.imports[pkg] = true - pkg = path.Base(pkg) - } else { - pkg = s.API.PackageName() - } - return fmt.Sprintf("*%s.%s", pkg, s.ShapeName) - } - return "*" + s.ShapeName - case "map": - return "map[string]" + s.ValueRef.GoType() - case "jsonvalue": - return "aws.JSONValue" - case "list": - return "[]" + s.MemberRef.GoType() - case "boolean": - return "*bool" - case "string", "character": - return "*string" - case "blob": - return "[]byte" - case "integer", "long": - return "*int64" - case "float", "double": - return "*float64" - case "timestamp": - s.API.imports["time"] = true - return "*time.Time" - default: - panic("Unsupported shape type: " + s.Type) - } -} - -// GoTypeElem returns the Go type for the Shape. If the shape type is a pointer just -// the type will be returned minus the pointer *. -func (s *Shape) GoTypeElem() string { - t := s.GoType() - if strings.HasPrefix(t, "*") { - return t[1:] - } - return t -} - -// GoTypeElem returns the Go type for the Shape. If the shape type is a pointer just -// the type will be returned minus the pointer *. -func (ref *ShapeRef) GoTypeElem() string { - if ref.Shape == nil { - panic(fmt.Errorf("missing shape definition on reference for %#v", ref)) - } - - return ref.Shape.GoTypeElem() -} - -// ShapeTag is a struct tag that will be applied to a shape's generated code -type ShapeTag struct { - Key, Val string -} - -// String returns the string representation of the shape tag -func (s ShapeTag) String() string { - return fmt.Sprintf(`%s:"%s"`, s.Key, s.Val) -} - -// ShapeTags is a collection of shape tags and provides serialization of the -// tags in an ordered list. -type ShapeTags []ShapeTag - -// Join returns an ordered serialization of the shape tags with the provided -// separator. -func (s ShapeTags) Join(sep string) string { - o := &bytes.Buffer{} - for i, t := range s { - o.WriteString(t.String()) - if i < len(s)-1 { - o.WriteString(sep) - } - } - - return o.String() -} - -// String is an alias for Join with the empty space separator. -func (s ShapeTags) String() string { - return s.Join(" ") -} - -// GoTags returns the rendered tags string for the ShapeRef -func (ref *ShapeRef) GoTags(toplevel bool, isRequired bool) string { - tags := ShapeTags{} - - if ref.Location != "" { - tags = append(tags, ShapeTag{"location", ref.Location}) - } else if ref.Shape.Location != "" { - tags = append(tags, ShapeTag{"location", ref.Shape.Location}) - } - - if ref.LocationName != "" { - tags = append(tags, ShapeTag{"locationName", ref.LocationName}) - } else if ref.Shape.LocationName != "" { - tags = append(tags, ShapeTag{"locationName", ref.Shape.LocationName}) - } - - if ref.QueryName != "" { - tags = append(tags, ShapeTag{"queryName", ref.QueryName}) - } - if ref.Shape.MemberRef.LocationName != "" { - tags = append(tags, ShapeTag{"locationNameList", ref.Shape.MemberRef.LocationName}) - } - if ref.Shape.KeyRef.LocationName != "" { - tags = append(tags, ShapeTag{"locationNameKey", ref.Shape.KeyRef.LocationName}) - } - if ref.Shape.ValueRef.LocationName != "" { - tags = append(tags, ShapeTag{"locationNameValue", ref.Shape.ValueRef.LocationName}) - } - if ref.Shape.Min > 0 { - tags = append(tags, ShapeTag{"min", fmt.Sprintf("%v", ref.Shape.Min)}) - } - - if ref.Deprecated || ref.Shape.Deprecated { - tags = append(tags, ShapeTag{"deprecated", "true"}) - } - - // All shapes have a type - tags = append(tags, ShapeTag{"type", ref.Shape.Type}) - - // embed the timestamp type for easier lookups - if ref.Shape.Type == "timestamp" { - t := ShapeTag{Key: "timestampFormat"} - if ref.Location == "header" { - t.Val = "rfc822" - } else { - switch ref.API.Metadata.Protocol { - case "json", "rest-json": - t.Val = "unix" - case "rest-xml", "ec2", "query": - t.Val = "iso8601" - } - } - tags = append(tags, t) - } - - if ref.Shape.Flattened || ref.Flattened { - tags = append(tags, ShapeTag{"flattened", "true"}) - } - if ref.XMLAttribute { - tags = append(tags, ShapeTag{"xmlAttribute", "true"}) - } - if isRequired { - tags = append(tags, ShapeTag{"required", "true"}) - } - if ref.Shape.IsEnum() { - tags = append(tags, ShapeTag{"enum", ref.ShapeName}) - } - - if toplevel { - if ref.Shape.Payload != "" { - tags = append(tags, ShapeTag{"payload", ref.Shape.Payload}) - } - if ref.XMLNamespace.Prefix != "" { - tags = append(tags, ShapeTag{"xmlPrefix", ref.XMLNamespace.Prefix}) - } else if ref.Shape.XMLNamespace.Prefix != "" { - tags = append(tags, ShapeTag{"xmlPrefix", ref.Shape.XMLNamespace.Prefix}) - } - if ref.XMLNamespace.URI != "" { - tags = append(tags, ShapeTag{"xmlURI", ref.XMLNamespace.URI}) - } else if ref.Shape.XMLNamespace.URI != "" { - tags = append(tags, ShapeTag{"xmlURI", ref.Shape.XMLNamespace.URI}) - } - } - - if ref.IdempotencyToken || ref.Shape.IdempotencyToken { - tags = append(tags, ShapeTag{"idempotencyToken", "true"}) - } - - if ref.Ignore { - tags = append(tags, ShapeTag{"ignore", "true"}) - } - - return fmt.Sprintf("`%s`", tags) -} - -// Docstring returns the godocs formated documentation -func (ref *ShapeRef) Docstring() string { - if ref.Documentation != "" { - return strings.Trim(ref.Documentation, "\n ") - } - return ref.Shape.Docstring() -} - -// Docstring returns the godocs formated documentation -func (s *Shape) Docstring() string { - return strings.Trim(s.Documentation, "\n ") -} - -// IndentedDocstring is the indented form of the doc string. -func (ref *ShapeRef) IndentedDocstring() string { - doc := ref.Docstring() - return strings.Replace(doc, "// ", "// ", -1) -} - -var goCodeStringerTmpl = template.Must(template.New("goCodeStringerTmpl").Parse(` -// String returns the string representation -func (s {{ .ShapeName }}) String() string { - return awsutil.Prettify(s) -} -// GoString returns the string representation -func (s {{ .ShapeName }}) GoString() string { - return s.String() -} -`)) - -// GoCodeStringers renders the Stringers for API input/output shapes -func (s *Shape) GoCodeStringers() string { - w := bytes.Buffer{} - if err := goCodeStringerTmpl.Execute(&w, s); err != nil { - panic(fmt.Sprintln("Unexpected error executing GoCodeStringers template", err)) - } - - return w.String() -} - -var enumStrip = regexp.MustCompile(`[^a-zA-Z0-9_:\./-]`) -var enumDelims = regexp.MustCompile(`[-_:\./]+`) -var enumCamelCase = regexp.MustCompile(`([a-z])([A-Z])`) - -// EnumName returns the Nth enum in the shapes Enum list -func (s *Shape) EnumName(n int) string { - enum := s.Enum[n] - enum = enumStrip.ReplaceAllLiteralString(enum, "") - enum = enumCamelCase.ReplaceAllString(enum, "$1-$2") - parts := enumDelims.Split(enum, -1) - for i, v := range parts { - v = strings.ToLower(v) - parts[i] = "" - if len(v) > 0 { - parts[i] = strings.ToUpper(v[0:1]) - } - if len(v) > 1 { - parts[i] += v[1:] - } - } - enum = strings.Join(parts, "") - enum = strings.ToUpper(enum[0:1]) + enum[1:] - return enum -} - -// NestedShape returns the shape pointer value for the shape which is nested -// under the current shape. If the shape is not nested nil will be returned. -// -// strucutures, the current shape is returned -// map: the value shape of the map is returned -// list: the element shape of the list is returned -func (s *Shape) NestedShape() *Shape { - var nestedShape *Shape - switch s.Type { - case "structure": - nestedShape = s - case "map": - nestedShape = s.ValueRef.Shape - case "list": - nestedShape = s.MemberRef.Shape - } - - return nestedShape -} - -var structShapeTmpl = template.Must(template.New("StructShape").Funcs(template.FuncMap{ - "GetCrosslinkURL": GetCrosslinkURL, -}).Parse(` -{{ .Docstring }} -{{ if ne $.OrigShapeName "" -}} -{{ $crosslinkURL := GetCrosslinkURL $.API.BaseCrosslinkURL $.API.APIName $.API.Metadata.UID $.OrigShapeName -}} -{{ if ne $crosslinkURL "" -}} -// Please also see {{ $crosslinkURL }} -{{ end -}} -{{ else -}} -{{ $crosslinkURL := GetCrosslinkURL $.API.BaseCrosslinkURL $.API.APIName $.API.Metadata.UID $.ShapeName -}} -{{ if ne $crosslinkURL "" -}} -// Please also see {{ $crosslinkURL }} -{{ end -}} -{{ end -}} -{{ $context := . -}} -type {{ .ShapeName }} struct { - _ struct{} {{ .GoTags true false }} - - {{ range $_, $name := $context.MemberNames -}} - {{ $elem := index $context.MemberRefs $name -}} - {{ $isRequired := $context.IsRequired $name -}} - {{ $doc := $elem.Docstring -}} - - {{ $doc }} - {{ if $isRequired -}} - {{ if $doc -}} - // - {{ end -}} - // {{ $name }} is a required field - {{ end -}} - {{ $name }} {{ $context.GoStructType $name $elem }} {{ $elem.GoTags false $isRequired }} - - {{ end }} -} -{{ if not .API.NoStringerMethods }} - {{ .GoCodeStringers }} -{{ end }} -{{ if not .API.NoValidataShapeMethods }} - {{ if .Validations -}} - {{ .Validations.GoCode . }} - {{ end }} -{{ end }} - -{{ if not .API.NoGenStructFieldAccessors }} - -{{ $builderShapeName := print .ShapeName -}} - -{{ range $_, $name := $context.MemberNames -}} - {{ $elem := index $context.MemberRefs $name -}} - -// Set{{ $name }} sets the {{ $name }} field's value. -func (s *{{ $builderShapeName }}) Set{{ $name }}(v {{ $context.GoStructValueType $name $elem }}) *{{ $builderShapeName }} { - {{ if $elem.UseIndirection -}} - s.{{ $name }} = &v - {{ else -}} - s.{{ $name }} = v - {{ end -}} - return s -} - -{{ end }} -{{ end }} -`)) - -var enumShapeTmpl = template.Must(template.New("EnumShape").Parse(` -{{ .Docstring }} -const ( - {{ $context := . -}} - {{ range $index, $elem := .Enum -}} - {{ $name := index $context.EnumConsts $index -}} - // {{ $name }} is a {{ $context.ShapeName }} enum value - {{ $name }} = "{{ $elem }}" - - {{ end }} -) -`)) - -// GoCode returns the rendered Go code for the Shape. -func (s *Shape) GoCode() string { - b := &bytes.Buffer{} - - switch { - case s.Type == "structure": - if err := structShapeTmpl.Execute(b, s); err != nil { - panic(fmt.Sprintf("Failed to generate struct shape %s, %v\n", s.ShapeName, err)) - } - case s.IsEnum(): - if err := enumShapeTmpl.Execute(b, s); err != nil { - panic(fmt.Sprintf("Failed to generate enum shape %s, %v\n", s.ShapeName, err)) - } - default: - panic(fmt.Sprintln("Cannot generate toplevel shape for", s.Type)) - } - - return b.String() -} - -// IsEnum returns whether this shape is an enum list -func (s *Shape) IsEnum() bool { - return s.Type == "string" && len(s.Enum) > 0 -} - -// IsRequired returns if member is a required field. -func (s *Shape) IsRequired(member string) bool { - for _, n := range s.Required { - if n == member { - return true - } - } - return false -} - -// IsInternal returns whether the shape was defined in this package -func (s *Shape) IsInternal() bool { - return s.resolvePkg == "" -} - -// removeRef removes a shape reference from the list of references this -// shape is used in. -func (s *Shape) removeRef(ref *ShapeRef) { - r := s.refs - for i := 0; i < len(r); i++ { - if r[i] == ref { - j := i + 1 - copy(r[i:], r[j:]) - for k, n := len(r)-j+i, len(r); k < n; k++ { - r[k] = nil // free up the end of the list - } // for k - s.refs = r[:len(r)-j+i] - break - } - } -} diff --git a/vendor/github.com/aws/aws-sdk-go/private/model/api/shape_validation.go b/vendor/github.com/aws/aws-sdk-go/private/model/api/shape_validation.go deleted file mode 100644 index 6f8abfd..0000000 --- a/vendor/github.com/aws/aws-sdk-go/private/model/api/shape_validation.go +++ /dev/null @@ -1,155 +0,0 @@ -// +build codegen - -package api - -import ( - "bytes" - "fmt" - "text/template" -) - -// A ShapeValidationType is the type of validation that a shape needs -type ShapeValidationType int - -const ( - // ShapeValidationRequired states the shape must be set - ShapeValidationRequired = iota - - // ShapeValidationMinVal states the shape must have at least a number of - // elements, or for numbers a minimum value - ShapeValidationMinVal - - // ShapeValidationNested states the shape has nested values that need - // to be validated - ShapeValidationNested -) - -// A ShapeValidation contains information about a shape and the type of validation -// that is needed -type ShapeValidation struct { - // Name of the shape to be validated - Name string - // Reference to the shape within the context the shape is referenced - Ref *ShapeRef - // Type of validation needed - Type ShapeValidationType -} - -var validationGoCodeTmpls = template.Must(template.New("validationGoCodeTmpls").Parse(` -{{ define "requiredValue" -}} - if s.{{ .Name }} == nil { - invalidParams.Add(request.NewErrParamRequired("{{ .Name }}")) - } -{{- end }} -{{ define "minLen" -}} - if s.{{ .Name }} != nil && len(s.{{ .Name }}) < {{ .Ref.Shape.Min }} { - invalidParams.Add(request.NewErrParamMinLen("{{ .Name }}", {{ .Ref.Shape.Min }})) - } -{{- end }} -{{ define "minLenString" -}} - if s.{{ .Name }} != nil && len(*s.{{ .Name }}) < {{ .Ref.Shape.Min }} { - invalidParams.Add(request.NewErrParamMinLen("{{ .Name }}", {{ .Ref.Shape.Min }})) - } -{{- end }} -{{ define "minVal" -}} - if s.{{ .Name }} != nil && *s.{{ .Name }} < {{ .Ref.Shape.Min }} { - invalidParams.Add(request.NewErrParamMinValue("{{ .Name }}", {{ .Ref.Shape.Min }})) - } -{{- end }} -{{ define "nestedMapList" -}} - if s.{{ .Name }} != nil { - for i, v := range s.{{ .Name }} { - if v == nil { continue } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "{{ .Name }}", i), err.(request.ErrInvalidParams)) - } - } - } -{{- end }} -{{ define "nestedStruct" -}} - if s.{{ .Name }} != nil { - if err := s.{{ .Name }}.Validate(); err != nil { - invalidParams.AddNested("{{ .Name }}", err.(request.ErrInvalidParams)) - } - } -{{- end }} -`)) - -// GoCode returns the generated Go code for the Shape with its validation type. -func (sv ShapeValidation) GoCode() string { - var err error - - w := &bytes.Buffer{} - switch sv.Type { - case ShapeValidationRequired: - err = validationGoCodeTmpls.ExecuteTemplate(w, "requiredValue", sv) - case ShapeValidationMinVal: - switch sv.Ref.Shape.Type { - case "list", "map", "blob": - err = validationGoCodeTmpls.ExecuteTemplate(w, "minLen", sv) - case "string": - err = validationGoCodeTmpls.ExecuteTemplate(w, "minLenString", sv) - case "integer", "long", "float", "double": - err = validationGoCodeTmpls.ExecuteTemplate(w, "minVal", sv) - default: - panic(fmt.Sprintf("ShapeValidation.GoCode, %s's type %s, no min value handling", - sv.Name, sv.Ref.Shape.Type)) - } - case ShapeValidationNested: - switch sv.Ref.Shape.Type { - case "map", "list": - err = validationGoCodeTmpls.ExecuteTemplate(w, "nestedMapList", sv) - default: - err = validationGoCodeTmpls.ExecuteTemplate(w, "nestedStruct", sv) - } - default: - panic(fmt.Sprintf("ShapeValidation.GoCode, %s's type %d, unknown validation type", - sv.Name, sv.Type)) - } - - if err != nil { - panic(fmt.Sprintf("ShapeValidation.GoCode failed, err: %v", err)) - } - - return w.String() -} - -// A ShapeValidations is a collection of shape validations needed nested within -// a parent shape -type ShapeValidations []ShapeValidation - -var validateShapeTmpl = template.Must(template.New("ValidateShape").Parse(` -// Validate inspects the fields of the type to determine if they are valid. -func (s *{{ .Shape.ShapeName }}) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "{{ .Shape.ShapeName }}"} - {{ range $_, $v := .Validations -}} - {{ $v.GoCode }} - {{ end }} - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} -`)) - -// GoCode generates the Go code needed to perform validations for the -// shape and its nested fields. -func (vs ShapeValidations) GoCode(shape *Shape) string { - buf := &bytes.Buffer{} - validateShapeTmpl.Execute(buf, map[string]interface{}{ - "Shape": shape, - "Validations": vs, - }) - return buf.String() -} - -// Has returns true or false if the ShapeValidations already contains the -// the reference and validation type. -func (vs ShapeValidations) Has(ref *ShapeRef, typ ShapeValidationType) bool { - for _, v := range vs { - if v.Ref == ref && v.Type == typ { - return true - } - } - return false -} diff --git a/vendor/github.com/aws/aws-sdk-go/private/model/api/shapetag_test.go b/vendor/github.com/aws/aws-sdk-go/private/model/api/shapetag_test.go deleted file mode 100644 index 43115cb..0000000 --- a/vendor/github.com/aws/aws-sdk-go/private/model/api/shapetag_test.go +++ /dev/null @@ -1,28 +0,0 @@ -// +build 1.6,codegen - -package api_test - -import ( - "testing" - - "github.com/aws/aws-sdk-go/private/model/api" -) - -func TestShapeTagJoin(t *testing.T) { - s := api.ShapeTags{ - {Key: "location", Val: "query"}, - {Key: "locationName", Val: "abc"}, - {Key: "type", Val: "string"}, - } - - expected := `location:"query" locationName:"abc" type:"string"` - - o := s.Join(" ") - o2 := s.String() - if expected != o { - t.Errorf("Expected %s, but received %s", expected, o) - } - if expected != o2 { - t.Errorf("Expected %s, but received %s", expected, o2) - } -} diff --git a/vendor/github.com/aws/aws-sdk-go/private/model/api/waiters.go b/vendor/github.com/aws/aws-sdk-go/private/model/api/waiters.go deleted file mode 100644 index 796d40e..0000000 --- a/vendor/github.com/aws/aws-sdk-go/private/model/api/waiters.go +++ /dev/null @@ -1,189 +0,0 @@ -// +build codegen - -package api - -import ( - "bytes" - "encoding/json" - "fmt" - "os" - "sort" - "strings" - "text/template" -) - -// WaiterAcceptor is the acceptors defined in the model the SDK will use -// to wait on resource states with. -type WaiterAcceptor struct { - State string - Matcher string - Argument string - Expected interface{} -} - -// ExpectedString returns the string that was expected by the WaiterAcceptor -func (a *WaiterAcceptor) ExpectedString() string { - switch a.Expected.(type) { - case string: - return fmt.Sprintf("%q", a.Expected) - default: - return fmt.Sprintf("%v", a.Expected) - } -} - -// A Waiter is an individual waiter definition. -type Waiter struct { - Name string - Delay int - MaxAttempts int - OperationName string `json:"operation"` - Operation *Operation - Acceptors []WaiterAcceptor -} - -// WaitersGoCode generates and returns Go code for each of the waiters of -// this API. -func (a *API) WaitersGoCode() string { - var buf bytes.Buffer - fmt.Fprintf(&buf, "import (\n%q\n\n%q\n%q\n)", - "time", - "github.com/aws/aws-sdk-go/aws", - "github.com/aws/aws-sdk-go/aws/request", - ) - - for _, w := range a.Waiters { - buf.WriteString(w.GoCode()) - } - return buf.String() -} - -// used for unmarshaling from the waiter JSON file -type waiterDefinitions struct { - *API - Waiters map[string]Waiter -} - -// AttachWaiters reads a file of waiter definitions, and adds those to the API. -// Will panic if an error occurs. -func (a *API) AttachWaiters(filename string) { - p := waiterDefinitions{API: a} - - f, err := os.Open(filename) - defer f.Close() - if err != nil { - panic(err) - } - err = json.NewDecoder(f).Decode(&p) - if err != nil { - panic(err) - } - - p.setup() -} - -func (p *waiterDefinitions) setup() { - p.API.Waiters = []Waiter{} - i, keys := 0, make([]string, len(p.Waiters)) - for k := range p.Waiters { - keys[i] = k - i++ - } - sort.Strings(keys) - - for _, n := range keys { - e := p.Waiters[n] - n = p.ExportableName(n) - e.Name = n - e.OperationName = p.ExportableName(e.OperationName) - e.Operation = p.API.Operations[e.OperationName] - if e.Operation == nil { - panic("unknown operation " + e.OperationName + " for waiter " + n) - } - p.API.Waiters = append(p.API.Waiters, e) - } -} - -var waiterTmpls = template.Must(template.New("waiterTmpls").Funcs( - template.FuncMap{ - "titleCase": func(v string) string { - return strings.Title(v) - }, - }, -).Parse(` -{{ define "waiter"}} -// WaitUntil{{ .Name }} uses the {{ .Operation.API.NiceName }} API operation -// {{ .OperationName }} to wait for a condition to be met before returning. -// If the condition is not meet within the max attempt window an error will -// be returned. -func (c *{{ .Operation.API.StructName }}) WaitUntil{{ .Name }}(input {{ .Operation.InputRef.GoType }}) error { - return c.WaitUntil{{ .Name }}WithContext(aws.BackgroundContext(), input) -} - -// WaitUntil{{ .Name }}WithContext is an extended version of WaitUntil{{ .Name }}. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *{{ .Operation.API.StructName }}) WaitUntil{{ .Name }}WithContext(` + - `ctx aws.Context, input {{ .Operation.InputRef.GoType }}, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntil{{ .Name }}", - MaxAttempts: {{ .MaxAttempts }}, - Delay: request.ConstantWaiterDelay({{ .Delay }} * time.Second), - Acceptors: []request.WaiterAcceptor{ - {{ range $_, $a := .Acceptors }}{ - State: request.{{ titleCase .State }}WaiterState, - Matcher: request.{{ titleCase .Matcher }}WaiterMatch, - {{- if .Argument }}Argument: "{{ .Argument }}",{{ end }} - Expected: {{ .ExpectedString }}, - }, - {{ end }} - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy {{ .Operation.InputRef.GoType }} - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.{{ .OperationName }}Request(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} -{{- end }} - -{{ define "waiter interface" }} -WaitUntil{{ .Name }}({{ .Operation.InputRef.GoTypeWithPkgName }}) error -WaitUntil{{ .Name }}WithContext(aws.Context, {{ .Operation.InputRef.GoTypeWithPkgName }}, ...request.WaiterOption) error -{{- end }} -`)) - -// InterfaceSignature returns a string representing the Waiter's interface -// function signature. -func (w *Waiter) InterfaceSignature() string { - var buf bytes.Buffer - if err := waiterTmpls.ExecuteTemplate(&buf, "waiter interface", w); err != nil { - panic(err) - } - - return strings.TrimSpace(buf.String()) -} - -// GoCode returns the generated Go code for an individual waiter. -func (w *Waiter) GoCode() string { - var buf bytes.Buffer - if err := waiterTmpls.ExecuteTemplate(&buf, "waiter", w); err != nil { - panic(err) - } - - return buf.String() -} diff --git a/vendor/github.com/aws/aws-sdk-go/private/model/cli/api-info/api-info.go b/vendor/github.com/aws/aws-sdk-go/private/model/cli/api-info/api-info.go deleted file mode 100644 index ee2b66d..0000000 --- a/vendor/github.com/aws/aws-sdk-go/private/model/cli/api-info/api-info.go +++ /dev/null @@ -1,29 +0,0 @@ -// +build codegen - -package main - -import ( - "fmt" - "os" - "path/filepath" - "sort" - - "github.com/aws/aws-sdk-go/private/model/api" -) - -func main() { - dir, _ := os.Open(filepath.Join("models", "apis")) - names, _ := dir.Readdirnames(0) - for _, name := range names { - m, _ := filepath.Glob(filepath.Join("models", "apis", name, "*", "api-2.json")) - if len(m) == 0 { - continue - } - - sort.Strings(m) - f := m[len(m)-1] - a := api.API{} - a.Attach(f) - fmt.Printf("%s\t%s\n", a.Metadata.ServiceFullName, a.Metadata.APIVersion) - } -} diff --git a/vendor/github.com/aws/aws-sdk-go/private/model/cli/gen-api/main.go b/vendor/github.com/aws/aws-sdk-go/private/model/cli/gen-api/main.go deleted file mode 100644 index a0d549f..0000000 --- a/vendor/github.com/aws/aws-sdk-go/private/model/cli/gen-api/main.go +++ /dev/null @@ -1,274 +0,0 @@ -// +build codegen - -// Command aws-gen-gocli parses a JSON description of an AWS API and generates a -// Go file containing a client for the API. -// -// aws-gen-gocli apis/s3/2006-03-03/api-2.json -package main - -import ( - "flag" - "fmt" - "io/ioutil" - "os" - "path/filepath" - "runtime/debug" - "sort" - "strings" - "sync" - - "github.com/aws/aws-sdk-go/private/model/api" - "github.com/aws/aws-sdk-go/private/util" -) - -type generateInfo struct { - *api.API - PackageDir string -} - -var excludeServices = map[string]struct{}{ - "importexport": {}, -} - -// newGenerateInfo initializes the service API's folder structure for a specific service. -// If the SERVICES environment variable is set, and this service is not apart of the list -// this service will be skipped. -func newGenerateInfo(modelFile, svcPath, svcImportPath string) *generateInfo { - g := &generateInfo{API: &api.API{SvcClientImportPath: svcImportPath, BaseCrosslinkURL: "https://docs.aws.amazon.com"}} - g.API.Attach(modelFile) - - if _, ok := excludeServices[g.API.PackageName()]; ok { - return nil - } - - paginatorsFile := strings.Replace(modelFile, "api-2.json", "paginators-1.json", -1) - if _, err := os.Stat(paginatorsFile); err == nil { - g.API.AttachPaginators(paginatorsFile) - } else if !os.IsNotExist(err) { - fmt.Println("api-2.json error:", err) - } - - docsFile := strings.Replace(modelFile, "api-2.json", "docs-2.json", -1) - if _, err := os.Stat(docsFile); err == nil { - g.API.AttachDocs(docsFile) - } else { - fmt.Println("docs-2.json error:", err) - } - - waitersFile := strings.Replace(modelFile, "api-2.json", "waiters-2.json", -1) - if _, err := os.Stat(waitersFile); err == nil { - g.API.AttachWaiters(waitersFile) - } else if !os.IsNotExist(err) { - fmt.Println("waiters-2.json error:", err) - } - - g.API.Setup() - - if svc := os.Getenv("SERVICES"); svc != "" { - svcs := strings.Split(svc, ",") - - included := false - for _, s := range svcs { - if s == g.API.PackageName() { - included = true - break - } - } - if !included { - // skip this non-included service - return nil - } - } - - // ensure the directory exists - pkgDir := filepath.Join(svcPath, g.API.PackageName()) - os.MkdirAll(pkgDir, 0775) - os.MkdirAll(filepath.Join(pkgDir, g.API.InterfacePackageName()), 0775) - - g.PackageDir = pkgDir - - return g -} - -// Generates service api, examples, and interface from api json definition files. -// -// Flags: -// -path alternative service path to write generated files to for each service. -// -// Env: -// SERVICES comma separated list of services to generate. -func main() { - var svcPath, sessionPath, svcImportPath string - flag.StringVar(&svcPath, "path", "service", "directory to generate service clients in") - flag.StringVar(&sessionPath, "sessionPath", filepath.Join("aws", "session"), "generate session service client factories") - flag.StringVar(&svcImportPath, "svc-import-path", "github.com/aws/aws-sdk-go/service", "namespace to generate service client Go code import path under") - flag.Parse() - api.Bootstrap() - - files := []string{} - for i := 0; i < flag.NArg(); i++ { - file := flag.Arg(i) - if strings.Contains(file, "*") { - paths, _ := filepath.Glob(file) - files = append(files, paths...) - } else { - files = append(files, file) - } - } - - for svcName := range excludeServices { - if strings.Contains(os.Getenv("SERVICES"), svcName) { - fmt.Printf("Service %s is not supported\n", svcName) - os.Exit(1) - } - } - - sort.Strings(files) - - // Remove old API versions from list - m := map[string]bool{} - for i := range files { - idx := len(files) - 1 - i - parts := strings.Split(files[idx], string(filepath.Separator)) - svc := parts[len(parts)-3] // service name is 2nd-to-last component - - if m[svc] { - files[idx] = "" // wipe this one out if we already saw the service - } - m[svc] = true - } - - wg := sync.WaitGroup{} - for i := range files { - filename := files[i] - if filename == "" { // empty file - continue - } - - genInfo := newGenerateInfo(filename, svcPath, svcImportPath) - if genInfo == nil { - continue - } - if _, ok := excludeServices[genInfo.API.PackageName()]; ok { - // Skip services not yet supported. - continue - } - - wg.Add(1) - go func(g *generateInfo, filename string) { - defer wg.Done() - writeServiceFiles(g, filename) - }(genInfo, filename) - } - - wg.Wait() -} - -func writeServiceFiles(g *generateInfo, filename string) { - defer func() { - if r := recover(); r != nil { - fmt.Fprintf(os.Stderr, "Error generating %s\n%s\n%s\n", - filename, r, debug.Stack()) - } - }() - - fmt.Printf("Generating %s (%s)...\n", - g.API.PackageName(), g.API.Metadata.APIVersion) - - // write api.go and service.go files - Must(writeAPIFile(g)) - Must(writeExamplesFile(g)) - Must(writeServiceFile(g)) - Must(writeInterfaceFile(g)) - Must(writeWaitersFile(g)) - Must(writeAPIErrorsFile(g)) -} - -// Must will panic if the error passed in is not nil. -func Must(err error) { - if err != nil { - panic(err) - } -} - -const codeLayout = `// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -%s -package %s - -%s -` - -func writeGoFile(file string, layout string, args ...interface{}) error { - return ioutil.WriteFile(file, []byte(util.GoFmt(fmt.Sprintf(layout, args...))), 0664) -} - -// writeExamplesFile writes out the service example file. -func writeExamplesFile(g *generateInfo) error { - return writeGoFile(filepath.Join(g.PackageDir, "examples_test.go"), - codeLayout, - "", - g.API.PackageName()+"_test", - g.API.ExampleGoCode(), - ) -} - -// writeServiceFile writes out the service initialization file. -func writeServiceFile(g *generateInfo) error { - return writeGoFile(filepath.Join(g.PackageDir, "service.go"), - codeLayout, - "", - g.API.PackageName(), - g.API.ServiceGoCode(), - ) -} - -// writeInterfaceFile writes out the service interface file. -func writeInterfaceFile(g *generateInfo) error { - const pkgDoc = ` -// Package %s provides an interface to enable mocking the %s service client -// for testing your code. -// -// It is important to note that this interface will have breaking changes -// when the service model is updated and adds new API operations, paginators, -// and waiters.` - return writeGoFile(filepath.Join(g.PackageDir, g.API.InterfacePackageName(), "interface.go"), - codeLayout, - fmt.Sprintf(pkgDoc, g.API.InterfacePackageName(), g.API.Metadata.ServiceFullName), - g.API.InterfacePackageName(), - g.API.InterfaceGoCode(), - ) -} - -func writeWaitersFile(g *generateInfo) error { - if len(g.API.Waiters) == 0 { - return nil - } - - return writeGoFile(filepath.Join(g.PackageDir, "waiters.go"), - codeLayout, - "", - g.API.PackageName(), - g.API.WaitersGoCode(), - ) -} - -// writeAPIFile writes out the service api file. -func writeAPIFile(g *generateInfo) error { - return writeGoFile(filepath.Join(g.PackageDir, "api.go"), - codeLayout, - fmt.Sprintf("\n// Package %s provides a client for %s.", - g.API.PackageName(), g.API.Metadata.ServiceFullName), - g.API.PackageName(), - g.API.APIGoCode(), - ) -} - -// writeAPIErrorsFile writes out the service api errors file. -func writeAPIErrorsFile(g *generateInfo) error { - return writeGoFile(filepath.Join(g.PackageDir, "errors.go"), - codeLayout, - "", - g.API.PackageName(), - g.API.APIErrorsGoCode(), - ) -} diff --git a/vendor/github.com/aws/aws-sdk-go/private/model/cli/gen-endpoints/main.go b/vendor/github.com/aws/aws-sdk-go/private/model/cli/gen-endpoints/main.go deleted file mode 100644 index 961eaaf..0000000 --- a/vendor/github.com/aws/aws-sdk-go/private/model/cli/gen-endpoints/main.go +++ /dev/null @@ -1,56 +0,0 @@ -// +build codegen - -// Command gen-endpoints parses a JSON description of the AWS endpoint -// discovery logic and generates a Go file which returns an endpoint. -// -// aws-gen-goendpoints apis/_endpoints.json aws/endpoints_map.go -package main - -import ( - "flag" - "fmt" - "os" - - "github.com/aws/aws-sdk-go/aws/endpoints" -) - -// Generates the endpoints from json description -// -// Args: -// -model The definition file to use -// -out The output file to generate -func main() { - var modelName, outName string - flag.StringVar(&modelName, "model", "", "Endpoints definition model") - flag.StringVar(&outName, "out", "", "File to write generated endpoints to.") - flag.Parse() - - if len(modelName) == 0 || len(outName) == 0 { - exitErrorf("model and out both required.") - } - - modelFile, err := os.Open(modelName) - if err != nil { - exitErrorf("failed to open model definition, %v.", err) - } - defer modelFile.Close() - - outFile, err := os.Create(outName) - if err != nil { - exitErrorf("failed to open out file, %v.", err) - } - defer func() { - if err := outFile.Close(); err != nil { - exitErrorf("failed to successfully write %q file, %v", outName, err) - } - }() - - if err := endpoints.CodeGenModel(modelFile, outFile); err != nil { - exitErrorf("failed to codegen model, %v", err) - } -} - -func exitErrorf(msg string, args ...interface{}) { - fmt.Fprintf(os.Stderr, msg+"\n", args...) - os.Exit(1) -} diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/ec2query/build.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/ec2query/build.go deleted file mode 100644 index eedc5bd..0000000 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/ec2query/build.go +++ /dev/null @@ -1,35 +0,0 @@ -// Package ec2query provides serialization of AWS EC2 requests and responses. -package ec2query - -//go:generate go run -tags codegen ../../../models/protocol_tests/generate.go ../../../models/protocol_tests/input/ec2.json build_test.go - -import ( - "net/url" - - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol/query/queryutil" -) - -// BuildHandler is a named request handler for building ec2query protocol requests -var BuildHandler = request.NamedHandler{Name: "awssdk.ec2query.Build", Fn: Build} - -// Build builds a request for the EC2 protocol. -func Build(r *request.Request) { - body := url.Values{ - "Action": {r.Operation.Name}, - "Version": {r.ClientInfo.APIVersion}, - } - if err := queryutil.Parse(body, r.Params, true); err != nil { - r.Error = awserr.New("SerializationError", "failed encoding EC2 Query request", err) - } - - if r.ExpireTime == 0 { - r.HTTPRequest.Method = "POST" - r.HTTPRequest.Header.Set("Content-Type", "application/x-www-form-urlencoded; charset=utf-8") - r.SetBufferBody([]byte(body.Encode())) - } else { // This is a pre-signed request - r.HTTPRequest.Method = "GET" - r.HTTPRequest.URL.RawQuery = body.Encode() - } -} diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/ec2query/build_bench_test.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/ec2query/build_bench_test.go deleted file mode 100644 index e135b93..0000000 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/ec2query/build_bench_test.go +++ /dev/null @@ -1,85 +0,0 @@ -// +build bench - -package ec2query_test - -import ( - "testing" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/awstesting" - "github.com/aws/aws-sdk-go/private/protocol/ec2query" - "github.com/aws/aws-sdk-go/service/ec2" -) - -func BenchmarkEC2QueryBuild_Complex_ec2AuthorizeSecurityGroupEgress(b *testing.B) { - params := &ec2.AuthorizeSecurityGroupEgressInput{ - GroupId: aws.String("String"), // Required - CidrIp: aws.String("String"), - DryRun: aws.Bool(true), - FromPort: aws.Int64(1), - IpPermissions: []*ec2.IpPermission{ - { // Required - FromPort: aws.Int64(1), - IpProtocol: aws.String("String"), - IpRanges: []*ec2.IpRange{ - { // Required - CidrIp: aws.String("String"), - }, - // More values... - }, - PrefixListIds: []*ec2.PrefixListId{ - { // Required - PrefixListId: aws.String("String"), - }, - // More values... - }, - ToPort: aws.Int64(1), - UserIdGroupPairs: []*ec2.UserIdGroupPair{ - { // Required - GroupId: aws.String("String"), - GroupName: aws.String("String"), - UserId: aws.String("String"), - }, - // More values... - }, - }, - // More values... - }, - IpProtocol: aws.String("String"), - SourceSecurityGroupName: aws.String("String"), - SourceSecurityGroupOwnerId: aws.String("String"), - ToPort: aws.Int64(1), - } - - benchEC2QueryBuild(b, "AuthorizeSecurityGroupEgress", params) -} - -func BenchmarkEC2QueryBuild_Simple_ec2AttachNetworkInterface(b *testing.B) { - params := &ec2.AttachNetworkInterfaceInput{ - DeviceIndex: aws.Int64(1), // Required - InstanceId: aws.String("String"), // Required - NetworkInterfaceId: aws.String("String"), // Required - DryRun: aws.Bool(true), - } - - benchEC2QueryBuild(b, "AttachNetworkInterface", params) -} - -func benchEC2QueryBuild(b *testing.B, opName string, params interface{}) { - svc := awstesting.NewClient() - svc.ServiceName = "ec2" - svc.APIVersion = "2015-04-15" - - for i := 0; i < b.N; i++ { - r := svc.NewRequest(&request.Operation{ - Name: opName, - HTTPMethod: "POST", - HTTPPath: "/", - }, params, nil) - ec2query.Build(r) - if r.Error != nil { - b.Fatal("Unexpected error", r.Error) - } - } -} diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/ec2query/build_test.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/ec2query/build_test.go deleted file mode 100644 index 8954baf..0000000 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/ec2query/build_test.go +++ /dev/null @@ -1,1695 +0,0 @@ -package ec2query_test - -import ( - "bytes" - "encoding/json" - "encoding/xml" - "fmt" - "io" - "io/ioutil" - "net/http" - "net/url" - "reflect" - "testing" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/awstesting" - "github.com/aws/aws-sdk-go/awstesting/unit" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/ec2query" - "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil" - "github.com/aws/aws-sdk-go/private/util" - "github.com/stretchr/testify/assert" -) - -var _ bytes.Buffer // always import bytes -var _ http.Request -var _ json.Marshaler -var _ time.Time -var _ xmlutil.XMLNode -var _ xml.Attr -var _ = ioutil.Discard -var _ = util.Trim("") -var _ = url.Values{} -var _ = io.EOF -var _ = aws.String -var _ = fmt.Println -var _ = reflect.Value{} - -func init() { - protocol.RandReader = &awstesting.ZeroReader{} -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type InputService1ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the InputService1ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a InputService1ProtocolTest client from just a session. -// svc := inputservice1protocoltest.New(mySession) -// -// // Create a InputService1ProtocolTest client with additional configuration -// svc := inputservice1protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewInputService1ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService1ProtocolTest { - c := p.ClientConfig("inputservice1protocoltest", cfgs...) - return newInputService1ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newInputService1ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService1ProtocolTest { - svc := &InputService1ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "inputservice1protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-01-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(ec2query.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(ec2query.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(ec2query.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(ec2query.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a InputService1ProtocolTest operation and runs any -// custom request initialization. -func (c *InputService1ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opInputService1TestCaseOperation1 = "OperationName" - -// InputService1TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the InputService1TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService1TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService1TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService1TestCaseOperation1Request method. -// req, resp := client.InputService1TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService1ProtocolTest) InputService1TestCaseOperation1Request(input *InputService1TestShapeInputService1TestCaseOperation1Input) (req *request.Request, output *InputService1TestShapeInputService1TestCaseOperation1Output) { - op := &request.Operation{ - Name: opInputService1TestCaseOperation1, - HTTPPath: "/", - } - - if input == nil { - input = &InputService1TestShapeInputService1TestCaseOperation1Input{} - } - - output = &InputService1TestShapeInputService1TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService1TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService1TestCaseOperation1 for usage and error information. -func (c *InputService1ProtocolTest) InputService1TestCaseOperation1(input *InputService1TestShapeInputService1TestCaseOperation1Input) (*InputService1TestShapeInputService1TestCaseOperation1Output, error) { - req, out := c.InputService1TestCaseOperation1Request(input) - return out, req.Send() -} - -// InputService1TestCaseOperation1WithContext is the same as InputService1TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService1TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService1ProtocolTest) InputService1TestCaseOperation1WithContext(ctx aws.Context, input *InputService1TestShapeInputService1TestCaseOperation1Input, opts ...request.Option) (*InputService1TestShapeInputService1TestCaseOperation1Output, error) { - req, out := c.InputService1TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type InputService1TestShapeInputService1TestCaseOperation1Input struct { - _ struct{} `type:"structure"` - - Bar *string `type:"string"` - - Foo *string `type:"string"` -} - -// SetBar sets the Bar field's value. -func (s *InputService1TestShapeInputService1TestCaseOperation1Input) SetBar(v string) *InputService1TestShapeInputService1TestCaseOperation1Input { - s.Bar = &v - return s -} - -// SetFoo sets the Foo field's value. -func (s *InputService1TestShapeInputService1TestCaseOperation1Input) SetFoo(v string) *InputService1TestShapeInputService1TestCaseOperation1Input { - s.Foo = &v - return s -} - -type InputService1TestShapeInputService1TestCaseOperation1Output struct { - _ struct{} `type:"structure"` -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type InputService2ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the InputService2ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a InputService2ProtocolTest client from just a session. -// svc := inputservice2protocoltest.New(mySession) -// -// // Create a InputService2ProtocolTest client with additional configuration -// svc := inputservice2protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewInputService2ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService2ProtocolTest { - c := p.ClientConfig("inputservice2protocoltest", cfgs...) - return newInputService2ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newInputService2ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService2ProtocolTest { - svc := &InputService2ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "inputservice2protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-01-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(ec2query.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(ec2query.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(ec2query.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(ec2query.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a InputService2ProtocolTest operation and runs any -// custom request initialization. -func (c *InputService2ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opInputService2TestCaseOperation1 = "OperationName" - -// InputService2TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the InputService2TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService2TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService2TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService2TestCaseOperation1Request method. -// req, resp := client.InputService2TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService2ProtocolTest) InputService2TestCaseOperation1Request(input *InputService2TestShapeInputService2TestCaseOperation1Input) (req *request.Request, output *InputService2TestShapeInputService2TestCaseOperation1Output) { - op := &request.Operation{ - Name: opInputService2TestCaseOperation1, - HTTPPath: "/", - } - - if input == nil { - input = &InputService2TestShapeInputService2TestCaseOperation1Input{} - } - - output = &InputService2TestShapeInputService2TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService2TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService2TestCaseOperation1 for usage and error information. -func (c *InputService2ProtocolTest) InputService2TestCaseOperation1(input *InputService2TestShapeInputService2TestCaseOperation1Input) (*InputService2TestShapeInputService2TestCaseOperation1Output, error) { - req, out := c.InputService2TestCaseOperation1Request(input) - return out, req.Send() -} - -// InputService2TestCaseOperation1WithContext is the same as InputService2TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService2TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService2ProtocolTest) InputService2TestCaseOperation1WithContext(ctx aws.Context, input *InputService2TestShapeInputService2TestCaseOperation1Input, opts ...request.Option) (*InputService2TestShapeInputService2TestCaseOperation1Output, error) { - req, out := c.InputService2TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type InputService2TestShapeInputService2TestCaseOperation1Input struct { - _ struct{} `type:"structure"` - - Bar *string `locationName:"barLocationName" type:"string"` - - Foo *string `type:"string"` - - Yuck *string `locationName:"yuckLocationName" queryName:"yuckQueryName" type:"string"` -} - -// SetBar sets the Bar field's value. -func (s *InputService2TestShapeInputService2TestCaseOperation1Input) SetBar(v string) *InputService2TestShapeInputService2TestCaseOperation1Input { - s.Bar = &v - return s -} - -// SetFoo sets the Foo field's value. -func (s *InputService2TestShapeInputService2TestCaseOperation1Input) SetFoo(v string) *InputService2TestShapeInputService2TestCaseOperation1Input { - s.Foo = &v - return s -} - -// SetYuck sets the Yuck field's value. -func (s *InputService2TestShapeInputService2TestCaseOperation1Input) SetYuck(v string) *InputService2TestShapeInputService2TestCaseOperation1Input { - s.Yuck = &v - return s -} - -type InputService2TestShapeInputService2TestCaseOperation1Output struct { - _ struct{} `type:"structure"` -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type InputService3ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the InputService3ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a InputService3ProtocolTest client from just a session. -// svc := inputservice3protocoltest.New(mySession) -// -// // Create a InputService3ProtocolTest client with additional configuration -// svc := inputservice3protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewInputService3ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService3ProtocolTest { - c := p.ClientConfig("inputservice3protocoltest", cfgs...) - return newInputService3ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newInputService3ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService3ProtocolTest { - svc := &InputService3ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "inputservice3protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-01-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(ec2query.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(ec2query.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(ec2query.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(ec2query.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a InputService3ProtocolTest operation and runs any -// custom request initialization. -func (c *InputService3ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opInputService3TestCaseOperation1 = "OperationName" - -// InputService3TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the InputService3TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService3TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService3TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService3TestCaseOperation1Request method. -// req, resp := client.InputService3TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService3ProtocolTest) InputService3TestCaseOperation1Request(input *InputService3TestShapeInputService3TestCaseOperation1Input) (req *request.Request, output *InputService3TestShapeInputService3TestCaseOperation1Output) { - op := &request.Operation{ - Name: opInputService3TestCaseOperation1, - HTTPPath: "/", - } - - if input == nil { - input = &InputService3TestShapeInputService3TestCaseOperation1Input{} - } - - output = &InputService3TestShapeInputService3TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService3TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService3TestCaseOperation1 for usage and error information. -func (c *InputService3ProtocolTest) InputService3TestCaseOperation1(input *InputService3TestShapeInputService3TestCaseOperation1Input) (*InputService3TestShapeInputService3TestCaseOperation1Output, error) { - req, out := c.InputService3TestCaseOperation1Request(input) - return out, req.Send() -} - -// InputService3TestCaseOperation1WithContext is the same as InputService3TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService3TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService3ProtocolTest) InputService3TestCaseOperation1WithContext(ctx aws.Context, input *InputService3TestShapeInputService3TestCaseOperation1Input, opts ...request.Option) (*InputService3TestShapeInputService3TestCaseOperation1Output, error) { - req, out := c.InputService3TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type InputService3TestShapeInputService3TestCaseOperation1Input struct { - _ struct{} `type:"structure"` - - StructArg *InputService3TestShapeStructType `locationName:"Struct" type:"structure"` -} - -// SetStructArg sets the StructArg field's value. -func (s *InputService3TestShapeInputService3TestCaseOperation1Input) SetStructArg(v *InputService3TestShapeStructType) *InputService3TestShapeInputService3TestCaseOperation1Input { - s.StructArg = v - return s -} - -type InputService3TestShapeInputService3TestCaseOperation1Output struct { - _ struct{} `type:"structure"` -} - -type InputService3TestShapeStructType struct { - _ struct{} `type:"structure"` - - ScalarArg *string `locationName:"Scalar" type:"string"` -} - -// SetScalarArg sets the ScalarArg field's value. -func (s *InputService3TestShapeStructType) SetScalarArg(v string) *InputService3TestShapeStructType { - s.ScalarArg = &v - return s -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type InputService4ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the InputService4ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a InputService4ProtocolTest client from just a session. -// svc := inputservice4protocoltest.New(mySession) -// -// // Create a InputService4ProtocolTest client with additional configuration -// svc := inputservice4protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewInputService4ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService4ProtocolTest { - c := p.ClientConfig("inputservice4protocoltest", cfgs...) - return newInputService4ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newInputService4ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService4ProtocolTest { - svc := &InputService4ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "inputservice4protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-01-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(ec2query.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(ec2query.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(ec2query.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(ec2query.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a InputService4ProtocolTest operation and runs any -// custom request initialization. -func (c *InputService4ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opInputService4TestCaseOperation1 = "OperationName" - -// InputService4TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the InputService4TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService4TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService4TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService4TestCaseOperation1Request method. -// req, resp := client.InputService4TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService4ProtocolTest) InputService4TestCaseOperation1Request(input *InputService4TestShapeInputService4TestCaseOperation1Input) (req *request.Request, output *InputService4TestShapeInputService4TestCaseOperation1Output) { - op := &request.Operation{ - Name: opInputService4TestCaseOperation1, - HTTPPath: "/", - } - - if input == nil { - input = &InputService4TestShapeInputService4TestCaseOperation1Input{} - } - - output = &InputService4TestShapeInputService4TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService4TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService4TestCaseOperation1 for usage and error information. -func (c *InputService4ProtocolTest) InputService4TestCaseOperation1(input *InputService4TestShapeInputService4TestCaseOperation1Input) (*InputService4TestShapeInputService4TestCaseOperation1Output, error) { - req, out := c.InputService4TestCaseOperation1Request(input) - return out, req.Send() -} - -// InputService4TestCaseOperation1WithContext is the same as InputService4TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService4TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService4ProtocolTest) InputService4TestCaseOperation1WithContext(ctx aws.Context, input *InputService4TestShapeInputService4TestCaseOperation1Input, opts ...request.Option) (*InputService4TestShapeInputService4TestCaseOperation1Output, error) { - req, out := c.InputService4TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type InputService4TestShapeInputService4TestCaseOperation1Input struct { - _ struct{} `type:"structure"` - - ListArg []*string `type:"list"` -} - -// SetListArg sets the ListArg field's value. -func (s *InputService4TestShapeInputService4TestCaseOperation1Input) SetListArg(v []*string) *InputService4TestShapeInputService4TestCaseOperation1Input { - s.ListArg = v - return s -} - -type InputService4TestShapeInputService4TestCaseOperation1Output struct { - _ struct{} `type:"structure"` -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type InputService5ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the InputService5ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a InputService5ProtocolTest client from just a session. -// svc := inputservice5protocoltest.New(mySession) -// -// // Create a InputService5ProtocolTest client with additional configuration -// svc := inputservice5protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewInputService5ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService5ProtocolTest { - c := p.ClientConfig("inputservice5protocoltest", cfgs...) - return newInputService5ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newInputService5ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService5ProtocolTest { - svc := &InputService5ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "inputservice5protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-01-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(ec2query.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(ec2query.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(ec2query.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(ec2query.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a InputService5ProtocolTest operation and runs any -// custom request initialization. -func (c *InputService5ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opInputService5TestCaseOperation1 = "OperationName" - -// InputService5TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the InputService5TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService5TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService5TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService5TestCaseOperation1Request method. -// req, resp := client.InputService5TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService5ProtocolTest) InputService5TestCaseOperation1Request(input *InputService5TestShapeInputService5TestCaseOperation1Input) (req *request.Request, output *InputService5TestShapeInputService5TestCaseOperation1Output) { - op := &request.Operation{ - Name: opInputService5TestCaseOperation1, - HTTPPath: "/", - } - - if input == nil { - input = &InputService5TestShapeInputService5TestCaseOperation1Input{} - } - - output = &InputService5TestShapeInputService5TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService5TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService5TestCaseOperation1 for usage and error information. -func (c *InputService5ProtocolTest) InputService5TestCaseOperation1(input *InputService5TestShapeInputService5TestCaseOperation1Input) (*InputService5TestShapeInputService5TestCaseOperation1Output, error) { - req, out := c.InputService5TestCaseOperation1Request(input) - return out, req.Send() -} - -// InputService5TestCaseOperation1WithContext is the same as InputService5TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService5TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService5ProtocolTest) InputService5TestCaseOperation1WithContext(ctx aws.Context, input *InputService5TestShapeInputService5TestCaseOperation1Input, opts ...request.Option) (*InputService5TestShapeInputService5TestCaseOperation1Output, error) { - req, out := c.InputService5TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type InputService5TestShapeInputService5TestCaseOperation1Input struct { - _ struct{} `type:"structure"` - - ListArg []*string `locationName:"ListMemberName" locationNameList:"item" type:"list"` -} - -// SetListArg sets the ListArg field's value. -func (s *InputService5TestShapeInputService5TestCaseOperation1Input) SetListArg(v []*string) *InputService5TestShapeInputService5TestCaseOperation1Input { - s.ListArg = v - return s -} - -type InputService5TestShapeInputService5TestCaseOperation1Output struct { - _ struct{} `type:"structure"` -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type InputService6ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the InputService6ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a InputService6ProtocolTest client from just a session. -// svc := inputservice6protocoltest.New(mySession) -// -// // Create a InputService6ProtocolTest client with additional configuration -// svc := inputservice6protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewInputService6ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService6ProtocolTest { - c := p.ClientConfig("inputservice6protocoltest", cfgs...) - return newInputService6ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newInputService6ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService6ProtocolTest { - svc := &InputService6ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "inputservice6protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-01-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(ec2query.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(ec2query.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(ec2query.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(ec2query.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a InputService6ProtocolTest operation and runs any -// custom request initialization. -func (c *InputService6ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opInputService6TestCaseOperation1 = "OperationName" - -// InputService6TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the InputService6TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService6TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService6TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService6TestCaseOperation1Request method. -// req, resp := client.InputService6TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService6ProtocolTest) InputService6TestCaseOperation1Request(input *InputService6TestShapeInputService6TestCaseOperation1Input) (req *request.Request, output *InputService6TestShapeInputService6TestCaseOperation1Output) { - op := &request.Operation{ - Name: opInputService6TestCaseOperation1, - HTTPPath: "/", - } - - if input == nil { - input = &InputService6TestShapeInputService6TestCaseOperation1Input{} - } - - output = &InputService6TestShapeInputService6TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService6TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService6TestCaseOperation1 for usage and error information. -func (c *InputService6ProtocolTest) InputService6TestCaseOperation1(input *InputService6TestShapeInputService6TestCaseOperation1Input) (*InputService6TestShapeInputService6TestCaseOperation1Output, error) { - req, out := c.InputService6TestCaseOperation1Request(input) - return out, req.Send() -} - -// InputService6TestCaseOperation1WithContext is the same as InputService6TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService6TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService6ProtocolTest) InputService6TestCaseOperation1WithContext(ctx aws.Context, input *InputService6TestShapeInputService6TestCaseOperation1Input, opts ...request.Option) (*InputService6TestShapeInputService6TestCaseOperation1Output, error) { - req, out := c.InputService6TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type InputService6TestShapeInputService6TestCaseOperation1Input struct { - _ struct{} `type:"structure"` - - ListArg []*string `locationName:"ListMemberName" queryName:"ListQueryName" locationNameList:"item" type:"list"` -} - -// SetListArg sets the ListArg field's value. -func (s *InputService6TestShapeInputService6TestCaseOperation1Input) SetListArg(v []*string) *InputService6TestShapeInputService6TestCaseOperation1Input { - s.ListArg = v - return s -} - -type InputService6TestShapeInputService6TestCaseOperation1Output struct { - _ struct{} `type:"structure"` -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type InputService7ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the InputService7ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a InputService7ProtocolTest client from just a session. -// svc := inputservice7protocoltest.New(mySession) -// -// // Create a InputService7ProtocolTest client with additional configuration -// svc := inputservice7protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewInputService7ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService7ProtocolTest { - c := p.ClientConfig("inputservice7protocoltest", cfgs...) - return newInputService7ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newInputService7ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService7ProtocolTest { - svc := &InputService7ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "inputservice7protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-01-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(ec2query.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(ec2query.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(ec2query.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(ec2query.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a InputService7ProtocolTest operation and runs any -// custom request initialization. -func (c *InputService7ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opInputService7TestCaseOperation1 = "OperationName" - -// InputService7TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the InputService7TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService7TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService7TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService7TestCaseOperation1Request method. -// req, resp := client.InputService7TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService7ProtocolTest) InputService7TestCaseOperation1Request(input *InputService7TestShapeInputService7TestCaseOperation1Input) (req *request.Request, output *InputService7TestShapeInputService7TestCaseOperation1Output) { - op := &request.Operation{ - Name: opInputService7TestCaseOperation1, - HTTPPath: "/", - } - - if input == nil { - input = &InputService7TestShapeInputService7TestCaseOperation1Input{} - } - - output = &InputService7TestShapeInputService7TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService7TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService7TestCaseOperation1 for usage and error information. -func (c *InputService7ProtocolTest) InputService7TestCaseOperation1(input *InputService7TestShapeInputService7TestCaseOperation1Input) (*InputService7TestShapeInputService7TestCaseOperation1Output, error) { - req, out := c.InputService7TestCaseOperation1Request(input) - return out, req.Send() -} - -// InputService7TestCaseOperation1WithContext is the same as InputService7TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService7TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService7ProtocolTest) InputService7TestCaseOperation1WithContext(ctx aws.Context, input *InputService7TestShapeInputService7TestCaseOperation1Input, opts ...request.Option) (*InputService7TestShapeInputService7TestCaseOperation1Output, error) { - req, out := c.InputService7TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type InputService7TestShapeInputService7TestCaseOperation1Input struct { - _ struct{} `type:"structure"` - - // BlobArg is automatically base64 encoded/decoded by the SDK. - BlobArg []byte `type:"blob"` -} - -// SetBlobArg sets the BlobArg field's value. -func (s *InputService7TestShapeInputService7TestCaseOperation1Input) SetBlobArg(v []byte) *InputService7TestShapeInputService7TestCaseOperation1Input { - s.BlobArg = v - return s -} - -type InputService7TestShapeInputService7TestCaseOperation1Output struct { - _ struct{} `type:"structure"` -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type InputService8ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the InputService8ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a InputService8ProtocolTest client from just a session. -// svc := inputservice8protocoltest.New(mySession) -// -// // Create a InputService8ProtocolTest client with additional configuration -// svc := inputservice8protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewInputService8ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService8ProtocolTest { - c := p.ClientConfig("inputservice8protocoltest", cfgs...) - return newInputService8ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newInputService8ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService8ProtocolTest { - svc := &InputService8ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "inputservice8protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-01-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(ec2query.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(ec2query.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(ec2query.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(ec2query.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a InputService8ProtocolTest operation and runs any -// custom request initialization. -func (c *InputService8ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opInputService8TestCaseOperation1 = "OperationName" - -// InputService8TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the InputService8TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService8TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService8TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService8TestCaseOperation1Request method. -// req, resp := client.InputService8TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService8ProtocolTest) InputService8TestCaseOperation1Request(input *InputService8TestShapeInputService8TestCaseOperation1Input) (req *request.Request, output *InputService8TestShapeInputService8TestCaseOperation1Output) { - op := &request.Operation{ - Name: opInputService8TestCaseOperation1, - HTTPPath: "/", - } - - if input == nil { - input = &InputService8TestShapeInputService8TestCaseOperation1Input{} - } - - output = &InputService8TestShapeInputService8TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService8TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService8TestCaseOperation1 for usage and error information. -func (c *InputService8ProtocolTest) InputService8TestCaseOperation1(input *InputService8TestShapeInputService8TestCaseOperation1Input) (*InputService8TestShapeInputService8TestCaseOperation1Output, error) { - req, out := c.InputService8TestCaseOperation1Request(input) - return out, req.Send() -} - -// InputService8TestCaseOperation1WithContext is the same as InputService8TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService8TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService8ProtocolTest) InputService8TestCaseOperation1WithContext(ctx aws.Context, input *InputService8TestShapeInputService8TestCaseOperation1Input, opts ...request.Option) (*InputService8TestShapeInputService8TestCaseOperation1Output, error) { - req, out := c.InputService8TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type InputService8TestShapeInputService8TestCaseOperation1Input struct { - _ struct{} `type:"structure"` - - TimeArg *time.Time `type:"timestamp" timestampFormat:"iso8601"` -} - -// SetTimeArg sets the TimeArg field's value. -func (s *InputService8TestShapeInputService8TestCaseOperation1Input) SetTimeArg(v time.Time) *InputService8TestShapeInputService8TestCaseOperation1Input { - s.TimeArg = &v - return s -} - -type InputService8TestShapeInputService8TestCaseOperation1Output struct { - _ struct{} `type:"structure"` -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type InputService9ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the InputService9ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a InputService9ProtocolTest client from just a session. -// svc := inputservice9protocoltest.New(mySession) -// -// // Create a InputService9ProtocolTest client with additional configuration -// svc := inputservice9protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewInputService9ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService9ProtocolTest { - c := p.ClientConfig("inputservice9protocoltest", cfgs...) - return newInputService9ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newInputService9ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService9ProtocolTest { - svc := &InputService9ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "inputservice9protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-01-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(ec2query.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(ec2query.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(ec2query.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(ec2query.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a InputService9ProtocolTest operation and runs any -// custom request initialization. -func (c *InputService9ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opInputService9TestCaseOperation1 = "OperationName" - -// InputService9TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the InputService9TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService9TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService9TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService9TestCaseOperation1Request method. -// req, resp := client.InputService9TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService9ProtocolTest) InputService9TestCaseOperation1Request(input *InputService9TestShapeInputService9TestCaseOperation2Input) (req *request.Request, output *InputService9TestShapeInputService9TestCaseOperation1Output) { - op := &request.Operation{ - Name: opInputService9TestCaseOperation1, - HTTPPath: "/", - } - - if input == nil { - input = &InputService9TestShapeInputService9TestCaseOperation2Input{} - } - - output = &InputService9TestShapeInputService9TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService9TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService9TestCaseOperation1 for usage and error information. -func (c *InputService9ProtocolTest) InputService9TestCaseOperation1(input *InputService9TestShapeInputService9TestCaseOperation2Input) (*InputService9TestShapeInputService9TestCaseOperation1Output, error) { - req, out := c.InputService9TestCaseOperation1Request(input) - return out, req.Send() -} - -// InputService9TestCaseOperation1WithContext is the same as InputService9TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService9TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService9ProtocolTest) InputService9TestCaseOperation1WithContext(ctx aws.Context, input *InputService9TestShapeInputService9TestCaseOperation2Input, opts ...request.Option) (*InputService9TestShapeInputService9TestCaseOperation1Output, error) { - req, out := c.InputService9TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opInputService9TestCaseOperation2 = "OperationName" - -// InputService9TestCaseOperation2Request generates a "aws/request.Request" representing the -// client's request for the InputService9TestCaseOperation2 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService9TestCaseOperation2 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService9TestCaseOperation2 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService9TestCaseOperation2Request method. -// req, resp := client.InputService9TestCaseOperation2Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService9ProtocolTest) InputService9TestCaseOperation2Request(input *InputService9TestShapeInputService9TestCaseOperation2Input) (req *request.Request, output *InputService9TestShapeInputService9TestCaseOperation2Output) { - op := &request.Operation{ - Name: opInputService9TestCaseOperation2, - HTTPPath: "/", - } - - if input == nil { - input = &InputService9TestShapeInputService9TestCaseOperation2Input{} - } - - output = &InputService9TestShapeInputService9TestCaseOperation2Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService9TestCaseOperation2 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService9TestCaseOperation2 for usage and error information. -func (c *InputService9ProtocolTest) InputService9TestCaseOperation2(input *InputService9TestShapeInputService9TestCaseOperation2Input) (*InputService9TestShapeInputService9TestCaseOperation2Output, error) { - req, out := c.InputService9TestCaseOperation2Request(input) - return out, req.Send() -} - -// InputService9TestCaseOperation2WithContext is the same as InputService9TestCaseOperation2 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService9TestCaseOperation2 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService9ProtocolTest) InputService9TestCaseOperation2WithContext(ctx aws.Context, input *InputService9TestShapeInputService9TestCaseOperation2Input, opts ...request.Option) (*InputService9TestShapeInputService9TestCaseOperation2Output, error) { - req, out := c.InputService9TestCaseOperation2Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type InputService9TestShapeInputService9TestCaseOperation1Output struct { - _ struct{} `type:"structure"` -} - -type InputService9TestShapeInputService9TestCaseOperation2Input struct { - _ struct{} `type:"structure"` - - Token *string `type:"string" idempotencyToken:"true"` -} - -// SetToken sets the Token field's value. -func (s *InputService9TestShapeInputService9TestCaseOperation2Input) SetToken(v string) *InputService9TestShapeInputService9TestCaseOperation2Input { - s.Token = &v - return s -} - -type InputService9TestShapeInputService9TestCaseOperation2Output struct { - _ struct{} `type:"structure"` -} - -// -// Tests begin here -// - -func TestInputService1ProtocolTestScalarMembersCase1(t *testing.T) { - svc := NewInputService1ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService1TestShapeInputService1TestCaseOperation1Input{ - Bar: aws.String("val2"), - Foo: aws.String("val1"), - } - req, _ := svc.InputService1TestCaseOperation1Request(input) - r := req.HTTPRequest - - // build request - ec2query.Build(req) - assert.NoError(t, req.Error) - - // assert body - assert.NotNil(t, r.Body) - body, _ := ioutil.ReadAll(r.Body) - awstesting.AssertQuery(t, `Action=OperationName&Bar=val2&Foo=val1&Version=2014-01-01`, util.Trim(string(body))) - - // assert URL - awstesting.AssertURL(t, "https://test/", r.URL.String()) - - // assert headers - -} - -func TestInputService2ProtocolTestStructureWithLocationNameAndQueryNameAppliedToMembersCase1(t *testing.T) { - svc := NewInputService2ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService2TestShapeInputService2TestCaseOperation1Input{ - Bar: aws.String("val2"), - Foo: aws.String("val1"), - Yuck: aws.String("val3"), - } - req, _ := svc.InputService2TestCaseOperation1Request(input) - r := req.HTTPRequest - - // build request - ec2query.Build(req) - assert.NoError(t, req.Error) - - // assert body - assert.NotNil(t, r.Body) - body, _ := ioutil.ReadAll(r.Body) - awstesting.AssertQuery(t, `Action=OperationName&BarLocationName=val2&Foo=val1&Version=2014-01-01&yuckQueryName=val3`, util.Trim(string(body))) - - // assert URL - awstesting.AssertURL(t, "https://test/", r.URL.String()) - - // assert headers - -} - -func TestInputService3ProtocolTestNestedStructureMembersCase1(t *testing.T) { - svc := NewInputService3ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService3TestShapeInputService3TestCaseOperation1Input{ - StructArg: &InputService3TestShapeStructType{ - ScalarArg: aws.String("foo"), - }, - } - req, _ := svc.InputService3TestCaseOperation1Request(input) - r := req.HTTPRequest - - // build request - ec2query.Build(req) - assert.NoError(t, req.Error) - - // assert body - assert.NotNil(t, r.Body) - body, _ := ioutil.ReadAll(r.Body) - awstesting.AssertQuery(t, `Action=OperationName&Struct.Scalar=foo&Version=2014-01-01`, util.Trim(string(body))) - - // assert URL - awstesting.AssertURL(t, "https://test/", r.URL.String()) - - // assert headers - -} - -func TestInputService4ProtocolTestListTypesCase1(t *testing.T) { - svc := NewInputService4ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService4TestShapeInputService4TestCaseOperation1Input{ - ListArg: []*string{ - aws.String("foo"), - aws.String("bar"), - aws.String("baz"), - }, - } - req, _ := svc.InputService4TestCaseOperation1Request(input) - r := req.HTTPRequest - - // build request - ec2query.Build(req) - assert.NoError(t, req.Error) - - // assert body - assert.NotNil(t, r.Body) - body, _ := ioutil.ReadAll(r.Body) - awstesting.AssertQuery(t, `Action=OperationName&ListArg.1=foo&ListArg.2=bar&ListArg.3=baz&Version=2014-01-01`, util.Trim(string(body))) - - // assert URL - awstesting.AssertURL(t, "https://test/", r.URL.String()) - - // assert headers - -} - -func TestInputService5ProtocolTestListWithLocationNameAppliedToMemberCase1(t *testing.T) { - svc := NewInputService5ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService5TestShapeInputService5TestCaseOperation1Input{ - ListArg: []*string{ - aws.String("a"), - aws.String("b"), - aws.String("c"), - }, - } - req, _ := svc.InputService5TestCaseOperation1Request(input) - r := req.HTTPRequest - - // build request - ec2query.Build(req) - assert.NoError(t, req.Error) - - // assert body - assert.NotNil(t, r.Body) - body, _ := ioutil.ReadAll(r.Body) - awstesting.AssertQuery(t, `Action=OperationName&ListMemberName.1=a&ListMemberName.2=b&ListMemberName.3=c&Version=2014-01-01`, util.Trim(string(body))) - - // assert URL - awstesting.AssertURL(t, "https://test/", r.URL.String()) - - // assert headers - -} - -func TestInputService6ProtocolTestListWithLocationNameAndQueryNameCase1(t *testing.T) { - svc := NewInputService6ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService6TestShapeInputService6TestCaseOperation1Input{ - ListArg: []*string{ - aws.String("a"), - aws.String("b"), - aws.String("c"), - }, - } - req, _ := svc.InputService6TestCaseOperation1Request(input) - r := req.HTTPRequest - - // build request - ec2query.Build(req) - assert.NoError(t, req.Error) - - // assert body - assert.NotNil(t, r.Body) - body, _ := ioutil.ReadAll(r.Body) - awstesting.AssertQuery(t, `Action=OperationName&ListQueryName.1=a&ListQueryName.2=b&ListQueryName.3=c&Version=2014-01-01`, util.Trim(string(body))) - - // assert URL - awstesting.AssertURL(t, "https://test/", r.URL.String()) - - // assert headers - -} - -func TestInputService7ProtocolTestBase64EncodedBlobsCase1(t *testing.T) { - svc := NewInputService7ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService7TestShapeInputService7TestCaseOperation1Input{ - BlobArg: []byte("foo"), - } - req, _ := svc.InputService7TestCaseOperation1Request(input) - r := req.HTTPRequest - - // build request - ec2query.Build(req) - assert.NoError(t, req.Error) - - // assert body - assert.NotNil(t, r.Body) - body, _ := ioutil.ReadAll(r.Body) - awstesting.AssertQuery(t, `Action=OperationName&BlobArg=Zm9v&Version=2014-01-01`, util.Trim(string(body))) - - // assert URL - awstesting.AssertURL(t, "https://test/", r.URL.String()) - - // assert headers - -} - -func TestInputService8ProtocolTestTimestampValuesCase1(t *testing.T) { - svc := NewInputService8ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService8TestShapeInputService8TestCaseOperation1Input{ - TimeArg: aws.Time(time.Unix(1422172800, 0)), - } - req, _ := svc.InputService8TestCaseOperation1Request(input) - r := req.HTTPRequest - - // build request - ec2query.Build(req) - assert.NoError(t, req.Error) - - // assert body - assert.NotNil(t, r.Body) - body, _ := ioutil.ReadAll(r.Body) - awstesting.AssertQuery(t, `Action=OperationName&TimeArg=2015-01-25T08%3A00%3A00Z&Version=2014-01-01`, util.Trim(string(body))) - - // assert URL - awstesting.AssertURL(t, "https://test/", r.URL.String()) - - // assert headers - -} - -func TestInputService9ProtocolTestIdempotencyTokenAutoFillCase1(t *testing.T) { - svc := NewInputService9ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService9TestShapeInputService9TestCaseOperation2Input{ - Token: aws.String("abc123"), - } - req, _ := svc.InputService9TestCaseOperation1Request(input) - r := req.HTTPRequest - - // build request - ec2query.Build(req) - assert.NoError(t, req.Error) - - // assert body - assert.NotNil(t, r.Body) - body, _ := ioutil.ReadAll(r.Body) - awstesting.AssertQuery(t, `Action=OperationName&Token=abc123&Version=2014-01-01`, util.Trim(string(body))) - - // assert URL - awstesting.AssertURL(t, "https://test/", r.URL.String()) - - // assert headers - -} - -func TestInputService9ProtocolTestIdempotencyTokenAutoFillCase2(t *testing.T) { - svc := NewInputService9ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService9TestShapeInputService9TestCaseOperation2Input{} - req, _ := svc.InputService9TestCaseOperation2Request(input) - r := req.HTTPRequest - - // build request - ec2query.Build(req) - assert.NoError(t, req.Error) - - // assert body - assert.NotNil(t, r.Body) - body, _ := ioutil.ReadAll(r.Body) - awstesting.AssertQuery(t, `Action=OperationName&Token=00000000-0000-4000-8000-000000000000&Version=2014-01-01`, util.Trim(string(body))) - - // assert URL - awstesting.AssertURL(t, "https://test/", r.URL.String()) - - // assert headers - -} diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/ec2query/unmarshal.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/ec2query/unmarshal.go deleted file mode 100644 index 095e97c..0000000 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/ec2query/unmarshal.go +++ /dev/null @@ -1,63 +0,0 @@ -package ec2query - -//go:generate go run -tags codegen ../../../models/protocol_tests/generate.go ../../../models/protocol_tests/output/ec2.json unmarshal_test.go - -import ( - "encoding/xml" - "io" - - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil" -) - -// UnmarshalHandler is a named request handler for unmarshaling ec2query protocol requests -var UnmarshalHandler = request.NamedHandler{Name: "awssdk.ec2query.Unmarshal", Fn: Unmarshal} - -// UnmarshalMetaHandler is a named request handler for unmarshaling ec2query protocol request metadata -var UnmarshalMetaHandler = request.NamedHandler{Name: "awssdk.ec2query.UnmarshalMeta", Fn: UnmarshalMeta} - -// UnmarshalErrorHandler is a named request handler for unmarshaling ec2query protocol request errors -var UnmarshalErrorHandler = request.NamedHandler{Name: "awssdk.ec2query.UnmarshalError", Fn: UnmarshalError} - -// Unmarshal unmarshals a response body for the EC2 protocol. -func Unmarshal(r *request.Request) { - defer r.HTTPResponse.Body.Close() - if r.DataFilled() { - decoder := xml.NewDecoder(r.HTTPResponse.Body) - err := xmlutil.UnmarshalXML(r.Data, decoder, "") - if err != nil { - r.Error = awserr.New("SerializationError", "failed decoding EC2 Query response", err) - return - } - } -} - -// UnmarshalMeta unmarshals response headers for the EC2 protocol. -func UnmarshalMeta(r *request.Request) { - // TODO implement unmarshaling of request IDs -} - -type xmlErrorResponse struct { - XMLName xml.Name `xml:"Response"` - Code string `xml:"Errors>Error>Code"` - Message string `xml:"Errors>Error>Message"` - RequestID string `xml:"RequestID"` -} - -// UnmarshalError unmarshals a response error for the EC2 protocol. -func UnmarshalError(r *request.Request) { - defer r.HTTPResponse.Body.Close() - - resp := &xmlErrorResponse{} - err := xml.NewDecoder(r.HTTPResponse.Body).Decode(resp) - if err != nil && err != io.EOF { - r.Error = awserr.New("SerializationError", "failed decoding EC2 Query error response", err) - } else { - r.Error = awserr.NewRequestFailure( - awserr.New(resp.Code, resp.Message, nil), - r.HTTPResponse.StatusCode, - resp.RequestID, - ) - } -} diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/ec2query/unmarshal_test.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/ec2query/unmarshal_test.go deleted file mode 100644 index 3e4e02d..0000000 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/ec2query/unmarshal_test.go +++ /dev/null @@ -1,1572 +0,0 @@ -package ec2query_test - -import ( - "bytes" - "encoding/json" - "encoding/xml" - "fmt" - "io" - "io/ioutil" - "net/http" - "net/url" - "reflect" - "testing" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/awstesting" - "github.com/aws/aws-sdk-go/awstesting/unit" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/ec2query" - "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil" - "github.com/aws/aws-sdk-go/private/util" - "github.com/stretchr/testify/assert" -) - -var _ bytes.Buffer // always import bytes -var _ http.Request -var _ json.Marshaler -var _ time.Time -var _ xmlutil.XMLNode -var _ xml.Attr -var _ = ioutil.Discard -var _ = util.Trim("") -var _ = url.Values{} -var _ = io.EOF -var _ = aws.String -var _ = fmt.Println -var _ = reflect.Value{} - -func init() { - protocol.RandReader = &awstesting.ZeroReader{} -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type OutputService1ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the OutputService1ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a OutputService1ProtocolTest client from just a session. -// svc := outputservice1protocoltest.New(mySession) -// -// // Create a OutputService1ProtocolTest client with additional configuration -// svc := outputservice1protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewOutputService1ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService1ProtocolTest { - c := p.ClientConfig("outputservice1protocoltest", cfgs...) - return newOutputService1ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newOutputService1ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *OutputService1ProtocolTest { - svc := &OutputService1ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "outputservice1protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(ec2query.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(ec2query.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(ec2query.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(ec2query.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a OutputService1ProtocolTest operation and runs any -// custom request initialization. -func (c *OutputService1ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opOutputService1TestCaseOperation1 = "OperationName" - -// OutputService1TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the OutputService1TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See OutputService1TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the OutputService1TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the OutputService1TestCaseOperation1Request method. -// req, resp := client.OutputService1TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *OutputService1ProtocolTest) OutputService1TestCaseOperation1Request(input *OutputService1TestShapeOutputService1TestCaseOperation1Input) (req *request.Request, output *OutputService1TestShapeOutputService1TestCaseOperation1Output) { - op := &request.Operation{ - Name: opOutputService1TestCaseOperation1, - HTTPPath: "/", - } - - if input == nil { - input = &OutputService1TestShapeOutputService1TestCaseOperation1Input{} - } - - output = &OutputService1TestShapeOutputService1TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - return -} - -// OutputService1TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation OutputService1TestCaseOperation1 for usage and error information. -func (c *OutputService1ProtocolTest) OutputService1TestCaseOperation1(input *OutputService1TestShapeOutputService1TestCaseOperation1Input) (*OutputService1TestShapeOutputService1TestCaseOperation1Output, error) { - req, out := c.OutputService1TestCaseOperation1Request(input) - return out, req.Send() -} - -// OutputService1TestCaseOperation1WithContext is the same as OutputService1TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See OutputService1TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OutputService1ProtocolTest) OutputService1TestCaseOperation1WithContext(ctx aws.Context, input *OutputService1TestShapeOutputService1TestCaseOperation1Input, opts ...request.Option) (*OutputService1TestShapeOutputService1TestCaseOperation1Output, error) { - req, out := c.OutputService1TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type OutputService1TestShapeOutputService1TestCaseOperation1Input struct { - _ struct{} `type:"structure"` -} - -type OutputService1TestShapeOutputService1TestCaseOperation1Output struct { - _ struct{} `type:"structure"` - - Char *string `type:"character"` - - Double *float64 `type:"double"` - - FalseBool *bool `type:"boolean"` - - Float *float64 `type:"float"` - - Long *int64 `type:"long"` - - Num *int64 `locationName:"FooNum" type:"integer"` - - Str *string `type:"string"` - - TrueBool *bool `type:"boolean"` -} - -// SetChar sets the Char field's value. -func (s *OutputService1TestShapeOutputService1TestCaseOperation1Output) SetChar(v string) *OutputService1TestShapeOutputService1TestCaseOperation1Output { - s.Char = &v - return s -} - -// SetDouble sets the Double field's value. -func (s *OutputService1TestShapeOutputService1TestCaseOperation1Output) SetDouble(v float64) *OutputService1TestShapeOutputService1TestCaseOperation1Output { - s.Double = &v - return s -} - -// SetFalseBool sets the FalseBool field's value. -func (s *OutputService1TestShapeOutputService1TestCaseOperation1Output) SetFalseBool(v bool) *OutputService1TestShapeOutputService1TestCaseOperation1Output { - s.FalseBool = &v - return s -} - -// SetFloat sets the Float field's value. -func (s *OutputService1TestShapeOutputService1TestCaseOperation1Output) SetFloat(v float64) *OutputService1TestShapeOutputService1TestCaseOperation1Output { - s.Float = &v - return s -} - -// SetLong sets the Long field's value. -func (s *OutputService1TestShapeOutputService1TestCaseOperation1Output) SetLong(v int64) *OutputService1TestShapeOutputService1TestCaseOperation1Output { - s.Long = &v - return s -} - -// SetNum sets the Num field's value. -func (s *OutputService1TestShapeOutputService1TestCaseOperation1Output) SetNum(v int64) *OutputService1TestShapeOutputService1TestCaseOperation1Output { - s.Num = &v - return s -} - -// SetStr sets the Str field's value. -func (s *OutputService1TestShapeOutputService1TestCaseOperation1Output) SetStr(v string) *OutputService1TestShapeOutputService1TestCaseOperation1Output { - s.Str = &v - return s -} - -// SetTrueBool sets the TrueBool field's value. -func (s *OutputService1TestShapeOutputService1TestCaseOperation1Output) SetTrueBool(v bool) *OutputService1TestShapeOutputService1TestCaseOperation1Output { - s.TrueBool = &v - return s -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type OutputService2ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the OutputService2ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a OutputService2ProtocolTest client from just a session. -// svc := outputservice2protocoltest.New(mySession) -// -// // Create a OutputService2ProtocolTest client with additional configuration -// svc := outputservice2protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewOutputService2ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService2ProtocolTest { - c := p.ClientConfig("outputservice2protocoltest", cfgs...) - return newOutputService2ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newOutputService2ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *OutputService2ProtocolTest { - svc := &OutputService2ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "outputservice2protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(ec2query.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(ec2query.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(ec2query.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(ec2query.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a OutputService2ProtocolTest operation and runs any -// custom request initialization. -func (c *OutputService2ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opOutputService2TestCaseOperation1 = "OperationName" - -// OutputService2TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the OutputService2TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See OutputService2TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the OutputService2TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the OutputService2TestCaseOperation1Request method. -// req, resp := client.OutputService2TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *OutputService2ProtocolTest) OutputService2TestCaseOperation1Request(input *OutputService2TestShapeOutputService2TestCaseOperation1Input) (req *request.Request, output *OutputService2TestShapeOutputService2TestCaseOperation1Output) { - op := &request.Operation{ - Name: opOutputService2TestCaseOperation1, - HTTPPath: "/", - } - - if input == nil { - input = &OutputService2TestShapeOutputService2TestCaseOperation1Input{} - } - - output = &OutputService2TestShapeOutputService2TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - return -} - -// OutputService2TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation OutputService2TestCaseOperation1 for usage and error information. -func (c *OutputService2ProtocolTest) OutputService2TestCaseOperation1(input *OutputService2TestShapeOutputService2TestCaseOperation1Input) (*OutputService2TestShapeOutputService2TestCaseOperation1Output, error) { - req, out := c.OutputService2TestCaseOperation1Request(input) - return out, req.Send() -} - -// OutputService2TestCaseOperation1WithContext is the same as OutputService2TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See OutputService2TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OutputService2ProtocolTest) OutputService2TestCaseOperation1WithContext(ctx aws.Context, input *OutputService2TestShapeOutputService2TestCaseOperation1Input, opts ...request.Option) (*OutputService2TestShapeOutputService2TestCaseOperation1Output, error) { - req, out := c.OutputService2TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type OutputService2TestShapeOutputService2TestCaseOperation1Input struct { - _ struct{} `type:"structure"` -} - -type OutputService2TestShapeOutputService2TestCaseOperation1Output struct { - _ struct{} `type:"structure"` - - // Blob is automatically base64 encoded/decoded by the SDK. - Blob []byte `type:"blob"` -} - -// SetBlob sets the Blob field's value. -func (s *OutputService2TestShapeOutputService2TestCaseOperation1Output) SetBlob(v []byte) *OutputService2TestShapeOutputService2TestCaseOperation1Output { - s.Blob = v - return s -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type OutputService3ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the OutputService3ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a OutputService3ProtocolTest client from just a session. -// svc := outputservice3protocoltest.New(mySession) -// -// // Create a OutputService3ProtocolTest client with additional configuration -// svc := outputservice3protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewOutputService3ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService3ProtocolTest { - c := p.ClientConfig("outputservice3protocoltest", cfgs...) - return newOutputService3ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newOutputService3ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *OutputService3ProtocolTest { - svc := &OutputService3ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "outputservice3protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(ec2query.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(ec2query.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(ec2query.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(ec2query.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a OutputService3ProtocolTest operation and runs any -// custom request initialization. -func (c *OutputService3ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opOutputService3TestCaseOperation1 = "OperationName" - -// OutputService3TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the OutputService3TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See OutputService3TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the OutputService3TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the OutputService3TestCaseOperation1Request method. -// req, resp := client.OutputService3TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *OutputService3ProtocolTest) OutputService3TestCaseOperation1Request(input *OutputService3TestShapeOutputService3TestCaseOperation1Input) (req *request.Request, output *OutputService3TestShapeOutputService3TestCaseOperation1Output) { - op := &request.Operation{ - Name: opOutputService3TestCaseOperation1, - HTTPPath: "/", - } - - if input == nil { - input = &OutputService3TestShapeOutputService3TestCaseOperation1Input{} - } - - output = &OutputService3TestShapeOutputService3TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - return -} - -// OutputService3TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation OutputService3TestCaseOperation1 for usage and error information. -func (c *OutputService3ProtocolTest) OutputService3TestCaseOperation1(input *OutputService3TestShapeOutputService3TestCaseOperation1Input) (*OutputService3TestShapeOutputService3TestCaseOperation1Output, error) { - req, out := c.OutputService3TestCaseOperation1Request(input) - return out, req.Send() -} - -// OutputService3TestCaseOperation1WithContext is the same as OutputService3TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See OutputService3TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OutputService3ProtocolTest) OutputService3TestCaseOperation1WithContext(ctx aws.Context, input *OutputService3TestShapeOutputService3TestCaseOperation1Input, opts ...request.Option) (*OutputService3TestShapeOutputService3TestCaseOperation1Output, error) { - req, out := c.OutputService3TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type OutputService3TestShapeOutputService3TestCaseOperation1Input struct { - _ struct{} `type:"structure"` -} - -type OutputService3TestShapeOutputService3TestCaseOperation1Output struct { - _ struct{} `type:"structure"` - - ListMember []*string `type:"list"` -} - -// SetListMember sets the ListMember field's value. -func (s *OutputService3TestShapeOutputService3TestCaseOperation1Output) SetListMember(v []*string) *OutputService3TestShapeOutputService3TestCaseOperation1Output { - s.ListMember = v - return s -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type OutputService4ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the OutputService4ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a OutputService4ProtocolTest client from just a session. -// svc := outputservice4protocoltest.New(mySession) -// -// // Create a OutputService4ProtocolTest client with additional configuration -// svc := outputservice4protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewOutputService4ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService4ProtocolTest { - c := p.ClientConfig("outputservice4protocoltest", cfgs...) - return newOutputService4ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newOutputService4ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *OutputService4ProtocolTest { - svc := &OutputService4ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "outputservice4protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(ec2query.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(ec2query.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(ec2query.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(ec2query.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a OutputService4ProtocolTest operation and runs any -// custom request initialization. -func (c *OutputService4ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opOutputService4TestCaseOperation1 = "OperationName" - -// OutputService4TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the OutputService4TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See OutputService4TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the OutputService4TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the OutputService4TestCaseOperation1Request method. -// req, resp := client.OutputService4TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *OutputService4ProtocolTest) OutputService4TestCaseOperation1Request(input *OutputService4TestShapeOutputService4TestCaseOperation1Input) (req *request.Request, output *OutputService4TestShapeOutputService4TestCaseOperation1Output) { - op := &request.Operation{ - Name: opOutputService4TestCaseOperation1, - HTTPPath: "/", - } - - if input == nil { - input = &OutputService4TestShapeOutputService4TestCaseOperation1Input{} - } - - output = &OutputService4TestShapeOutputService4TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - return -} - -// OutputService4TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation OutputService4TestCaseOperation1 for usage and error information. -func (c *OutputService4ProtocolTest) OutputService4TestCaseOperation1(input *OutputService4TestShapeOutputService4TestCaseOperation1Input) (*OutputService4TestShapeOutputService4TestCaseOperation1Output, error) { - req, out := c.OutputService4TestCaseOperation1Request(input) - return out, req.Send() -} - -// OutputService4TestCaseOperation1WithContext is the same as OutputService4TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See OutputService4TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OutputService4ProtocolTest) OutputService4TestCaseOperation1WithContext(ctx aws.Context, input *OutputService4TestShapeOutputService4TestCaseOperation1Input, opts ...request.Option) (*OutputService4TestShapeOutputService4TestCaseOperation1Output, error) { - req, out := c.OutputService4TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type OutputService4TestShapeOutputService4TestCaseOperation1Input struct { - _ struct{} `type:"structure"` -} - -type OutputService4TestShapeOutputService4TestCaseOperation1Output struct { - _ struct{} `type:"structure"` - - ListMember []*string `locationNameList:"item" type:"list"` -} - -// SetListMember sets the ListMember field's value. -func (s *OutputService4TestShapeOutputService4TestCaseOperation1Output) SetListMember(v []*string) *OutputService4TestShapeOutputService4TestCaseOperation1Output { - s.ListMember = v - return s -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type OutputService5ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the OutputService5ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a OutputService5ProtocolTest client from just a session. -// svc := outputservice5protocoltest.New(mySession) -// -// // Create a OutputService5ProtocolTest client with additional configuration -// svc := outputservice5protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewOutputService5ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService5ProtocolTest { - c := p.ClientConfig("outputservice5protocoltest", cfgs...) - return newOutputService5ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newOutputService5ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *OutputService5ProtocolTest { - svc := &OutputService5ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "outputservice5protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(ec2query.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(ec2query.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(ec2query.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(ec2query.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a OutputService5ProtocolTest operation and runs any -// custom request initialization. -func (c *OutputService5ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opOutputService5TestCaseOperation1 = "OperationName" - -// OutputService5TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the OutputService5TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See OutputService5TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the OutputService5TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the OutputService5TestCaseOperation1Request method. -// req, resp := client.OutputService5TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *OutputService5ProtocolTest) OutputService5TestCaseOperation1Request(input *OutputService5TestShapeOutputService5TestCaseOperation1Input) (req *request.Request, output *OutputService5TestShapeOutputService5TestCaseOperation1Output) { - op := &request.Operation{ - Name: opOutputService5TestCaseOperation1, - HTTPPath: "/", - } - - if input == nil { - input = &OutputService5TestShapeOutputService5TestCaseOperation1Input{} - } - - output = &OutputService5TestShapeOutputService5TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - return -} - -// OutputService5TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation OutputService5TestCaseOperation1 for usage and error information. -func (c *OutputService5ProtocolTest) OutputService5TestCaseOperation1(input *OutputService5TestShapeOutputService5TestCaseOperation1Input) (*OutputService5TestShapeOutputService5TestCaseOperation1Output, error) { - req, out := c.OutputService5TestCaseOperation1Request(input) - return out, req.Send() -} - -// OutputService5TestCaseOperation1WithContext is the same as OutputService5TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See OutputService5TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OutputService5ProtocolTest) OutputService5TestCaseOperation1WithContext(ctx aws.Context, input *OutputService5TestShapeOutputService5TestCaseOperation1Input, opts ...request.Option) (*OutputService5TestShapeOutputService5TestCaseOperation1Output, error) { - req, out := c.OutputService5TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type OutputService5TestShapeOutputService5TestCaseOperation1Input struct { - _ struct{} `type:"structure"` -} - -type OutputService5TestShapeOutputService5TestCaseOperation1Output struct { - _ struct{} `type:"structure"` - - ListMember []*string `type:"list" flattened:"true"` -} - -// SetListMember sets the ListMember field's value. -func (s *OutputService5TestShapeOutputService5TestCaseOperation1Output) SetListMember(v []*string) *OutputService5TestShapeOutputService5TestCaseOperation1Output { - s.ListMember = v - return s -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type OutputService6ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the OutputService6ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a OutputService6ProtocolTest client from just a session. -// svc := outputservice6protocoltest.New(mySession) -// -// // Create a OutputService6ProtocolTest client with additional configuration -// svc := outputservice6protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewOutputService6ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService6ProtocolTest { - c := p.ClientConfig("outputservice6protocoltest", cfgs...) - return newOutputService6ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newOutputService6ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *OutputService6ProtocolTest { - svc := &OutputService6ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "outputservice6protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(ec2query.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(ec2query.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(ec2query.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(ec2query.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a OutputService6ProtocolTest operation and runs any -// custom request initialization. -func (c *OutputService6ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opOutputService6TestCaseOperation1 = "OperationName" - -// OutputService6TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the OutputService6TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See OutputService6TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the OutputService6TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the OutputService6TestCaseOperation1Request method. -// req, resp := client.OutputService6TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *OutputService6ProtocolTest) OutputService6TestCaseOperation1Request(input *OutputService6TestShapeOutputService6TestCaseOperation1Input) (req *request.Request, output *OutputService6TestShapeOutputService6TestCaseOperation1Output) { - op := &request.Operation{ - Name: opOutputService6TestCaseOperation1, - HTTPPath: "/", - } - - if input == nil { - input = &OutputService6TestShapeOutputService6TestCaseOperation1Input{} - } - - output = &OutputService6TestShapeOutputService6TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - return -} - -// OutputService6TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation OutputService6TestCaseOperation1 for usage and error information. -func (c *OutputService6ProtocolTest) OutputService6TestCaseOperation1(input *OutputService6TestShapeOutputService6TestCaseOperation1Input) (*OutputService6TestShapeOutputService6TestCaseOperation1Output, error) { - req, out := c.OutputService6TestCaseOperation1Request(input) - return out, req.Send() -} - -// OutputService6TestCaseOperation1WithContext is the same as OutputService6TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See OutputService6TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OutputService6ProtocolTest) OutputService6TestCaseOperation1WithContext(ctx aws.Context, input *OutputService6TestShapeOutputService6TestCaseOperation1Input, opts ...request.Option) (*OutputService6TestShapeOutputService6TestCaseOperation1Output, error) { - req, out := c.OutputService6TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type OutputService6TestShapeOutputService6TestCaseOperation1Input struct { - _ struct{} `type:"structure"` -} - -type OutputService6TestShapeOutputService6TestCaseOperation1Output struct { - _ struct{} `type:"structure"` - - Map map[string]*OutputService6TestShapeStructureType `type:"map"` -} - -// SetMap sets the Map field's value. -func (s *OutputService6TestShapeOutputService6TestCaseOperation1Output) SetMap(v map[string]*OutputService6TestShapeStructureType) *OutputService6TestShapeOutputService6TestCaseOperation1Output { - s.Map = v - return s -} - -type OutputService6TestShapeStructureType struct { - _ struct{} `type:"structure"` - - Foo *string `locationName:"foo" type:"string"` -} - -// SetFoo sets the Foo field's value. -func (s *OutputService6TestShapeStructureType) SetFoo(v string) *OutputService6TestShapeStructureType { - s.Foo = &v - return s -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type OutputService7ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the OutputService7ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a OutputService7ProtocolTest client from just a session. -// svc := outputservice7protocoltest.New(mySession) -// -// // Create a OutputService7ProtocolTest client with additional configuration -// svc := outputservice7protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewOutputService7ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService7ProtocolTest { - c := p.ClientConfig("outputservice7protocoltest", cfgs...) - return newOutputService7ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newOutputService7ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *OutputService7ProtocolTest { - svc := &OutputService7ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "outputservice7protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(ec2query.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(ec2query.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(ec2query.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(ec2query.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a OutputService7ProtocolTest operation and runs any -// custom request initialization. -func (c *OutputService7ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opOutputService7TestCaseOperation1 = "OperationName" - -// OutputService7TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the OutputService7TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See OutputService7TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the OutputService7TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the OutputService7TestCaseOperation1Request method. -// req, resp := client.OutputService7TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *OutputService7ProtocolTest) OutputService7TestCaseOperation1Request(input *OutputService7TestShapeOutputService7TestCaseOperation1Input) (req *request.Request, output *OutputService7TestShapeOutputService7TestCaseOperation1Output) { - op := &request.Operation{ - Name: opOutputService7TestCaseOperation1, - HTTPPath: "/", - } - - if input == nil { - input = &OutputService7TestShapeOutputService7TestCaseOperation1Input{} - } - - output = &OutputService7TestShapeOutputService7TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - return -} - -// OutputService7TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation OutputService7TestCaseOperation1 for usage and error information. -func (c *OutputService7ProtocolTest) OutputService7TestCaseOperation1(input *OutputService7TestShapeOutputService7TestCaseOperation1Input) (*OutputService7TestShapeOutputService7TestCaseOperation1Output, error) { - req, out := c.OutputService7TestCaseOperation1Request(input) - return out, req.Send() -} - -// OutputService7TestCaseOperation1WithContext is the same as OutputService7TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See OutputService7TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OutputService7ProtocolTest) OutputService7TestCaseOperation1WithContext(ctx aws.Context, input *OutputService7TestShapeOutputService7TestCaseOperation1Input, opts ...request.Option) (*OutputService7TestShapeOutputService7TestCaseOperation1Output, error) { - req, out := c.OutputService7TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type OutputService7TestShapeOutputService7TestCaseOperation1Input struct { - _ struct{} `type:"structure"` -} - -type OutputService7TestShapeOutputService7TestCaseOperation1Output struct { - _ struct{} `type:"structure"` - - Map map[string]*string `type:"map" flattened:"true"` -} - -// SetMap sets the Map field's value. -func (s *OutputService7TestShapeOutputService7TestCaseOperation1Output) SetMap(v map[string]*string) *OutputService7TestShapeOutputService7TestCaseOperation1Output { - s.Map = v - return s -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type OutputService8ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the OutputService8ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a OutputService8ProtocolTest client from just a session. -// svc := outputservice8protocoltest.New(mySession) -// -// // Create a OutputService8ProtocolTest client with additional configuration -// svc := outputservice8protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewOutputService8ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService8ProtocolTest { - c := p.ClientConfig("outputservice8protocoltest", cfgs...) - return newOutputService8ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newOutputService8ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *OutputService8ProtocolTest { - svc := &OutputService8ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "outputservice8protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(ec2query.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(ec2query.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(ec2query.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(ec2query.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a OutputService8ProtocolTest operation and runs any -// custom request initialization. -func (c *OutputService8ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opOutputService8TestCaseOperation1 = "OperationName" - -// OutputService8TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the OutputService8TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See OutputService8TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the OutputService8TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the OutputService8TestCaseOperation1Request method. -// req, resp := client.OutputService8TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *OutputService8ProtocolTest) OutputService8TestCaseOperation1Request(input *OutputService8TestShapeOutputService8TestCaseOperation1Input) (req *request.Request, output *OutputService8TestShapeOutputService8TestCaseOperation1Output) { - op := &request.Operation{ - Name: opOutputService8TestCaseOperation1, - HTTPPath: "/", - } - - if input == nil { - input = &OutputService8TestShapeOutputService8TestCaseOperation1Input{} - } - - output = &OutputService8TestShapeOutputService8TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - return -} - -// OutputService8TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation OutputService8TestCaseOperation1 for usage and error information. -func (c *OutputService8ProtocolTest) OutputService8TestCaseOperation1(input *OutputService8TestShapeOutputService8TestCaseOperation1Input) (*OutputService8TestShapeOutputService8TestCaseOperation1Output, error) { - req, out := c.OutputService8TestCaseOperation1Request(input) - return out, req.Send() -} - -// OutputService8TestCaseOperation1WithContext is the same as OutputService8TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See OutputService8TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OutputService8ProtocolTest) OutputService8TestCaseOperation1WithContext(ctx aws.Context, input *OutputService8TestShapeOutputService8TestCaseOperation1Input, opts ...request.Option) (*OutputService8TestShapeOutputService8TestCaseOperation1Output, error) { - req, out := c.OutputService8TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type OutputService8TestShapeOutputService8TestCaseOperation1Input struct { - _ struct{} `type:"structure"` -} - -type OutputService8TestShapeOutputService8TestCaseOperation1Output struct { - _ struct{} `type:"structure"` - - Map map[string]*string `locationNameKey:"foo" locationNameValue:"bar" type:"map" flattened:"true"` -} - -// SetMap sets the Map field's value. -func (s *OutputService8TestShapeOutputService8TestCaseOperation1Output) SetMap(v map[string]*string) *OutputService8TestShapeOutputService8TestCaseOperation1Output { - s.Map = v - return s -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type OutputService9ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the OutputService9ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a OutputService9ProtocolTest client from just a session. -// svc := outputservice9protocoltest.New(mySession) -// -// // Create a OutputService9ProtocolTest client with additional configuration -// svc := outputservice9protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewOutputService9ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService9ProtocolTest { - c := p.ClientConfig("outputservice9protocoltest", cfgs...) - return newOutputService9ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newOutputService9ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *OutputService9ProtocolTest { - svc := &OutputService9ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "outputservice9protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(ec2query.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(ec2query.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(ec2query.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(ec2query.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a OutputService9ProtocolTest operation and runs any -// custom request initialization. -func (c *OutputService9ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opOutputService9TestCaseOperation1 = "OperationName" - -// OutputService9TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the OutputService9TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See OutputService9TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the OutputService9TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the OutputService9TestCaseOperation1Request method. -// req, resp := client.OutputService9TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *OutputService9ProtocolTest) OutputService9TestCaseOperation1Request(input *OutputService9TestShapeOutputService9TestCaseOperation1Input) (req *request.Request, output *OutputService9TestShapeOutputService9TestCaseOperation1Output) { - op := &request.Operation{ - Name: opOutputService9TestCaseOperation1, - HTTPPath: "/", - } - - if input == nil { - input = &OutputService9TestShapeOutputService9TestCaseOperation1Input{} - } - - output = &OutputService9TestShapeOutputService9TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - return -} - -// OutputService9TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation OutputService9TestCaseOperation1 for usage and error information. -func (c *OutputService9ProtocolTest) OutputService9TestCaseOperation1(input *OutputService9TestShapeOutputService9TestCaseOperation1Input) (*OutputService9TestShapeOutputService9TestCaseOperation1Output, error) { - req, out := c.OutputService9TestCaseOperation1Request(input) - return out, req.Send() -} - -// OutputService9TestCaseOperation1WithContext is the same as OutputService9TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See OutputService9TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OutputService9ProtocolTest) OutputService9TestCaseOperation1WithContext(ctx aws.Context, input *OutputService9TestShapeOutputService9TestCaseOperation1Input, opts ...request.Option) (*OutputService9TestShapeOutputService9TestCaseOperation1Output, error) { - req, out := c.OutputService9TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type OutputService9TestShapeOutputService9TestCaseOperation1Input struct { - _ struct{} `type:"structure"` -} - -type OutputService9TestShapeOutputService9TestCaseOperation1Output struct { - _ struct{} `type:"structure"` - - Foo *string `type:"string"` -} - -// SetFoo sets the Foo field's value. -func (s *OutputService9TestShapeOutputService9TestCaseOperation1Output) SetFoo(v string) *OutputService9TestShapeOutputService9TestCaseOperation1Output { - s.Foo = &v - return s -} - -// -// Tests begin here -// - -func TestOutputService1ProtocolTestScalarMembersCase1(t *testing.T) { - svc := NewOutputService1ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - - buf := bytes.NewReader([]byte("myname123falsetrue1.21.3200arequest-id")) - req, out := svc.OutputService1TestCaseOperation1Request(nil) - req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} - - // set headers - - // unmarshal response - ec2query.UnmarshalMeta(req) - ec2query.Unmarshal(req) - assert.NoError(t, req.Error) - - // assert response - assert.NotNil(t, out) // ensure out variable is used - assert.Equal(t, "a", *out.Char) - assert.Equal(t, 1.3, *out.Double) - assert.Equal(t, false, *out.FalseBool) - assert.Equal(t, 1.2, *out.Float) - assert.Equal(t, int64(200), *out.Long) - assert.Equal(t, int64(123), *out.Num) - assert.Equal(t, "myname", *out.Str) - assert.Equal(t, true, *out.TrueBool) - -} - -func TestOutputService2ProtocolTestBlobCase1(t *testing.T) { - svc := NewOutputService2ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - - buf := bytes.NewReader([]byte("dmFsdWU=requestid")) - req, out := svc.OutputService2TestCaseOperation1Request(nil) - req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} - - // set headers - - // unmarshal response - ec2query.UnmarshalMeta(req) - ec2query.Unmarshal(req) - assert.NoError(t, req.Error) - - // assert response - assert.NotNil(t, out) // ensure out variable is used - assert.Equal(t, "value", string(out.Blob)) - -} - -func TestOutputService3ProtocolTestListsCase1(t *testing.T) { - svc := NewOutputService3ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - - buf := bytes.NewReader([]byte("abc123requestid")) - req, out := svc.OutputService3TestCaseOperation1Request(nil) - req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} - - // set headers - - // unmarshal response - ec2query.UnmarshalMeta(req) - ec2query.Unmarshal(req) - assert.NoError(t, req.Error) - - // assert response - assert.NotNil(t, out) // ensure out variable is used - assert.Equal(t, "abc", *out.ListMember[0]) - assert.Equal(t, "123", *out.ListMember[1]) - -} - -func TestOutputService4ProtocolTestListWithCustomMemberNameCase1(t *testing.T) { - svc := NewOutputService4ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - - buf := bytes.NewReader([]byte("abc123requestid")) - req, out := svc.OutputService4TestCaseOperation1Request(nil) - req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} - - // set headers - - // unmarshal response - ec2query.UnmarshalMeta(req) - ec2query.Unmarshal(req) - assert.NoError(t, req.Error) - - // assert response - assert.NotNil(t, out) // ensure out variable is used - assert.Equal(t, "abc", *out.ListMember[0]) - assert.Equal(t, "123", *out.ListMember[1]) - -} - -func TestOutputService5ProtocolTestFlattenedListCase1(t *testing.T) { - svc := NewOutputService5ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - - buf := bytes.NewReader([]byte("abc123requestid")) - req, out := svc.OutputService5TestCaseOperation1Request(nil) - req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} - - // set headers - - // unmarshal response - ec2query.UnmarshalMeta(req) - ec2query.Unmarshal(req) - assert.NoError(t, req.Error) - - // assert response - assert.NotNil(t, out) // ensure out variable is used - assert.Equal(t, "abc", *out.ListMember[0]) - assert.Equal(t, "123", *out.ListMember[1]) - -} - -func TestOutputService6ProtocolTestNormalMapCase1(t *testing.T) { - svc := NewOutputService6ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - - buf := bytes.NewReader([]byte("quxbarbazbamrequestid")) - req, out := svc.OutputService6TestCaseOperation1Request(nil) - req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} - - // set headers - - // unmarshal response - ec2query.UnmarshalMeta(req) - ec2query.Unmarshal(req) - assert.NoError(t, req.Error) - - // assert response - assert.NotNil(t, out) // ensure out variable is used - assert.Equal(t, "bam", *out.Map["baz"].Foo) - assert.Equal(t, "bar", *out.Map["qux"].Foo) - -} - -func TestOutputService7ProtocolTestFlattenedMapCase1(t *testing.T) { - svc := NewOutputService7ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - - buf := bytes.NewReader([]byte("quxbarbazbamrequestid")) - req, out := svc.OutputService7TestCaseOperation1Request(nil) - req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} - - // set headers - - // unmarshal response - ec2query.UnmarshalMeta(req) - ec2query.Unmarshal(req) - assert.NoError(t, req.Error) - - // assert response - assert.NotNil(t, out) // ensure out variable is used - assert.Equal(t, "bam", *out.Map["baz"]) - assert.Equal(t, "bar", *out.Map["qux"]) - -} - -func TestOutputService8ProtocolTestNamedMapCase1(t *testing.T) { - svc := NewOutputService8ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - - buf := bytes.NewReader([]byte("quxbarbazbamrequestid")) - req, out := svc.OutputService8TestCaseOperation1Request(nil) - req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} - - // set headers - - // unmarshal response - ec2query.UnmarshalMeta(req) - ec2query.Unmarshal(req) - assert.NoError(t, req.Error) - - // assert response - assert.NotNil(t, out) // ensure out variable is used - assert.Equal(t, "bam", *out.Map["baz"]) - assert.Equal(t, "bar", *out.Map["qux"]) - -} - -func TestOutputService9ProtocolTestEmptyStringCase1(t *testing.T) { - svc := NewOutputService9ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - - buf := bytes.NewReader([]byte("requestid")) - req, out := svc.OutputService9TestCaseOperation1Request(nil) - req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} - - // set headers - - // unmarshal response - ec2query.UnmarshalMeta(req) - ec2query.Unmarshal(req) - assert.NoError(t, req.Error) - - // assert response - assert.NotNil(t, out) // ensure out variable is used - assert.Equal(t, "", *out.Foo) - -} diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/build.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/build.go index 6efe43d..ec765ba 100644 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/build.go +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/build.go @@ -12,6 +12,7 @@ import ( "strconv" "time" + "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/private/protocol" ) @@ -49,7 +50,10 @@ func buildAny(value reflect.Value, buf *bytes.Buffer, tag reflect.StructTag) err t = "list" } case reflect.Map: - t = "map" + // cannot be a JSONValue map + if _, ok := value.Interface().(aws.JSONValue); !ok { + t = "map" + } } } @@ -210,14 +214,11 @@ func buildScalar(v reflect.Value, buf *bytes.Buffer, tag reflect.StructTag) erro } buf.Write(strconv.AppendFloat(scratch[:0], f, 'f', -1, 64)) default: - switch value.Type() { - case timeType: - converted := v.Interface().(*time.Time) - + switch converted := value.Interface().(type) { + case time.Time: buf.Write(strconv.AppendInt(scratch[:0], converted.UTC().Unix(), 10)) - case byteSliceType: + case []byte: if !value.IsNil() { - converted := value.Interface().([]byte) buf.WriteByte('"') if len(converted) < 1024 { // for small buffers, using Encode directly is much faster. @@ -233,6 +234,12 @@ func buildScalar(v reflect.Value, buf *bytes.Buffer, tag reflect.StructTag) erro } buf.WriteByte('"') } + case aws.JSONValue: + str, err := protocol.EncodeJSONValue(converted, protocol.QuotedEscape) + if err != nil { + return fmt.Errorf("unable to encode JSONValue, %v", err) + } + buf.WriteString(str) default: return fmt.Errorf("unsupported JSON value %v (%s)", value.Interface(), value.Type()) } diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/unmarshal.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/unmarshal.go index fea5356..037e1e7 100644 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/unmarshal.go +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/unmarshal.go @@ -8,6 +8,9 @@ import ( "io/ioutil" "reflect" "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/private/protocol" ) // UnmarshalJSON reads a stream and unmarshals the results in object v. @@ -50,7 +53,10 @@ func unmarshalAny(value reflect.Value, data interface{}, tag reflect.StructTag) t = "list" } case reflect.Map: - t = "map" + // cannot be a JSONValue map + if _, ok := value.Interface().(aws.JSONValue); !ok { + t = "map" + } } } @@ -183,6 +189,13 @@ func unmarshalScalar(value reflect.Value, data interface{}, tag reflect.StructTa return err } value.Set(reflect.ValueOf(b)) + case aws.JSONValue: + // No need to use escaping as the value is a non-quoted string. + v, err := protocol.DecodeJSONValue(d, protocol.NoEscape) + if err != nil { + return err + } + value.Set(reflect.ValueOf(v)) default: return errf() } diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/jsonrpc/build_test.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/jsonrpc/build_test.go index dec7792..18a581b 100644 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/jsonrpc/build_test.go +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/jsonrpc/build_test.go @@ -24,7 +24,6 @@ import ( "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil" "github.com/aws/aws-sdk-go/private/util" - "github.com/stretchr/testify/assert" ) var _ bytes.Buffer // always import bytes @@ -45,8 +44,12 @@ func init() { protocol.RandReader = &awstesting.ZeroReader{} } -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. +// InputService1ProtocolTest provides the API operation methods for making requests to +// . See this package's package overview docs +// for details on the service. +// +// InputService1ProtocolTest methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. type InputService1ProtocolTest struct { *client.Client } @@ -73,6 +76,7 @@ func newInputService1ProtocolTestClient(cfg aws.Config, handlers request.Handler cfg, metadata.ClientInfo{ ServiceName: "inputservice1protocoltest", + ServiceID: "InputService1ProtocolTest", SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, @@ -106,19 +110,18 @@ const opInputService1TestCaseOperation1 = "OperationName" // InputService1TestCaseOperation1Request generates a "aws/request.Request" representing the // client's request for the InputService1TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See InputService1TestCaseOperation1 for usage and error information. +// See InputService1TestCaseOperation1 for more information on using the InputService1TestCaseOperation1 +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService1TestCaseOperation1 method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the InputService1TestCaseOperation1Request method. // req, resp := client.InputService1TestCaseOperation1Request(params) @@ -190,8 +193,12 @@ type InputService1TestShapeInputService1TestCaseOperation1Output struct { _ struct{} `type:"structure"` } -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. +// InputService2ProtocolTest provides the API operation methods for making requests to +// . See this package's package overview docs +// for details on the service. +// +// InputService2ProtocolTest methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. type InputService2ProtocolTest struct { *client.Client } @@ -218,6 +225,7 @@ func newInputService2ProtocolTestClient(cfg aws.Config, handlers request.Handler cfg, metadata.ClientInfo{ ServiceName: "inputservice2protocoltest", + ServiceID: "InputService2ProtocolTest", SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, @@ -251,19 +259,18 @@ const opInputService2TestCaseOperation1 = "OperationName" // InputService2TestCaseOperation1Request generates a "aws/request.Request" representing the // client's request for the InputService2TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. // -// See InputService2TestCaseOperation1 for usage and error information. +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService2TestCaseOperation1 method directly -// instead. +// See InputService2TestCaseOperation1 for more information on using the InputService2TestCaseOperation1 +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the InputService2TestCaseOperation1Request method. // req, resp := client.InputService2TestCaseOperation1Request(params) @@ -334,8 +341,12 @@ type InputService2TestShapeInputService2TestCaseOperation1Output struct { _ struct{} `type:"structure"` } -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. +// InputService3ProtocolTest provides the API operation methods for making requests to +// . See this package's package overview docs +// for details on the service. +// +// InputService3ProtocolTest methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. type InputService3ProtocolTest struct { *client.Client } @@ -362,6 +373,7 @@ func newInputService3ProtocolTestClient(cfg aws.Config, handlers request.Handler cfg, metadata.ClientInfo{ ServiceName: "inputservice3protocoltest", + ServiceID: "InputService3ProtocolTest", SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, @@ -395,19 +407,18 @@ const opInputService3TestCaseOperation1 = "OperationName" // InputService3TestCaseOperation1Request generates a "aws/request.Request" representing the // client's request for the InputService3TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. // -// See InputService3TestCaseOperation1 for usage and error information. +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService3TestCaseOperation1 method directly -// instead. +// See InputService3TestCaseOperation1 for more information on using the InputService3TestCaseOperation1 +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the InputService3TestCaseOperation1Request method. // req, resp := client.InputService3TestCaseOperation1Request(params) @@ -466,19 +477,18 @@ const opInputService3TestCaseOperation2 = "OperationName" // InputService3TestCaseOperation2Request generates a "aws/request.Request" representing the // client's request for the InputService3TestCaseOperation2 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See InputService3TestCaseOperation2 for usage and error information. +// See InputService3TestCaseOperation2 for more information on using the InputService3TestCaseOperation2 +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService3TestCaseOperation2 method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the InputService3TestCaseOperation2Request method. // req, resp := client.InputService3TestCaseOperation2Request(params) @@ -562,8 +572,12 @@ type InputService3TestShapeInputService3TestCaseOperation2Output struct { _ struct{} `type:"structure"` } -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. +// InputService4ProtocolTest provides the API operation methods for making requests to +// . See this package's package overview docs +// for details on the service. +// +// InputService4ProtocolTest methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. type InputService4ProtocolTest struct { *client.Client } @@ -590,6 +604,7 @@ func newInputService4ProtocolTestClient(cfg aws.Config, handlers request.Handler cfg, metadata.ClientInfo{ ServiceName: "inputservice4protocoltest", + ServiceID: "InputService4ProtocolTest", SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, @@ -623,19 +638,18 @@ const opInputService4TestCaseOperation1 = "OperationName" // InputService4TestCaseOperation1Request generates a "aws/request.Request" representing the // client's request for the InputService4TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See InputService4TestCaseOperation1 for usage and error information. +// See InputService4TestCaseOperation1 for more information on using the InputService4TestCaseOperation1 +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService4TestCaseOperation1 method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the InputService4TestCaseOperation1Request method. // req, resp := client.InputService4TestCaseOperation1Request(params) @@ -707,8 +721,12 @@ type InputService4TestShapeInputService4TestCaseOperation1Output struct { _ struct{} `type:"structure"` } -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. +// InputService5ProtocolTest provides the API operation methods for making requests to +// . See this package's package overview docs +// for details on the service. +// +// InputService5ProtocolTest methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. type InputService5ProtocolTest struct { *client.Client } @@ -735,6 +753,7 @@ func newInputService5ProtocolTestClient(cfg aws.Config, handlers request.Handler cfg, metadata.ClientInfo{ ServiceName: "inputservice5protocoltest", + ServiceID: "InputService5ProtocolTest", SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, @@ -768,19 +787,18 @@ const opInputService5TestCaseOperation1 = "OperationName" // InputService5TestCaseOperation1Request generates a "aws/request.Request" representing the // client's request for the InputService5TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See InputService5TestCaseOperation1 for usage and error information. +// See InputService5TestCaseOperation1 for more information on using the InputService5TestCaseOperation1 +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService5TestCaseOperation1 method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the InputService5TestCaseOperation1Request method. // req, resp := client.InputService5TestCaseOperation1Request(params) @@ -839,19 +857,18 @@ const opInputService5TestCaseOperation2 = "OperationName" // InputService5TestCaseOperation2Request generates a "aws/request.Request" representing the // client's request for the InputService5TestCaseOperation2 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. // -// See InputService5TestCaseOperation2 for usage and error information. +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService5TestCaseOperation2 method directly -// instead. +// See InputService5TestCaseOperation2 for more information on using the InputService5TestCaseOperation2 +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the InputService5TestCaseOperation2Request method. // req, resp := client.InputService5TestCaseOperation2Request(params) @@ -910,19 +927,18 @@ const opInputService5TestCaseOperation3 = "OperationName" // InputService5TestCaseOperation3Request generates a "aws/request.Request" representing the // client's request for the InputService5TestCaseOperation3 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See InputService5TestCaseOperation3 for usage and error information. +// See InputService5TestCaseOperation3 for more information on using the InputService5TestCaseOperation3 +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService5TestCaseOperation3 method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the InputService5TestCaseOperation3Request method. // req, resp := client.InputService5TestCaseOperation3Request(params) @@ -981,19 +997,18 @@ const opInputService5TestCaseOperation4 = "OperationName" // InputService5TestCaseOperation4Request generates a "aws/request.Request" representing the // client's request for the InputService5TestCaseOperation4 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. // -// See InputService5TestCaseOperation4 for usage and error information. +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService5TestCaseOperation4 method directly -// instead. +// See InputService5TestCaseOperation4 for more information on using the InputService5TestCaseOperation4 +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the InputService5TestCaseOperation4Request method. // req, resp := client.InputService5TestCaseOperation4Request(params) @@ -1052,19 +1067,18 @@ const opInputService5TestCaseOperation5 = "OperationName" // InputService5TestCaseOperation5Request generates a "aws/request.Request" representing the // client's request for the InputService5TestCaseOperation5 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See InputService5TestCaseOperation5 for usage and error information. +// See InputService5TestCaseOperation5 for more information on using the InputService5TestCaseOperation5 +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService5TestCaseOperation5 method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the InputService5TestCaseOperation5Request method. // req, resp := client.InputService5TestCaseOperation5Request(params) @@ -1123,19 +1137,18 @@ const opInputService5TestCaseOperation6 = "OperationName" // InputService5TestCaseOperation6Request generates a "aws/request.Request" representing the // client's request for the InputService5TestCaseOperation6 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. // -// See InputService5TestCaseOperation6 for usage and error information. +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService5TestCaseOperation6 method directly -// instead. +// See InputService5TestCaseOperation6 for more information on using the InputService5TestCaseOperation6 +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the InputService5TestCaseOperation6Request method. // req, resp := client.InputService5TestCaseOperation6Request(params) @@ -1262,8 +1275,12 @@ func (s *InputService5TestShapeRecursiveStructType) SetRecursiveStruct(v *InputS return s } -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. +// InputService6ProtocolTest provides the API operation methods for making requests to +// . See this package's package overview docs +// for details on the service. +// +// InputService6ProtocolTest methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. type InputService6ProtocolTest struct { *client.Client } @@ -1290,6 +1307,7 @@ func newInputService6ProtocolTestClient(cfg aws.Config, handlers request.Handler cfg, metadata.ClientInfo{ ServiceName: "inputservice6protocoltest", + ServiceID: "InputService6ProtocolTest", SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, @@ -1323,19 +1341,18 @@ const opInputService6TestCaseOperation1 = "OperationName" // InputService6TestCaseOperation1Request generates a "aws/request.Request" representing the // client's request for the InputService6TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. // -// See InputService6TestCaseOperation1 for usage and error information. +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService6TestCaseOperation1 method directly -// instead. +// See InputService6TestCaseOperation1 for more information on using the InputService6TestCaseOperation1 +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the InputService6TestCaseOperation1Request method. // req, resp := client.InputService6TestCaseOperation1Request(params) @@ -1407,8 +1424,12 @@ type InputService6TestShapeInputService6TestCaseOperation1Output struct { _ struct{} `type:"structure"` } -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. +// InputService7ProtocolTest provides the API operation methods for making requests to +// . See this package's package overview docs +// for details on the service. +// +// InputService7ProtocolTest methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. type InputService7ProtocolTest struct { *client.Client } @@ -1435,6 +1456,7 @@ func newInputService7ProtocolTestClient(cfg aws.Config, handlers request.Handler cfg, metadata.ClientInfo{ ServiceName: "inputservice7protocoltest", + ServiceID: "InputService7ProtocolTest", SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, @@ -1466,19 +1488,18 @@ const opInputService7TestCaseOperation1 = "OperationName" // InputService7TestCaseOperation1Request generates a "aws/request.Request" representing the // client's request for the InputService7TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. // -// See InputService7TestCaseOperation1 for usage and error information. +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService7TestCaseOperation1 method directly -// instead. +// See InputService7TestCaseOperation1 for more information on using the InputService7TestCaseOperation1 +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the InputService7TestCaseOperation1Request method. // req, resp := client.InputService7TestCaseOperation1Request(params) @@ -1538,19 +1559,18 @@ const opInputService7TestCaseOperation2 = "OperationName" // InputService7TestCaseOperation2Request generates a "aws/request.Request" representing the // client's request for the InputService7TestCaseOperation2 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See InputService7TestCaseOperation2 for usage and error information. +// See InputService7TestCaseOperation2 for more information on using the InputService7TestCaseOperation2 +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService7TestCaseOperation2 method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the InputService7TestCaseOperation2Request method. // req, resp := client.InputService7TestCaseOperation2Request(params) @@ -1626,6 +1646,244 @@ type InputService7TestShapeInputService7TestCaseOperation2Output struct { _ struct{} `type:"structure"` } +// InputService8ProtocolTest provides the API operation methods for making requests to +// . See this package's package overview docs +// for details on the service. +// +// InputService8ProtocolTest methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type InputService8ProtocolTest struct { + *client.Client +} + +// New creates a new instance of the InputService8ProtocolTest client with a session. +// If additional configuration is needed for the client instance use the optional +// aws.Config parameter to add your extra config. +// +// Example: +// // Create a InputService8ProtocolTest client from just a session. +// svc := inputservice8protocoltest.New(mySession) +// +// // Create a InputService8ProtocolTest client with additional configuration +// svc := inputservice8protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func NewInputService8ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService8ProtocolTest { + c := p.ClientConfig("inputservice8protocoltest", cfgs...) + return newInputService8ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) +} + +// newClient creates, initializes and returns a new service client instance. +func newInputService8ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService8ProtocolTest { + svc := &InputService8ProtocolTest{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: "inputservice8protocoltest", + ServiceID: "InputService8ProtocolTest", + SigningName: signingName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "2014-01-01", + }, + handlers, + ), + } + + // Handlers + svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) + svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) + svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) + svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) + svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) + + return svc +} + +// newRequest creates a new request for a InputService8ProtocolTest operation and runs any +// custom request initialization. +func (c *InputService8ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) + + return req +} + +const opInputService8TestCaseOperation1 = "OperationName" + +// InputService8TestCaseOperation1Request generates a "aws/request.Request" representing the +// client's request for the InputService8TestCaseOperation1 operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See InputService8TestCaseOperation1 for more information on using the InputService8TestCaseOperation1 +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the InputService8TestCaseOperation1Request method. +// req, resp := client.InputService8TestCaseOperation1Request(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *InputService8ProtocolTest) InputService8TestCaseOperation1Request(input *InputService8TestShapeInputService8TestCaseOperation2Input) (req *request.Request, output *InputService8TestShapeInputService8TestCaseOperation1Output) { + op := &request.Operation{ + Name: opInputService8TestCaseOperation1, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &InputService8TestShapeInputService8TestCaseOperation2Input{} + } + + output = &InputService8TestShapeInputService8TestCaseOperation1Output{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// InputService8TestCaseOperation1 API operation for . +// +// 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 +// the error. +// +// See the AWS API reference guide for 's +// API operation InputService8TestCaseOperation1 for usage and error information. +func (c *InputService8ProtocolTest) InputService8TestCaseOperation1(input *InputService8TestShapeInputService8TestCaseOperation2Input) (*InputService8TestShapeInputService8TestCaseOperation1Output, error) { + req, out := c.InputService8TestCaseOperation1Request(input) + return out, req.Send() +} + +// InputService8TestCaseOperation1WithContext is the same as InputService8TestCaseOperation1 with the addition of +// the ability to pass a context and additional request options. +// +// See InputService8TestCaseOperation1 for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *InputService8ProtocolTest) InputService8TestCaseOperation1WithContext(ctx aws.Context, input *InputService8TestShapeInputService8TestCaseOperation2Input, opts ...request.Option) (*InputService8TestShapeInputService8TestCaseOperation1Output, error) { + req, out := c.InputService8TestCaseOperation1Request(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opInputService8TestCaseOperation2 = "OperationName" + +// InputService8TestCaseOperation2Request generates a "aws/request.Request" representing the +// client's request for the InputService8TestCaseOperation2 operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See InputService8TestCaseOperation2 for more information on using the InputService8TestCaseOperation2 +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the InputService8TestCaseOperation2Request method. +// req, resp := client.InputService8TestCaseOperation2Request(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *InputService8ProtocolTest) InputService8TestCaseOperation2Request(input *InputService8TestShapeInputService8TestCaseOperation2Input) (req *request.Request, output *InputService8TestShapeInputService8TestCaseOperation2Output) { + op := &request.Operation{ + Name: opInputService8TestCaseOperation2, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &InputService8TestShapeInputService8TestCaseOperation2Input{} + } + + output = &InputService8TestShapeInputService8TestCaseOperation2Output{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// InputService8TestCaseOperation2 API operation for . +// +// 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 +// the error. +// +// See the AWS API reference guide for 's +// API operation InputService8TestCaseOperation2 for usage and error information. +func (c *InputService8ProtocolTest) InputService8TestCaseOperation2(input *InputService8TestShapeInputService8TestCaseOperation2Input) (*InputService8TestShapeInputService8TestCaseOperation2Output, error) { + req, out := c.InputService8TestCaseOperation2Request(input) + return out, req.Send() +} + +// InputService8TestCaseOperation2WithContext is the same as InputService8TestCaseOperation2 with the addition of +// the ability to pass a context and additional request options. +// +// See InputService8TestCaseOperation2 for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *InputService8ProtocolTest) InputService8TestCaseOperation2WithContext(ctx aws.Context, input *InputService8TestShapeInputService8TestCaseOperation2Input, opts ...request.Option) (*InputService8TestShapeInputService8TestCaseOperation2Output, error) { + req, out := c.InputService8TestCaseOperation2Request(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +type InputService8TestShapeInputService8TestCaseOperation1Output struct { + _ struct{} `type:"structure"` +} + +type InputService8TestShapeInputService8TestCaseOperation2Input struct { + _ struct{} `type:"structure"` + + FooEnum *string `type:"string" enum:"InputService8TestShapeEnumType"` + + ListEnums []*string `type:"list"` +} + +// SetFooEnum sets the FooEnum field's value. +func (s *InputService8TestShapeInputService8TestCaseOperation2Input) SetFooEnum(v string) *InputService8TestShapeInputService8TestCaseOperation2Input { + s.FooEnum = &v + return s +} + +// SetListEnums sets the ListEnums field's value. +func (s *InputService8TestShapeInputService8TestCaseOperation2Input) SetListEnums(v []*string) *InputService8TestShapeInputService8TestCaseOperation2Input { + s.ListEnums = v + return s +} + +type InputService8TestShapeInputService8TestCaseOperation2Output struct { + _ struct{} `type:"structure"` +} + +const ( + // EnumTypeFoo is a InputService8TestShapeEnumType enum value + EnumTypeFoo = "foo" + + // EnumTypeBar is a InputService8TestShapeEnumType enum value + EnumTypeBar = "bar" +) + // // Tests begin here // @@ -1640,10 +1898,14 @@ func TestInputService1ProtocolTestScalarMembersCase1(t *testing.T) { // build request jsonrpc.Build(req) - assert.NoError(t, req.Error) + if req.Error != nil { + t.Errorf("expect no error, got %v", req.Error) + } // assert body - assert.NotNil(t, r.Body) + if r.Body == nil { + t.Errorf("expect body not to be nil") + } body, _ := ioutil.ReadAll(r.Body) awstesting.AssertJSON(t, `{"Name":"myname"}`, util.Trim(string(body))) @@ -1651,8 +1913,12 @@ func TestInputService1ProtocolTestScalarMembersCase1(t *testing.T) { awstesting.AssertURL(t, "https://test/", r.URL.String()) // assert headers - assert.Equal(t, "application/x-amz-json-1.1", r.Header.Get("Content-Type")) - assert.Equal(t, "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target")) + if e, a := "application/x-amz-json-1.1", r.Header.Get("Content-Type"); e != a { + t.Errorf("expect %v to be %v", e, a) + } + if e, a := "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target"); e != a { + t.Errorf("expect %v to be %v", e, a) + } } @@ -1666,10 +1932,14 @@ func TestInputService2ProtocolTestTimestampValuesCase1(t *testing.T) { // build request jsonrpc.Build(req) - assert.NoError(t, req.Error) + if req.Error != nil { + t.Errorf("expect no error, got %v", req.Error) + } // assert body - assert.NotNil(t, r.Body) + if r.Body == nil { + t.Errorf("expect body not to be nil") + } body, _ := ioutil.ReadAll(r.Body) awstesting.AssertJSON(t, `{"TimeArg":1422172800}`, util.Trim(string(body))) @@ -1677,8 +1947,12 @@ func TestInputService2ProtocolTestTimestampValuesCase1(t *testing.T) { awstesting.AssertURL(t, "https://test/", r.URL.String()) // assert headers - assert.Equal(t, "application/x-amz-json-1.1", r.Header.Get("Content-Type")) - assert.Equal(t, "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target")) + if e, a := "application/x-amz-json-1.1", r.Header.Get("Content-Type"); e != a { + t.Errorf("expect %v to be %v", e, a) + } + if e, a := "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target"); e != a { + t.Errorf("expect %v to be %v", e, a) + } } @@ -1692,10 +1966,14 @@ func TestInputService3ProtocolTestBase64EncodedBlobsCase1(t *testing.T) { // build request jsonrpc.Build(req) - assert.NoError(t, req.Error) + if req.Error != nil { + t.Errorf("expect no error, got %v", req.Error) + } // assert body - assert.NotNil(t, r.Body) + if r.Body == nil { + t.Errorf("expect body not to be nil") + } body, _ := ioutil.ReadAll(r.Body) awstesting.AssertJSON(t, `{"BlobArg":"Zm9v"}`, util.Trim(string(body))) @@ -1703,8 +1981,12 @@ func TestInputService3ProtocolTestBase64EncodedBlobsCase1(t *testing.T) { awstesting.AssertURL(t, "https://test/", r.URL.String()) // assert headers - assert.Equal(t, "application/x-amz-json-1.1", r.Header.Get("Content-Type")) - assert.Equal(t, "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target")) + if e, a := "application/x-amz-json-1.1", r.Header.Get("Content-Type"); e != a { + t.Errorf("expect %v to be %v", e, a) + } + if e, a := "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target"); e != a { + t.Errorf("expect %v to be %v", e, a) + } } @@ -1721,10 +2003,14 @@ func TestInputService3ProtocolTestBase64EncodedBlobsCase2(t *testing.T) { // build request jsonrpc.Build(req) - assert.NoError(t, req.Error) + if req.Error != nil { + t.Errorf("expect no error, got %v", req.Error) + } // assert body - assert.NotNil(t, r.Body) + if r.Body == nil { + t.Errorf("expect body not to be nil") + } body, _ := ioutil.ReadAll(r.Body) awstesting.AssertJSON(t, `{"BlobMap":{"key1":"Zm9v","key2":"YmFy"}}`, util.Trim(string(body))) @@ -1732,8 +2018,12 @@ func TestInputService3ProtocolTestBase64EncodedBlobsCase2(t *testing.T) { awstesting.AssertURL(t, "https://test/", r.URL.String()) // assert headers - assert.Equal(t, "application/x-amz-json-1.1", r.Header.Get("Content-Type")) - assert.Equal(t, "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target")) + if e, a := "application/x-amz-json-1.1", r.Header.Get("Content-Type"); e != a { + t.Errorf("expect %v to be %v", e, a) + } + if e, a := "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target"); e != a { + t.Errorf("expect %v to be %v", e, a) + } } @@ -1750,10 +2040,14 @@ func TestInputService4ProtocolTestNestedBlobsCase1(t *testing.T) { // build request jsonrpc.Build(req) - assert.NoError(t, req.Error) + if req.Error != nil { + t.Errorf("expect no error, got %v", req.Error) + } // assert body - assert.NotNil(t, r.Body) + if r.Body == nil { + t.Errorf("expect body not to be nil") + } body, _ := ioutil.ReadAll(r.Body) awstesting.AssertJSON(t, `{"ListParam":["Zm9v","YmFy"]}`, util.Trim(string(body))) @@ -1761,8 +2055,12 @@ func TestInputService4ProtocolTestNestedBlobsCase1(t *testing.T) { awstesting.AssertURL(t, "https://test/", r.URL.String()) // assert headers - assert.Equal(t, "application/x-amz-json-1.1", r.Header.Get("Content-Type")) - assert.Equal(t, "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target")) + if e, a := "application/x-amz-json-1.1", r.Header.Get("Content-Type"); e != a { + t.Errorf("expect %v to be %v", e, a) + } + if e, a := "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target"); e != a { + t.Errorf("expect %v to be %v", e, a) + } } @@ -1778,10 +2076,14 @@ func TestInputService5ProtocolTestRecursiveShapesCase1(t *testing.T) { // build request jsonrpc.Build(req) - assert.NoError(t, req.Error) + if req.Error != nil { + t.Errorf("expect no error, got %v", req.Error) + } // assert body - assert.NotNil(t, r.Body) + if r.Body == nil { + t.Errorf("expect body not to be nil") + } body, _ := ioutil.ReadAll(r.Body) awstesting.AssertJSON(t, `{"RecursiveStruct":{"NoRecurse":"foo"}}`, util.Trim(string(body))) @@ -1789,8 +2091,12 @@ func TestInputService5ProtocolTestRecursiveShapesCase1(t *testing.T) { awstesting.AssertURL(t, "https://test/", r.URL.String()) // assert headers - assert.Equal(t, "application/x-amz-json-1.1", r.Header.Get("Content-Type")) - assert.Equal(t, "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target")) + if e, a := "application/x-amz-json-1.1", r.Header.Get("Content-Type"); e != a { + t.Errorf("expect %v to be %v", e, a) + } + if e, a := "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target"); e != a { + t.Errorf("expect %v to be %v", e, a) + } } @@ -1808,10 +2114,14 @@ func TestInputService5ProtocolTestRecursiveShapesCase2(t *testing.T) { // build request jsonrpc.Build(req) - assert.NoError(t, req.Error) + if req.Error != nil { + t.Errorf("expect no error, got %v", req.Error) + } // assert body - assert.NotNil(t, r.Body) + if r.Body == nil { + t.Errorf("expect body not to be nil") + } body, _ := ioutil.ReadAll(r.Body) awstesting.AssertJSON(t, `{"RecursiveStruct":{"RecursiveStruct":{"NoRecurse":"foo"}}}`, util.Trim(string(body))) @@ -1819,8 +2129,12 @@ func TestInputService5ProtocolTestRecursiveShapesCase2(t *testing.T) { awstesting.AssertURL(t, "https://test/", r.URL.String()) // assert headers - assert.Equal(t, "application/x-amz-json-1.1", r.Header.Get("Content-Type")) - assert.Equal(t, "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target")) + if e, a := "application/x-amz-json-1.1", r.Header.Get("Content-Type"); e != a { + t.Errorf("expect %v to be %v", e, a) + } + if e, a := "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target"); e != a { + t.Errorf("expect %v to be %v", e, a) + } } @@ -1842,10 +2156,14 @@ func TestInputService5ProtocolTestRecursiveShapesCase3(t *testing.T) { // build request jsonrpc.Build(req) - assert.NoError(t, req.Error) + if req.Error != nil { + t.Errorf("expect no error, got %v", req.Error) + } // assert body - assert.NotNil(t, r.Body) + if r.Body == nil { + t.Errorf("expect body not to be nil") + } body, _ := ioutil.ReadAll(r.Body) awstesting.AssertJSON(t, `{"RecursiveStruct":{"RecursiveStruct":{"RecursiveStruct":{"RecursiveStruct":{"NoRecurse":"foo"}}}}}`, util.Trim(string(body))) @@ -1853,8 +2171,12 @@ func TestInputService5ProtocolTestRecursiveShapesCase3(t *testing.T) { awstesting.AssertURL(t, "https://test/", r.URL.String()) // assert headers - assert.Equal(t, "application/x-amz-json-1.1", r.Header.Get("Content-Type")) - assert.Equal(t, "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target")) + if e, a := "application/x-amz-json-1.1", r.Header.Get("Content-Type"); e != a { + t.Errorf("expect %v to be %v", e, a) + } + if e, a := "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target"); e != a { + t.Errorf("expect %v to be %v", e, a) + } } @@ -1877,10 +2199,14 @@ func TestInputService5ProtocolTestRecursiveShapesCase4(t *testing.T) { // build request jsonrpc.Build(req) - assert.NoError(t, req.Error) + if req.Error != nil { + t.Errorf("expect no error, got %v", req.Error) + } // assert body - assert.NotNil(t, r.Body) + if r.Body == nil { + t.Errorf("expect body not to be nil") + } body, _ := ioutil.ReadAll(r.Body) awstesting.AssertJSON(t, `{"RecursiveStruct":{"RecursiveList":[{"NoRecurse":"foo"},{"NoRecurse":"bar"}]}}`, util.Trim(string(body))) @@ -1888,8 +2214,12 @@ func TestInputService5ProtocolTestRecursiveShapesCase4(t *testing.T) { awstesting.AssertURL(t, "https://test/", r.URL.String()) // assert headers - assert.Equal(t, "application/x-amz-json-1.1", r.Header.Get("Content-Type")) - assert.Equal(t, "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target")) + if e, a := "application/x-amz-json-1.1", r.Header.Get("Content-Type"); e != a { + t.Errorf("expect %v to be %v", e, a) + } + if e, a := "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target"); e != a { + t.Errorf("expect %v to be %v", e, a) + } } @@ -1914,10 +2244,14 @@ func TestInputService5ProtocolTestRecursiveShapesCase5(t *testing.T) { // build request jsonrpc.Build(req) - assert.NoError(t, req.Error) + if req.Error != nil { + t.Errorf("expect no error, got %v", req.Error) + } // assert body - assert.NotNil(t, r.Body) + if r.Body == nil { + t.Errorf("expect body not to be nil") + } body, _ := ioutil.ReadAll(r.Body) awstesting.AssertJSON(t, `{"RecursiveStruct":{"RecursiveList":[{"NoRecurse":"foo"},{"RecursiveStruct":{"NoRecurse":"bar"}}]}}`, util.Trim(string(body))) @@ -1925,8 +2259,12 @@ func TestInputService5ProtocolTestRecursiveShapesCase5(t *testing.T) { awstesting.AssertURL(t, "https://test/", r.URL.String()) // assert headers - assert.Equal(t, "application/x-amz-json-1.1", r.Header.Get("Content-Type")) - assert.Equal(t, "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target")) + if e, a := "application/x-amz-json-1.1", r.Header.Get("Content-Type"); e != a { + t.Errorf("expect %v to be %v", e, a) + } + if e, a := "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target"); e != a { + t.Errorf("expect %v to be %v", e, a) + } } @@ -1949,10 +2287,14 @@ func TestInputService5ProtocolTestRecursiveShapesCase6(t *testing.T) { // build request jsonrpc.Build(req) - assert.NoError(t, req.Error) + if req.Error != nil { + t.Errorf("expect no error, got %v", req.Error) + } // assert body - assert.NotNil(t, r.Body) + if r.Body == nil { + t.Errorf("expect body not to be nil") + } body, _ := ioutil.ReadAll(r.Body) awstesting.AssertJSON(t, `{"RecursiveStruct":{"RecursiveMap":{"foo":{"NoRecurse":"foo"},"bar":{"NoRecurse":"bar"}}}}`, util.Trim(string(body))) @@ -1960,8 +2302,12 @@ func TestInputService5ProtocolTestRecursiveShapesCase6(t *testing.T) { awstesting.AssertURL(t, "https://test/", r.URL.String()) // assert headers - assert.Equal(t, "application/x-amz-json-1.1", r.Header.Get("Content-Type")) - assert.Equal(t, "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target")) + if e, a := "application/x-amz-json-1.1", r.Header.Get("Content-Type"); e != a { + t.Errorf("expect %v to be %v", e, a) + } + if e, a := "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target"); e != a { + t.Errorf("expect %v to be %v", e, a) + } } @@ -1975,10 +2321,14 @@ func TestInputService6ProtocolTestEmptyMapsCase1(t *testing.T) { // build request jsonrpc.Build(req) - assert.NoError(t, req.Error) + if req.Error != nil { + t.Errorf("expect no error, got %v", req.Error) + } // assert body - assert.NotNil(t, r.Body) + if r.Body == nil { + t.Errorf("expect body not to be nil") + } body, _ := ioutil.ReadAll(r.Body) awstesting.AssertJSON(t, `{"Map":{}}`, util.Trim(string(body))) @@ -1986,8 +2336,12 @@ func TestInputService6ProtocolTestEmptyMapsCase1(t *testing.T) { awstesting.AssertURL(t, "https://test/", r.URL.String()) // assert headers - assert.Equal(t, "application/x-amz-json-1.1", r.Header.Get("Content-Type")) - assert.Equal(t, "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target")) + if e, a := "application/x-amz-json-1.1", r.Header.Get("Content-Type"); e != a { + t.Errorf("expect %v to be %v", e, a) + } + if e, a := "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target"); e != a { + t.Errorf("expect %v to be %v", e, a) + } } @@ -2001,10 +2355,14 @@ func TestInputService7ProtocolTestIdempotencyTokenAutoFillCase1(t *testing.T) { // build request jsonrpc.Build(req) - assert.NoError(t, req.Error) + if req.Error != nil { + t.Errorf("expect no error, got %v", req.Error) + } // assert body - assert.NotNil(t, r.Body) + if r.Body == nil { + t.Errorf("expect body not to be nil") + } body, _ := ioutil.ReadAll(r.Body) awstesting.AssertJSON(t, `{"Token":"abc123"}`, util.Trim(string(body))) @@ -2023,10 +2381,14 @@ func TestInputService7ProtocolTestIdempotencyTokenAutoFillCase2(t *testing.T) { // build request jsonrpc.Build(req) - assert.NoError(t, req.Error) + if req.Error != nil { + t.Errorf("expect no error, got %v", req.Error) + } // assert body - assert.NotNil(t, r.Body) + if r.Body == nil { + t.Errorf("expect body not to be nil") + } body, _ := ioutil.ReadAll(r.Body) awstesting.AssertJSON(t, `{"Token":"00000000-0000-4000-8000-000000000000"}`, util.Trim(string(body))) @@ -2036,3 +2398,55 @@ func TestInputService7ProtocolTestIdempotencyTokenAutoFillCase2(t *testing.T) { // assert headers } + +func TestInputService8ProtocolTestEnumCase1(t *testing.T) { + svc := NewInputService8ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) + input := &InputService8TestShapeInputService8TestCaseOperation2Input{ + FooEnum: aws.String("foo"), + ListEnums: []*string{ + aws.String("foo"), + aws.String(""), + aws.String("bar"), + }, + } + req, _ := svc.InputService8TestCaseOperation1Request(input) + r := req.HTTPRequest + + // build request + jsonrpc.Build(req) + if req.Error != nil { + t.Errorf("expect no error, got %v", req.Error) + } + + // assert body + if r.Body == nil { + t.Errorf("expect body not to be nil") + } + body, _ := ioutil.ReadAll(r.Body) + awstesting.AssertJSON(t, `{"FooEnum":"foo","ListEnums":["foo","","bar"]}`, util.Trim(string(body))) + + // assert URL + awstesting.AssertURL(t, "https://test/", r.URL.String()) + + // assert headers + +} + +func TestInputService8ProtocolTestEnumCase2(t *testing.T) { + svc := NewInputService8ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) + input := &InputService8TestShapeInputService8TestCaseOperation2Input{} + req, _ := svc.InputService8TestCaseOperation2Request(input) + r := req.HTTPRequest + + // build request + jsonrpc.Build(req) + if req.Error != nil { + t.Errorf("expect no error, got %v", req.Error) + } + + // assert URL + awstesting.AssertURL(t, "https://test/", r.URL.String()) + + // assert headers + +} diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/jsonrpc/unmarshal_test.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/jsonrpc/unmarshal_test.go index 7540f02..87f3ca2 100644 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/jsonrpc/unmarshal_test.go +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/jsonrpc/unmarshal_test.go @@ -24,7 +24,6 @@ import ( "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil" "github.com/aws/aws-sdk-go/private/util" - "github.com/stretchr/testify/assert" ) var _ bytes.Buffer // always import bytes @@ -45,8 +44,12 @@ func init() { protocol.RandReader = &awstesting.ZeroReader{} } -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. +// OutputService1ProtocolTest provides the API operation methods for making requests to +// . See this package's package overview docs +// for details on the service. +// +// OutputService1ProtocolTest methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. type OutputService1ProtocolTest struct { *client.Client } @@ -73,6 +76,7 @@ func newOutputService1ProtocolTestClient(cfg aws.Config, handlers request.Handle cfg, metadata.ClientInfo{ ServiceName: "outputservice1protocoltest", + ServiceID: "OutputService1ProtocolTest", SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, @@ -104,19 +108,18 @@ const opOutputService1TestCaseOperation1 = "OperationName" // OutputService1TestCaseOperation1Request generates a "aws/request.Request" representing the // client's request for the OutputService1TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See OutputService1TestCaseOperation1 for usage and error information. +// See OutputService1TestCaseOperation1 for more information on using the OutputService1TestCaseOperation1 +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the OutputService1TestCaseOperation1 method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the OutputService1TestCaseOperation1Request method. // req, resp := client.OutputService1TestCaseOperation1Request(params) @@ -241,8 +244,12 @@ func (s *OutputService1TestShapeOutputService1TestCaseOperation1Output) SetTrueB return s } -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. +// OutputService2ProtocolTest provides the API operation methods for making requests to +// . See this package's package overview docs +// for details on the service. +// +// OutputService2ProtocolTest methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. type OutputService2ProtocolTest struct { *client.Client } @@ -269,6 +276,7 @@ func newOutputService2ProtocolTestClient(cfg aws.Config, handlers request.Handle cfg, metadata.ClientInfo{ ServiceName: "outputservice2protocoltest", + ServiceID: "OutputService2ProtocolTest", SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, @@ -300,19 +308,18 @@ const opOutputService2TestCaseOperation1 = "OperationName" // OutputService2TestCaseOperation1Request generates a "aws/request.Request" representing the // client's request for the OutputService2TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. // -// See OutputService2TestCaseOperation1 for usage and error information. +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the OutputService2TestCaseOperation1 method directly -// instead. +// See OutputService2TestCaseOperation1 for more information on using the OutputService2TestCaseOperation1 +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the OutputService2TestCaseOperation1Request method. // req, resp := client.OutputService2TestCaseOperation1Request(params) @@ -403,8 +410,12 @@ func (s *OutputService2TestShapeOutputService2TestCaseOperation1Output) SetStruc return s } -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. +// OutputService3ProtocolTest provides the API operation methods for making requests to +// . See this package's package overview docs +// for details on the service. +// +// OutputService3ProtocolTest methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. type OutputService3ProtocolTest struct { *client.Client } @@ -431,6 +442,7 @@ func newOutputService3ProtocolTestClient(cfg aws.Config, handlers request.Handle cfg, metadata.ClientInfo{ ServiceName: "outputservice3protocoltest", + ServiceID: "OutputService3ProtocolTest", SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, @@ -462,19 +474,18 @@ const opOutputService3TestCaseOperation1 = "OperationName" // OutputService3TestCaseOperation1Request generates a "aws/request.Request" representing the // client's request for the OutputService3TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See OutputService3TestCaseOperation1 for usage and error information. +// See OutputService3TestCaseOperation1 for more information on using the OutputService3TestCaseOperation1 +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the OutputService3TestCaseOperation1 method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the OutputService3TestCaseOperation1Request method. // req, resp := client.OutputService3TestCaseOperation1Request(params) @@ -563,8 +574,12 @@ func (s *OutputService3TestShapeTimeContainer) SetFoo(v time.Time) *OutputServic return s } -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. +// OutputService4ProtocolTest provides the API operation methods for making requests to +// . See this package's package overview docs +// for details on the service. +// +// OutputService4ProtocolTest methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. type OutputService4ProtocolTest struct { *client.Client } @@ -591,6 +606,7 @@ func newOutputService4ProtocolTestClient(cfg aws.Config, handlers request.Handle cfg, metadata.ClientInfo{ ServiceName: "outputservice4protocoltest", + ServiceID: "OutputService4ProtocolTest", SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, @@ -622,19 +638,18 @@ const opOutputService4TestCaseOperation1 = "OperationName" // OutputService4TestCaseOperation1Request generates a "aws/request.Request" representing the // client's request for the OutputService4TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See OutputService4TestCaseOperation1 for usage and error information. +// See OutputService4TestCaseOperation1 for more information on using the OutputService4TestCaseOperation1 +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the OutputService4TestCaseOperation1 method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the OutputService4TestCaseOperation1Request method. // req, resp := client.OutputService4TestCaseOperation1Request(params) @@ -691,19 +706,18 @@ const opOutputService4TestCaseOperation2 = "OperationName" // OutputService4TestCaseOperation2Request generates a "aws/request.Request" representing the // client's request for the OutputService4TestCaseOperation2 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See OutputService4TestCaseOperation2 for usage and error information. +// See OutputService4TestCaseOperation2 for more information on using the OutputService4TestCaseOperation2 +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the OutputService4TestCaseOperation2 method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the OutputService4TestCaseOperation2Request method. // req, resp := client.OutputService4TestCaseOperation2Request(params) @@ -796,8 +810,12 @@ type OutputService4TestShapeStructType struct { _ struct{} `type:"structure"` } -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. +// OutputService5ProtocolTest provides the API operation methods for making requests to +// . See this package's package overview docs +// for details on the service. +// +// OutputService5ProtocolTest methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. type OutputService5ProtocolTest struct { *client.Client } @@ -824,6 +842,7 @@ func newOutputService5ProtocolTestClient(cfg aws.Config, handlers request.Handle cfg, metadata.ClientInfo{ ServiceName: "outputservice5protocoltest", + ServiceID: "OutputService5ProtocolTest", SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, @@ -855,19 +874,18 @@ const opOutputService5TestCaseOperation1 = "OperationName" // OutputService5TestCaseOperation1Request generates a "aws/request.Request" representing the // client's request for the OutputService5TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See OutputService5TestCaseOperation1 for usage and error information. +// See OutputService5TestCaseOperation1 for more information on using the OutputService5TestCaseOperation1 +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the OutputService5TestCaseOperation1 method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the OutputService5TestCaseOperation1Request method. // req, resp := client.OutputService5TestCaseOperation1Request(params) @@ -936,8 +954,12 @@ func (s *OutputService5TestShapeOutputService5TestCaseOperation1Output) SetMapMe return s } -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. +// OutputService6ProtocolTest provides the API operation methods for making requests to +// . See this package's package overview docs +// for details on the service. +// +// OutputService6ProtocolTest methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. type OutputService6ProtocolTest struct { *client.Client } @@ -964,6 +986,7 @@ func newOutputService6ProtocolTestClient(cfg aws.Config, handlers request.Handle cfg, metadata.ClientInfo{ ServiceName: "outputservice6protocoltest", + ServiceID: "OutputService6ProtocolTest", SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, @@ -995,19 +1018,18 @@ const opOutputService6TestCaseOperation1 = "OperationName" // OutputService6TestCaseOperation1Request generates a "aws/request.Request" representing the // client's request for the OutputService6TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See OutputService6TestCaseOperation1 for usage and error information. +// See OutputService6TestCaseOperation1 for more information on using the OutputService6TestCaseOperation1 +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the OutputService6TestCaseOperation1 method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the OutputService6TestCaseOperation1Request method. // req, resp := client.OutputService6TestCaseOperation1Request(params) @@ -1076,6 +1098,166 @@ func (s *OutputService6TestShapeOutputService6TestCaseOperation1Output) SetStrTy return s } +// OutputService7ProtocolTest provides the API operation methods for making requests to +// . See this package's package overview docs +// for details on the service. +// +// OutputService7ProtocolTest methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type OutputService7ProtocolTest struct { + *client.Client +} + +// New creates a new instance of the OutputService7ProtocolTest client with a session. +// If additional configuration is needed for the client instance use the optional +// aws.Config parameter to add your extra config. +// +// Example: +// // Create a OutputService7ProtocolTest client from just a session. +// svc := outputservice7protocoltest.New(mySession) +// +// // Create a OutputService7ProtocolTest client with additional configuration +// svc := outputservice7protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func NewOutputService7ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService7ProtocolTest { + c := p.ClientConfig("outputservice7protocoltest", cfgs...) + return newOutputService7ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) +} + +// newClient creates, initializes and returns a new service client instance. +func newOutputService7ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *OutputService7ProtocolTest { + svc := &OutputService7ProtocolTest{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: "outputservice7protocoltest", + ServiceID: "OutputService7ProtocolTest", + SigningName: signingName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "", + }, + handlers, + ), + } + + // Handlers + svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) + svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) + svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) + svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) + svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) + + return svc +} + +// newRequest creates a new request for a OutputService7ProtocolTest operation and runs any +// custom request initialization. +func (c *OutputService7ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) + + return req +} + +const opOutputService7TestCaseOperation1 = "OperationName" + +// OutputService7TestCaseOperation1Request generates a "aws/request.Request" representing the +// client's request for the OutputService7TestCaseOperation1 operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See OutputService7TestCaseOperation1 for more information on using the OutputService7TestCaseOperation1 +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the OutputService7TestCaseOperation1Request method. +// req, resp := client.OutputService7TestCaseOperation1Request(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *OutputService7ProtocolTest) OutputService7TestCaseOperation1Request(input *OutputService7TestShapeOutputService7TestCaseOperation1Input) (req *request.Request, output *OutputService7TestShapeOutputService7TestCaseOperation1Output) { + op := &request.Operation{ + Name: opOutputService7TestCaseOperation1, + HTTPPath: "/", + } + + if input == nil { + input = &OutputService7TestShapeOutputService7TestCaseOperation1Input{} + } + + output = &OutputService7TestShapeOutputService7TestCaseOperation1Output{} + req = c.newRequest(op, input, output) + return +} + +// OutputService7TestCaseOperation1 API operation for . +// +// 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 +// the error. +// +// See the AWS API reference guide for 's +// API operation OutputService7TestCaseOperation1 for usage and error information. +func (c *OutputService7ProtocolTest) OutputService7TestCaseOperation1(input *OutputService7TestShapeOutputService7TestCaseOperation1Input) (*OutputService7TestShapeOutputService7TestCaseOperation1Output, error) { + req, out := c.OutputService7TestCaseOperation1Request(input) + return out, req.Send() +} + +// OutputService7TestCaseOperation1WithContext is the same as OutputService7TestCaseOperation1 with the addition of +// the ability to pass a context and additional request options. +// +// See OutputService7TestCaseOperation1 for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *OutputService7ProtocolTest) OutputService7TestCaseOperation1WithContext(ctx aws.Context, input *OutputService7TestShapeOutputService7TestCaseOperation1Input, opts ...request.Option) (*OutputService7TestShapeOutputService7TestCaseOperation1Output, error) { + req, out := c.OutputService7TestCaseOperation1Request(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +type OutputService7TestShapeOutputService7TestCaseOperation1Input struct { + _ struct{} `type:"structure"` +} + +type OutputService7TestShapeOutputService7TestCaseOperation1Output struct { + _ struct{} `type:"structure"` + + FooEnum *string `type:"string" enum:"OutputService7TestShapeJSONEnumType"` + + ListEnums []*string `type:"list"` +} + +// SetFooEnum sets the FooEnum field's value. +func (s *OutputService7TestShapeOutputService7TestCaseOperation1Output) SetFooEnum(v string) *OutputService7TestShapeOutputService7TestCaseOperation1Output { + s.FooEnum = &v + return s +} + +// SetListEnums sets the ListEnums field's value. +func (s *OutputService7TestShapeOutputService7TestCaseOperation1Output) SetListEnums(v []*string) *OutputService7TestShapeOutputService7TestCaseOperation1Output { + s.ListEnums = v + return s +} + +const ( + // JSONEnumTypeFoo is a OutputService7TestShapeJSONEnumType enum value + JSONEnumTypeFoo = "foo" + + // JSONEnumTypeBar is a OutputService7TestShapeJSONEnumType enum value + JSONEnumTypeBar = "bar" +) + // // Tests begin here // @@ -1092,18 +1274,38 @@ func TestOutputService1ProtocolTestScalarMembersCase1(t *testing.T) { // unmarshal response jsonrpc.UnmarshalMeta(req) jsonrpc.Unmarshal(req) - assert.NoError(t, req.Error) + if req.Error != nil { + t.Errorf("expect not error, got %v", req.Error) + } // assert response - assert.NotNil(t, out) // ensure out variable is used - assert.Equal(t, "a", *out.Char) - assert.Equal(t, 1.3, *out.Double) - assert.Equal(t, false, *out.FalseBool) - assert.Equal(t, 1.2, *out.Float) - assert.Equal(t, int64(200), *out.Long) - assert.Equal(t, int64(123), *out.Num) - assert.Equal(t, "myname", *out.Str) - assert.Equal(t, true, *out.TrueBool) + if out == nil { + t.Errorf("expect not to be nil") + } + if e, a := "a", *out.Char; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := 1.3, *out.Double; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := false, *out.FalseBool; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := 1.2, *out.Float; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := int64(200), *out.Long; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := int64(123), *out.Num; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "myname", *out.Str; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := true, *out.TrueBool; e != a { + t.Errorf("expect %v, got %v", e, a) + } } @@ -1119,12 +1321,20 @@ func TestOutputService2ProtocolTestBlobMembersCase1(t *testing.T) { // unmarshal response jsonrpc.UnmarshalMeta(req) jsonrpc.Unmarshal(req) - assert.NoError(t, req.Error) + if req.Error != nil { + t.Errorf("expect not error, got %v", req.Error) + } // assert response - assert.NotNil(t, out) // ensure out variable is used - assert.Equal(t, "hi!", string(out.BlobMember)) - assert.Equal(t, "there!", string(out.StructMember.Foo)) + if out == nil { + t.Errorf("expect not to be nil") + } + if e, a := "hi!", string(out.BlobMember); e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "there!", string(out.StructMember.Foo); e != a { + t.Errorf("expect %v, got %v", e, a) + } } @@ -1140,12 +1350,20 @@ func TestOutputService3ProtocolTestTimestampMembersCase1(t *testing.T) { // unmarshal response jsonrpc.UnmarshalMeta(req) jsonrpc.Unmarshal(req) - assert.NoError(t, req.Error) + if req.Error != nil { + t.Errorf("expect not error, got %v", req.Error) + } // assert response - assert.NotNil(t, out) // ensure out variable is used - assert.Equal(t, time.Unix(1.398796238e+09, 0).UTC().String(), out.StructMember.Foo.String()) - assert.Equal(t, time.Unix(1.398796238e+09, 0).UTC().String(), out.TimeMember.String()) + if out == nil { + t.Errorf("expect not to be nil") + } + if e, a := time.Unix(1.398796238e+09, 0).UTC().String(), out.StructMember.Foo.UTC().String(); e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := time.Unix(1.398796238e+09, 0).UTC().String(), out.TimeMember.UTC().String(); e != a { + t.Errorf("expect %v, got %v", e, a) + } } @@ -1161,12 +1379,20 @@ func TestOutputService4ProtocolTestListsCase1(t *testing.T) { // unmarshal response jsonrpc.UnmarshalMeta(req) jsonrpc.Unmarshal(req) - assert.NoError(t, req.Error) + if req.Error != nil { + t.Errorf("expect not error, got %v", req.Error) + } // assert response - assert.NotNil(t, out) // ensure out variable is used - assert.Equal(t, "a", *out.ListMember[0]) - assert.Equal(t, "b", *out.ListMember[1]) + if out == nil { + t.Errorf("expect not to be nil") + } + if e, a := "a", *out.ListMember[0]; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "b", *out.ListMember[1]; e != a { + t.Errorf("expect %v, got %v", e, a) + } } @@ -1182,16 +1408,32 @@ func TestOutputService4ProtocolTestListsCase2(t *testing.T) { // unmarshal response jsonrpc.UnmarshalMeta(req) jsonrpc.Unmarshal(req) - assert.NoError(t, req.Error) + if req.Error != nil { + t.Errorf("expect not error, got %v", req.Error) + } // assert response - assert.NotNil(t, out) // ensure out variable is used - assert.Equal(t, "a", *out.ListMember[0]) - assert.Nil(t, out.ListMember[1]) - assert.Nil(t, out.ListMemberMap[1]) - assert.Nil(t, out.ListMemberMap[2]) - assert.Nil(t, out.ListMemberStruct[1]) - assert.Nil(t, out.ListMemberStruct[2]) + if out == nil { + t.Errorf("expect not to be nil") + } + if e, a := "a", *out.ListMember[0]; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e := out.ListMember[1]; e != nil { + t.Errorf("expect nil, got %v", e) + } + if e := out.ListMemberMap[1]; e != nil { + t.Errorf("expect nil, got %v", e) + } + if e := out.ListMemberMap[2]; e != nil { + t.Errorf("expect nil, got %v", e) + } + if e := out.ListMemberStruct[1]; e != nil { + t.Errorf("expect nil, got %v", e) + } + if e := out.ListMemberStruct[2]; e != nil { + t.Errorf("expect nil, got %v", e) + } } @@ -1207,14 +1449,26 @@ func TestOutputService5ProtocolTestMapsCase1(t *testing.T) { // unmarshal response jsonrpc.UnmarshalMeta(req) jsonrpc.Unmarshal(req) - assert.NoError(t, req.Error) + if req.Error != nil { + t.Errorf("expect not error, got %v", req.Error) + } // assert response - assert.NotNil(t, out) // ensure out variable is used - assert.Equal(t, int64(1), *out.MapMember["a"][0]) - assert.Equal(t, int64(2), *out.MapMember["a"][1]) - assert.Equal(t, int64(3), *out.MapMember["b"][0]) - assert.Equal(t, int64(4), *out.MapMember["b"][1]) + if out == nil { + t.Errorf("expect not to be nil") + } + if e, a := int64(1), *out.MapMember["a"][0]; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := int64(2), *out.MapMember["a"][1]; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := int64(3), *out.MapMember["b"][0]; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := int64(4), *out.MapMember["b"][1]; e != a { + t.Errorf("expect %v, got %v", e, a) + } } @@ -1230,9 +1484,45 @@ func TestOutputService6ProtocolTestIgnoresExtraDataCase1(t *testing.T) { // unmarshal response jsonrpc.UnmarshalMeta(req) jsonrpc.Unmarshal(req) - assert.NoError(t, req.Error) + if req.Error != nil { + t.Errorf("expect not error, got %v", req.Error) + } // assert response - assert.NotNil(t, out) // ensure out variable is used + if out == nil { + t.Errorf("expect not to be nil") + } + +} + +func TestOutputService7ProtocolTestEnumOutputCase1(t *testing.T) { + svc := NewOutputService7ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) + + buf := bytes.NewReader([]byte("{\"FooEnum\": \"foo\", \"ListEnums\": [\"foo\", \"bar\"]}")) + req, out := svc.OutputService7TestCaseOperation1Request(nil) + req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} + + // set headers + + // unmarshal response + jsonrpc.UnmarshalMeta(req) + jsonrpc.Unmarshal(req) + if req.Error != nil { + t.Errorf("expect not error, got %v", req.Error) + } + + // assert response + if out == nil { + t.Errorf("expect not to be nil") + } + if e, a := "foo", *out.FooEnum; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "foo", *out.ListEnums[0]; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "bar", *out.ListEnums[1]; e != a { + t.Errorf("expect %v, got %v", e, a) + } } diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/jsonvalue.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/jsonvalue.go new file mode 100644 index 0000000..776d110 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/jsonvalue.go @@ -0,0 +1,76 @@ +package protocol + +import ( + "encoding/base64" + "encoding/json" + "fmt" + "strconv" + + "github.com/aws/aws-sdk-go/aws" +) + +// EscapeMode is the mode that should be use for escaping a value +type EscapeMode uint + +// The modes for escaping a value before it is marshaled, and unmarshaled. +const ( + NoEscape EscapeMode = iota + Base64Escape + QuotedEscape +) + +// EncodeJSONValue marshals the value into a JSON string, and optionally base64 +// encodes the string before returning it. +// +// Will panic if the escape mode is unknown. +func EncodeJSONValue(v aws.JSONValue, escape EscapeMode) (string, error) { + b, err := json.Marshal(v) + if err != nil { + return "", err + } + + switch escape { + case NoEscape: + return string(b), nil + case Base64Escape: + return base64.StdEncoding.EncodeToString(b), nil + case QuotedEscape: + return strconv.Quote(string(b)), nil + } + + panic(fmt.Sprintf("EncodeJSONValue called with unknown EscapeMode, %v", escape)) +} + +// DecodeJSONValue will attempt to decode the string input as a JSONValue. +// Optionally decoding base64 the value first before JSON unmarshaling. +// +// Will panic if the escape mode is unknown. +func DecodeJSONValue(v string, escape EscapeMode) (aws.JSONValue, error) { + var b []byte + var err error + + switch escape { + case NoEscape: + b = []byte(v) + case Base64Escape: + b, err = base64.StdEncoding.DecodeString(v) + case QuotedEscape: + var u string + u, err = strconv.Unquote(v) + b = []byte(u) + default: + panic(fmt.Sprintf("DecodeJSONValue called with unknown EscapeMode, %v", escape)) + } + + if err != nil { + return nil, err + } + + m := aws.JSONValue{} + err = json.Unmarshal(b, &m) + if err != nil { + return nil, err + } + + return m, nil +} diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/jsonvalue_test.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/jsonvalue_test.go new file mode 100644 index 0000000..66a3c8c --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/jsonvalue_test.go @@ -0,0 +1,93 @@ +package protocol + +import ( + "fmt" + "reflect" + "strings" + "testing" + + "github.com/aws/aws-sdk-go/aws" +) + +var testJSONValueCases = []struct { + Value aws.JSONValue + Mode EscapeMode + String string +}{ + { + Value: aws.JSONValue{ + "abc": 123., + }, + Mode: NoEscape, + String: `{"abc":123}`, + }, + { + Value: aws.JSONValue{ + "abc": 123., + }, + Mode: Base64Escape, + String: `eyJhYmMiOjEyM30=`, + }, + { + Value: aws.JSONValue{ + "abc": 123., + }, + Mode: QuotedEscape, + String: `"{\"abc\":123}"`, + }, +} + +func TestEncodeJSONValue(t *testing.T) { + for i, c := range testJSONValueCases { + str, err := EncodeJSONValue(c.Value, c.Mode) + if err != nil { + t.Fatalf("%d, expect no error, got %v", i, err) + } + if e, a := c.String, str; e != a { + t.Errorf("%d, expect %v encoded value, got %v", i, e, a) + } + } +} + +func TestDecodeJSONValue(t *testing.T) { + for i, c := range testJSONValueCases { + val, err := DecodeJSONValue(c.String, c.Mode) + if err != nil { + t.Fatalf("%d, expect no error, got %v", i, err) + } + if e, a := c.Value, val; !reflect.DeepEqual(e, a) { + t.Errorf("%d, expect %v encoded value, got %v", i, e, a) + } + } +} + +func TestEncodeJSONValue_PanicUnkownMode(t *testing.T) { + defer func() { + if r := recover(); r == nil { + t.Errorf("expect panic, got none") + } else { + reason := fmt.Sprintf("%v", r) + if e, a := "unknown EscapeMode", reason; !strings.Contains(a, e) { + t.Errorf("expect %q to be in %v", e, a) + } + } + }() + + val := aws.JSONValue{} + + EncodeJSONValue(val, 123456) +} +func TestDecodeJSONValue_PanicUnkownMode(t *testing.T) { + defer func() { + if r := recover(); r == nil { + t.Errorf("expect panic, got none") + } else { + reason := fmt.Sprintf("%v", r) + if e, a := "unknown EscapeMode", reason; !strings.Contains(a, e) { + t.Errorf("expect %q to be in %v", e, a) + } + } + }() + + DecodeJSONValue(`{"abc":123}`, 123456) +} diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/payload.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/payload.go new file mode 100644 index 0000000..e21614a --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/payload.go @@ -0,0 +1,81 @@ +package protocol + +import ( + "io" + "io/ioutil" + "net/http" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/client/metadata" + "github.com/aws/aws-sdk-go/aws/request" +) + +// PayloadUnmarshaler provides the interface for unmarshaling a payload's +// reader into a SDK shape. +type PayloadUnmarshaler interface { + UnmarshalPayload(io.Reader, interface{}) error +} + +// HandlerPayloadUnmarshal implements the PayloadUnmarshaler from a +// HandlerList. This provides the support for unmarshaling a payload reader to +// a shape without needing a SDK request first. +type HandlerPayloadUnmarshal struct { + Unmarshalers request.HandlerList +} + +// UnmarshalPayload unmarshals the io.Reader payload into the SDK shape using +// the Unmarshalers HandlerList provided. Returns an error if unable +// unmarshaling fails. +func (h HandlerPayloadUnmarshal) UnmarshalPayload(r io.Reader, v interface{}) error { + req := &request.Request{ + HTTPRequest: &http.Request{}, + HTTPResponse: &http.Response{ + StatusCode: 200, + Header: http.Header{}, + Body: ioutil.NopCloser(r), + }, + Data: v, + } + + h.Unmarshalers.Run(req) + + return req.Error +} + +// PayloadMarshaler provides the interface for marshaling a SDK shape into and +// io.Writer. +type PayloadMarshaler interface { + MarshalPayload(io.Writer, interface{}) error +} + +// HandlerPayloadMarshal implements the PayloadMarshaler from a HandlerList. +// This provides support for marshaling a SDK shape into an io.Writer without +// needing a SDK request first. +type HandlerPayloadMarshal struct { + Marshalers request.HandlerList +} + +// MarshalPayload marshals the SDK shape into the io.Writer using the +// Marshalers HandlerList provided. Returns an error if unable if marshal +// fails. +func (h HandlerPayloadMarshal) MarshalPayload(w io.Writer, v interface{}) error { + req := request.New( + aws.Config{}, + metadata.ClientInfo{}, + request.Handlers{}, + nil, + &request.Operation{HTTPMethod: "GET"}, + v, + nil, + ) + + h.Marshalers.Run(req) + + if req.Error != nil { + return req.Error + } + + io.Copy(w, req.GetBody()) + + return nil +} diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/query/build.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/query/build.go index 18169f0..60e5b09 100644 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/query/build.go +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/query/build.go @@ -25,7 +25,7 @@ func Build(r *request.Request) { return } - if r.ExpireTime == 0 { + if !r.IsPresigned() { r.HTTPRequest.Method = "POST" r.HTTPRequest.Header.Set("Content-Type", "application/x-www-form-urlencoded; charset=utf-8") r.SetBufferBody([]byte(body.Encode())) diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/query/build_test.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/query/build_test.go index dd5ffea..da3a775 100644 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/query/build_test.go +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/query/build_test.go @@ -24,7 +24,6 @@ import ( "github.com/aws/aws-sdk-go/private/protocol/query" "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil" "github.com/aws/aws-sdk-go/private/util" - "github.com/stretchr/testify/assert" ) var _ bytes.Buffer // always import bytes @@ -45,8 +44,12 @@ func init() { protocol.RandReader = &awstesting.ZeroReader{} } -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. +// InputService1ProtocolTest provides the API operation methods for making requests to +// . See this package's package overview docs +// for details on the service. +// +// InputService1ProtocolTest methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. type InputService1ProtocolTest struct { *client.Client } @@ -73,6 +76,7 @@ func newInputService1ProtocolTestClient(cfg aws.Config, handlers request.Handler cfg, metadata.ClientInfo{ ServiceName: "inputservice1protocoltest", + ServiceID: "InputService1ProtocolTest", SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, @@ -104,19 +108,18 @@ const opInputService1TestCaseOperation1 = "OperationName" // InputService1TestCaseOperation1Request generates a "aws/request.Request" representing the // client's request for the InputService1TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See InputService1TestCaseOperation1 for usage and error information. +// See InputService1TestCaseOperation1 for more information on using the InputService1TestCaseOperation1 +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService1TestCaseOperation1 method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the InputService1TestCaseOperation1Request method. // req, resp := client.InputService1TestCaseOperation1Request(params) @@ -175,19 +178,18 @@ const opInputService1TestCaseOperation2 = "OperationName" // InputService1TestCaseOperation2Request generates a "aws/request.Request" representing the // client's request for the InputService1TestCaseOperation2 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. // -// See InputService1TestCaseOperation2 for usage and error information. +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService1TestCaseOperation2 method directly -// instead. +// See InputService1TestCaseOperation2 for more information on using the InputService1TestCaseOperation2 +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the InputService1TestCaseOperation2Request method. // req, resp := client.InputService1TestCaseOperation2Request(params) @@ -246,19 +248,18 @@ const opInputService1TestCaseOperation3 = "OperationName" // InputService1TestCaseOperation3Request generates a "aws/request.Request" representing the // client's request for the InputService1TestCaseOperation3 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See InputService1TestCaseOperation3 for usage and error information. +// See InputService1TestCaseOperation3 for more information on using the InputService1TestCaseOperation3 +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService1TestCaseOperation3 method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the InputService1TestCaseOperation3Request method. // req, resp := client.InputService1TestCaseOperation3Request(params) @@ -353,8 +354,12 @@ type InputService1TestShapeInputService1TestCaseOperation3Output struct { _ struct{} `type:"structure"` } -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. +// InputService2ProtocolTest provides the API operation methods for making requests to +// . See this package's package overview docs +// for details on the service. +// +// InputService2ProtocolTest methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. type InputService2ProtocolTest struct { *client.Client } @@ -381,6 +386,7 @@ func newInputService2ProtocolTestClient(cfg aws.Config, handlers request.Handler cfg, metadata.ClientInfo{ ServiceName: "inputservice2protocoltest", + ServiceID: "InputService2ProtocolTest", SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, @@ -412,19 +418,18 @@ const opInputService2TestCaseOperation1 = "OperationName" // InputService2TestCaseOperation1Request generates a "aws/request.Request" representing the // client's request for the InputService2TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See InputService2TestCaseOperation1 for usage and error information. +// See InputService2TestCaseOperation1 for more information on using the InputService2TestCaseOperation1 +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService2TestCaseOperation1 method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the InputService2TestCaseOperation1Request method. // req, resp := client.InputService2TestCaseOperation1Request(params) @@ -507,8 +512,12 @@ func (s *InputService2TestShapeStructType) SetScalarArg(v string) *InputService2 return s } -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. +// InputService3ProtocolTest provides the API operation methods for making requests to +// . See this package's package overview docs +// for details on the service. +// +// InputService3ProtocolTest methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. type InputService3ProtocolTest struct { *client.Client } @@ -535,6 +544,7 @@ func newInputService3ProtocolTestClient(cfg aws.Config, handlers request.Handler cfg, metadata.ClientInfo{ ServiceName: "inputservice3protocoltest", + ServiceID: "InputService3ProtocolTest", SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, @@ -566,19 +576,18 @@ const opInputService3TestCaseOperation1 = "OperationName" // InputService3TestCaseOperation1Request generates a "aws/request.Request" representing the // client's request for the InputService3TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See InputService3TestCaseOperation1 for usage and error information. +// See InputService3TestCaseOperation1 for more information on using the InputService3TestCaseOperation1 +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService3TestCaseOperation1 method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the InputService3TestCaseOperation1Request method. // req, resp := client.InputService3TestCaseOperation1Request(params) @@ -637,19 +646,18 @@ const opInputService3TestCaseOperation2 = "OperationName" // InputService3TestCaseOperation2Request generates a "aws/request.Request" representing the // client's request for the InputService3TestCaseOperation2 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. // -// See InputService3TestCaseOperation2 for usage and error information. +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService3TestCaseOperation2 method directly -// instead. +// See InputService3TestCaseOperation2 for more information on using the InputService3TestCaseOperation2 +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the InputService3TestCaseOperation2Request method. // req, resp := client.InputService3TestCaseOperation2Request(params) @@ -724,8 +732,12 @@ type InputService3TestShapeInputService3TestCaseOperation2Output struct { _ struct{} `type:"structure"` } -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. +// InputService4ProtocolTest provides the API operation methods for making requests to +// . See this package's package overview docs +// for details on the service. +// +// InputService4ProtocolTest methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. type InputService4ProtocolTest struct { *client.Client } @@ -752,6 +764,7 @@ func newInputService4ProtocolTestClient(cfg aws.Config, handlers request.Handler cfg, metadata.ClientInfo{ ServiceName: "inputservice4protocoltest", + ServiceID: "InputService4ProtocolTest", SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, @@ -783,19 +796,18 @@ const opInputService4TestCaseOperation1 = "OperationName" // InputService4TestCaseOperation1Request generates a "aws/request.Request" representing the // client's request for the InputService4TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. // -// See InputService4TestCaseOperation1 for usage and error information. +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService4TestCaseOperation1 method directly -// instead. +// See InputService4TestCaseOperation1 for more information on using the InputService4TestCaseOperation1 +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the InputService4TestCaseOperation1Request method. // req, resp := client.InputService4TestCaseOperation1Request(params) @@ -854,19 +866,18 @@ const opInputService4TestCaseOperation2 = "OperationName" // InputService4TestCaseOperation2Request generates a "aws/request.Request" representing the // client's request for the InputService4TestCaseOperation2 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See InputService4TestCaseOperation2 for usage and error information. +// See InputService4TestCaseOperation2 for more information on using the InputService4TestCaseOperation2 +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService4TestCaseOperation2 method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the InputService4TestCaseOperation2Request method. // req, resp := client.InputService4TestCaseOperation2Request(params) @@ -957,8 +968,12 @@ type InputService4TestShapeInputService4TestCaseOperation2Output struct { _ struct{} `type:"structure"` } -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. +// InputService5ProtocolTest provides the API operation methods for making requests to +// . See this package's package overview docs +// for details on the service. +// +// InputService5ProtocolTest methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. type InputService5ProtocolTest struct { *client.Client } @@ -985,6 +1000,7 @@ func newInputService5ProtocolTestClient(cfg aws.Config, handlers request.Handler cfg, metadata.ClientInfo{ ServiceName: "inputservice5protocoltest", + ServiceID: "InputService5ProtocolTest", SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, @@ -1016,19 +1032,18 @@ const opInputService5TestCaseOperation1 = "OperationName" // InputService5TestCaseOperation1Request generates a "aws/request.Request" representing the // client's request for the InputService5TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See InputService5TestCaseOperation1 for usage and error information. +// See InputService5TestCaseOperation1 for more information on using the InputService5TestCaseOperation1 +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService5TestCaseOperation1 method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the InputService5TestCaseOperation1Request method. // req, resp := client.InputService5TestCaseOperation1Request(params) @@ -1099,8 +1114,12 @@ type InputService5TestShapeInputService5TestCaseOperation1Output struct { _ struct{} `type:"structure"` } -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. +// InputService6ProtocolTest provides the API operation methods for making requests to +// . See this package's package overview docs +// for details on the service. +// +// InputService6ProtocolTest methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. type InputService6ProtocolTest struct { *client.Client } @@ -1127,6 +1146,7 @@ func newInputService6ProtocolTestClient(cfg aws.Config, handlers request.Handler cfg, metadata.ClientInfo{ ServiceName: "inputservice6protocoltest", + ServiceID: "InputService6ProtocolTest", SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, @@ -1158,19 +1178,18 @@ const opInputService6TestCaseOperation1 = "OperationName" // InputService6TestCaseOperation1Request generates a "aws/request.Request" representing the // client's request for the InputService6TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See InputService6TestCaseOperation1 for usage and error information. +// See InputService6TestCaseOperation1 for more information on using the InputService6TestCaseOperation1 +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService6TestCaseOperation1 method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the InputService6TestCaseOperation1Request method. // req, resp := client.InputService6TestCaseOperation1Request(params) @@ -1241,8 +1260,12 @@ type InputService6TestShapeInputService6TestCaseOperation1Output struct { _ struct{} `type:"structure"` } -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. +// InputService7ProtocolTest provides the API operation methods for making requests to +// . See this package's package overview docs +// for details on the service. +// +// InputService7ProtocolTest methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. type InputService7ProtocolTest struct { *client.Client } @@ -1269,6 +1292,7 @@ func newInputService7ProtocolTestClient(cfg aws.Config, handlers request.Handler cfg, metadata.ClientInfo{ ServiceName: "inputservice7protocoltest", + ServiceID: "InputService7ProtocolTest", SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, @@ -1300,19 +1324,18 @@ const opInputService7TestCaseOperation1 = "OperationName" // InputService7TestCaseOperation1Request generates a "aws/request.Request" representing the // client's request for the InputService7TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See InputService7TestCaseOperation1 for usage and error information. +// See InputService7TestCaseOperation1 for more information on using the InputService7TestCaseOperation1 +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService7TestCaseOperation1 method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the InputService7TestCaseOperation1Request method. // req, resp := client.InputService7TestCaseOperation1Request(params) @@ -1391,8 +1414,12 @@ type InputService7TestShapeInputService7TestCaseOperation1Output struct { _ struct{} `type:"structure"` } -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. +// InputService8ProtocolTest provides the API operation methods for making requests to +// . See this package's package overview docs +// for details on the service. +// +// InputService8ProtocolTest methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. type InputService8ProtocolTest struct { *client.Client } @@ -1419,6 +1446,7 @@ func newInputService8ProtocolTestClient(cfg aws.Config, handlers request.Handler cfg, metadata.ClientInfo{ ServiceName: "inputservice8protocoltest", + ServiceID: "InputService8ProtocolTest", SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, @@ -1450,19 +1478,18 @@ const opInputService8TestCaseOperation1 = "OperationName" // InputService8TestCaseOperation1Request generates a "aws/request.Request" representing the // client's request for the InputService8TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See InputService8TestCaseOperation1 for usage and error information. +// See InputService8TestCaseOperation1 for more information on using the InputService8TestCaseOperation1 +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService8TestCaseOperation1 method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the InputService8TestCaseOperation1Request method. // req, resp := client.InputService8TestCaseOperation1Request(params) @@ -1533,8 +1560,12 @@ type InputService8TestShapeInputService8TestCaseOperation1Output struct { _ struct{} `type:"structure"` } -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. +// InputService9ProtocolTest provides the API operation methods for making requests to +// . See this package's package overview docs +// for details on the service. +// +// InputService9ProtocolTest methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. type InputService9ProtocolTest struct { *client.Client } @@ -1561,6 +1592,7 @@ func newInputService9ProtocolTestClient(cfg aws.Config, handlers request.Handler cfg, metadata.ClientInfo{ ServiceName: "inputservice9protocoltest", + ServiceID: "InputService9ProtocolTest", SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, @@ -1592,19 +1624,18 @@ const opInputService9TestCaseOperation1 = "OperationName" // InputService9TestCaseOperation1Request generates a "aws/request.Request" representing the // client's request for the InputService9TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See InputService9TestCaseOperation1 for usage and error information. +// See InputService9TestCaseOperation1 for more information on using the InputService9TestCaseOperation1 +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService9TestCaseOperation1 method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the InputService9TestCaseOperation1Request method. // req, resp := client.InputService9TestCaseOperation1Request(params) @@ -1675,8 +1706,12 @@ type InputService9TestShapeInputService9TestCaseOperation1Output struct { _ struct{} `type:"structure"` } -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. +// InputService10ProtocolTest provides the API operation methods for making requests to +// . See this package's package overview docs +// for details on the service. +// +// InputService10ProtocolTest methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. type InputService10ProtocolTest struct { *client.Client } @@ -1703,6 +1738,7 @@ func newInputService10ProtocolTestClient(cfg aws.Config, handlers request.Handle cfg, metadata.ClientInfo{ ServiceName: "inputservice10protocoltest", + ServiceID: "InputService10ProtocolTest", SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, @@ -1734,19 +1770,18 @@ const opInputService10TestCaseOperation1 = "OperationName" // InputService10TestCaseOperation1Request generates a "aws/request.Request" representing the // client's request for the InputService10TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See InputService10TestCaseOperation1 for usage and error information. +// See InputService10TestCaseOperation1 for more information on using the InputService10TestCaseOperation1 +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService10TestCaseOperation1 method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the InputService10TestCaseOperation1Request method. // req, resp := client.InputService10TestCaseOperation1Request(params) @@ -1818,8 +1853,12 @@ type InputService10TestShapeInputService10TestCaseOperation1Output struct { _ struct{} `type:"structure"` } -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. +// InputService11ProtocolTest provides the API operation methods for making requests to +// . See this package's package overview docs +// for details on the service. +// +// InputService11ProtocolTest methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. type InputService11ProtocolTest struct { *client.Client } @@ -1846,6 +1885,7 @@ func newInputService11ProtocolTestClient(cfg aws.Config, handlers request.Handle cfg, metadata.ClientInfo{ ServiceName: "inputservice11protocoltest", + ServiceID: "InputService11ProtocolTest", SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, @@ -1877,19 +1917,18 @@ const opInputService11TestCaseOperation1 = "OperationName" // InputService11TestCaseOperation1Request generates a "aws/request.Request" representing the // client's request for the InputService11TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See InputService11TestCaseOperation1 for usage and error information. +// See InputService11TestCaseOperation1 for more information on using the InputService11TestCaseOperation1 +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService11TestCaseOperation1 method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the InputService11TestCaseOperation1Request method. // req, resp := client.InputService11TestCaseOperation1Request(params) @@ -1947,12 +1986,12 @@ func (c *InputService11ProtocolTest) InputService11TestCaseOperation1WithContext type InputService11TestShapeInputService11TestCaseOperation1Input struct { _ struct{} `type:"structure"` - TimeArg *time.Time `type:"timestamp" timestampFormat:"iso8601"` + BlobArgs [][]byte `type:"list" flattened:"true"` } -// SetTimeArg sets the TimeArg field's value. -func (s *InputService11TestShapeInputService11TestCaseOperation1Input) SetTimeArg(v time.Time) *InputService11TestShapeInputService11TestCaseOperation1Input { - s.TimeArg = &v +// SetBlobArgs sets the BlobArgs field's value. +func (s *InputService11TestShapeInputService11TestCaseOperation1Input) SetBlobArgs(v [][]byte) *InputService11TestShapeInputService11TestCaseOperation1Input { + s.BlobArgs = v return s } @@ -1960,8 +1999,12 @@ type InputService11TestShapeInputService11TestCaseOperation1Output struct { _ struct{} `type:"structure"` } -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. +// InputService12ProtocolTest provides the API operation methods for making requests to +// . See this package's package overview docs +// for details on the service. +// +// InputService12ProtocolTest methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. type InputService12ProtocolTest struct { *client.Client } @@ -1988,6 +2031,7 @@ func newInputService12ProtocolTestClient(cfg aws.Config, handlers request.Handle cfg, metadata.ClientInfo{ ServiceName: "inputservice12protocoltest", + ServiceID: "InputService12ProtocolTest", SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, @@ -2019,19 +2063,18 @@ const opInputService12TestCaseOperation1 = "OperationName" // InputService12TestCaseOperation1Request generates a "aws/request.Request" representing the // client's request for the InputService12TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. // -// See InputService12TestCaseOperation1 for usage and error information. +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService12TestCaseOperation1 method directly -// instead. +// See InputService12TestCaseOperation1 for more information on using the InputService12TestCaseOperation1 +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the InputService12TestCaseOperation1Request method. // req, resp := client.InputService12TestCaseOperation1Request(params) @@ -2040,14 +2083,14 @@ const opInputService12TestCaseOperation1 = "OperationName" // if err == nil { // resp is now filled // fmt.Println(resp) // } -func (c *InputService12ProtocolTest) InputService12TestCaseOperation1Request(input *InputService12TestShapeInputService12TestCaseOperation6Input) (req *request.Request, output *InputService12TestShapeInputService12TestCaseOperation1Output) { +func (c *InputService12ProtocolTest) InputService12TestCaseOperation1Request(input *InputService12TestShapeInputService12TestCaseOperation1Input) (req *request.Request, output *InputService12TestShapeInputService12TestCaseOperation1Output) { op := &request.Operation{ Name: opInputService12TestCaseOperation1, HTTPPath: "/", } if input == nil { - input = &InputService12TestShapeInputService12TestCaseOperation6Input{} + input = &InputService12TestShapeInputService12TestCaseOperation1Input{} } output = &InputService12TestShapeInputService12TestCaseOperation1Output{} @@ -2065,7 +2108,7 @@ func (c *InputService12ProtocolTest) InputService12TestCaseOperation1Request(inp // // See the AWS API reference guide for 's // API operation InputService12TestCaseOperation1 for usage and error information. -func (c *InputService12ProtocolTest) InputService12TestCaseOperation1(input *InputService12TestShapeInputService12TestCaseOperation6Input) (*InputService12TestShapeInputService12TestCaseOperation1Output, error) { +func (c *InputService12ProtocolTest) InputService12TestCaseOperation1(input *InputService12TestShapeInputService12TestCaseOperation1Input) (*InputService12TestShapeInputService12TestCaseOperation1Output, error) { req, out := c.InputService12TestCaseOperation1Request(input) return out, req.Send() } @@ -2079,468 +2122,614 @@ func (c *InputService12ProtocolTest) InputService12TestCaseOperation1(input *Inp // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *InputService12ProtocolTest) InputService12TestCaseOperation1WithContext(ctx aws.Context, input *InputService12TestShapeInputService12TestCaseOperation6Input, opts ...request.Option) (*InputService12TestShapeInputService12TestCaseOperation1Output, error) { +func (c *InputService12ProtocolTest) InputService12TestCaseOperation1WithContext(ctx aws.Context, input *InputService12TestShapeInputService12TestCaseOperation1Input, opts ...request.Option) (*InputService12TestShapeInputService12TestCaseOperation1Output, error) { req, out := c.InputService12TestCaseOperation1Request(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opInputService12TestCaseOperation2 = "OperationName" +type InputService12TestShapeInputService12TestCaseOperation1Input struct { + _ struct{} `type:"structure"` + + TimeArg *time.Time `type:"timestamp" timestampFormat:"iso8601"` +} + +// SetTimeArg sets the TimeArg field's value. +func (s *InputService12TestShapeInputService12TestCaseOperation1Input) SetTimeArg(v time.Time) *InputService12TestShapeInputService12TestCaseOperation1Input { + s.TimeArg = &v + return s +} + +type InputService12TestShapeInputService12TestCaseOperation1Output struct { + _ struct{} `type:"structure"` +} + +// InputService13ProtocolTest provides the API operation methods for making requests to +// . See this package's package overview docs +// for details on the service. +// +// InputService13ProtocolTest methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type InputService13ProtocolTest struct { + *client.Client +} + +// New creates a new instance of the InputService13ProtocolTest client with a session. +// If additional configuration is needed for the client instance use the optional +// aws.Config parameter to add your extra config. +// +// Example: +// // Create a InputService13ProtocolTest client from just a session. +// svc := inputservice13protocoltest.New(mySession) +// +// // Create a InputService13ProtocolTest client with additional configuration +// svc := inputservice13protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func NewInputService13ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService13ProtocolTest { + c := p.ClientConfig("inputservice13protocoltest", cfgs...) + return newInputService13ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) +} + +// newClient creates, initializes and returns a new service client instance. +func newInputService13ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService13ProtocolTest { + svc := &InputService13ProtocolTest{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: "inputservice13protocoltest", + ServiceID: "InputService13ProtocolTest", + SigningName: signingName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "2014-01-01", + }, + handlers, + ), + } + + // Handlers + svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) + svc.Handlers.Build.PushBackNamed(query.BuildHandler) + svc.Handlers.Unmarshal.PushBackNamed(query.UnmarshalHandler) + svc.Handlers.UnmarshalMeta.PushBackNamed(query.UnmarshalMetaHandler) + svc.Handlers.UnmarshalError.PushBackNamed(query.UnmarshalErrorHandler) + + return svc +} + +// newRequest creates a new request for a InputService13ProtocolTest operation and runs any +// custom request initialization. +func (c *InputService13ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) + + return req +} + +const opInputService13TestCaseOperation1 = "OperationName" + +// InputService13TestCaseOperation1Request generates a "aws/request.Request" representing the +// client's request for the InputService13TestCaseOperation1 operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See InputService13TestCaseOperation1 for more information on using the InputService13TestCaseOperation1 +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the InputService13TestCaseOperation1Request method. +// req, resp := client.InputService13TestCaseOperation1Request(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *InputService13ProtocolTest) InputService13TestCaseOperation1Request(input *InputService13TestShapeInputService13TestCaseOperation6Input) (req *request.Request, output *InputService13TestShapeInputService13TestCaseOperation1Output) { + op := &request.Operation{ + Name: opInputService13TestCaseOperation1, + HTTPPath: "/", + } + + if input == nil { + input = &InputService13TestShapeInputService13TestCaseOperation6Input{} + } + + output = &InputService13TestShapeInputService13TestCaseOperation1Output{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// InputService13TestCaseOperation1 API operation for . +// +// 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 +// the error. +// +// See the AWS API reference guide for 's +// API operation InputService13TestCaseOperation1 for usage and error information. +func (c *InputService13ProtocolTest) InputService13TestCaseOperation1(input *InputService13TestShapeInputService13TestCaseOperation6Input) (*InputService13TestShapeInputService13TestCaseOperation1Output, error) { + req, out := c.InputService13TestCaseOperation1Request(input) + return out, req.Send() +} + +// InputService13TestCaseOperation1WithContext is the same as InputService13TestCaseOperation1 with the addition of +// the ability to pass a context and additional request options. +// +// See InputService13TestCaseOperation1 for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *InputService13ProtocolTest) InputService13TestCaseOperation1WithContext(ctx aws.Context, input *InputService13TestShapeInputService13TestCaseOperation6Input, opts ...request.Option) (*InputService13TestShapeInputService13TestCaseOperation1Output, error) { + req, out := c.InputService13TestCaseOperation1Request(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opInputService13TestCaseOperation2 = "OperationName" -// InputService12TestCaseOperation2Request generates a "aws/request.Request" representing the -// client's request for the InputService12TestCaseOperation2 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// InputService13TestCaseOperation2Request generates a "aws/request.Request" representing the +// client's request for the InputService13TestCaseOperation2 operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See InputService12TestCaseOperation2 for usage and error information. +// See InputService13TestCaseOperation2 for more information on using the InputService13TestCaseOperation2 +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService12TestCaseOperation2 method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // -// // Example sending a request using the InputService12TestCaseOperation2Request method. -// req, resp := client.InputService12TestCaseOperation2Request(params) +// // Example sending a request using the InputService13TestCaseOperation2Request method. +// req, resp := client.InputService13TestCaseOperation2Request(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } -func (c *InputService12ProtocolTest) InputService12TestCaseOperation2Request(input *InputService12TestShapeInputService12TestCaseOperation6Input) (req *request.Request, output *InputService12TestShapeInputService12TestCaseOperation2Output) { +func (c *InputService13ProtocolTest) InputService13TestCaseOperation2Request(input *InputService13TestShapeInputService13TestCaseOperation6Input) (req *request.Request, output *InputService13TestShapeInputService13TestCaseOperation2Output) { op := &request.Operation{ - Name: opInputService12TestCaseOperation2, + Name: opInputService13TestCaseOperation2, HTTPPath: "/", } if input == nil { - input = &InputService12TestShapeInputService12TestCaseOperation6Input{} + input = &InputService13TestShapeInputService13TestCaseOperation6Input{} } - output = &InputService12TestShapeInputService12TestCaseOperation2Output{} + output = &InputService13TestShapeInputService13TestCaseOperation2Output{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) return } -// InputService12TestCaseOperation2 API operation for . +// InputService13TestCaseOperation2 API operation for . // // 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 // the error. // // See the AWS API reference guide for 's -// API operation InputService12TestCaseOperation2 for usage and error information. -func (c *InputService12ProtocolTest) InputService12TestCaseOperation2(input *InputService12TestShapeInputService12TestCaseOperation6Input) (*InputService12TestShapeInputService12TestCaseOperation2Output, error) { - req, out := c.InputService12TestCaseOperation2Request(input) +// API operation InputService13TestCaseOperation2 for usage and error information. +func (c *InputService13ProtocolTest) InputService13TestCaseOperation2(input *InputService13TestShapeInputService13TestCaseOperation6Input) (*InputService13TestShapeInputService13TestCaseOperation2Output, error) { + req, out := c.InputService13TestCaseOperation2Request(input) return out, req.Send() } -// InputService12TestCaseOperation2WithContext is the same as InputService12TestCaseOperation2 with the addition of +// InputService13TestCaseOperation2WithContext is the same as InputService13TestCaseOperation2 with the addition of // the ability to pass a context and additional request options. // -// See InputService12TestCaseOperation2 for details on how to use this API operation. +// See InputService13TestCaseOperation2 for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *InputService12ProtocolTest) InputService12TestCaseOperation2WithContext(ctx aws.Context, input *InputService12TestShapeInputService12TestCaseOperation6Input, opts ...request.Option) (*InputService12TestShapeInputService12TestCaseOperation2Output, error) { - req, out := c.InputService12TestCaseOperation2Request(input) +func (c *InputService13ProtocolTest) InputService13TestCaseOperation2WithContext(ctx aws.Context, input *InputService13TestShapeInputService13TestCaseOperation6Input, opts ...request.Option) (*InputService13TestShapeInputService13TestCaseOperation2Output, error) { + req, out := c.InputService13TestCaseOperation2Request(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opInputService12TestCaseOperation3 = "OperationName" +const opInputService13TestCaseOperation3 = "OperationName" -// InputService12TestCaseOperation3Request generates a "aws/request.Request" representing the -// client's request for the InputService12TestCaseOperation3 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// InputService13TestCaseOperation3Request generates a "aws/request.Request" representing the +// client's request for the InputService13TestCaseOperation3 operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See InputService12TestCaseOperation3 for usage and error information. +// See InputService13TestCaseOperation3 for more information on using the InputService13TestCaseOperation3 +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService12TestCaseOperation3 method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // -// // Example sending a request using the InputService12TestCaseOperation3Request method. -// req, resp := client.InputService12TestCaseOperation3Request(params) +// // Example sending a request using the InputService13TestCaseOperation3Request method. +// req, resp := client.InputService13TestCaseOperation3Request(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } -func (c *InputService12ProtocolTest) InputService12TestCaseOperation3Request(input *InputService12TestShapeInputService12TestCaseOperation6Input) (req *request.Request, output *InputService12TestShapeInputService12TestCaseOperation3Output) { +func (c *InputService13ProtocolTest) InputService13TestCaseOperation3Request(input *InputService13TestShapeInputService13TestCaseOperation6Input) (req *request.Request, output *InputService13TestShapeInputService13TestCaseOperation3Output) { op := &request.Operation{ - Name: opInputService12TestCaseOperation3, + Name: opInputService13TestCaseOperation3, HTTPPath: "/", } if input == nil { - input = &InputService12TestShapeInputService12TestCaseOperation6Input{} + input = &InputService13TestShapeInputService13TestCaseOperation6Input{} } - output = &InputService12TestShapeInputService12TestCaseOperation3Output{} + output = &InputService13TestShapeInputService13TestCaseOperation3Output{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) return } -// InputService12TestCaseOperation3 API operation for . +// InputService13TestCaseOperation3 API operation for . // // 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 // the error. // // See the AWS API reference guide for 's -// API operation InputService12TestCaseOperation3 for usage and error information. -func (c *InputService12ProtocolTest) InputService12TestCaseOperation3(input *InputService12TestShapeInputService12TestCaseOperation6Input) (*InputService12TestShapeInputService12TestCaseOperation3Output, error) { - req, out := c.InputService12TestCaseOperation3Request(input) +// API operation InputService13TestCaseOperation3 for usage and error information. +func (c *InputService13ProtocolTest) InputService13TestCaseOperation3(input *InputService13TestShapeInputService13TestCaseOperation6Input) (*InputService13TestShapeInputService13TestCaseOperation3Output, error) { + req, out := c.InputService13TestCaseOperation3Request(input) return out, req.Send() } -// InputService12TestCaseOperation3WithContext is the same as InputService12TestCaseOperation3 with the addition of +// InputService13TestCaseOperation3WithContext is the same as InputService13TestCaseOperation3 with the addition of // the ability to pass a context and additional request options. // -// See InputService12TestCaseOperation3 for details on how to use this API operation. +// See InputService13TestCaseOperation3 for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *InputService12ProtocolTest) InputService12TestCaseOperation3WithContext(ctx aws.Context, input *InputService12TestShapeInputService12TestCaseOperation6Input, opts ...request.Option) (*InputService12TestShapeInputService12TestCaseOperation3Output, error) { - req, out := c.InputService12TestCaseOperation3Request(input) +func (c *InputService13ProtocolTest) InputService13TestCaseOperation3WithContext(ctx aws.Context, input *InputService13TestShapeInputService13TestCaseOperation6Input, opts ...request.Option) (*InputService13TestShapeInputService13TestCaseOperation3Output, error) { + req, out := c.InputService13TestCaseOperation3Request(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opInputService12TestCaseOperation4 = "OperationName" +const opInputService13TestCaseOperation4 = "OperationName" -// InputService12TestCaseOperation4Request generates a "aws/request.Request" representing the -// client's request for the InputService12TestCaseOperation4 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// InputService13TestCaseOperation4Request generates a "aws/request.Request" representing the +// client's request for the InputService13TestCaseOperation4 operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. // -// See InputService12TestCaseOperation4 for usage and error information. +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService12TestCaseOperation4 method directly -// instead. +// See InputService13TestCaseOperation4 for more information on using the InputService13TestCaseOperation4 +// API call, and error handling. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the InputService12TestCaseOperation4Request method. -// req, resp := client.InputService12TestCaseOperation4Request(params) +// +// // Example sending a request using the InputService13TestCaseOperation4Request method. +// req, resp := client.InputService13TestCaseOperation4Request(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } -func (c *InputService12ProtocolTest) InputService12TestCaseOperation4Request(input *InputService12TestShapeInputService12TestCaseOperation6Input) (req *request.Request, output *InputService12TestShapeInputService12TestCaseOperation4Output) { +func (c *InputService13ProtocolTest) InputService13TestCaseOperation4Request(input *InputService13TestShapeInputService13TestCaseOperation6Input) (req *request.Request, output *InputService13TestShapeInputService13TestCaseOperation4Output) { op := &request.Operation{ - Name: opInputService12TestCaseOperation4, + Name: opInputService13TestCaseOperation4, HTTPPath: "/", } if input == nil { - input = &InputService12TestShapeInputService12TestCaseOperation6Input{} + input = &InputService13TestShapeInputService13TestCaseOperation6Input{} } - output = &InputService12TestShapeInputService12TestCaseOperation4Output{} + output = &InputService13TestShapeInputService13TestCaseOperation4Output{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) return } -// InputService12TestCaseOperation4 API operation for . +// InputService13TestCaseOperation4 API operation for . // // 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 // the error. // // See the AWS API reference guide for 's -// API operation InputService12TestCaseOperation4 for usage and error information. -func (c *InputService12ProtocolTest) InputService12TestCaseOperation4(input *InputService12TestShapeInputService12TestCaseOperation6Input) (*InputService12TestShapeInputService12TestCaseOperation4Output, error) { - req, out := c.InputService12TestCaseOperation4Request(input) +// API operation InputService13TestCaseOperation4 for usage and error information. +func (c *InputService13ProtocolTest) InputService13TestCaseOperation4(input *InputService13TestShapeInputService13TestCaseOperation6Input) (*InputService13TestShapeInputService13TestCaseOperation4Output, error) { + req, out := c.InputService13TestCaseOperation4Request(input) return out, req.Send() } -// InputService12TestCaseOperation4WithContext is the same as InputService12TestCaseOperation4 with the addition of +// InputService13TestCaseOperation4WithContext is the same as InputService13TestCaseOperation4 with the addition of // the ability to pass a context and additional request options. // -// See InputService12TestCaseOperation4 for details on how to use this API operation. +// See InputService13TestCaseOperation4 for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *InputService12ProtocolTest) InputService12TestCaseOperation4WithContext(ctx aws.Context, input *InputService12TestShapeInputService12TestCaseOperation6Input, opts ...request.Option) (*InputService12TestShapeInputService12TestCaseOperation4Output, error) { - req, out := c.InputService12TestCaseOperation4Request(input) +func (c *InputService13ProtocolTest) InputService13TestCaseOperation4WithContext(ctx aws.Context, input *InputService13TestShapeInputService13TestCaseOperation6Input, opts ...request.Option) (*InputService13TestShapeInputService13TestCaseOperation4Output, error) { + req, out := c.InputService13TestCaseOperation4Request(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opInputService12TestCaseOperation5 = "OperationName" +const opInputService13TestCaseOperation5 = "OperationName" -// InputService12TestCaseOperation5Request generates a "aws/request.Request" representing the -// client's request for the InputService12TestCaseOperation5 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// InputService13TestCaseOperation5Request generates a "aws/request.Request" representing the +// client's request for the InputService13TestCaseOperation5 operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See InputService12TestCaseOperation5 for usage and error information. +// See InputService13TestCaseOperation5 for more information on using the InputService13TestCaseOperation5 +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService12TestCaseOperation5 method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // -// // Example sending a request using the InputService12TestCaseOperation5Request method. -// req, resp := client.InputService12TestCaseOperation5Request(params) +// // Example sending a request using the InputService13TestCaseOperation5Request method. +// req, resp := client.InputService13TestCaseOperation5Request(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } -func (c *InputService12ProtocolTest) InputService12TestCaseOperation5Request(input *InputService12TestShapeInputService12TestCaseOperation6Input) (req *request.Request, output *InputService12TestShapeInputService12TestCaseOperation5Output) { +func (c *InputService13ProtocolTest) InputService13TestCaseOperation5Request(input *InputService13TestShapeInputService13TestCaseOperation6Input) (req *request.Request, output *InputService13TestShapeInputService13TestCaseOperation5Output) { op := &request.Operation{ - Name: opInputService12TestCaseOperation5, + Name: opInputService13TestCaseOperation5, HTTPPath: "/", } if input == nil { - input = &InputService12TestShapeInputService12TestCaseOperation6Input{} + input = &InputService13TestShapeInputService13TestCaseOperation6Input{} } - output = &InputService12TestShapeInputService12TestCaseOperation5Output{} + output = &InputService13TestShapeInputService13TestCaseOperation5Output{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) return } -// InputService12TestCaseOperation5 API operation for . +// InputService13TestCaseOperation5 API operation for . // // 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 // the error. // // See the AWS API reference guide for 's -// API operation InputService12TestCaseOperation5 for usage and error information. -func (c *InputService12ProtocolTest) InputService12TestCaseOperation5(input *InputService12TestShapeInputService12TestCaseOperation6Input) (*InputService12TestShapeInputService12TestCaseOperation5Output, error) { - req, out := c.InputService12TestCaseOperation5Request(input) +// API operation InputService13TestCaseOperation5 for usage and error information. +func (c *InputService13ProtocolTest) InputService13TestCaseOperation5(input *InputService13TestShapeInputService13TestCaseOperation6Input) (*InputService13TestShapeInputService13TestCaseOperation5Output, error) { + req, out := c.InputService13TestCaseOperation5Request(input) return out, req.Send() } -// InputService12TestCaseOperation5WithContext is the same as InputService12TestCaseOperation5 with the addition of +// InputService13TestCaseOperation5WithContext is the same as InputService13TestCaseOperation5 with the addition of // the ability to pass a context and additional request options. // -// See InputService12TestCaseOperation5 for details on how to use this API operation. +// See InputService13TestCaseOperation5 for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *InputService12ProtocolTest) InputService12TestCaseOperation5WithContext(ctx aws.Context, input *InputService12TestShapeInputService12TestCaseOperation6Input, opts ...request.Option) (*InputService12TestShapeInputService12TestCaseOperation5Output, error) { - req, out := c.InputService12TestCaseOperation5Request(input) +func (c *InputService13ProtocolTest) InputService13TestCaseOperation5WithContext(ctx aws.Context, input *InputService13TestShapeInputService13TestCaseOperation6Input, opts ...request.Option) (*InputService13TestShapeInputService13TestCaseOperation5Output, error) { + req, out := c.InputService13TestCaseOperation5Request(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opInputService12TestCaseOperation6 = "OperationName" +const opInputService13TestCaseOperation6 = "OperationName" -// InputService12TestCaseOperation6Request generates a "aws/request.Request" representing the -// client's request for the InputService12TestCaseOperation6 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// InputService13TestCaseOperation6Request generates a "aws/request.Request" representing the +// client's request for the InputService13TestCaseOperation6 operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. // -// See InputService12TestCaseOperation6 for usage and error information. +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService12TestCaseOperation6 method directly -// instead. +// See InputService13TestCaseOperation6 for more information on using the InputService13TestCaseOperation6 +// API call, and error handling. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the InputService12TestCaseOperation6Request method. -// req, resp := client.InputService12TestCaseOperation6Request(params) +// +// // Example sending a request using the InputService13TestCaseOperation6Request method. +// req, resp := client.InputService13TestCaseOperation6Request(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } -func (c *InputService12ProtocolTest) InputService12TestCaseOperation6Request(input *InputService12TestShapeInputService12TestCaseOperation6Input) (req *request.Request, output *InputService12TestShapeInputService12TestCaseOperation6Output) { +func (c *InputService13ProtocolTest) InputService13TestCaseOperation6Request(input *InputService13TestShapeInputService13TestCaseOperation6Input) (req *request.Request, output *InputService13TestShapeInputService13TestCaseOperation6Output) { op := &request.Operation{ - Name: opInputService12TestCaseOperation6, + Name: opInputService13TestCaseOperation6, HTTPPath: "/", } if input == nil { - input = &InputService12TestShapeInputService12TestCaseOperation6Input{} + input = &InputService13TestShapeInputService13TestCaseOperation6Input{} } - output = &InputService12TestShapeInputService12TestCaseOperation6Output{} + output = &InputService13TestShapeInputService13TestCaseOperation6Output{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) return } -// InputService12TestCaseOperation6 API operation for . +// InputService13TestCaseOperation6 API operation for . // // 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 // the error. // // See the AWS API reference guide for 's -// API operation InputService12TestCaseOperation6 for usage and error information. -func (c *InputService12ProtocolTest) InputService12TestCaseOperation6(input *InputService12TestShapeInputService12TestCaseOperation6Input) (*InputService12TestShapeInputService12TestCaseOperation6Output, error) { - req, out := c.InputService12TestCaseOperation6Request(input) +// API operation InputService13TestCaseOperation6 for usage and error information. +func (c *InputService13ProtocolTest) InputService13TestCaseOperation6(input *InputService13TestShapeInputService13TestCaseOperation6Input) (*InputService13TestShapeInputService13TestCaseOperation6Output, error) { + req, out := c.InputService13TestCaseOperation6Request(input) return out, req.Send() } -// InputService12TestCaseOperation6WithContext is the same as InputService12TestCaseOperation6 with the addition of +// InputService13TestCaseOperation6WithContext is the same as InputService13TestCaseOperation6 with the addition of // the ability to pass a context and additional request options. // -// See InputService12TestCaseOperation6 for details on how to use this API operation. +// See InputService13TestCaseOperation6 for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *InputService12ProtocolTest) InputService12TestCaseOperation6WithContext(ctx aws.Context, input *InputService12TestShapeInputService12TestCaseOperation6Input, opts ...request.Option) (*InputService12TestShapeInputService12TestCaseOperation6Output, error) { - req, out := c.InputService12TestCaseOperation6Request(input) +func (c *InputService13ProtocolTest) InputService13TestCaseOperation6WithContext(ctx aws.Context, input *InputService13TestShapeInputService13TestCaseOperation6Input, opts ...request.Option) (*InputService13TestShapeInputService13TestCaseOperation6Output, error) { + req, out := c.InputService13TestCaseOperation6Request(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -type InputService12TestShapeInputService12TestCaseOperation1Output struct { +type InputService13TestShapeInputService13TestCaseOperation1Output struct { _ struct{} `type:"structure"` } -type InputService12TestShapeInputService12TestCaseOperation2Output struct { +type InputService13TestShapeInputService13TestCaseOperation2Output struct { _ struct{} `type:"structure"` } -type InputService12TestShapeInputService12TestCaseOperation3Output struct { +type InputService13TestShapeInputService13TestCaseOperation3Output struct { _ struct{} `type:"structure"` } -type InputService12TestShapeInputService12TestCaseOperation4Output struct { +type InputService13TestShapeInputService13TestCaseOperation4Output struct { _ struct{} `type:"structure"` } -type InputService12TestShapeInputService12TestCaseOperation5Output struct { +type InputService13TestShapeInputService13TestCaseOperation5Output struct { _ struct{} `type:"structure"` } -type InputService12TestShapeInputService12TestCaseOperation6Input struct { +type InputService13TestShapeInputService13TestCaseOperation6Input struct { _ struct{} `type:"structure"` - RecursiveStruct *InputService12TestShapeRecursiveStructType `type:"structure"` + RecursiveStruct *InputService13TestShapeRecursiveStructType `type:"structure"` } // SetRecursiveStruct sets the RecursiveStruct field's value. -func (s *InputService12TestShapeInputService12TestCaseOperation6Input) SetRecursiveStruct(v *InputService12TestShapeRecursiveStructType) *InputService12TestShapeInputService12TestCaseOperation6Input { +func (s *InputService13TestShapeInputService13TestCaseOperation6Input) SetRecursiveStruct(v *InputService13TestShapeRecursiveStructType) *InputService13TestShapeInputService13TestCaseOperation6Input { s.RecursiveStruct = v return s } -type InputService12TestShapeInputService12TestCaseOperation6Output struct { +type InputService13TestShapeInputService13TestCaseOperation6Output struct { _ struct{} `type:"structure"` } -type InputService12TestShapeRecursiveStructType struct { +type InputService13TestShapeRecursiveStructType struct { _ struct{} `type:"structure"` NoRecurse *string `type:"string"` - RecursiveList []*InputService12TestShapeRecursiveStructType `type:"list"` + RecursiveList []*InputService13TestShapeRecursiveStructType `type:"list"` - RecursiveMap map[string]*InputService12TestShapeRecursiveStructType `type:"map"` + RecursiveMap map[string]*InputService13TestShapeRecursiveStructType `type:"map"` - RecursiveStruct *InputService12TestShapeRecursiveStructType `type:"structure"` + RecursiveStruct *InputService13TestShapeRecursiveStructType `type:"structure"` } // SetNoRecurse sets the NoRecurse field's value. -func (s *InputService12TestShapeRecursiveStructType) SetNoRecurse(v string) *InputService12TestShapeRecursiveStructType { +func (s *InputService13TestShapeRecursiveStructType) SetNoRecurse(v string) *InputService13TestShapeRecursiveStructType { s.NoRecurse = &v return s } // SetRecursiveList sets the RecursiveList field's value. -func (s *InputService12TestShapeRecursiveStructType) SetRecursiveList(v []*InputService12TestShapeRecursiveStructType) *InputService12TestShapeRecursiveStructType { +func (s *InputService13TestShapeRecursiveStructType) SetRecursiveList(v []*InputService13TestShapeRecursiveStructType) *InputService13TestShapeRecursiveStructType { s.RecursiveList = v return s } // SetRecursiveMap sets the RecursiveMap field's value. -func (s *InputService12TestShapeRecursiveStructType) SetRecursiveMap(v map[string]*InputService12TestShapeRecursiveStructType) *InputService12TestShapeRecursiveStructType { +func (s *InputService13TestShapeRecursiveStructType) SetRecursiveMap(v map[string]*InputService13TestShapeRecursiveStructType) *InputService13TestShapeRecursiveStructType { s.RecursiveMap = v return s } // SetRecursiveStruct sets the RecursiveStruct field's value. -func (s *InputService12TestShapeRecursiveStructType) SetRecursiveStruct(v *InputService12TestShapeRecursiveStructType) *InputService12TestShapeRecursiveStructType { +func (s *InputService13TestShapeRecursiveStructType) SetRecursiveStruct(v *InputService13TestShapeRecursiveStructType) *InputService13TestShapeRecursiveStructType { s.RecursiveStruct = v return s } -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type InputService13ProtocolTest struct { +// InputService14ProtocolTest provides the API operation methods for making requests to +// . See this package's package overview docs +// for details on the service. +// +// InputService14ProtocolTest methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type InputService14ProtocolTest struct { *client.Client } -// New creates a new instance of the InputService13ProtocolTest client with a session. +// New creates a new instance of the InputService14ProtocolTest client with a session. // If additional configuration is needed for the client instance use the optional // aws.Config parameter to add your extra config. // // Example: -// // Create a InputService13ProtocolTest client from just a session. -// svc := inputservice13protocoltest.New(mySession) +// // Create a InputService14ProtocolTest client from just a session. +// svc := inputservice14protocoltest.New(mySession) // -// // Create a InputService13ProtocolTest client with additional configuration -// svc := inputservice13protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewInputService13ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService13ProtocolTest { - c := p.ClientConfig("inputservice13protocoltest", cfgs...) - return newInputService13ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) +// // Create a InputService14ProtocolTest client with additional configuration +// svc := inputservice14protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func NewInputService14ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService14ProtocolTest { + c := p.ClientConfig("inputservice14protocoltest", cfgs...) + return newInputService14ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) } // newClient creates, initializes and returns a new service client instance. -func newInputService13ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService13ProtocolTest { - svc := &InputService13ProtocolTest{ +func newInputService14ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService14ProtocolTest { + svc := &InputService14ProtocolTest{ Client: client.New( cfg, metadata.ClientInfo{ - ServiceName: "inputservice13protocoltest", + ServiceName: "inputservice14protocoltest", + ServiceID: "InputService14ProtocolTest", SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, @@ -2560,198 +2749,513 @@ func newInputService13ProtocolTestClient(cfg aws.Config, handlers request.Handle return svc } -// newRequest creates a new request for a InputService13ProtocolTest operation and runs any +// newRequest creates a new request for a InputService14ProtocolTest operation and runs any // custom request initialization. -func (c *InputService13ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { +func (c *InputService14ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { req := c.NewRequest(op, params, data) return req } -const opInputService13TestCaseOperation1 = "OperationName" +const opInputService14TestCaseOperation1 = "OperationName" -// InputService13TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the InputService13TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// InputService14TestCaseOperation1Request generates a "aws/request.Request" representing the +// client's request for the InputService14TestCaseOperation1 operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. // -// See InputService13TestCaseOperation1 for usage and error information. +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService13TestCaseOperation1 method directly -// instead. +// See InputService14TestCaseOperation1 for more information on using the InputService14TestCaseOperation1 +// API call, and error handling. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the InputService13TestCaseOperation1Request method. -// req, resp := client.InputService13TestCaseOperation1Request(params) +// +// // Example sending a request using the InputService14TestCaseOperation1Request method. +// req, resp := client.InputService14TestCaseOperation1Request(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } -func (c *InputService13ProtocolTest) InputService13TestCaseOperation1Request(input *InputService13TestShapeInputService13TestCaseOperation2Input) (req *request.Request, output *InputService13TestShapeInputService13TestCaseOperation1Output) { +func (c *InputService14ProtocolTest) InputService14TestCaseOperation1Request(input *InputService14TestShapeInputService14TestCaseOperation2Input) (req *request.Request, output *InputService14TestShapeInputService14TestCaseOperation1Output) { op := &request.Operation{ - Name: opInputService13TestCaseOperation1, + Name: opInputService14TestCaseOperation1, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &InputService13TestShapeInputService13TestCaseOperation2Input{} + input = &InputService14TestShapeInputService14TestCaseOperation2Input{} } - output = &InputService13TestShapeInputService13TestCaseOperation1Output{} + output = &InputService14TestShapeInputService14TestCaseOperation1Output{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) return } -// InputService13TestCaseOperation1 API operation for . +// InputService14TestCaseOperation1 API operation for . // // 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 // the error. // // See the AWS API reference guide for 's -// API operation InputService13TestCaseOperation1 for usage and error information. -func (c *InputService13ProtocolTest) InputService13TestCaseOperation1(input *InputService13TestShapeInputService13TestCaseOperation2Input) (*InputService13TestShapeInputService13TestCaseOperation1Output, error) { - req, out := c.InputService13TestCaseOperation1Request(input) +// API operation InputService14TestCaseOperation1 for usage and error information. +func (c *InputService14ProtocolTest) InputService14TestCaseOperation1(input *InputService14TestShapeInputService14TestCaseOperation2Input) (*InputService14TestShapeInputService14TestCaseOperation1Output, error) { + req, out := c.InputService14TestCaseOperation1Request(input) return out, req.Send() } -// InputService13TestCaseOperation1WithContext is the same as InputService13TestCaseOperation1 with the addition of +// InputService14TestCaseOperation1WithContext is the same as InputService14TestCaseOperation1 with the addition of // the ability to pass a context and additional request options. // -// See InputService13TestCaseOperation1 for details on how to use this API operation. +// See InputService14TestCaseOperation1 for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *InputService13ProtocolTest) InputService13TestCaseOperation1WithContext(ctx aws.Context, input *InputService13TestShapeInputService13TestCaseOperation2Input, opts ...request.Option) (*InputService13TestShapeInputService13TestCaseOperation1Output, error) { - req, out := c.InputService13TestCaseOperation1Request(input) +func (c *InputService14ProtocolTest) InputService14TestCaseOperation1WithContext(ctx aws.Context, input *InputService14TestShapeInputService14TestCaseOperation2Input, opts ...request.Option) (*InputService14TestShapeInputService14TestCaseOperation1Output, error) { + req, out := c.InputService14TestCaseOperation1Request(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opInputService13TestCaseOperation2 = "OperationName" +const opInputService14TestCaseOperation2 = "OperationName" -// InputService13TestCaseOperation2Request generates a "aws/request.Request" representing the -// client's request for the InputService13TestCaseOperation2 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// InputService14TestCaseOperation2Request generates a "aws/request.Request" representing the +// client's request for the InputService14TestCaseOperation2 operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. // -// See InputService13TestCaseOperation2 for usage and error information. +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService13TestCaseOperation2 method directly -// instead. +// See InputService14TestCaseOperation2 for more information on using the InputService14TestCaseOperation2 +// API call, and error handling. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the InputService13TestCaseOperation2Request method. -// req, resp := client.InputService13TestCaseOperation2Request(params) +// +// // Example sending a request using the InputService14TestCaseOperation2Request method. +// req, resp := client.InputService14TestCaseOperation2Request(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } -func (c *InputService13ProtocolTest) InputService13TestCaseOperation2Request(input *InputService13TestShapeInputService13TestCaseOperation2Input) (req *request.Request, output *InputService13TestShapeInputService13TestCaseOperation2Output) { +func (c *InputService14ProtocolTest) InputService14TestCaseOperation2Request(input *InputService14TestShapeInputService14TestCaseOperation2Input) (req *request.Request, output *InputService14TestShapeInputService14TestCaseOperation2Output) { op := &request.Operation{ - Name: opInputService13TestCaseOperation2, + Name: opInputService14TestCaseOperation2, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &InputService13TestShapeInputService13TestCaseOperation2Input{} + input = &InputService14TestShapeInputService14TestCaseOperation2Input{} } - output = &InputService13TestShapeInputService13TestCaseOperation2Output{} + output = &InputService14TestShapeInputService14TestCaseOperation2Output{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) return } -// InputService13TestCaseOperation2 API operation for . +// InputService14TestCaseOperation2 API operation for . // // 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 // the error. // // See the AWS API reference guide for 's -// API operation InputService13TestCaseOperation2 for usage and error information. -func (c *InputService13ProtocolTest) InputService13TestCaseOperation2(input *InputService13TestShapeInputService13TestCaseOperation2Input) (*InputService13TestShapeInputService13TestCaseOperation2Output, error) { - req, out := c.InputService13TestCaseOperation2Request(input) +// API operation InputService14TestCaseOperation2 for usage and error information. +func (c *InputService14ProtocolTest) InputService14TestCaseOperation2(input *InputService14TestShapeInputService14TestCaseOperation2Input) (*InputService14TestShapeInputService14TestCaseOperation2Output, error) { + req, out := c.InputService14TestCaseOperation2Request(input) return out, req.Send() } -// InputService13TestCaseOperation2WithContext is the same as InputService13TestCaseOperation2 with the addition of +// InputService14TestCaseOperation2WithContext is the same as InputService14TestCaseOperation2 with the addition of // the ability to pass a context and additional request options. // -// See InputService13TestCaseOperation2 for details on how to use this API operation. +// See InputService14TestCaseOperation2 for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *InputService13ProtocolTest) InputService13TestCaseOperation2WithContext(ctx aws.Context, input *InputService13TestShapeInputService13TestCaseOperation2Input, opts ...request.Option) (*InputService13TestShapeInputService13TestCaseOperation2Output, error) { - req, out := c.InputService13TestCaseOperation2Request(input) +func (c *InputService14ProtocolTest) InputService14TestCaseOperation2WithContext(ctx aws.Context, input *InputService14TestShapeInputService14TestCaseOperation2Input, opts ...request.Option) (*InputService14TestShapeInputService14TestCaseOperation2Output, error) { + req, out := c.InputService14TestCaseOperation2Request(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -type InputService13TestShapeInputService13TestCaseOperation1Output struct { +type InputService14TestShapeInputService14TestCaseOperation1Output struct { _ struct{} `type:"structure"` } -type InputService13TestShapeInputService13TestCaseOperation2Input struct { +type InputService14TestShapeInputService14TestCaseOperation2Input struct { _ struct{} `type:"structure"` Token *string `type:"string" idempotencyToken:"true"` } // SetToken sets the Token field's value. -func (s *InputService13TestShapeInputService13TestCaseOperation2Input) SetToken(v string) *InputService13TestShapeInputService13TestCaseOperation2Input { +func (s *InputService14TestShapeInputService14TestCaseOperation2Input) SetToken(v string) *InputService14TestShapeInputService14TestCaseOperation2Input { s.Token = &v return s } -type InputService13TestShapeInputService13TestCaseOperation2Output struct { +type InputService14TestShapeInputService14TestCaseOperation2Output struct { _ struct{} `type:"structure"` } +// InputService15ProtocolTest provides the API operation methods for making requests to +// . See this package's package overview docs +// for details on the service. // -// Tests begin here +// InputService15ProtocolTest methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type InputService15ProtocolTest struct { + *client.Client +} + +// New creates a new instance of the InputService15ProtocolTest client with a session. +// If additional configuration is needed for the client instance use the optional +// aws.Config parameter to add your extra config. +// +// Example: +// // Create a InputService15ProtocolTest client from just a session. +// svc := inputservice15protocoltest.New(mySession) // +// // Create a InputService15ProtocolTest client with additional configuration +// svc := inputservice15protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func NewInputService15ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService15ProtocolTest { + c := p.ClientConfig("inputservice15protocoltest", cfgs...) + return newInputService15ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) +} -func TestInputService1ProtocolTestScalarMembersCase1(t *testing.T) { - svc := NewInputService1ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService1TestShapeInputService1TestCaseOperation3Input{ - Bar: aws.String("val2"), - Foo: aws.String("val1"), +// newClient creates, initializes and returns a new service client instance. +func newInputService15ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService15ProtocolTest { + svc := &InputService15ProtocolTest{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: "inputservice15protocoltest", + ServiceID: "InputService15ProtocolTest", + SigningName: signingName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "2014-01-01", + }, + handlers, + ), } - req, _ := svc.InputService1TestCaseOperation1Request(input) - r := req.HTTPRequest - // build request - query.Build(req) - assert.NoError(t, req.Error) + // Handlers + svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) + svc.Handlers.Build.PushBackNamed(query.BuildHandler) + svc.Handlers.Unmarshal.PushBackNamed(query.UnmarshalHandler) + svc.Handlers.UnmarshalMeta.PushBackNamed(query.UnmarshalMetaHandler) + svc.Handlers.UnmarshalError.PushBackNamed(query.UnmarshalErrorHandler) - // assert body - assert.NotNil(t, r.Body) - body, _ := ioutil.ReadAll(r.Body) + return svc +} + +// newRequest creates a new request for a InputService15ProtocolTest operation and runs any +// custom request initialization. +func (c *InputService15ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) + + return req +} + +const opInputService15TestCaseOperation1 = "OperationName" + +// InputService15TestCaseOperation1Request generates a "aws/request.Request" representing the +// client's request for the InputService15TestCaseOperation1 operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See InputService15TestCaseOperation1 for more information on using the InputService15TestCaseOperation1 +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the InputService15TestCaseOperation1Request method. +// req, resp := client.InputService15TestCaseOperation1Request(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *InputService15ProtocolTest) InputService15TestCaseOperation1Request(input *InputService15TestShapeInputService15TestCaseOperation3Input) (req *request.Request, output *InputService15TestShapeInputService15TestCaseOperation1Output) { + op := &request.Operation{ + Name: opInputService15TestCaseOperation1, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &InputService15TestShapeInputService15TestCaseOperation3Input{} + } + + output = &InputService15TestShapeInputService15TestCaseOperation1Output{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// InputService15TestCaseOperation1 API operation for . +// +// 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 +// the error. +// +// See the AWS API reference guide for 's +// API operation InputService15TestCaseOperation1 for usage and error information. +func (c *InputService15ProtocolTest) InputService15TestCaseOperation1(input *InputService15TestShapeInputService15TestCaseOperation3Input) (*InputService15TestShapeInputService15TestCaseOperation1Output, error) { + req, out := c.InputService15TestCaseOperation1Request(input) + return out, req.Send() +} + +// InputService15TestCaseOperation1WithContext is the same as InputService15TestCaseOperation1 with the addition of +// the ability to pass a context and additional request options. +// +// See InputService15TestCaseOperation1 for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *InputService15ProtocolTest) InputService15TestCaseOperation1WithContext(ctx aws.Context, input *InputService15TestShapeInputService15TestCaseOperation3Input, opts ...request.Option) (*InputService15TestShapeInputService15TestCaseOperation1Output, error) { + req, out := c.InputService15TestCaseOperation1Request(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opInputService15TestCaseOperation2 = "OperationName" + +// InputService15TestCaseOperation2Request generates a "aws/request.Request" representing the +// client's request for the InputService15TestCaseOperation2 operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See InputService15TestCaseOperation2 for more information on using the InputService15TestCaseOperation2 +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the InputService15TestCaseOperation2Request method. +// req, resp := client.InputService15TestCaseOperation2Request(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *InputService15ProtocolTest) InputService15TestCaseOperation2Request(input *InputService15TestShapeInputService15TestCaseOperation3Input) (req *request.Request, output *InputService15TestShapeInputService15TestCaseOperation2Output) { + op := &request.Operation{ + Name: opInputService15TestCaseOperation2, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &InputService15TestShapeInputService15TestCaseOperation3Input{} + } + + output = &InputService15TestShapeInputService15TestCaseOperation2Output{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// InputService15TestCaseOperation2 API operation for . +// +// 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 +// the error. +// +// See the AWS API reference guide for 's +// API operation InputService15TestCaseOperation2 for usage and error information. +func (c *InputService15ProtocolTest) InputService15TestCaseOperation2(input *InputService15TestShapeInputService15TestCaseOperation3Input) (*InputService15TestShapeInputService15TestCaseOperation2Output, error) { + req, out := c.InputService15TestCaseOperation2Request(input) + return out, req.Send() +} + +// InputService15TestCaseOperation2WithContext is the same as InputService15TestCaseOperation2 with the addition of +// the ability to pass a context and additional request options. +// +// See InputService15TestCaseOperation2 for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *InputService15ProtocolTest) InputService15TestCaseOperation2WithContext(ctx aws.Context, input *InputService15TestShapeInputService15TestCaseOperation3Input, opts ...request.Option) (*InputService15TestShapeInputService15TestCaseOperation2Output, error) { + req, out := c.InputService15TestCaseOperation2Request(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opInputService15TestCaseOperation3 = "OperationName" + +// InputService15TestCaseOperation3Request generates a "aws/request.Request" representing the +// client's request for the InputService15TestCaseOperation3 operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See InputService15TestCaseOperation3 for more information on using the InputService15TestCaseOperation3 +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the InputService15TestCaseOperation3Request method. +// req, resp := client.InputService15TestCaseOperation3Request(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *InputService15ProtocolTest) InputService15TestCaseOperation3Request(input *InputService15TestShapeInputService15TestCaseOperation3Input) (req *request.Request, output *InputService15TestShapeInputService15TestCaseOperation3Output) { + op := &request.Operation{ + Name: opInputService15TestCaseOperation3, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &InputService15TestShapeInputService15TestCaseOperation3Input{} + } + + output = &InputService15TestShapeInputService15TestCaseOperation3Output{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// InputService15TestCaseOperation3 API operation for . +// +// 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 +// the error. +// +// See the AWS API reference guide for 's +// API operation InputService15TestCaseOperation3 for usage and error information. +func (c *InputService15ProtocolTest) InputService15TestCaseOperation3(input *InputService15TestShapeInputService15TestCaseOperation3Input) (*InputService15TestShapeInputService15TestCaseOperation3Output, error) { + req, out := c.InputService15TestCaseOperation3Request(input) + return out, req.Send() +} + +// InputService15TestCaseOperation3WithContext is the same as InputService15TestCaseOperation3 with the addition of +// the ability to pass a context and additional request options. +// +// See InputService15TestCaseOperation3 for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *InputService15ProtocolTest) InputService15TestCaseOperation3WithContext(ctx aws.Context, input *InputService15TestShapeInputService15TestCaseOperation3Input, opts ...request.Option) (*InputService15TestShapeInputService15TestCaseOperation3Output, error) { + req, out := c.InputService15TestCaseOperation3Request(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +type InputService15TestShapeInputService15TestCaseOperation1Output struct { + _ struct{} `type:"structure"` +} + +type InputService15TestShapeInputService15TestCaseOperation2Output struct { + _ struct{} `type:"structure"` +} + +type InputService15TestShapeInputService15TestCaseOperation3Input struct { + _ struct{} `type:"structure"` + + FooEnum *string `type:"string" enum:"InputService15TestShapeEnumType"` + + ListEnums []*string `type:"list"` +} + +// SetFooEnum sets the FooEnum field's value. +func (s *InputService15TestShapeInputService15TestCaseOperation3Input) SetFooEnum(v string) *InputService15TestShapeInputService15TestCaseOperation3Input { + s.FooEnum = &v + return s +} + +// SetListEnums sets the ListEnums field's value. +func (s *InputService15TestShapeInputService15TestCaseOperation3Input) SetListEnums(v []*string) *InputService15TestShapeInputService15TestCaseOperation3Input { + s.ListEnums = v + return s +} + +type InputService15TestShapeInputService15TestCaseOperation3Output struct { + _ struct{} `type:"structure"` +} + +const ( + // EnumTypeFoo is a InputService15TestShapeEnumType enum value + EnumTypeFoo = "foo" + + // EnumTypeBar is a InputService15TestShapeEnumType enum value + EnumTypeBar = "bar" +) + +// +// Tests begin here +// + +func TestInputService1ProtocolTestScalarMembersCase1(t *testing.T) { + svc := NewInputService1ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) + input := &InputService1TestShapeInputService1TestCaseOperation3Input{ + Bar: aws.String("val2"), + Foo: aws.String("val1"), + } + req, _ := svc.InputService1TestCaseOperation1Request(input) + r := req.HTTPRequest + + // build request + query.Build(req) + if req.Error != nil { + t.Errorf("expect no error, got %v", req.Error) + } + + // assert body + if r.Body == nil { + t.Errorf("expect body not to be nil") + } + body, _ := ioutil.ReadAll(r.Body) awstesting.AssertQuery(t, `Action=OperationName&Bar=val2&Foo=val1&Version=2014-01-01`, util.Trim(string(body))) // assert URL @@ -2771,10 +3275,14 @@ func TestInputService1ProtocolTestScalarMembersCase2(t *testing.T) { // build request query.Build(req) - assert.NoError(t, req.Error) + if req.Error != nil { + t.Errorf("expect no error, got %v", req.Error) + } // assert body - assert.NotNil(t, r.Body) + if r.Body == nil { + t.Errorf("expect body not to be nil") + } body, _ := ioutil.ReadAll(r.Body) awstesting.AssertQuery(t, `Action=OperationName&Baz=true&Version=2014-01-01`, util.Trim(string(body))) @@ -2795,10 +3303,14 @@ func TestInputService1ProtocolTestScalarMembersCase3(t *testing.T) { // build request query.Build(req) - assert.NoError(t, req.Error) + if req.Error != nil { + t.Errorf("expect no error, got %v", req.Error) + } // assert body - assert.NotNil(t, r.Body) + if r.Body == nil { + t.Errorf("expect body not to be nil") + } body, _ := ioutil.ReadAll(r.Body) awstesting.AssertQuery(t, `Action=OperationName&Baz=false&Version=2014-01-01`, util.Trim(string(body))) @@ -2821,10 +3333,14 @@ func TestInputService2ProtocolTestNestedStructureMembersCase1(t *testing.T) { // build request query.Build(req) - assert.NoError(t, req.Error) + if req.Error != nil { + t.Errorf("expect no error, got %v", req.Error) + } // assert body - assert.NotNil(t, r.Body) + if r.Body == nil { + t.Errorf("expect body not to be nil") + } body, _ := ioutil.ReadAll(r.Body) awstesting.AssertQuery(t, `Action=OperationName&StructArg.ScalarArg=foo&Version=2014-01-01`, util.Trim(string(body))) @@ -2849,10 +3365,14 @@ func TestInputService3ProtocolTestListTypesCase1(t *testing.T) { // build request query.Build(req) - assert.NoError(t, req.Error) + if req.Error != nil { + t.Errorf("expect no error, got %v", req.Error) + } // assert body - assert.NotNil(t, r.Body) + if r.Body == nil { + t.Errorf("expect body not to be nil") + } body, _ := ioutil.ReadAll(r.Body) awstesting.AssertQuery(t, `Action=OperationName&ListArg.member.1=foo&ListArg.member.2=bar&ListArg.member.3=baz&Version=2014-01-01`, util.Trim(string(body))) @@ -2873,10 +3393,14 @@ func TestInputService3ProtocolTestListTypesCase2(t *testing.T) { // build request query.Build(req) - assert.NoError(t, req.Error) + if req.Error != nil { + t.Errorf("expect no error, got %v", req.Error) + } // assert body - assert.NotNil(t, r.Body) + if r.Body == nil { + t.Errorf("expect body not to be nil") + } body, _ := ioutil.ReadAll(r.Body) awstesting.AssertQuery(t, `Action=OperationName&ListArg=&Version=2014-01-01`, util.Trim(string(body))) @@ -2902,10 +3426,14 @@ func TestInputService4ProtocolTestFlattenedListCase1(t *testing.T) { // build request query.Build(req) - assert.NoError(t, req.Error) + if req.Error != nil { + t.Errorf("expect no error, got %v", req.Error) + } // assert body - assert.NotNil(t, r.Body) + if r.Body == nil { + t.Errorf("expect body not to be nil") + } body, _ := ioutil.ReadAll(r.Body) awstesting.AssertQuery(t, `Action=OperationName&ListArg.1=a&ListArg.2=b&ListArg.3=c&ScalarArg=foo&Version=2014-01-01`, util.Trim(string(body))) @@ -2928,10 +3456,14 @@ func TestInputService4ProtocolTestFlattenedListCase2(t *testing.T) { // build request query.Build(req) - assert.NoError(t, req.Error) + if req.Error != nil { + t.Errorf("expect no error, got %v", req.Error) + } // assert body - assert.NotNil(t, r.Body) + if r.Body == nil { + t.Errorf("expect body not to be nil") + } body, _ := ioutil.ReadAll(r.Body) awstesting.AssertQuery(t, `Action=OperationName&Foo.1=a&Version=2014-01-01`, util.Trim(string(body))) @@ -2955,10 +3487,14 @@ func TestInputService5ProtocolTestSerializeFlattenedMapTypeCase1(t *testing.T) { // build request query.Build(req) - assert.NoError(t, req.Error) + if req.Error != nil { + t.Errorf("expect no error, got %v", req.Error) + } // assert body - assert.NotNil(t, r.Body) + if r.Body == nil { + t.Errorf("expect body not to be nil") + } body, _ := ioutil.ReadAll(r.Body) awstesting.AssertQuery(t, `Action=OperationName&MapArg.1.key=key1&MapArg.1.value=val1&MapArg.2.key=key2&MapArg.2.value=val2&Version=2014-01-01`, util.Trim(string(body))) @@ -2983,10 +3519,14 @@ func TestInputService6ProtocolTestNonFlattenedListWithLocationNameCase1(t *testi // build request query.Build(req) - assert.NoError(t, req.Error) + if req.Error != nil { + t.Errorf("expect no error, got %v", req.Error) + } // assert body - assert.NotNil(t, r.Body) + if r.Body == nil { + t.Errorf("expect body not to be nil") + } body, _ := ioutil.ReadAll(r.Body) awstesting.AssertQuery(t, `Action=OperationName&ListArg.item.1=a&ListArg.item.2=b&ListArg.item.3=c&Version=2014-01-01`, util.Trim(string(body))) @@ -3012,10 +3552,14 @@ func TestInputService7ProtocolTestFlattenedListWithLocationNameCase1(t *testing. // build request query.Build(req) - assert.NoError(t, req.Error) + if req.Error != nil { + t.Errorf("expect no error, got %v", req.Error) + } // assert body - assert.NotNil(t, r.Body) + if r.Body == nil { + t.Errorf("expect body not to be nil") + } body, _ := ioutil.ReadAll(r.Body) awstesting.AssertQuery(t, `Action=OperationName&ListArgLocation.1=a&ListArgLocation.2=b&ListArgLocation.3=c&ScalarArg=foo&Version=2014-01-01`, util.Trim(string(body))) @@ -3039,10 +3583,14 @@ func TestInputService8ProtocolTestSerializeMapTypeCase1(t *testing.T) { // build request query.Build(req) - assert.NoError(t, req.Error) + if req.Error != nil { + t.Errorf("expect no error, got %v", req.Error) + } // assert body - assert.NotNil(t, r.Body) + if r.Body == nil { + t.Errorf("expect body not to be nil") + } body, _ := ioutil.ReadAll(r.Body) awstesting.AssertQuery(t, `Action=OperationName&MapArg.entry.1.key=key1&MapArg.entry.1.value=val1&MapArg.entry.2.key=key2&MapArg.entry.2.value=val2&Version=2014-01-01`, util.Trim(string(body))) @@ -3066,10 +3614,14 @@ func TestInputService9ProtocolTestSerializeMapTypeWithLocationNameCase1(t *testi // build request query.Build(req) - assert.NoError(t, req.Error) + if req.Error != nil { + t.Errorf("expect no error, got %v", req.Error) + } // assert body - assert.NotNil(t, r.Body) + if r.Body == nil { + t.Errorf("expect body not to be nil") + } body, _ := ioutil.ReadAll(r.Body) awstesting.AssertQuery(t, `Action=OperationName&MapArg.entry.1.TheKey=key1&MapArg.entry.1.TheValue=val1&MapArg.entry.2.TheKey=key2&MapArg.entry.2.TheValue=val2&Version=2014-01-01`, util.Trim(string(body))) @@ -3090,10 +3642,14 @@ func TestInputService10ProtocolTestBase64EncodedBlobsCase1(t *testing.T) { // build request query.Build(req) - assert.NoError(t, req.Error) + if req.Error != nil { + t.Errorf("expect no error, got %v", req.Error) + } // assert body - assert.NotNil(t, r.Body) + if r.Body == nil { + t.Errorf("expect body not to be nil") + } body, _ := ioutil.ReadAll(r.Body) awstesting.AssertQuery(t, `Action=OperationName&BlobArg=Zm9v&Version=2014-01-01`, util.Trim(string(body))) @@ -3104,22 +3660,28 @@ func TestInputService10ProtocolTestBase64EncodedBlobsCase1(t *testing.T) { } -func TestInputService11ProtocolTestTimestampValuesCase1(t *testing.T) { +func TestInputService11ProtocolTestBase64EncodedBlobsNestedCase1(t *testing.T) { svc := NewInputService11ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) input := &InputService11TestShapeInputService11TestCaseOperation1Input{ - TimeArg: aws.Time(time.Unix(1422172800, 0)), + BlobArgs: [][]byte{ + []byte("foo"), + }, } req, _ := svc.InputService11TestCaseOperation1Request(input) r := req.HTTPRequest // build request query.Build(req) - assert.NoError(t, req.Error) + if req.Error != nil { + t.Errorf("expect no error, got %v", req.Error) + } // assert body - assert.NotNil(t, r.Body) + if r.Body == nil { + t.Errorf("expect body not to be nil") + } body, _ := ioutil.ReadAll(r.Body) - awstesting.AssertQuery(t, `Action=OperationName&TimeArg=2015-01-25T08%3A00%3A00Z&Version=2014-01-01`, util.Trim(string(body))) + awstesting.AssertQuery(t, `Action=OperationName&BlobArgs.1=Zm9v&Version=2014-01-01`, util.Trim(string(body))) // assert URL awstesting.AssertURL(t, "https://test/", r.URL.String()) @@ -3128,22 +3690,54 @@ func TestInputService11ProtocolTestTimestampValuesCase1(t *testing.T) { } -func TestInputService12ProtocolTestRecursiveShapesCase1(t *testing.T) { +func TestInputService12ProtocolTestTimestampValuesCase1(t *testing.T) { svc := NewInputService12ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService12TestShapeInputService12TestCaseOperation6Input{ - RecursiveStruct: &InputService12TestShapeRecursiveStructType{ + input := &InputService12TestShapeInputService12TestCaseOperation1Input{ + TimeArg: aws.Time(time.Unix(1422172800, 0)), + } + req, _ := svc.InputService12TestCaseOperation1Request(input) + r := req.HTTPRequest + + // build request + query.Build(req) + if req.Error != nil { + t.Errorf("expect no error, got %v", req.Error) + } + + // assert body + if r.Body == nil { + t.Errorf("expect body not to be nil") + } + body, _ := ioutil.ReadAll(r.Body) + awstesting.AssertQuery(t, `Action=OperationName&TimeArg=2015-01-25T08%3A00%3A00Z&Version=2014-01-01`, util.Trim(string(body))) + + // assert URL + awstesting.AssertURL(t, "https://test/", r.URL.String()) + + // assert headers + +} + +func TestInputService13ProtocolTestRecursiveShapesCase1(t *testing.T) { + svc := NewInputService13ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) + input := &InputService13TestShapeInputService13TestCaseOperation6Input{ + RecursiveStruct: &InputService13TestShapeRecursiveStructType{ NoRecurse: aws.String("foo"), }, } - req, _ := svc.InputService12TestCaseOperation1Request(input) + req, _ := svc.InputService13TestCaseOperation1Request(input) r := req.HTTPRequest // build request query.Build(req) - assert.NoError(t, req.Error) + if req.Error != nil { + t.Errorf("expect no error, got %v", req.Error) + } // assert body - assert.NotNil(t, r.Body) + if r.Body == nil { + t.Errorf("expect body not to be nil") + } body, _ := ioutil.ReadAll(r.Body) awstesting.AssertQuery(t, `Action=OperationName&RecursiveStruct.NoRecurse=foo&Version=2014-01-01`, util.Trim(string(body))) @@ -3154,24 +3748,28 @@ func TestInputService12ProtocolTestRecursiveShapesCase1(t *testing.T) { } -func TestInputService12ProtocolTestRecursiveShapesCase2(t *testing.T) { - svc := NewInputService12ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService12TestShapeInputService12TestCaseOperation6Input{ - RecursiveStruct: &InputService12TestShapeRecursiveStructType{ - RecursiveStruct: &InputService12TestShapeRecursiveStructType{ +func TestInputService13ProtocolTestRecursiveShapesCase2(t *testing.T) { + svc := NewInputService13ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) + input := &InputService13TestShapeInputService13TestCaseOperation6Input{ + RecursiveStruct: &InputService13TestShapeRecursiveStructType{ + RecursiveStruct: &InputService13TestShapeRecursiveStructType{ NoRecurse: aws.String("foo"), }, }, } - req, _ := svc.InputService12TestCaseOperation2Request(input) + req, _ := svc.InputService13TestCaseOperation2Request(input) r := req.HTTPRequest // build request query.Build(req) - assert.NoError(t, req.Error) + if req.Error != nil { + t.Errorf("expect no error, got %v", req.Error) + } // assert body - assert.NotNil(t, r.Body) + if r.Body == nil { + t.Errorf("expect body not to be nil") + } body, _ := ioutil.ReadAll(r.Body) awstesting.AssertQuery(t, `Action=OperationName&RecursiveStruct.RecursiveStruct.NoRecurse=foo&Version=2014-01-01`, util.Trim(string(body))) @@ -3182,28 +3780,32 @@ func TestInputService12ProtocolTestRecursiveShapesCase2(t *testing.T) { } -func TestInputService12ProtocolTestRecursiveShapesCase3(t *testing.T) { - svc := NewInputService12ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService12TestShapeInputService12TestCaseOperation6Input{ - RecursiveStruct: &InputService12TestShapeRecursiveStructType{ - RecursiveStruct: &InputService12TestShapeRecursiveStructType{ - RecursiveStruct: &InputService12TestShapeRecursiveStructType{ - RecursiveStruct: &InputService12TestShapeRecursiveStructType{ +func TestInputService13ProtocolTestRecursiveShapesCase3(t *testing.T) { + svc := NewInputService13ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) + input := &InputService13TestShapeInputService13TestCaseOperation6Input{ + RecursiveStruct: &InputService13TestShapeRecursiveStructType{ + RecursiveStruct: &InputService13TestShapeRecursiveStructType{ + RecursiveStruct: &InputService13TestShapeRecursiveStructType{ + RecursiveStruct: &InputService13TestShapeRecursiveStructType{ NoRecurse: aws.String("foo"), }, }, }, }, } - req, _ := svc.InputService12TestCaseOperation3Request(input) + req, _ := svc.InputService13TestCaseOperation3Request(input) r := req.HTTPRequest // build request query.Build(req) - assert.NoError(t, req.Error) + if req.Error != nil { + t.Errorf("expect no error, got %v", req.Error) + } // assert body - assert.NotNil(t, r.Body) + if r.Body == nil { + t.Errorf("expect body not to be nil") + } body, _ := ioutil.ReadAll(r.Body) awstesting.AssertQuery(t, `Action=OperationName&RecursiveStruct.RecursiveStruct.RecursiveStruct.RecursiveStruct.NoRecurse=foo&Version=2014-01-01`, util.Trim(string(body))) @@ -3214,11 +3816,11 @@ func TestInputService12ProtocolTestRecursiveShapesCase3(t *testing.T) { } -func TestInputService12ProtocolTestRecursiveShapesCase4(t *testing.T) { - svc := NewInputService12ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService12TestShapeInputService12TestCaseOperation6Input{ - RecursiveStruct: &InputService12TestShapeRecursiveStructType{ - RecursiveList: []*InputService12TestShapeRecursiveStructType{ +func TestInputService13ProtocolTestRecursiveShapesCase4(t *testing.T) { + svc := NewInputService13ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) + input := &InputService13TestShapeInputService13TestCaseOperation6Input{ + RecursiveStruct: &InputService13TestShapeRecursiveStructType{ + RecursiveList: []*InputService13TestShapeRecursiveStructType{ { NoRecurse: aws.String("foo"), }, @@ -3228,15 +3830,19 @@ func TestInputService12ProtocolTestRecursiveShapesCase4(t *testing.T) { }, }, } - req, _ := svc.InputService12TestCaseOperation4Request(input) + req, _ := svc.InputService13TestCaseOperation4Request(input) r := req.HTTPRequest // build request query.Build(req) - assert.NoError(t, req.Error) + if req.Error != nil { + t.Errorf("expect no error, got %v", req.Error) + } // assert body - assert.NotNil(t, r.Body) + if r.Body == nil { + t.Errorf("expect body not to be nil") + } body, _ := ioutil.ReadAll(r.Body) awstesting.AssertQuery(t, `Action=OperationName&RecursiveStruct.RecursiveList.member.1.NoRecurse=foo&RecursiveStruct.RecursiveList.member.2.NoRecurse=bar&Version=2014-01-01`, util.Trim(string(body))) @@ -3247,31 +3853,35 @@ func TestInputService12ProtocolTestRecursiveShapesCase4(t *testing.T) { } -func TestInputService12ProtocolTestRecursiveShapesCase5(t *testing.T) { - svc := NewInputService12ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService12TestShapeInputService12TestCaseOperation6Input{ - RecursiveStruct: &InputService12TestShapeRecursiveStructType{ - RecursiveList: []*InputService12TestShapeRecursiveStructType{ +func TestInputService13ProtocolTestRecursiveShapesCase5(t *testing.T) { + svc := NewInputService13ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) + input := &InputService13TestShapeInputService13TestCaseOperation6Input{ + RecursiveStruct: &InputService13TestShapeRecursiveStructType{ + RecursiveList: []*InputService13TestShapeRecursiveStructType{ { NoRecurse: aws.String("foo"), }, { - RecursiveStruct: &InputService12TestShapeRecursiveStructType{ + RecursiveStruct: &InputService13TestShapeRecursiveStructType{ NoRecurse: aws.String("bar"), }, }, }, }, } - req, _ := svc.InputService12TestCaseOperation5Request(input) + req, _ := svc.InputService13TestCaseOperation5Request(input) r := req.HTTPRequest // build request query.Build(req) - assert.NoError(t, req.Error) + if req.Error != nil { + t.Errorf("expect no error, got %v", req.Error) + } // assert body - assert.NotNil(t, r.Body) + if r.Body == nil { + t.Errorf("expect body not to be nil") + } body, _ := ioutil.ReadAll(r.Body) awstesting.AssertQuery(t, `Action=OperationName&RecursiveStruct.RecursiveList.member.1.NoRecurse=foo&RecursiveStruct.RecursiveList.member.2.RecursiveStruct.NoRecurse=bar&Version=2014-01-01`, util.Trim(string(body))) @@ -3282,11 +3892,11 @@ func TestInputService12ProtocolTestRecursiveShapesCase5(t *testing.T) { } -func TestInputService12ProtocolTestRecursiveShapesCase6(t *testing.T) { - svc := NewInputService12ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService12TestShapeInputService12TestCaseOperation6Input{ - RecursiveStruct: &InputService12TestShapeRecursiveStructType{ - RecursiveMap: map[string]*InputService12TestShapeRecursiveStructType{ +func TestInputService13ProtocolTestRecursiveShapesCase6(t *testing.T) { + svc := NewInputService13ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) + input := &InputService13TestShapeInputService13TestCaseOperation6Input{ + RecursiveStruct: &InputService13TestShapeRecursiveStructType{ + RecursiveMap: map[string]*InputService13TestShapeRecursiveStructType{ "bar": { NoRecurse: aws.String("bar"), }, @@ -3296,15 +3906,19 @@ func TestInputService12ProtocolTestRecursiveShapesCase6(t *testing.T) { }, }, } - req, _ := svc.InputService12TestCaseOperation6Request(input) + req, _ := svc.InputService13TestCaseOperation6Request(input) r := req.HTTPRequest // build request query.Build(req) - assert.NoError(t, req.Error) + if req.Error != nil { + t.Errorf("expect no error, got %v", req.Error) + } // assert body - assert.NotNil(t, r.Body) + if r.Body == nil { + t.Errorf("expect body not to be nil") + } body, _ := ioutil.ReadAll(r.Body) awstesting.AssertQuery(t, `Action=OperationName&RecursiveStruct.RecursiveMap.entry.1.key=foo&RecursiveStruct.RecursiveMap.entry.1.value.NoRecurse=foo&RecursiveStruct.RecursiveMap.entry.2.key=bar&RecursiveStruct.RecursiveMap.entry.2.value.NoRecurse=bar&Version=2014-01-01`, util.Trim(string(body))) @@ -3315,20 +3929,24 @@ func TestInputService12ProtocolTestRecursiveShapesCase6(t *testing.T) { } -func TestInputService13ProtocolTestIdempotencyTokenAutoFillCase1(t *testing.T) { - svc := NewInputService13ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService13TestShapeInputService13TestCaseOperation2Input{ +func TestInputService14ProtocolTestIdempotencyTokenAutoFillCase1(t *testing.T) { + svc := NewInputService14ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) + input := &InputService14TestShapeInputService14TestCaseOperation2Input{ Token: aws.String("abc123"), } - req, _ := svc.InputService13TestCaseOperation1Request(input) + req, _ := svc.InputService14TestCaseOperation1Request(input) r := req.HTTPRequest // build request query.Build(req) - assert.NoError(t, req.Error) + if req.Error != nil { + t.Errorf("expect no error, got %v", req.Error) + } // assert body - assert.NotNil(t, r.Body) + if r.Body == nil { + t.Errorf("expect body not to be nil") + } body, _ := ioutil.ReadAll(r.Body) awstesting.AssertQuery(t, `Action=OperationName&Token=abc123&Version=2014-01-01`, util.Trim(string(body))) @@ -3339,18 +3957,22 @@ func TestInputService13ProtocolTestIdempotencyTokenAutoFillCase1(t *testing.T) { } -func TestInputService13ProtocolTestIdempotencyTokenAutoFillCase2(t *testing.T) { - svc := NewInputService13ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService13TestShapeInputService13TestCaseOperation2Input{} - req, _ := svc.InputService13TestCaseOperation2Request(input) +func TestInputService14ProtocolTestIdempotencyTokenAutoFillCase2(t *testing.T) { + svc := NewInputService14ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) + input := &InputService14TestShapeInputService14TestCaseOperation2Input{} + req, _ := svc.InputService14TestCaseOperation2Request(input) r := req.HTTPRequest // build request query.Build(req) - assert.NoError(t, req.Error) + if req.Error != nil { + t.Errorf("expect no error, got %v", req.Error) + } // assert body - assert.NotNil(t, r.Body) + if r.Body == nil { + t.Errorf("expect body not to be nil") + } body, _ := ioutil.ReadAll(r.Body) awstesting.AssertQuery(t, `Action=OperationName&Token=00000000-0000-4000-8000-000000000000&Version=2014-01-01`, util.Trim(string(body))) @@ -3360,3 +3982,90 @@ func TestInputService13ProtocolTestIdempotencyTokenAutoFillCase2(t *testing.T) { // assert headers } + +func TestInputService15ProtocolTestEnumCase1(t *testing.T) { + svc := NewInputService15ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) + input := &InputService15TestShapeInputService15TestCaseOperation3Input{ + FooEnum: aws.String("foo"), + ListEnums: []*string{ + aws.String("foo"), + aws.String(""), + aws.String("bar"), + }, + } + req, _ := svc.InputService15TestCaseOperation1Request(input) + r := req.HTTPRequest + + // build request + query.Build(req) + if req.Error != nil { + t.Errorf("expect no error, got %v", req.Error) + } + + // assert body + if r.Body == nil { + t.Errorf("expect body not to be nil") + } + body, _ := ioutil.ReadAll(r.Body) + awstesting.AssertQuery(t, `Action=OperationName&FooEnum=foo&ListEnums.member.1=foo&ListEnums.member.2=&ListEnums.member.3=bar&Version=2014-01-01`, util.Trim(string(body))) + + // assert URL + awstesting.AssertURL(t, "https://test/", r.URL.String()) + + // assert headers + +} + +func TestInputService15ProtocolTestEnumCase2(t *testing.T) { + svc := NewInputService15ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) + input := &InputService15TestShapeInputService15TestCaseOperation3Input{ + FooEnum: aws.String("foo"), + } + req, _ := svc.InputService15TestCaseOperation2Request(input) + r := req.HTTPRequest + + // build request + query.Build(req) + if req.Error != nil { + t.Errorf("expect no error, got %v", req.Error) + } + + // assert body + if r.Body == nil { + t.Errorf("expect body not to be nil") + } + body, _ := ioutil.ReadAll(r.Body) + awstesting.AssertQuery(t, `Action=OperationName&FooEnum=foo&Version=2014-01-01`, util.Trim(string(body))) + + // assert URL + awstesting.AssertURL(t, "https://test/", r.URL.String()) + + // assert headers + +} + +func TestInputService15ProtocolTestEnumCase3(t *testing.T) { + svc := NewInputService15ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) + input := &InputService15TestShapeInputService15TestCaseOperation3Input{} + req, _ := svc.InputService15TestCaseOperation3Request(input) + r := req.HTTPRequest + + // build request + query.Build(req) + if req.Error != nil { + t.Errorf("expect no error, got %v", req.Error) + } + + // assert body + if r.Body == nil { + t.Errorf("expect body not to be nil") + } + body, _ := ioutil.ReadAll(r.Body) + awstesting.AssertQuery(t, `Action=OperationName&Version=2014-01-01`, util.Trim(string(body))) + + // assert URL + awstesting.AssertURL(t, "https://test/", r.URL.String()) + + // assert headers + +} diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/query/queryutil/queryutil.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/query/queryutil/queryutil.go index 524ca95..5ce9cba 100644 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/query/queryutil/queryutil.go +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/query/queryutil/queryutil.go @@ -121,6 +121,10 @@ func (q *queryParser) parseList(v url.Values, value reflect.Value, prefix string return nil } + if _, ok := value.Interface().([]byte); ok { + return q.parseScalar(v, value, prefix, tag) + } + // check for unflattened list member if !q.isEC2 && tag.Get("flattened") == "" { if listName := tag.Get("locationNameList"); listName == "" { diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/query/unmarshal_test.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/query/unmarshal_test.go index 2908b61..afbe3df 100644 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/query/unmarshal_test.go +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/query/unmarshal_test.go @@ -24,7 +24,6 @@ import ( "github.com/aws/aws-sdk-go/private/protocol/query" "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil" "github.com/aws/aws-sdk-go/private/util" - "github.com/stretchr/testify/assert" ) var _ bytes.Buffer // always import bytes @@ -45,8 +44,12 @@ func init() { protocol.RandReader = &awstesting.ZeroReader{} } -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. +// OutputService1ProtocolTest provides the API operation methods for making requests to +// . See this package's package overview docs +// for details on the service. +// +// OutputService1ProtocolTest methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. type OutputService1ProtocolTest struct { *client.Client } @@ -73,6 +76,7 @@ func newOutputService1ProtocolTestClient(cfg aws.Config, handlers request.Handle cfg, metadata.ClientInfo{ ServiceName: "outputservice1protocoltest", + ServiceID: "OutputService1ProtocolTest", SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, @@ -104,19 +108,18 @@ const opOutputService1TestCaseOperation1 = "OperationName" // OutputService1TestCaseOperation1Request generates a "aws/request.Request" representing the // client's request for the OutputService1TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See OutputService1TestCaseOperation1 for usage and error information. +// See OutputService1TestCaseOperation1 for more information on using the OutputService1TestCaseOperation1 +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the OutputService1TestCaseOperation1 method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the OutputService1TestCaseOperation1Request method. // req, resp := client.OutputService1TestCaseOperation1Request(params) @@ -249,8 +252,12 @@ func (s *OutputService1TestShapeOutputService1TestCaseOperation1Output) SetTrueB return s } -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. +// OutputService2ProtocolTest provides the API operation methods for making requests to +// . See this package's package overview docs +// for details on the service. +// +// OutputService2ProtocolTest methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. type OutputService2ProtocolTest struct { *client.Client } @@ -277,6 +284,7 @@ func newOutputService2ProtocolTestClient(cfg aws.Config, handlers request.Handle cfg, metadata.ClientInfo{ ServiceName: "outputservice2protocoltest", + ServiceID: "OutputService2ProtocolTest", SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, @@ -308,19 +316,18 @@ const opOutputService2TestCaseOperation1 = "OperationName" // OutputService2TestCaseOperation1Request generates a "aws/request.Request" representing the // client's request for the OutputService2TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See OutputService2TestCaseOperation1 for usage and error information. +// See OutputService2TestCaseOperation1 for more information on using the OutputService2TestCaseOperation1 +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the OutputService2TestCaseOperation1 method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the OutputService2TestCaseOperation1Request method. // req, resp := client.OutputService2TestCaseOperation1Request(params) @@ -397,8 +404,12 @@ func (s *OutputService2TestShapeOutputService2TestCaseOperation1Output) SetStr(v return s } -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. +// OutputService3ProtocolTest provides the API operation methods for making requests to +// . See this package's package overview docs +// for details on the service. +// +// OutputService3ProtocolTest methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. type OutputService3ProtocolTest struct { *client.Client } @@ -425,6 +436,7 @@ func newOutputService3ProtocolTestClient(cfg aws.Config, handlers request.Handle cfg, metadata.ClientInfo{ ServiceName: "outputservice3protocoltest", + ServiceID: "OutputService3ProtocolTest", SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, @@ -456,19 +468,18 @@ const opOutputService3TestCaseOperation1 = "OperationName" // OutputService3TestCaseOperation1Request generates a "aws/request.Request" representing the // client's request for the OutputService3TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See OutputService3TestCaseOperation1 for usage and error information. +// See OutputService3TestCaseOperation1 for more information on using the OutputService3TestCaseOperation1 +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the OutputService3TestCaseOperation1 method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the OutputService3TestCaseOperation1Request method. // req, resp := client.OutputService3TestCaseOperation1Request(params) @@ -538,8 +549,12 @@ func (s *OutputService3TestShapeOutputService3TestCaseOperation1Output) SetBlob( return s } -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. +// OutputService4ProtocolTest provides the API operation methods for making requests to +// . See this package's package overview docs +// for details on the service. +// +// OutputService4ProtocolTest methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. type OutputService4ProtocolTest struct { *client.Client } @@ -566,6 +581,7 @@ func newOutputService4ProtocolTestClient(cfg aws.Config, handlers request.Handle cfg, metadata.ClientInfo{ ServiceName: "outputservice4protocoltest", + ServiceID: "OutputService4ProtocolTest", SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, @@ -597,19 +613,18 @@ const opOutputService4TestCaseOperation1 = "OperationName" // OutputService4TestCaseOperation1Request generates a "aws/request.Request" representing the // client's request for the OutputService4TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. // -// See OutputService4TestCaseOperation1 for usage and error information. +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the OutputService4TestCaseOperation1 method directly -// instead. +// See OutputService4TestCaseOperation1 for more information on using the OutputService4TestCaseOperation1 +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the OutputService4TestCaseOperation1Request method. // req, resp := client.OutputService4TestCaseOperation1Request(params) @@ -678,8 +693,12 @@ func (s *OutputService4TestShapeOutputService4TestCaseOperation1Output) SetListM return s } -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. +// OutputService5ProtocolTest provides the API operation methods for making requests to +// . See this package's package overview docs +// for details on the service. +// +// OutputService5ProtocolTest methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. type OutputService5ProtocolTest struct { *client.Client } @@ -706,6 +725,7 @@ func newOutputService5ProtocolTestClient(cfg aws.Config, handlers request.Handle cfg, metadata.ClientInfo{ ServiceName: "outputservice5protocoltest", + ServiceID: "OutputService5ProtocolTest", SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, @@ -737,19 +757,18 @@ const opOutputService5TestCaseOperation1 = "OperationName" // OutputService5TestCaseOperation1Request generates a "aws/request.Request" representing the // client's request for the OutputService5TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. // -// See OutputService5TestCaseOperation1 for usage and error information. +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the OutputService5TestCaseOperation1 method directly -// instead. +// See OutputService5TestCaseOperation1 for more information on using the OutputService5TestCaseOperation1 +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the OutputService5TestCaseOperation1Request method. // req, resp := client.OutputService5TestCaseOperation1Request(params) @@ -818,8 +837,12 @@ func (s *OutputService5TestShapeOutputService5TestCaseOperation1Output) SetListM return s } -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. +// OutputService6ProtocolTest provides the API operation methods for making requests to +// . See this package's package overview docs +// for details on the service. +// +// OutputService6ProtocolTest methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. type OutputService6ProtocolTest struct { *client.Client } @@ -846,6 +869,7 @@ func newOutputService6ProtocolTestClient(cfg aws.Config, handlers request.Handle cfg, metadata.ClientInfo{ ServiceName: "outputservice6protocoltest", + ServiceID: "OutputService6ProtocolTest", SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, @@ -877,19 +901,18 @@ const opOutputService6TestCaseOperation1 = "OperationName" // OutputService6TestCaseOperation1Request generates a "aws/request.Request" representing the // client's request for the OutputService6TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. // -// See OutputService6TestCaseOperation1 for usage and error information. +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the OutputService6TestCaseOperation1 method directly -// instead. +// See OutputService6TestCaseOperation1 for more information on using the OutputService6TestCaseOperation1 +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the OutputService6TestCaseOperation1Request method. // req, resp := client.OutputService6TestCaseOperation1Request(params) @@ -958,8 +981,12 @@ func (s *OutputService6TestShapeOutputService6TestCaseOperation1Output) SetListM return s } -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. +// OutputService7ProtocolTest provides the API operation methods for making requests to +// . See this package's package overview docs +// for details on the service. +// +// OutputService7ProtocolTest methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. type OutputService7ProtocolTest struct { *client.Client } @@ -986,6 +1013,7 @@ func newOutputService7ProtocolTestClient(cfg aws.Config, handlers request.Handle cfg, metadata.ClientInfo{ ServiceName: "outputservice7protocoltest", + ServiceID: "OutputService7ProtocolTest", SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, @@ -1017,19 +1045,18 @@ const opOutputService7TestCaseOperation1 = "OperationName" // OutputService7TestCaseOperation1Request generates a "aws/request.Request" representing the // client's request for the OutputService7TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See OutputService7TestCaseOperation1 for usage and error information. +// See OutputService7TestCaseOperation1 for more information on using the OutputService7TestCaseOperation1 +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the OutputService7TestCaseOperation1 method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the OutputService7TestCaseOperation1Request method. // req, resp := client.OutputService7TestCaseOperation1Request(params) @@ -1098,8 +1125,12 @@ func (s *OutputService7TestShapeOutputService7TestCaseOperation1Output) SetListM return s } -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. +// OutputService8ProtocolTest provides the API operation methods for making requests to +// . See this package's package overview docs +// for details on the service. +// +// OutputService8ProtocolTest methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. type OutputService8ProtocolTest struct { *client.Client } @@ -1126,6 +1157,7 @@ func newOutputService8ProtocolTestClient(cfg aws.Config, handlers request.Handle cfg, metadata.ClientInfo{ ServiceName: "outputservice8protocoltest", + ServiceID: "OutputService8ProtocolTest", SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, @@ -1157,19 +1189,18 @@ const opOutputService8TestCaseOperation1 = "OperationName" // OutputService8TestCaseOperation1Request generates a "aws/request.Request" representing the // client's request for the OutputService8TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See OutputService8TestCaseOperation1 for usage and error information. +// See OutputService8TestCaseOperation1 for more information on using the OutputService8TestCaseOperation1 +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the OutputService8TestCaseOperation1 method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the OutputService8TestCaseOperation1Request method. // req, resp := client.OutputService8TestCaseOperation1Request(params) @@ -1266,8 +1297,12 @@ func (s *OutputService8TestShapeStructureShape) SetFoo(v string) *OutputService8 return s } -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. +// OutputService9ProtocolTest provides the API operation methods for making requests to +// . See this package's package overview docs +// for details on the service. +// +// OutputService9ProtocolTest methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. type OutputService9ProtocolTest struct { *client.Client } @@ -1294,6 +1329,7 @@ func newOutputService9ProtocolTestClient(cfg aws.Config, handlers request.Handle cfg, metadata.ClientInfo{ ServiceName: "outputservice9protocoltest", + ServiceID: "OutputService9ProtocolTest", SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, @@ -1325,19 +1361,18 @@ const opOutputService9TestCaseOperation1 = "OperationName" // OutputService9TestCaseOperation1Request generates a "aws/request.Request" representing the // client's request for the OutputService9TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See OutputService9TestCaseOperation1 for usage and error information. +// See OutputService9TestCaseOperation1 for more information on using the OutputService9TestCaseOperation1 +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the OutputService9TestCaseOperation1 method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the OutputService9TestCaseOperation1Request method. // req, resp := client.OutputService9TestCaseOperation1Request(params) @@ -1434,8 +1469,12 @@ func (s *OutputService9TestShapeStructureShape) SetFoo(v string) *OutputService9 return s } -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. +// OutputService10ProtocolTest provides the API operation methods for making requests to +// . See this package's package overview docs +// for details on the service. +// +// OutputService10ProtocolTest methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. type OutputService10ProtocolTest struct { *client.Client } @@ -1462,6 +1501,7 @@ func newOutputService10ProtocolTestClient(cfg aws.Config, handlers request.Handl cfg, metadata.ClientInfo{ ServiceName: "outputservice10protocoltest", + ServiceID: "OutputService10ProtocolTest", SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, @@ -1493,19 +1533,18 @@ const opOutputService10TestCaseOperation1 = "OperationName" // OutputService10TestCaseOperation1Request generates a "aws/request.Request" representing the // client's request for the OutputService10TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See OutputService10TestCaseOperation1 for usage and error information. +// See OutputService10TestCaseOperation1 for more information on using the OutputService10TestCaseOperation1 +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the OutputService10TestCaseOperation1 method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the OutputService10TestCaseOperation1Request method. // req, resp := client.OutputService10TestCaseOperation1Request(params) @@ -1574,8 +1613,12 @@ func (s *OutputService10TestShapeOutputService10TestCaseOperation1Output) SetLis return s } -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. +// OutputService11ProtocolTest provides the API operation methods for making requests to +// . See this package's package overview docs +// for details on the service. +// +// OutputService11ProtocolTest methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. type OutputService11ProtocolTest struct { *client.Client } @@ -1602,6 +1645,7 @@ func newOutputService11ProtocolTestClient(cfg aws.Config, handlers request.Handl cfg, metadata.ClientInfo{ ServiceName: "outputservice11protocoltest", + ServiceID: "OutputService11ProtocolTest", SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, @@ -1633,19 +1677,18 @@ const opOutputService11TestCaseOperation1 = "OperationName" // OutputService11TestCaseOperation1Request generates a "aws/request.Request" representing the // client's request for the OutputService11TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. // -// See OutputService11TestCaseOperation1 for usage and error information. +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the OutputService11TestCaseOperation1 method directly -// instead. +// See OutputService11TestCaseOperation1 for more information on using the OutputService11TestCaseOperation1 +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the OutputService11TestCaseOperation1Request method. // req, resp := client.OutputService11TestCaseOperation1Request(params) @@ -1726,8 +1769,12 @@ func (s *OutputService11TestShapeStructType) SetFoo(v string) *OutputService11Te return s } -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. +// OutputService12ProtocolTest provides the API operation methods for making requests to +// . See this package's package overview docs +// for details on the service. +// +// OutputService12ProtocolTest methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. type OutputService12ProtocolTest struct { *client.Client } @@ -1754,6 +1801,7 @@ func newOutputService12ProtocolTestClient(cfg aws.Config, handlers request.Handl cfg, metadata.ClientInfo{ ServiceName: "outputservice12protocoltest", + ServiceID: "OutputService12ProtocolTest", SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, @@ -1785,19 +1833,18 @@ const opOutputService12TestCaseOperation1 = "OperationName" // OutputService12TestCaseOperation1Request generates a "aws/request.Request" representing the // client's request for the OutputService12TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. // -// See OutputService12TestCaseOperation1 for usage and error information. +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the OutputService12TestCaseOperation1 method directly -// instead. +// See OutputService12TestCaseOperation1 for more information on using the OutputService12TestCaseOperation1 +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the OutputService12TestCaseOperation1Request method. // req, resp := client.OutputService12TestCaseOperation1Request(params) @@ -1866,8 +1913,12 @@ func (s *OutputService12TestShapeOutputService12TestCaseOperation1Output) SetMap return s } -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. +// OutputService13ProtocolTest provides the API operation methods for making requests to +// . See this package's package overview docs +// for details on the service. +// +// OutputService13ProtocolTest methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. type OutputService13ProtocolTest struct { *client.Client } @@ -1894,6 +1945,7 @@ func newOutputService13ProtocolTestClient(cfg aws.Config, handlers request.Handl cfg, metadata.ClientInfo{ ServiceName: "outputservice13protocoltest", + ServiceID: "OutputService13ProtocolTest", SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, @@ -1925,19 +1977,18 @@ const opOutputService13TestCaseOperation1 = "OperationName" // OutputService13TestCaseOperation1Request generates a "aws/request.Request" representing the // client's request for the OutputService13TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. // -// See OutputService13TestCaseOperation1 for usage and error information. +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the OutputService13TestCaseOperation1 method directly -// instead. +// See OutputService13TestCaseOperation1 for more information on using the OutputService13TestCaseOperation1 +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the OutputService13TestCaseOperation1Request method. // req, resp := client.OutputService13TestCaseOperation1Request(params) @@ -2006,8 +2057,12 @@ func (s *OutputService13TestShapeOutputService13TestCaseOperation1Output) SetMap return s } -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. +// OutputService14ProtocolTest provides the API operation methods for making requests to +// . See this package's package overview docs +// for details on the service. +// +// OutputService14ProtocolTest methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. type OutputService14ProtocolTest struct { *client.Client } @@ -2034,6 +2089,7 @@ func newOutputService14ProtocolTestClient(cfg aws.Config, handlers request.Handl cfg, metadata.ClientInfo{ ServiceName: "outputservice14protocoltest", + ServiceID: "OutputService14ProtocolTest", SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, @@ -2065,19 +2121,18 @@ const opOutputService14TestCaseOperation1 = "OperationName" // OutputService14TestCaseOperation1Request generates a "aws/request.Request" representing the // client's request for the OutputService14TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See OutputService14TestCaseOperation1 for usage and error information. +// See OutputService14TestCaseOperation1 for more information on using the OutputService14TestCaseOperation1 +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the OutputService14TestCaseOperation1 method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the OutputService14TestCaseOperation1Request method. // req, resp := client.OutputService14TestCaseOperation1Request(params) @@ -2146,8 +2201,12 @@ func (s *OutputService14TestShapeOutputService14TestCaseOperation1Output) SetMap return s } -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. +// OutputService15ProtocolTest provides the API operation methods for making requests to +// . See this package's package overview docs +// for details on the service. +// +// OutputService15ProtocolTest methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. type OutputService15ProtocolTest struct { *client.Client } @@ -2174,6 +2233,7 @@ func newOutputService15ProtocolTestClient(cfg aws.Config, handlers request.Handl cfg, metadata.ClientInfo{ ServiceName: "outputservice15protocoltest", + ServiceID: "OutputService15ProtocolTest", SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, @@ -2205,19 +2265,18 @@ const opOutputService15TestCaseOperation1 = "OperationName" // OutputService15TestCaseOperation1Request generates a "aws/request.Request" representing the // client's request for the OutputService15TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See OutputService15TestCaseOperation1 for usage and error information. +// See OutputService15TestCaseOperation1 for more information on using the OutputService15TestCaseOperation1 +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the OutputService15TestCaseOperation1 method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the OutputService15TestCaseOperation1Request method. // req, resp := client.OutputService15TestCaseOperation1Request(params) @@ -2286,6 +2345,166 @@ func (s *OutputService15TestShapeOutputService15TestCaseOperation1Output) SetFoo return s } +// OutputService16ProtocolTest provides the API operation methods for making requests to +// . See this package's package overview docs +// for details on the service. +// +// OutputService16ProtocolTest methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type OutputService16ProtocolTest struct { + *client.Client +} + +// New creates a new instance of the OutputService16ProtocolTest client with a session. +// If additional configuration is needed for the client instance use the optional +// aws.Config parameter to add your extra config. +// +// Example: +// // Create a OutputService16ProtocolTest client from just a session. +// svc := outputservice16protocoltest.New(mySession) +// +// // Create a OutputService16ProtocolTest client with additional configuration +// svc := outputservice16protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func NewOutputService16ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService16ProtocolTest { + c := p.ClientConfig("outputservice16protocoltest", cfgs...) + return newOutputService16ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) +} + +// newClient creates, initializes and returns a new service client instance. +func newOutputService16ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *OutputService16ProtocolTest { + svc := &OutputService16ProtocolTest{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: "outputservice16protocoltest", + ServiceID: "OutputService16ProtocolTest", + SigningName: signingName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "", + }, + handlers, + ), + } + + // Handlers + svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) + svc.Handlers.Build.PushBackNamed(query.BuildHandler) + svc.Handlers.Unmarshal.PushBackNamed(query.UnmarshalHandler) + svc.Handlers.UnmarshalMeta.PushBackNamed(query.UnmarshalMetaHandler) + svc.Handlers.UnmarshalError.PushBackNamed(query.UnmarshalErrorHandler) + + return svc +} + +// newRequest creates a new request for a OutputService16ProtocolTest operation and runs any +// custom request initialization. +func (c *OutputService16ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) + + return req +} + +const opOutputService16TestCaseOperation1 = "OperationName" + +// OutputService16TestCaseOperation1Request generates a "aws/request.Request" representing the +// client's request for the OutputService16TestCaseOperation1 operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See OutputService16TestCaseOperation1 for more information on using the OutputService16TestCaseOperation1 +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the OutputService16TestCaseOperation1Request method. +// req, resp := client.OutputService16TestCaseOperation1Request(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *OutputService16ProtocolTest) OutputService16TestCaseOperation1Request(input *OutputService16TestShapeOutputService16TestCaseOperation1Input) (req *request.Request, output *OutputService16TestShapeOutputService16TestCaseOperation1Output) { + op := &request.Operation{ + Name: opOutputService16TestCaseOperation1, + HTTPPath: "/", + } + + if input == nil { + input = &OutputService16TestShapeOutputService16TestCaseOperation1Input{} + } + + output = &OutputService16TestShapeOutputService16TestCaseOperation1Output{} + req = c.newRequest(op, input, output) + return +} + +// OutputService16TestCaseOperation1 API operation for . +// +// 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 +// the error. +// +// See the AWS API reference guide for 's +// API operation OutputService16TestCaseOperation1 for usage and error information. +func (c *OutputService16ProtocolTest) OutputService16TestCaseOperation1(input *OutputService16TestShapeOutputService16TestCaseOperation1Input) (*OutputService16TestShapeOutputService16TestCaseOperation1Output, error) { + req, out := c.OutputService16TestCaseOperation1Request(input) + return out, req.Send() +} + +// OutputService16TestCaseOperation1WithContext is the same as OutputService16TestCaseOperation1 with the addition of +// the ability to pass a context and additional request options. +// +// See OutputService16TestCaseOperation1 for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *OutputService16ProtocolTest) OutputService16TestCaseOperation1WithContext(ctx aws.Context, input *OutputService16TestShapeOutputService16TestCaseOperation1Input, opts ...request.Option) (*OutputService16TestShapeOutputService16TestCaseOperation1Output, error) { + req, out := c.OutputService16TestCaseOperation1Request(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +type OutputService16TestShapeOutputService16TestCaseOperation1Input struct { + _ struct{} `type:"structure"` +} + +type OutputService16TestShapeOutputService16TestCaseOperation1Output struct { + _ struct{} `type:"structure"` + + FooEnum *string `type:"string" enum:"OutputService16TestShapeEC2EnumType"` + + ListEnums []*string `type:"list"` +} + +// SetFooEnum sets the FooEnum field's value. +func (s *OutputService16TestShapeOutputService16TestCaseOperation1Output) SetFooEnum(v string) *OutputService16TestShapeOutputService16TestCaseOperation1Output { + s.FooEnum = &v + return s +} + +// SetListEnums sets the ListEnums field's value. +func (s *OutputService16TestShapeOutputService16TestCaseOperation1Output) SetListEnums(v []*string) *OutputService16TestShapeOutputService16TestCaseOperation1Output { + s.ListEnums = v + return s +} + +const ( + // EC2EnumTypeFoo is a OutputService16TestShapeEC2EnumType enum value + EC2EnumTypeFoo = "foo" + + // EC2EnumTypeBar is a OutputService16TestShapeEC2EnumType enum value + EC2EnumTypeBar = "bar" +) + // // Tests begin here // @@ -2302,19 +2521,41 @@ func TestOutputService1ProtocolTestScalarMembersCase1(t *testing.T) { // unmarshal response query.UnmarshalMeta(req) query.Unmarshal(req) - assert.NoError(t, req.Error) + if req.Error != nil { + t.Errorf("expect not error, got %v", req.Error) + } // assert response - assert.NotNil(t, out) // ensure out variable is used - assert.Equal(t, "a", *out.Char) - assert.Equal(t, 1.3, *out.Double) - assert.Equal(t, false, *out.FalseBool) - assert.Equal(t, 1.2, *out.Float) - assert.Equal(t, int64(200), *out.Long) - assert.Equal(t, int64(123), *out.Num) - assert.Equal(t, "myname", *out.Str) - assert.Equal(t, time.Unix(1.4221728e+09, 0).UTC().String(), out.Timestamp.String()) - assert.Equal(t, true, *out.TrueBool) + if out == nil { + t.Errorf("expect not to be nil") + } + if e, a := "a", *out.Char; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := 1.3, *out.Double; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := false, *out.FalseBool; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := 1.2, *out.Float; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := int64(200), *out.Long; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := int64(123), *out.Num; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "myname", *out.Str; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := time.Unix(1.4221728e+09, 0).UTC().String(), out.Timestamp.UTC().String(); e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := true, *out.TrueBool; e != a { + t.Errorf("expect %v, got %v", e, a) + } } @@ -2330,11 +2571,17 @@ func TestOutputService2ProtocolTestNotAllMembersInResponseCase1(t *testing.T) { // unmarshal response query.UnmarshalMeta(req) query.Unmarshal(req) - assert.NoError(t, req.Error) + if req.Error != nil { + t.Errorf("expect not error, got %v", req.Error) + } // assert response - assert.NotNil(t, out) // ensure out variable is used - assert.Equal(t, "myname", *out.Str) + if out == nil { + t.Errorf("expect not to be nil") + } + if e, a := "myname", *out.Str; e != a { + t.Errorf("expect %v, got %v", e, a) + } } @@ -2350,11 +2597,17 @@ func TestOutputService3ProtocolTestBlobCase1(t *testing.T) { // unmarshal response query.UnmarshalMeta(req) query.Unmarshal(req) - assert.NoError(t, req.Error) + if req.Error != nil { + t.Errorf("expect not error, got %v", req.Error) + } // assert response - assert.NotNil(t, out) // ensure out variable is used - assert.Equal(t, "value", string(out.Blob)) + if out == nil { + t.Errorf("expect not to be nil") + } + if e, a := "value", string(out.Blob); e != a { + t.Errorf("expect %v, got %v", e, a) + } } @@ -2370,12 +2623,20 @@ func TestOutputService4ProtocolTestListsCase1(t *testing.T) { // unmarshal response query.UnmarshalMeta(req) query.Unmarshal(req) - assert.NoError(t, req.Error) + if req.Error != nil { + t.Errorf("expect not error, got %v", req.Error) + } // assert response - assert.NotNil(t, out) // ensure out variable is used - assert.Equal(t, "abc", *out.ListMember[0]) - assert.Equal(t, "123", *out.ListMember[1]) + if out == nil { + t.Errorf("expect not to be nil") + } + if e, a := "abc", *out.ListMember[0]; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "123", *out.ListMember[1]; e != a { + t.Errorf("expect %v, got %v", e, a) + } } @@ -2391,12 +2652,20 @@ func TestOutputService5ProtocolTestListWithCustomMemberNameCase1(t *testing.T) { // unmarshal response query.UnmarshalMeta(req) query.Unmarshal(req) - assert.NoError(t, req.Error) + if req.Error != nil { + t.Errorf("expect not error, got %v", req.Error) + } // assert response - assert.NotNil(t, out) // ensure out variable is used - assert.Equal(t, "abc", *out.ListMember[0]) - assert.Equal(t, "123", *out.ListMember[1]) + if out == nil { + t.Errorf("expect not to be nil") + } + if e, a := "abc", *out.ListMember[0]; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "123", *out.ListMember[1]; e != a { + t.Errorf("expect %v, got %v", e, a) + } } @@ -2412,12 +2681,20 @@ func TestOutputService6ProtocolTestFlattenedListCase1(t *testing.T) { // unmarshal response query.UnmarshalMeta(req) query.Unmarshal(req) - assert.NoError(t, req.Error) + if req.Error != nil { + t.Errorf("expect not error, got %v", req.Error) + } // assert response - assert.NotNil(t, out) // ensure out variable is used - assert.Equal(t, "abc", *out.ListMember[0]) - assert.Equal(t, "123", *out.ListMember[1]) + if out == nil { + t.Errorf("expect not to be nil") + } + if e, a := "abc", *out.ListMember[0]; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "123", *out.ListMember[1]; e != a { + t.Errorf("expect %v, got %v", e, a) + } } @@ -2433,11 +2710,17 @@ func TestOutputService7ProtocolTestFlattenedSingleElementListCase1(t *testing.T) // unmarshal response query.UnmarshalMeta(req) query.Unmarshal(req) - assert.NoError(t, req.Error) + if req.Error != nil { + t.Errorf("expect not error, got %v", req.Error) + } // assert response - assert.NotNil(t, out) // ensure out variable is used - assert.Equal(t, "abc", *out.ListMember[0]) + if out == nil { + t.Errorf("expect not to be nil") + } + if e, a := "abc", *out.ListMember[0]; e != a { + t.Errorf("expect %v, got %v", e, a) + } } @@ -2453,16 +2736,32 @@ func TestOutputService8ProtocolTestListOfStructuresCase1(t *testing.T) { // unmarshal response query.UnmarshalMeta(req) query.Unmarshal(req) - assert.NoError(t, req.Error) + if req.Error != nil { + t.Errorf("expect not error, got %v", req.Error) + } // assert response - assert.NotNil(t, out) // ensure out variable is used - assert.Equal(t, "firstbar", *out.List[0].Bar) - assert.Equal(t, "firstbaz", *out.List[0].Baz) - assert.Equal(t, "firstfoo", *out.List[0].Foo) - assert.Equal(t, "secondbar", *out.List[1].Bar) - assert.Equal(t, "secondbaz", *out.List[1].Baz) - assert.Equal(t, "secondfoo", *out.List[1].Foo) + if out == nil { + t.Errorf("expect not to be nil") + } + if e, a := "firstbar", *out.List[0].Bar; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "firstbaz", *out.List[0].Baz; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "firstfoo", *out.List[0].Foo; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "secondbar", *out.List[1].Bar; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "secondbaz", *out.List[1].Baz; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "secondfoo", *out.List[1].Foo; e != a { + t.Errorf("expect %v, got %v", e, a) + } } @@ -2478,16 +2777,32 @@ func TestOutputService9ProtocolTestFlattenedListOfStructuresCase1(t *testing.T) // unmarshal response query.UnmarshalMeta(req) query.Unmarshal(req) - assert.NoError(t, req.Error) + if req.Error != nil { + t.Errorf("expect not error, got %v", req.Error) + } // assert response - assert.NotNil(t, out) // ensure out variable is used - assert.Equal(t, "firstbar", *out.List[0].Bar) - assert.Equal(t, "firstbaz", *out.List[0].Baz) - assert.Equal(t, "firstfoo", *out.List[0].Foo) - assert.Equal(t, "secondbar", *out.List[1].Bar) - assert.Equal(t, "secondbaz", *out.List[1].Baz) - assert.Equal(t, "secondfoo", *out.List[1].Foo) + if out == nil { + t.Errorf("expect not to be nil") + } + if e, a := "firstbar", *out.List[0].Bar; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "firstbaz", *out.List[0].Baz; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "firstfoo", *out.List[0].Foo; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "secondbar", *out.List[1].Bar; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "secondbaz", *out.List[1].Baz; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "secondfoo", *out.List[1].Foo; e != a { + t.Errorf("expect %v, got %v", e, a) + } } @@ -2503,12 +2818,20 @@ func TestOutputService10ProtocolTestFlattenedListWithLocationNameCase1(t *testin // unmarshal response query.UnmarshalMeta(req) query.Unmarshal(req) - assert.NoError(t, req.Error) + if req.Error != nil { + t.Errorf("expect not error, got %v", req.Error) + } // assert response - assert.NotNil(t, out) // ensure out variable is used - assert.Equal(t, "a", *out.List[0]) - assert.Equal(t, "b", *out.List[1]) + if out == nil { + t.Errorf("expect not to be nil") + } + if e, a := "a", *out.List[0]; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "b", *out.List[1]; e != a { + t.Errorf("expect %v, got %v", e, a) + } } @@ -2524,12 +2847,20 @@ func TestOutputService11ProtocolTestNormalMapCase1(t *testing.T) { // unmarshal response query.UnmarshalMeta(req) query.Unmarshal(req) - assert.NoError(t, req.Error) + if req.Error != nil { + t.Errorf("expect not error, got %v", req.Error) + } // assert response - assert.NotNil(t, out) // ensure out variable is used - assert.Equal(t, "bam", *out.Map["baz"].Foo) - assert.Equal(t, "bar", *out.Map["qux"].Foo) + if out == nil { + t.Errorf("expect not to be nil") + } + if e, a := "bam", *out.Map["baz"].Foo; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "bar", *out.Map["qux"].Foo; e != a { + t.Errorf("expect %v, got %v", e, a) + } } @@ -2545,12 +2876,20 @@ func TestOutputService12ProtocolTestFlattenedMapCase1(t *testing.T) { // unmarshal response query.UnmarshalMeta(req) query.Unmarshal(req) - assert.NoError(t, req.Error) + if req.Error != nil { + t.Errorf("expect not error, got %v", req.Error) + } // assert response - assert.NotNil(t, out) // ensure out variable is used - assert.Equal(t, "bam", *out.Map["baz"]) - assert.Equal(t, "bar", *out.Map["qux"]) + if out == nil { + t.Errorf("expect not to be nil") + } + if e, a := "bam", *out.Map["baz"]; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "bar", *out.Map["qux"]; e != a { + t.Errorf("expect %v, got %v", e, a) + } } @@ -2566,11 +2905,17 @@ func TestOutputService13ProtocolTestFlattenedMapInShapeDefinitionCase1(t *testin // unmarshal response query.UnmarshalMeta(req) query.Unmarshal(req) - assert.NoError(t, req.Error) + if req.Error != nil { + t.Errorf("expect not error, got %v", req.Error) + } // assert response - assert.NotNil(t, out) // ensure out variable is used - assert.Equal(t, "bar", *out.Map["qux"]) + if out == nil { + t.Errorf("expect not to be nil") + } + if e, a := "bar", *out.Map["qux"]; e != a { + t.Errorf("expect %v, got %v", e, a) + } } @@ -2586,12 +2931,20 @@ func TestOutputService14ProtocolTestNamedMapCase1(t *testing.T) { // unmarshal response query.UnmarshalMeta(req) query.Unmarshal(req) - assert.NoError(t, req.Error) + if req.Error != nil { + t.Errorf("expect not error, got %v", req.Error) + } // assert response - assert.NotNil(t, out) // ensure out variable is used - assert.Equal(t, "bam", *out.Map["baz"]) - assert.Equal(t, "bar", *out.Map["qux"]) + if out == nil { + t.Errorf("expect not to be nil") + } + if e, a := "bam", *out.Map["baz"]; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "bar", *out.Map["qux"]; e != a { + t.Errorf("expect %v, got %v", e, a) + } } @@ -2607,10 +2960,48 @@ func TestOutputService15ProtocolTestEmptyStringCase1(t *testing.T) { // unmarshal response query.UnmarshalMeta(req) query.Unmarshal(req) - assert.NoError(t, req.Error) + if req.Error != nil { + t.Errorf("expect not error, got %v", req.Error) + } // assert response - assert.NotNil(t, out) // ensure out variable is used - assert.Equal(t, "", *out.Foo) + if out == nil { + t.Errorf("expect not to be nil") + } + if e, a := "", *out.Foo; e != a { + t.Errorf("expect %v, got %v", e, a) + } + +} + +func TestOutputService16ProtocolTestEnumOutputCase1(t *testing.T) { + svc := NewOutputService16ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) + + buf := bytes.NewReader([]byte("foofoobar")) + req, out := svc.OutputService16TestCaseOperation1Request(nil) + req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} + + // set headers + + // unmarshal response + query.UnmarshalMeta(req) + query.Unmarshal(req) + if req.Error != nil { + t.Errorf("expect not error, got %v", req.Error) + } + + // assert response + if out == nil { + t.Errorf("expect not to be nil") + } + if e, a := "foo", *out.FooEnum; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "foo", *out.ListEnums[0]; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "bar", *out.ListEnums[1]; e != a { + t.Errorf("expect %v, got %v", e, a) + } } diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/build.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/build.go index 7161835..f761e0b 100644 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/build.go +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/build.go @@ -4,7 +4,6 @@ package rest import ( "bytes" "encoding/base64" - "encoding/json" "fmt" "io" "net/http" @@ -18,10 +17,13 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" ) -// RFC822 returns an RFC822 formatted timestamp for AWS protocols -const RFC822 = "Mon, 2 Jan 2006 15:04:05 GMT" +// RFC1123GMT is a RFC1123 (RFC822) formated timestame. This format is not +// using the standard library's time.RFC1123 due to the desire to always use +// GMT as the timezone. +const RFC1123GMT = "Mon, 2 Jan 2006 15:04:05 GMT" // Whether the byte value can be sent without escaping in AWS URLs var noEscape [256]bool @@ -252,13 +254,12 @@ func EscapePath(path string, encodeSep bool) string { return buf.String() } -func convertType(v reflect.Value, tag reflect.StructTag) (string, error) { +func convertType(v reflect.Value, tag reflect.StructTag) (str string, err error) { v = reflect.Indirect(v) if !v.IsValid() { return "", errValueNotSet } - var str string switch value := v.Interface().(type) { case string: str = value @@ -271,19 +272,21 @@ func convertType(v reflect.Value, tag reflect.StructTag) (string, error) { case float64: str = strconv.FormatFloat(value, 'f', -1, 64) case time.Time: - str = value.UTC().Format(RFC822) + str = value.UTC().Format(RFC1123GMT) case aws.JSONValue: - b, err := json.Marshal(value) - if err != nil { - return "", err + if len(value) == 0 { + return "", errValueNotSet } + escaping := protocol.NoEscape if tag.Get("location") == "header" { - str = base64.StdEncoding.EncodeToString(b) - } else { - str = string(b) + escaping = protocol.Base64Escape + } + str, err = protocol.EncodeJSONValue(value, escaping) + if err != nil { + return "", fmt.Errorf("unable to encode JSONValue, %v", err) } default: - err := fmt.Errorf("Unsupported value for param %v (%s)", v.Interface(), v.Type()) + err := fmt.Errorf("unsupported value for param %v (%s)", v.Interface(), v.Type()) return "", err } return str, nil diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/unmarshal.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/unmarshal.go index 7a779ee..9d4e762 100644 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/unmarshal.go +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/unmarshal.go @@ -3,7 +3,6 @@ package rest import ( "bytes" "encoding/base64" - "encoding/json" "fmt" "io" "io/ioutil" @@ -16,6 +15,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" ) // UnmarshalHandler is a named request handler for unmarshaling rest protocol requests @@ -198,23 +198,17 @@ func unmarshalHeader(v reflect.Value, header string, tag reflect.StructTag) erro } v.Set(reflect.ValueOf(&f)) case *time.Time: - t, err := time.Parse(RFC822, header) + t, err := time.Parse(time.RFC1123, header) if err != nil { return err } v.Set(reflect.ValueOf(&t)) case aws.JSONValue: - b := []byte(header) - var err error + escaping := protocol.NoEscape if tag.Get("location") == "header" { - b, err = base64.StdEncoding.DecodeString(header) - if err != nil { - return err - } + escaping = protocol.Base64Escape } - - m := aws.JSONValue{} - err = json.Unmarshal(b, &m) + m, err := protocol.DecodeJSONValue(header, escaping) if err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/restjson/build_bench_test.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/restjson/build_bench_test.go deleted file mode 100644 index 31e1d6c..0000000 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/restjson/build_bench_test.go +++ /dev/null @@ -1,356 +0,0 @@ -// +build bench - -package restjson_test - -import ( - "bytes" - "encoding/json" - "testing" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/awstesting" - "github.com/aws/aws-sdk-go/private/protocol/rest" - "github.com/aws/aws-sdk-go/private/protocol/restjson" - "github.com/aws/aws-sdk-go/service/elastictranscoder" -) - -func BenchmarkRESTJSONBuild_Complex_elastictranscoderCreateJobInput(b *testing.B) { - svc := awstesting.NewClient() - svc.ServiceName = "elastictranscoder" - svc.APIVersion = "2012-09-25" - - for i := 0; i < b.N; i++ { - r := svc.NewRequest(&request.Operation{Name: "CreateJobInput"}, restjsonBuildParms, nil) - restjson.Build(r) - if r.Error != nil { - b.Fatal("Unexpected error", r.Error) - } - } -} - -func BenchmarkRESTBuild_Complex_elastictranscoderCreateJobInput(b *testing.B) { - svc := awstesting.NewClient() - svc.ServiceName = "elastictranscoder" - svc.APIVersion = "2012-09-25" - - for i := 0; i < b.N; i++ { - r := svc.NewRequest(&request.Operation{Name: "CreateJobInput"}, restjsonBuildParms, nil) - rest.Build(r) - if r.Error != nil { - b.Fatal("Unexpected error", r.Error) - } - } -} - -func BenchmarkEncodingJSONMarshal_Complex_elastictranscoderCreateJobInput(b *testing.B) { - params := restjsonBuildParms - - for i := 0; i < b.N; i++ { - buf := &bytes.Buffer{} - encoder := json.NewEncoder(buf) - if err := encoder.Encode(params); err != nil { - b.Fatal("Unexpected error", err) - } - } -} - -func BenchmarkRESTJSONBuild_Simple_elastictranscoderListJobsByPipeline(b *testing.B) { - svc := awstesting.NewClient() - svc.ServiceName = "elastictranscoder" - svc.APIVersion = "2012-09-25" - - params := &elastictranscoder.ListJobsByPipelineInput{ - PipelineId: aws.String("Id"), // Required - Ascending: aws.String("Ascending"), - PageToken: aws.String("Id"), - } - - for i := 0; i < b.N; i++ { - r := svc.NewRequest(&request.Operation{Name: "ListJobsByPipeline"}, params, nil) - restjson.Build(r) - if r.Error != nil { - b.Fatal("Unexpected error", r.Error) - } - } -} - -func BenchmarkRESTBuild_Simple_elastictranscoderListJobsByPipeline(b *testing.B) { - svc := awstesting.NewClient() - svc.ServiceName = "elastictranscoder" - svc.APIVersion = "2012-09-25" - - params := &elastictranscoder.ListJobsByPipelineInput{ - PipelineId: aws.String("Id"), // Required - Ascending: aws.String("Ascending"), - PageToken: aws.String("Id"), - } - - for i := 0; i < b.N; i++ { - r := svc.NewRequest(&request.Operation{Name: "ListJobsByPipeline"}, params, nil) - rest.Build(r) - if r.Error != nil { - b.Fatal("Unexpected error", r.Error) - } - } -} - -func BenchmarkEncodingJSONMarshal_Simple_elastictranscoderListJobsByPipeline(b *testing.B) { - params := &elastictranscoder.ListJobsByPipelineInput{ - PipelineId: aws.String("Id"), // Required - Ascending: aws.String("Ascending"), - PageToken: aws.String("Id"), - } - - for i := 0; i < b.N; i++ { - buf := &bytes.Buffer{} - encoder := json.NewEncoder(buf) - if err := encoder.Encode(params); err != nil { - b.Fatal("Unexpected error", err) - } - } -} - -var restjsonBuildParms = &elastictranscoder.CreateJobInput{ - Input: &elastictranscoder.JobInput{ // Required - AspectRatio: aws.String("AspectRatio"), - Container: aws.String("JobContainer"), - DetectedProperties: &elastictranscoder.DetectedProperties{ - DurationMillis: aws.Int64(1), - FileSize: aws.Int64(1), - FrameRate: aws.String("FloatString"), - Height: aws.Int64(1), - Width: aws.Int64(1), - }, - Encryption: &elastictranscoder.Encryption{ - InitializationVector: aws.String("ZeroTo255String"), - Key: aws.String("Base64EncodedString"), - KeyMd5: aws.String("Base64EncodedString"), - Mode: aws.String("EncryptionMode"), - }, - FrameRate: aws.String("FrameRate"), - Interlaced: aws.String("Interlaced"), - Key: aws.String("Key"), - Resolution: aws.String("Resolution"), - }, - PipelineId: aws.String("Id"), // Required - Output: &elastictranscoder.CreateJobOutput{ - AlbumArt: &elastictranscoder.JobAlbumArt{ - Artwork: []*elastictranscoder.Artwork{ - { // Required - AlbumArtFormat: aws.String("JpgOrPng"), - Encryption: &elastictranscoder.Encryption{ - InitializationVector: aws.String("ZeroTo255String"), - Key: aws.String("Base64EncodedString"), - KeyMd5: aws.String("Base64EncodedString"), - Mode: aws.String("EncryptionMode"), - }, - InputKey: aws.String("WatermarkKey"), - MaxHeight: aws.String("DigitsOrAuto"), - MaxWidth: aws.String("DigitsOrAuto"), - PaddingPolicy: aws.String("PaddingPolicy"), - SizingPolicy: aws.String("SizingPolicy"), - }, - // More values... - }, - MergePolicy: aws.String("MergePolicy"), - }, - Captions: &elastictranscoder.Captions{ - CaptionFormats: []*elastictranscoder.CaptionFormat{ - { // Required - Encryption: &elastictranscoder.Encryption{ - InitializationVector: aws.String("ZeroTo255String"), - Key: aws.String("Base64EncodedString"), - KeyMd5: aws.String("Base64EncodedString"), - Mode: aws.String("EncryptionMode"), - }, - Format: aws.String("CaptionFormatFormat"), - Pattern: aws.String("CaptionFormatPattern"), - }, - // More values... - }, - CaptionSources: []*elastictranscoder.CaptionSource{ - { // Required - Encryption: &elastictranscoder.Encryption{ - InitializationVector: aws.String("ZeroTo255String"), - Key: aws.String("Base64EncodedString"), - KeyMd5: aws.String("Base64EncodedString"), - Mode: aws.String("EncryptionMode"), - }, - Key: aws.String("Key"), - Label: aws.String("Name"), - Language: aws.String("Key"), - TimeOffset: aws.String("TimeOffset"), - }, - // More values... - }, - MergePolicy: aws.String("CaptionMergePolicy"), - }, - Composition: []*elastictranscoder.Clip{ - { // Required - TimeSpan: &elastictranscoder.TimeSpan{ - Duration: aws.String("Time"), - StartTime: aws.String("Time"), - }, - }, - // More values... - }, - Encryption: &elastictranscoder.Encryption{ - InitializationVector: aws.String("ZeroTo255String"), - Key: aws.String("Base64EncodedString"), - KeyMd5: aws.String("Base64EncodedString"), - Mode: aws.String("EncryptionMode"), - }, - Key: aws.String("Key"), - PresetId: aws.String("Id"), - Rotate: aws.String("Rotate"), - SegmentDuration: aws.String("FloatString"), - ThumbnailEncryption: &elastictranscoder.Encryption{ - InitializationVector: aws.String("ZeroTo255String"), - Key: aws.String("Base64EncodedString"), - KeyMd5: aws.String("Base64EncodedString"), - Mode: aws.String("EncryptionMode"), - }, - ThumbnailPattern: aws.String("ThumbnailPattern"), - Watermarks: []*elastictranscoder.JobWatermark{ - { // Required - Encryption: &elastictranscoder.Encryption{ - InitializationVector: aws.String("ZeroTo255String"), - Key: aws.String("Base64EncodedString"), - KeyMd5: aws.String("Base64EncodedString"), - Mode: aws.String("EncryptionMode"), - }, - InputKey: aws.String("WatermarkKey"), - PresetWatermarkId: aws.String("PresetWatermarkId"), - }, - // More values... - }, - }, - OutputKeyPrefix: aws.String("Key"), - Outputs: []*elastictranscoder.CreateJobOutput{ - { // Required - AlbumArt: &elastictranscoder.JobAlbumArt{ - Artwork: []*elastictranscoder.Artwork{ - { // Required - AlbumArtFormat: aws.String("JpgOrPng"), - Encryption: &elastictranscoder.Encryption{ - InitializationVector: aws.String("ZeroTo255String"), - Key: aws.String("Base64EncodedString"), - KeyMd5: aws.String("Base64EncodedString"), - Mode: aws.String("EncryptionMode"), - }, - InputKey: aws.String("WatermarkKey"), - MaxHeight: aws.String("DigitsOrAuto"), - MaxWidth: aws.String("DigitsOrAuto"), - PaddingPolicy: aws.String("PaddingPolicy"), - SizingPolicy: aws.String("SizingPolicy"), - }, - // More values... - }, - MergePolicy: aws.String("MergePolicy"), - }, - Captions: &elastictranscoder.Captions{ - CaptionFormats: []*elastictranscoder.CaptionFormat{ - { // Required - Encryption: &elastictranscoder.Encryption{ - InitializationVector: aws.String("ZeroTo255String"), - Key: aws.String("Base64EncodedString"), - KeyMd5: aws.String("Base64EncodedString"), - Mode: aws.String("EncryptionMode"), - }, - Format: aws.String("CaptionFormatFormat"), - Pattern: aws.String("CaptionFormatPattern"), - }, - // More values... - }, - CaptionSources: []*elastictranscoder.CaptionSource{ - { // Required - Encryption: &elastictranscoder.Encryption{ - InitializationVector: aws.String("ZeroTo255String"), - Key: aws.String("Base64EncodedString"), - KeyMd5: aws.String("Base64EncodedString"), - Mode: aws.String("EncryptionMode"), - }, - Key: aws.String("Key"), - Label: aws.String("Name"), - Language: aws.String("Key"), - TimeOffset: aws.String("TimeOffset"), - }, - // More values... - }, - MergePolicy: aws.String("CaptionMergePolicy"), - }, - Composition: []*elastictranscoder.Clip{ - { // Required - TimeSpan: &elastictranscoder.TimeSpan{ - Duration: aws.String("Time"), - StartTime: aws.String("Time"), - }, - }, - // More values... - }, - Encryption: &elastictranscoder.Encryption{ - InitializationVector: aws.String("ZeroTo255String"), - Key: aws.String("Base64EncodedString"), - KeyMd5: aws.String("Base64EncodedString"), - Mode: aws.String("EncryptionMode"), - }, - Key: aws.String("Key"), - PresetId: aws.String("Id"), - Rotate: aws.String("Rotate"), - SegmentDuration: aws.String("FloatString"), - ThumbnailEncryption: &elastictranscoder.Encryption{ - InitializationVector: aws.String("ZeroTo255String"), - Key: aws.String("Base64EncodedString"), - KeyMd5: aws.String("Base64EncodedString"), - Mode: aws.String("EncryptionMode"), - }, - ThumbnailPattern: aws.String("ThumbnailPattern"), - Watermarks: []*elastictranscoder.JobWatermark{ - { // Required - Encryption: &elastictranscoder.Encryption{ - InitializationVector: aws.String("ZeroTo255String"), - Key: aws.String("Base64EncodedString"), - KeyMd5: aws.String("Base64EncodedString"), - Mode: aws.String("EncryptionMode"), - }, - InputKey: aws.String("WatermarkKey"), - PresetWatermarkId: aws.String("PresetWatermarkId"), - }, - // More values... - }, - }, - // More values... - }, - Playlists: []*elastictranscoder.CreateJobPlaylist{ - { // Required - Format: aws.String("PlaylistFormat"), - HlsContentProtection: &elastictranscoder.HlsContentProtection{ - InitializationVector: aws.String("ZeroTo255String"), - Key: aws.String("Base64EncodedString"), - KeyMd5: aws.String("Base64EncodedString"), - KeyStoragePolicy: aws.String("KeyStoragePolicy"), - LicenseAcquisitionUrl: aws.String("ZeroTo512String"), - Method: aws.String("HlsContentProtectionMethod"), - }, - Name: aws.String("Filename"), - OutputKeys: []*string{ - aws.String("Key"), // Required - // More values... - }, - PlayReadyDrm: &elastictranscoder.PlayReadyDrm{ - Format: aws.String("PlayReadyDrmFormatString"), - InitializationVector: aws.String("ZeroTo255String"), - Key: aws.String("NonEmptyBase64EncodedString"), - KeyId: aws.String("KeyIdGuid"), - KeyMd5: aws.String("NonEmptyBase64EncodedString"), - LicenseAcquisitionUrl: aws.String("OneTo512String"), - }, - }, - // More values... - }, - UserMetadata: map[string]*string{ - "Key": aws.String("String"), // Required - // More values... - }, -} diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/restjson/build_test.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/restjson/build_test.go deleted file mode 100644 index 7034db2..0000000 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/restjson/build_test.go +++ /dev/null @@ -1,4976 +0,0 @@ -package restjson_test - -import ( - "bytes" - "encoding/json" - "encoding/xml" - "fmt" - "io" - "io/ioutil" - "net/http" - "net/url" - "reflect" - "testing" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/awstesting" - "github.com/aws/aws-sdk-go/awstesting/unit" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/restjson" - "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil" - "github.com/aws/aws-sdk-go/private/util" - "github.com/stretchr/testify/assert" -) - -var _ bytes.Buffer // always import bytes -var _ http.Request -var _ json.Marshaler -var _ time.Time -var _ xmlutil.XMLNode -var _ xml.Attr -var _ = ioutil.Discard -var _ = util.Trim("") -var _ = url.Values{} -var _ = io.EOF -var _ = aws.String -var _ = fmt.Println -var _ = reflect.Value{} - -func init() { - protocol.RandReader = &awstesting.ZeroReader{} -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type InputService1ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the InputService1ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a InputService1ProtocolTest client from just a session. -// svc := inputservice1protocoltest.New(mySession) -// -// // Create a InputService1ProtocolTest client with additional configuration -// svc := inputservice1protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewInputService1ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService1ProtocolTest { - c := p.ClientConfig("inputservice1protocoltest", cfgs...) - return newInputService1ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newInputService1ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService1ProtocolTest { - svc := &InputService1ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "inputservice1protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-01-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a InputService1ProtocolTest operation and runs any -// custom request initialization. -func (c *InputService1ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opInputService1TestCaseOperation1 = "OperationName" - -// InputService1TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the InputService1TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService1TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService1TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService1TestCaseOperation1Request method. -// req, resp := client.InputService1TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService1ProtocolTest) InputService1TestCaseOperation1Request(input *InputService1TestShapeInputService1TestCaseOperation1Input) (req *request.Request, output *InputService1TestShapeInputService1TestCaseOperation1Output) { - op := &request.Operation{ - Name: opInputService1TestCaseOperation1, - HTTPMethod: "GET", - HTTPPath: "/2014-01-01/jobs", - } - - if input == nil { - input = &InputService1TestShapeInputService1TestCaseOperation1Input{} - } - - output = &InputService1TestShapeInputService1TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService1TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService1TestCaseOperation1 for usage and error information. -func (c *InputService1ProtocolTest) InputService1TestCaseOperation1(input *InputService1TestShapeInputService1TestCaseOperation1Input) (*InputService1TestShapeInputService1TestCaseOperation1Output, error) { - req, out := c.InputService1TestCaseOperation1Request(input) - return out, req.Send() -} - -// InputService1TestCaseOperation1WithContext is the same as InputService1TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService1TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService1ProtocolTest) InputService1TestCaseOperation1WithContext(ctx aws.Context, input *InputService1TestShapeInputService1TestCaseOperation1Input, opts ...request.Option) (*InputService1TestShapeInputService1TestCaseOperation1Output, error) { - req, out := c.InputService1TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type InputService1TestShapeInputService1TestCaseOperation1Input struct { - _ struct{} `type:"structure"` -} - -type InputService1TestShapeInputService1TestCaseOperation1Output struct { - _ struct{} `type:"structure"` -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type InputService2ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the InputService2ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a InputService2ProtocolTest client from just a session. -// svc := inputservice2protocoltest.New(mySession) -// -// // Create a InputService2ProtocolTest client with additional configuration -// svc := inputservice2protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewInputService2ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService2ProtocolTest { - c := p.ClientConfig("inputservice2protocoltest", cfgs...) - return newInputService2ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newInputService2ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService2ProtocolTest { - svc := &InputService2ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "inputservice2protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-01-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a InputService2ProtocolTest operation and runs any -// custom request initialization. -func (c *InputService2ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opInputService2TestCaseOperation1 = "OperationName" - -// InputService2TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the InputService2TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService2TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService2TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService2TestCaseOperation1Request method. -// req, resp := client.InputService2TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService2ProtocolTest) InputService2TestCaseOperation1Request(input *InputService2TestShapeInputService2TestCaseOperation1Input) (req *request.Request, output *InputService2TestShapeInputService2TestCaseOperation1Output) { - op := &request.Operation{ - Name: opInputService2TestCaseOperation1, - HTTPMethod: "GET", - HTTPPath: "/2014-01-01/jobsByPipeline/{PipelineId}", - } - - if input == nil { - input = &InputService2TestShapeInputService2TestCaseOperation1Input{} - } - - output = &InputService2TestShapeInputService2TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService2TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService2TestCaseOperation1 for usage and error information. -func (c *InputService2ProtocolTest) InputService2TestCaseOperation1(input *InputService2TestShapeInputService2TestCaseOperation1Input) (*InputService2TestShapeInputService2TestCaseOperation1Output, error) { - req, out := c.InputService2TestCaseOperation1Request(input) - return out, req.Send() -} - -// InputService2TestCaseOperation1WithContext is the same as InputService2TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService2TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService2ProtocolTest) InputService2TestCaseOperation1WithContext(ctx aws.Context, input *InputService2TestShapeInputService2TestCaseOperation1Input, opts ...request.Option) (*InputService2TestShapeInputService2TestCaseOperation1Output, error) { - req, out := c.InputService2TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type InputService2TestShapeInputService2TestCaseOperation1Input struct { - _ struct{} `type:"structure"` - - PipelineId *string `location:"uri" type:"string"` -} - -// SetPipelineId sets the PipelineId field's value. -func (s *InputService2TestShapeInputService2TestCaseOperation1Input) SetPipelineId(v string) *InputService2TestShapeInputService2TestCaseOperation1Input { - s.PipelineId = &v - return s -} - -type InputService2TestShapeInputService2TestCaseOperation1Output struct { - _ struct{} `type:"structure"` -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type InputService3ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the InputService3ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a InputService3ProtocolTest client from just a session. -// svc := inputservice3protocoltest.New(mySession) -// -// // Create a InputService3ProtocolTest client with additional configuration -// svc := inputservice3protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewInputService3ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService3ProtocolTest { - c := p.ClientConfig("inputservice3protocoltest", cfgs...) - return newInputService3ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newInputService3ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService3ProtocolTest { - svc := &InputService3ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "inputservice3protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-01-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a InputService3ProtocolTest operation and runs any -// custom request initialization. -func (c *InputService3ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opInputService3TestCaseOperation1 = "OperationName" - -// InputService3TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the InputService3TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService3TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService3TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService3TestCaseOperation1Request method. -// req, resp := client.InputService3TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService3ProtocolTest) InputService3TestCaseOperation1Request(input *InputService3TestShapeInputService3TestCaseOperation1Input) (req *request.Request, output *InputService3TestShapeInputService3TestCaseOperation1Output) { - op := &request.Operation{ - Name: opInputService3TestCaseOperation1, - HTTPMethod: "GET", - HTTPPath: "/2014-01-01/jobsByPipeline/{PipelineId}", - } - - if input == nil { - input = &InputService3TestShapeInputService3TestCaseOperation1Input{} - } - - output = &InputService3TestShapeInputService3TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService3TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService3TestCaseOperation1 for usage and error information. -func (c *InputService3ProtocolTest) InputService3TestCaseOperation1(input *InputService3TestShapeInputService3TestCaseOperation1Input) (*InputService3TestShapeInputService3TestCaseOperation1Output, error) { - req, out := c.InputService3TestCaseOperation1Request(input) - return out, req.Send() -} - -// InputService3TestCaseOperation1WithContext is the same as InputService3TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService3TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService3ProtocolTest) InputService3TestCaseOperation1WithContext(ctx aws.Context, input *InputService3TestShapeInputService3TestCaseOperation1Input, opts ...request.Option) (*InputService3TestShapeInputService3TestCaseOperation1Output, error) { - req, out := c.InputService3TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type InputService3TestShapeInputService3TestCaseOperation1Input struct { - _ struct{} `type:"structure"` - - Foo *string `location:"uri" locationName:"PipelineId" type:"string"` -} - -// SetFoo sets the Foo field's value. -func (s *InputService3TestShapeInputService3TestCaseOperation1Input) SetFoo(v string) *InputService3TestShapeInputService3TestCaseOperation1Input { - s.Foo = &v - return s -} - -type InputService3TestShapeInputService3TestCaseOperation1Output struct { - _ struct{} `type:"structure"` -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type InputService4ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the InputService4ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a InputService4ProtocolTest client from just a session. -// svc := inputservice4protocoltest.New(mySession) -// -// // Create a InputService4ProtocolTest client with additional configuration -// svc := inputservice4protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewInputService4ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService4ProtocolTest { - c := p.ClientConfig("inputservice4protocoltest", cfgs...) - return newInputService4ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newInputService4ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService4ProtocolTest { - svc := &InputService4ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "inputservice4protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-01-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a InputService4ProtocolTest operation and runs any -// custom request initialization. -func (c *InputService4ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opInputService4TestCaseOperation1 = "OperationName" - -// InputService4TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the InputService4TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService4TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService4TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService4TestCaseOperation1Request method. -// req, resp := client.InputService4TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService4ProtocolTest) InputService4TestCaseOperation1Request(input *InputService4TestShapeInputService4TestCaseOperation1Input) (req *request.Request, output *InputService4TestShapeInputService4TestCaseOperation1Output) { - op := &request.Operation{ - Name: opInputService4TestCaseOperation1, - HTTPMethod: "GET", - HTTPPath: "/path", - } - - if input == nil { - input = &InputService4TestShapeInputService4TestCaseOperation1Input{} - } - - output = &InputService4TestShapeInputService4TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService4TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService4TestCaseOperation1 for usage and error information. -func (c *InputService4ProtocolTest) InputService4TestCaseOperation1(input *InputService4TestShapeInputService4TestCaseOperation1Input) (*InputService4TestShapeInputService4TestCaseOperation1Output, error) { - req, out := c.InputService4TestCaseOperation1Request(input) - return out, req.Send() -} - -// InputService4TestCaseOperation1WithContext is the same as InputService4TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService4TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService4ProtocolTest) InputService4TestCaseOperation1WithContext(ctx aws.Context, input *InputService4TestShapeInputService4TestCaseOperation1Input, opts ...request.Option) (*InputService4TestShapeInputService4TestCaseOperation1Output, error) { - req, out := c.InputService4TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type InputService4TestShapeInputService4TestCaseOperation1Input struct { - _ struct{} `type:"structure"` - - Items []*string `location:"querystring" locationName:"item" type:"list"` -} - -// SetItems sets the Items field's value. -func (s *InputService4TestShapeInputService4TestCaseOperation1Input) SetItems(v []*string) *InputService4TestShapeInputService4TestCaseOperation1Input { - s.Items = v - return s -} - -type InputService4TestShapeInputService4TestCaseOperation1Output struct { - _ struct{} `type:"structure"` -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type InputService5ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the InputService5ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a InputService5ProtocolTest client from just a session. -// svc := inputservice5protocoltest.New(mySession) -// -// // Create a InputService5ProtocolTest client with additional configuration -// svc := inputservice5protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewInputService5ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService5ProtocolTest { - c := p.ClientConfig("inputservice5protocoltest", cfgs...) - return newInputService5ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newInputService5ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService5ProtocolTest { - svc := &InputService5ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "inputservice5protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-01-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a InputService5ProtocolTest operation and runs any -// custom request initialization. -func (c *InputService5ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opInputService5TestCaseOperation1 = "OperationName" - -// InputService5TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the InputService5TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService5TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService5TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService5TestCaseOperation1Request method. -// req, resp := client.InputService5TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService5ProtocolTest) InputService5TestCaseOperation1Request(input *InputService5TestShapeInputService5TestCaseOperation1Input) (req *request.Request, output *InputService5TestShapeInputService5TestCaseOperation1Output) { - op := &request.Operation{ - Name: opInputService5TestCaseOperation1, - HTTPMethod: "GET", - HTTPPath: "/2014-01-01/jobsByPipeline/{PipelineId}", - } - - if input == nil { - input = &InputService5TestShapeInputService5TestCaseOperation1Input{} - } - - output = &InputService5TestShapeInputService5TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService5TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService5TestCaseOperation1 for usage and error information. -func (c *InputService5ProtocolTest) InputService5TestCaseOperation1(input *InputService5TestShapeInputService5TestCaseOperation1Input) (*InputService5TestShapeInputService5TestCaseOperation1Output, error) { - req, out := c.InputService5TestCaseOperation1Request(input) - return out, req.Send() -} - -// InputService5TestCaseOperation1WithContext is the same as InputService5TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService5TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService5ProtocolTest) InputService5TestCaseOperation1WithContext(ctx aws.Context, input *InputService5TestShapeInputService5TestCaseOperation1Input, opts ...request.Option) (*InputService5TestShapeInputService5TestCaseOperation1Output, error) { - req, out := c.InputService5TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type InputService5TestShapeInputService5TestCaseOperation1Input struct { - _ struct{} `type:"structure"` - - PipelineId *string `location:"uri" type:"string"` - - QueryDoc map[string]*string `location:"querystring" type:"map"` -} - -// SetPipelineId sets the PipelineId field's value. -func (s *InputService5TestShapeInputService5TestCaseOperation1Input) SetPipelineId(v string) *InputService5TestShapeInputService5TestCaseOperation1Input { - s.PipelineId = &v - return s -} - -// SetQueryDoc sets the QueryDoc field's value. -func (s *InputService5TestShapeInputService5TestCaseOperation1Input) SetQueryDoc(v map[string]*string) *InputService5TestShapeInputService5TestCaseOperation1Input { - s.QueryDoc = v - return s -} - -type InputService5TestShapeInputService5TestCaseOperation1Output struct { - _ struct{} `type:"structure"` -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type InputService6ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the InputService6ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a InputService6ProtocolTest client from just a session. -// svc := inputservice6protocoltest.New(mySession) -// -// // Create a InputService6ProtocolTest client with additional configuration -// svc := inputservice6protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewInputService6ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService6ProtocolTest { - c := p.ClientConfig("inputservice6protocoltest", cfgs...) - return newInputService6ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newInputService6ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService6ProtocolTest { - svc := &InputService6ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "inputservice6protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-01-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a InputService6ProtocolTest operation and runs any -// custom request initialization. -func (c *InputService6ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opInputService6TestCaseOperation1 = "OperationName" - -// InputService6TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the InputService6TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService6TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService6TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService6TestCaseOperation1Request method. -// req, resp := client.InputService6TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService6ProtocolTest) InputService6TestCaseOperation1Request(input *InputService6TestShapeInputService6TestCaseOperation1Input) (req *request.Request, output *InputService6TestShapeInputService6TestCaseOperation1Output) { - op := &request.Operation{ - Name: opInputService6TestCaseOperation1, - HTTPMethod: "GET", - HTTPPath: "/2014-01-01/jobsByPipeline/{PipelineId}", - } - - if input == nil { - input = &InputService6TestShapeInputService6TestCaseOperation1Input{} - } - - output = &InputService6TestShapeInputService6TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService6TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService6TestCaseOperation1 for usage and error information. -func (c *InputService6ProtocolTest) InputService6TestCaseOperation1(input *InputService6TestShapeInputService6TestCaseOperation1Input) (*InputService6TestShapeInputService6TestCaseOperation1Output, error) { - req, out := c.InputService6TestCaseOperation1Request(input) - return out, req.Send() -} - -// InputService6TestCaseOperation1WithContext is the same as InputService6TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService6TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService6ProtocolTest) InputService6TestCaseOperation1WithContext(ctx aws.Context, input *InputService6TestShapeInputService6TestCaseOperation1Input, opts ...request.Option) (*InputService6TestShapeInputService6TestCaseOperation1Output, error) { - req, out := c.InputService6TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type InputService6TestShapeInputService6TestCaseOperation1Input struct { - _ struct{} `type:"structure"` - - PipelineId *string `location:"uri" type:"string"` - - QueryDoc map[string][]*string `location:"querystring" type:"map"` -} - -// SetPipelineId sets the PipelineId field's value. -func (s *InputService6TestShapeInputService6TestCaseOperation1Input) SetPipelineId(v string) *InputService6TestShapeInputService6TestCaseOperation1Input { - s.PipelineId = &v - return s -} - -// SetQueryDoc sets the QueryDoc field's value. -func (s *InputService6TestShapeInputService6TestCaseOperation1Input) SetQueryDoc(v map[string][]*string) *InputService6TestShapeInputService6TestCaseOperation1Input { - s.QueryDoc = v - return s -} - -type InputService6TestShapeInputService6TestCaseOperation1Output struct { - _ struct{} `type:"structure"` -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type InputService7ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the InputService7ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a InputService7ProtocolTest client from just a session. -// svc := inputservice7protocoltest.New(mySession) -// -// // Create a InputService7ProtocolTest client with additional configuration -// svc := inputservice7protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewInputService7ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService7ProtocolTest { - c := p.ClientConfig("inputservice7protocoltest", cfgs...) - return newInputService7ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newInputService7ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService7ProtocolTest { - svc := &InputService7ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "inputservice7protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-01-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a InputService7ProtocolTest operation and runs any -// custom request initialization. -func (c *InputService7ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opInputService7TestCaseOperation1 = "OperationName" - -// InputService7TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the InputService7TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService7TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService7TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService7TestCaseOperation1Request method. -// req, resp := client.InputService7TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService7ProtocolTest) InputService7TestCaseOperation1Request(input *InputService7TestShapeInputService7TestCaseOperation2Input) (req *request.Request, output *InputService7TestShapeInputService7TestCaseOperation1Output) { - op := &request.Operation{ - Name: opInputService7TestCaseOperation1, - HTTPMethod: "GET", - HTTPPath: "/path", - } - - if input == nil { - input = &InputService7TestShapeInputService7TestCaseOperation2Input{} - } - - output = &InputService7TestShapeInputService7TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService7TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService7TestCaseOperation1 for usage and error information. -func (c *InputService7ProtocolTest) InputService7TestCaseOperation1(input *InputService7TestShapeInputService7TestCaseOperation2Input) (*InputService7TestShapeInputService7TestCaseOperation1Output, error) { - req, out := c.InputService7TestCaseOperation1Request(input) - return out, req.Send() -} - -// InputService7TestCaseOperation1WithContext is the same as InputService7TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService7TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService7ProtocolTest) InputService7TestCaseOperation1WithContext(ctx aws.Context, input *InputService7TestShapeInputService7TestCaseOperation2Input, opts ...request.Option) (*InputService7TestShapeInputService7TestCaseOperation1Output, error) { - req, out := c.InputService7TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opInputService7TestCaseOperation2 = "OperationName" - -// InputService7TestCaseOperation2Request generates a "aws/request.Request" representing the -// client's request for the InputService7TestCaseOperation2 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService7TestCaseOperation2 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService7TestCaseOperation2 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService7TestCaseOperation2Request method. -// req, resp := client.InputService7TestCaseOperation2Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService7ProtocolTest) InputService7TestCaseOperation2Request(input *InputService7TestShapeInputService7TestCaseOperation2Input) (req *request.Request, output *InputService7TestShapeInputService7TestCaseOperation2Output) { - op := &request.Operation{ - Name: opInputService7TestCaseOperation2, - HTTPMethod: "GET", - HTTPPath: "/path", - } - - if input == nil { - input = &InputService7TestShapeInputService7TestCaseOperation2Input{} - } - - output = &InputService7TestShapeInputService7TestCaseOperation2Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService7TestCaseOperation2 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService7TestCaseOperation2 for usage and error information. -func (c *InputService7ProtocolTest) InputService7TestCaseOperation2(input *InputService7TestShapeInputService7TestCaseOperation2Input) (*InputService7TestShapeInputService7TestCaseOperation2Output, error) { - req, out := c.InputService7TestCaseOperation2Request(input) - return out, req.Send() -} - -// InputService7TestCaseOperation2WithContext is the same as InputService7TestCaseOperation2 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService7TestCaseOperation2 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService7ProtocolTest) InputService7TestCaseOperation2WithContext(ctx aws.Context, input *InputService7TestShapeInputService7TestCaseOperation2Input, opts ...request.Option) (*InputService7TestShapeInputService7TestCaseOperation2Output, error) { - req, out := c.InputService7TestCaseOperation2Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type InputService7TestShapeInputService7TestCaseOperation1Output struct { - _ struct{} `type:"structure"` -} - -type InputService7TestShapeInputService7TestCaseOperation2Input struct { - _ struct{} `type:"structure"` - - BoolQuery *bool `location:"querystring" locationName:"bool-query" type:"boolean"` -} - -// SetBoolQuery sets the BoolQuery field's value. -func (s *InputService7TestShapeInputService7TestCaseOperation2Input) SetBoolQuery(v bool) *InputService7TestShapeInputService7TestCaseOperation2Input { - s.BoolQuery = &v - return s -} - -type InputService7TestShapeInputService7TestCaseOperation2Output struct { - _ struct{} `type:"structure"` -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type InputService8ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the InputService8ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a InputService8ProtocolTest client from just a session. -// svc := inputservice8protocoltest.New(mySession) -// -// // Create a InputService8ProtocolTest client with additional configuration -// svc := inputservice8protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewInputService8ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService8ProtocolTest { - c := p.ClientConfig("inputservice8protocoltest", cfgs...) - return newInputService8ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newInputService8ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService8ProtocolTest { - svc := &InputService8ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "inputservice8protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-01-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a InputService8ProtocolTest operation and runs any -// custom request initialization. -func (c *InputService8ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opInputService8TestCaseOperation1 = "OperationName" - -// InputService8TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the InputService8TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService8TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService8TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService8TestCaseOperation1Request method. -// req, resp := client.InputService8TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService8ProtocolTest) InputService8TestCaseOperation1Request(input *InputService8TestShapeInputService8TestCaseOperation1Input) (req *request.Request, output *InputService8TestShapeInputService8TestCaseOperation1Output) { - op := &request.Operation{ - Name: opInputService8TestCaseOperation1, - HTTPMethod: "GET", - HTTPPath: "/2014-01-01/jobsByPipeline/{PipelineId}", - } - - if input == nil { - input = &InputService8TestShapeInputService8TestCaseOperation1Input{} - } - - output = &InputService8TestShapeInputService8TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService8TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService8TestCaseOperation1 for usage and error information. -func (c *InputService8ProtocolTest) InputService8TestCaseOperation1(input *InputService8TestShapeInputService8TestCaseOperation1Input) (*InputService8TestShapeInputService8TestCaseOperation1Output, error) { - req, out := c.InputService8TestCaseOperation1Request(input) - return out, req.Send() -} - -// InputService8TestCaseOperation1WithContext is the same as InputService8TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService8TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService8ProtocolTest) InputService8TestCaseOperation1WithContext(ctx aws.Context, input *InputService8TestShapeInputService8TestCaseOperation1Input, opts ...request.Option) (*InputService8TestShapeInputService8TestCaseOperation1Output, error) { - req, out := c.InputService8TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type InputService8TestShapeInputService8TestCaseOperation1Input struct { - _ struct{} `type:"structure"` - - Ascending *string `location:"querystring" locationName:"Ascending" type:"string"` - - PageToken *string `location:"querystring" locationName:"PageToken" type:"string"` - - PipelineId *string `location:"uri" locationName:"PipelineId" type:"string"` -} - -// SetAscending sets the Ascending field's value. -func (s *InputService8TestShapeInputService8TestCaseOperation1Input) SetAscending(v string) *InputService8TestShapeInputService8TestCaseOperation1Input { - s.Ascending = &v - return s -} - -// SetPageToken sets the PageToken field's value. -func (s *InputService8TestShapeInputService8TestCaseOperation1Input) SetPageToken(v string) *InputService8TestShapeInputService8TestCaseOperation1Input { - s.PageToken = &v - return s -} - -// SetPipelineId sets the PipelineId field's value. -func (s *InputService8TestShapeInputService8TestCaseOperation1Input) SetPipelineId(v string) *InputService8TestShapeInputService8TestCaseOperation1Input { - s.PipelineId = &v - return s -} - -type InputService8TestShapeInputService8TestCaseOperation1Output struct { - _ struct{} `type:"structure"` -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type InputService9ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the InputService9ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a InputService9ProtocolTest client from just a session. -// svc := inputservice9protocoltest.New(mySession) -// -// // Create a InputService9ProtocolTest client with additional configuration -// svc := inputservice9protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewInputService9ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService9ProtocolTest { - c := p.ClientConfig("inputservice9protocoltest", cfgs...) - return newInputService9ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newInputService9ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService9ProtocolTest { - svc := &InputService9ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "inputservice9protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-01-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a InputService9ProtocolTest operation and runs any -// custom request initialization. -func (c *InputService9ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opInputService9TestCaseOperation1 = "OperationName" - -// InputService9TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the InputService9TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService9TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService9TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService9TestCaseOperation1Request method. -// req, resp := client.InputService9TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService9ProtocolTest) InputService9TestCaseOperation1Request(input *InputService9TestShapeInputService9TestCaseOperation1Input) (req *request.Request, output *InputService9TestShapeInputService9TestCaseOperation1Output) { - op := &request.Operation{ - Name: opInputService9TestCaseOperation1, - HTTPMethod: "POST", - HTTPPath: "/2014-01-01/jobsByPipeline/{PipelineId}", - } - - if input == nil { - input = &InputService9TestShapeInputService9TestCaseOperation1Input{} - } - - output = &InputService9TestShapeInputService9TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService9TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService9TestCaseOperation1 for usage and error information. -func (c *InputService9ProtocolTest) InputService9TestCaseOperation1(input *InputService9TestShapeInputService9TestCaseOperation1Input) (*InputService9TestShapeInputService9TestCaseOperation1Output, error) { - req, out := c.InputService9TestCaseOperation1Request(input) - return out, req.Send() -} - -// InputService9TestCaseOperation1WithContext is the same as InputService9TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService9TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService9ProtocolTest) InputService9TestCaseOperation1WithContext(ctx aws.Context, input *InputService9TestShapeInputService9TestCaseOperation1Input, opts ...request.Option) (*InputService9TestShapeInputService9TestCaseOperation1Output, error) { - req, out := c.InputService9TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type InputService9TestShapeInputService9TestCaseOperation1Input struct { - _ struct{} `type:"structure"` - - Ascending *string `location:"querystring" locationName:"Ascending" type:"string"` - - Config *InputService9TestShapeStructType `type:"structure"` - - PageToken *string `location:"querystring" locationName:"PageToken" type:"string"` - - PipelineId *string `location:"uri" locationName:"PipelineId" type:"string"` -} - -// SetAscending sets the Ascending field's value. -func (s *InputService9TestShapeInputService9TestCaseOperation1Input) SetAscending(v string) *InputService9TestShapeInputService9TestCaseOperation1Input { - s.Ascending = &v - return s -} - -// SetConfig sets the Config field's value. -func (s *InputService9TestShapeInputService9TestCaseOperation1Input) SetConfig(v *InputService9TestShapeStructType) *InputService9TestShapeInputService9TestCaseOperation1Input { - s.Config = v - return s -} - -// SetPageToken sets the PageToken field's value. -func (s *InputService9TestShapeInputService9TestCaseOperation1Input) SetPageToken(v string) *InputService9TestShapeInputService9TestCaseOperation1Input { - s.PageToken = &v - return s -} - -// SetPipelineId sets the PipelineId field's value. -func (s *InputService9TestShapeInputService9TestCaseOperation1Input) SetPipelineId(v string) *InputService9TestShapeInputService9TestCaseOperation1Input { - s.PipelineId = &v - return s -} - -type InputService9TestShapeInputService9TestCaseOperation1Output struct { - _ struct{} `type:"structure"` -} - -type InputService9TestShapeStructType struct { - _ struct{} `type:"structure"` - - A *string `type:"string"` - - B *string `type:"string"` -} - -// SetA sets the A field's value. -func (s *InputService9TestShapeStructType) SetA(v string) *InputService9TestShapeStructType { - s.A = &v - return s -} - -// SetB sets the B field's value. -func (s *InputService9TestShapeStructType) SetB(v string) *InputService9TestShapeStructType { - s.B = &v - return s -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type InputService10ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the InputService10ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a InputService10ProtocolTest client from just a session. -// svc := inputservice10protocoltest.New(mySession) -// -// // Create a InputService10ProtocolTest client with additional configuration -// svc := inputservice10protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewInputService10ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService10ProtocolTest { - c := p.ClientConfig("inputservice10protocoltest", cfgs...) - return newInputService10ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newInputService10ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService10ProtocolTest { - svc := &InputService10ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "inputservice10protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-01-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a InputService10ProtocolTest operation and runs any -// custom request initialization. -func (c *InputService10ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opInputService10TestCaseOperation1 = "OperationName" - -// InputService10TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the InputService10TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService10TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService10TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService10TestCaseOperation1Request method. -// req, resp := client.InputService10TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService10ProtocolTest) InputService10TestCaseOperation1Request(input *InputService10TestShapeInputService10TestCaseOperation1Input) (req *request.Request, output *InputService10TestShapeInputService10TestCaseOperation1Output) { - op := &request.Operation{ - Name: opInputService10TestCaseOperation1, - HTTPMethod: "POST", - HTTPPath: "/2014-01-01/jobsByPipeline/{PipelineId}", - } - - if input == nil { - input = &InputService10TestShapeInputService10TestCaseOperation1Input{} - } - - output = &InputService10TestShapeInputService10TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService10TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService10TestCaseOperation1 for usage and error information. -func (c *InputService10ProtocolTest) InputService10TestCaseOperation1(input *InputService10TestShapeInputService10TestCaseOperation1Input) (*InputService10TestShapeInputService10TestCaseOperation1Output, error) { - req, out := c.InputService10TestCaseOperation1Request(input) - return out, req.Send() -} - -// InputService10TestCaseOperation1WithContext is the same as InputService10TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService10TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService10ProtocolTest) InputService10TestCaseOperation1WithContext(ctx aws.Context, input *InputService10TestShapeInputService10TestCaseOperation1Input, opts ...request.Option) (*InputService10TestShapeInputService10TestCaseOperation1Output, error) { - req, out := c.InputService10TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type InputService10TestShapeInputService10TestCaseOperation1Input struct { - _ struct{} `type:"structure"` - - Ascending *string `location:"querystring" locationName:"Ascending" type:"string"` - - Checksum *string `location:"header" locationName:"x-amz-checksum" type:"string"` - - Config *InputService10TestShapeStructType `type:"structure"` - - PageToken *string `location:"querystring" locationName:"PageToken" type:"string"` - - PipelineId *string `location:"uri" locationName:"PipelineId" type:"string"` -} - -// SetAscending sets the Ascending field's value. -func (s *InputService10TestShapeInputService10TestCaseOperation1Input) SetAscending(v string) *InputService10TestShapeInputService10TestCaseOperation1Input { - s.Ascending = &v - return s -} - -// SetChecksum sets the Checksum field's value. -func (s *InputService10TestShapeInputService10TestCaseOperation1Input) SetChecksum(v string) *InputService10TestShapeInputService10TestCaseOperation1Input { - s.Checksum = &v - return s -} - -// SetConfig sets the Config field's value. -func (s *InputService10TestShapeInputService10TestCaseOperation1Input) SetConfig(v *InputService10TestShapeStructType) *InputService10TestShapeInputService10TestCaseOperation1Input { - s.Config = v - return s -} - -// SetPageToken sets the PageToken field's value. -func (s *InputService10TestShapeInputService10TestCaseOperation1Input) SetPageToken(v string) *InputService10TestShapeInputService10TestCaseOperation1Input { - s.PageToken = &v - return s -} - -// SetPipelineId sets the PipelineId field's value. -func (s *InputService10TestShapeInputService10TestCaseOperation1Input) SetPipelineId(v string) *InputService10TestShapeInputService10TestCaseOperation1Input { - s.PipelineId = &v - return s -} - -type InputService10TestShapeInputService10TestCaseOperation1Output struct { - _ struct{} `type:"structure"` -} - -type InputService10TestShapeStructType struct { - _ struct{} `type:"structure"` - - A *string `type:"string"` - - B *string `type:"string"` -} - -// SetA sets the A field's value. -func (s *InputService10TestShapeStructType) SetA(v string) *InputService10TestShapeStructType { - s.A = &v - return s -} - -// SetB sets the B field's value. -func (s *InputService10TestShapeStructType) SetB(v string) *InputService10TestShapeStructType { - s.B = &v - return s -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type InputService11ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the InputService11ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a InputService11ProtocolTest client from just a session. -// svc := inputservice11protocoltest.New(mySession) -// -// // Create a InputService11ProtocolTest client with additional configuration -// svc := inputservice11protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewInputService11ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService11ProtocolTest { - c := p.ClientConfig("inputservice11protocoltest", cfgs...) - return newInputService11ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newInputService11ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService11ProtocolTest { - svc := &InputService11ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "inputservice11protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-01-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a InputService11ProtocolTest operation and runs any -// custom request initialization. -func (c *InputService11ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opInputService11TestCaseOperation1 = "OperationName" - -// InputService11TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the InputService11TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService11TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService11TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService11TestCaseOperation1Request method. -// req, resp := client.InputService11TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService11ProtocolTest) InputService11TestCaseOperation1Request(input *InputService11TestShapeInputService11TestCaseOperation1Input) (req *request.Request, output *InputService11TestShapeInputService11TestCaseOperation1Output) { - op := &request.Operation{ - Name: opInputService11TestCaseOperation1, - HTTPMethod: "POST", - HTTPPath: "/2014-01-01/vaults/{vaultName}/archives", - } - - if input == nil { - input = &InputService11TestShapeInputService11TestCaseOperation1Input{} - } - - output = &InputService11TestShapeInputService11TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService11TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService11TestCaseOperation1 for usage and error information. -func (c *InputService11ProtocolTest) InputService11TestCaseOperation1(input *InputService11TestShapeInputService11TestCaseOperation1Input) (*InputService11TestShapeInputService11TestCaseOperation1Output, error) { - req, out := c.InputService11TestCaseOperation1Request(input) - return out, req.Send() -} - -// InputService11TestCaseOperation1WithContext is the same as InputService11TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService11TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService11ProtocolTest) InputService11TestCaseOperation1WithContext(ctx aws.Context, input *InputService11TestShapeInputService11TestCaseOperation1Input, opts ...request.Option) (*InputService11TestShapeInputService11TestCaseOperation1Output, error) { - req, out := c.InputService11TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type InputService11TestShapeInputService11TestCaseOperation1Input struct { - _ struct{} `type:"structure" payload:"Body"` - - Body io.ReadSeeker `locationName:"body" type:"blob"` - - Checksum *string `location:"header" locationName:"x-amz-sha256-tree-hash" type:"string"` - - // VaultName is a required field - VaultName *string `location:"uri" locationName:"vaultName" type:"string" required:"true"` -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InputService11TestShapeInputService11TestCaseOperation1Input) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InputService11TestShapeInputService11TestCaseOperation1Input"} - if s.VaultName == nil { - invalidParams.Add(request.NewErrParamRequired("VaultName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBody sets the Body field's value. -func (s *InputService11TestShapeInputService11TestCaseOperation1Input) SetBody(v io.ReadSeeker) *InputService11TestShapeInputService11TestCaseOperation1Input { - s.Body = v - return s -} - -// SetChecksum sets the Checksum field's value. -func (s *InputService11TestShapeInputService11TestCaseOperation1Input) SetChecksum(v string) *InputService11TestShapeInputService11TestCaseOperation1Input { - s.Checksum = &v - return s -} - -// SetVaultName sets the VaultName field's value. -func (s *InputService11TestShapeInputService11TestCaseOperation1Input) SetVaultName(v string) *InputService11TestShapeInputService11TestCaseOperation1Input { - s.VaultName = &v - return s -} - -type InputService11TestShapeInputService11TestCaseOperation1Output struct { - _ struct{} `type:"structure"` -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type InputService12ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the InputService12ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a InputService12ProtocolTest client from just a session. -// svc := inputservice12protocoltest.New(mySession) -// -// // Create a InputService12ProtocolTest client with additional configuration -// svc := inputservice12protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewInputService12ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService12ProtocolTest { - c := p.ClientConfig("inputservice12protocoltest", cfgs...) - return newInputService12ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newInputService12ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService12ProtocolTest { - svc := &InputService12ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "inputservice12protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-01-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a InputService12ProtocolTest operation and runs any -// custom request initialization. -func (c *InputService12ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opInputService12TestCaseOperation1 = "OperationName" - -// InputService12TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the InputService12TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService12TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService12TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService12TestCaseOperation1Request method. -// req, resp := client.InputService12TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService12ProtocolTest) InputService12TestCaseOperation1Request(input *InputService12TestShapeInputService12TestCaseOperation1Input) (req *request.Request, output *InputService12TestShapeInputService12TestCaseOperation1Output) { - op := &request.Operation{ - Name: opInputService12TestCaseOperation1, - HTTPMethod: "POST", - HTTPPath: "/2014-01-01/{Foo}", - } - - if input == nil { - input = &InputService12TestShapeInputService12TestCaseOperation1Input{} - } - - output = &InputService12TestShapeInputService12TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService12TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService12TestCaseOperation1 for usage and error information. -func (c *InputService12ProtocolTest) InputService12TestCaseOperation1(input *InputService12TestShapeInputService12TestCaseOperation1Input) (*InputService12TestShapeInputService12TestCaseOperation1Output, error) { - req, out := c.InputService12TestCaseOperation1Request(input) - return out, req.Send() -} - -// InputService12TestCaseOperation1WithContext is the same as InputService12TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService12TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService12ProtocolTest) InputService12TestCaseOperation1WithContext(ctx aws.Context, input *InputService12TestShapeInputService12TestCaseOperation1Input, opts ...request.Option) (*InputService12TestShapeInputService12TestCaseOperation1Output, error) { - req, out := c.InputService12TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type InputService12TestShapeInputService12TestCaseOperation1Input struct { - _ struct{} `type:"structure"` - - // Bar is automatically base64 encoded/decoded by the SDK. - Bar []byte `type:"blob"` - - // Foo is a required field - Foo *string `location:"uri" locationName:"Foo" type:"string" required:"true"` -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InputService12TestShapeInputService12TestCaseOperation1Input) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InputService12TestShapeInputService12TestCaseOperation1Input"} - if s.Foo == nil { - invalidParams.Add(request.NewErrParamRequired("Foo")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBar sets the Bar field's value. -func (s *InputService12TestShapeInputService12TestCaseOperation1Input) SetBar(v []byte) *InputService12TestShapeInputService12TestCaseOperation1Input { - s.Bar = v - return s -} - -// SetFoo sets the Foo field's value. -func (s *InputService12TestShapeInputService12TestCaseOperation1Input) SetFoo(v string) *InputService12TestShapeInputService12TestCaseOperation1Input { - s.Foo = &v - return s -} - -type InputService12TestShapeInputService12TestCaseOperation1Output struct { - _ struct{} `type:"structure"` -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type InputService13ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the InputService13ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a InputService13ProtocolTest client from just a session. -// svc := inputservice13protocoltest.New(mySession) -// -// // Create a InputService13ProtocolTest client with additional configuration -// svc := inputservice13protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewInputService13ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService13ProtocolTest { - c := p.ClientConfig("inputservice13protocoltest", cfgs...) - return newInputService13ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newInputService13ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService13ProtocolTest { - svc := &InputService13ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "inputservice13protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-01-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a InputService13ProtocolTest operation and runs any -// custom request initialization. -func (c *InputService13ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opInputService13TestCaseOperation1 = "OperationName" - -// InputService13TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the InputService13TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService13TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService13TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService13TestCaseOperation1Request method. -// req, resp := client.InputService13TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService13ProtocolTest) InputService13TestCaseOperation1Request(input *InputService13TestShapeInputService13TestCaseOperation2Input) (req *request.Request, output *InputService13TestShapeInputService13TestCaseOperation1Output) { - op := &request.Operation{ - Name: opInputService13TestCaseOperation1, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &InputService13TestShapeInputService13TestCaseOperation2Input{} - } - - output = &InputService13TestShapeInputService13TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService13TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService13TestCaseOperation1 for usage and error information. -func (c *InputService13ProtocolTest) InputService13TestCaseOperation1(input *InputService13TestShapeInputService13TestCaseOperation2Input) (*InputService13TestShapeInputService13TestCaseOperation1Output, error) { - req, out := c.InputService13TestCaseOperation1Request(input) - return out, req.Send() -} - -// InputService13TestCaseOperation1WithContext is the same as InputService13TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService13TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService13ProtocolTest) InputService13TestCaseOperation1WithContext(ctx aws.Context, input *InputService13TestShapeInputService13TestCaseOperation2Input, opts ...request.Option) (*InputService13TestShapeInputService13TestCaseOperation1Output, error) { - req, out := c.InputService13TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opInputService13TestCaseOperation2 = "OperationName" - -// InputService13TestCaseOperation2Request generates a "aws/request.Request" representing the -// client's request for the InputService13TestCaseOperation2 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService13TestCaseOperation2 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService13TestCaseOperation2 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService13TestCaseOperation2Request method. -// req, resp := client.InputService13TestCaseOperation2Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService13ProtocolTest) InputService13TestCaseOperation2Request(input *InputService13TestShapeInputService13TestCaseOperation2Input) (req *request.Request, output *InputService13TestShapeInputService13TestCaseOperation2Output) { - op := &request.Operation{ - Name: opInputService13TestCaseOperation2, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &InputService13TestShapeInputService13TestCaseOperation2Input{} - } - - output = &InputService13TestShapeInputService13TestCaseOperation2Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService13TestCaseOperation2 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService13TestCaseOperation2 for usage and error information. -func (c *InputService13ProtocolTest) InputService13TestCaseOperation2(input *InputService13TestShapeInputService13TestCaseOperation2Input) (*InputService13TestShapeInputService13TestCaseOperation2Output, error) { - req, out := c.InputService13TestCaseOperation2Request(input) - return out, req.Send() -} - -// InputService13TestCaseOperation2WithContext is the same as InputService13TestCaseOperation2 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService13TestCaseOperation2 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService13ProtocolTest) InputService13TestCaseOperation2WithContext(ctx aws.Context, input *InputService13TestShapeInputService13TestCaseOperation2Input, opts ...request.Option) (*InputService13TestShapeInputService13TestCaseOperation2Output, error) { - req, out := c.InputService13TestCaseOperation2Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type InputService13TestShapeInputService13TestCaseOperation1Output struct { - _ struct{} `type:"structure"` -} - -type InputService13TestShapeInputService13TestCaseOperation2Input struct { - _ struct{} `type:"structure" payload:"Foo"` - - Foo []byte `locationName:"foo" type:"blob"` -} - -// SetFoo sets the Foo field's value. -func (s *InputService13TestShapeInputService13TestCaseOperation2Input) SetFoo(v []byte) *InputService13TestShapeInputService13TestCaseOperation2Input { - s.Foo = v - return s -} - -type InputService13TestShapeInputService13TestCaseOperation2Output struct { - _ struct{} `type:"structure"` -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type InputService14ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the InputService14ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a InputService14ProtocolTest client from just a session. -// svc := inputservice14protocoltest.New(mySession) -// -// // Create a InputService14ProtocolTest client with additional configuration -// svc := inputservice14protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewInputService14ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService14ProtocolTest { - c := p.ClientConfig("inputservice14protocoltest", cfgs...) - return newInputService14ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newInputService14ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService14ProtocolTest { - svc := &InputService14ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "inputservice14protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-01-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a InputService14ProtocolTest operation and runs any -// custom request initialization. -func (c *InputService14ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opInputService14TestCaseOperation1 = "OperationName" - -// InputService14TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the InputService14TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService14TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService14TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService14TestCaseOperation1Request method. -// req, resp := client.InputService14TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService14ProtocolTest) InputService14TestCaseOperation1Request(input *InputService14TestShapeInputService14TestCaseOperation2Input) (req *request.Request, output *InputService14TestShapeInputService14TestCaseOperation1Output) { - op := &request.Operation{ - Name: opInputService14TestCaseOperation1, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &InputService14TestShapeInputService14TestCaseOperation2Input{} - } - - output = &InputService14TestShapeInputService14TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService14TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService14TestCaseOperation1 for usage and error information. -func (c *InputService14ProtocolTest) InputService14TestCaseOperation1(input *InputService14TestShapeInputService14TestCaseOperation2Input) (*InputService14TestShapeInputService14TestCaseOperation1Output, error) { - req, out := c.InputService14TestCaseOperation1Request(input) - return out, req.Send() -} - -// InputService14TestCaseOperation1WithContext is the same as InputService14TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService14TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService14ProtocolTest) InputService14TestCaseOperation1WithContext(ctx aws.Context, input *InputService14TestShapeInputService14TestCaseOperation2Input, opts ...request.Option) (*InputService14TestShapeInputService14TestCaseOperation1Output, error) { - req, out := c.InputService14TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opInputService14TestCaseOperation2 = "OperationName" - -// InputService14TestCaseOperation2Request generates a "aws/request.Request" representing the -// client's request for the InputService14TestCaseOperation2 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService14TestCaseOperation2 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService14TestCaseOperation2 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService14TestCaseOperation2Request method. -// req, resp := client.InputService14TestCaseOperation2Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService14ProtocolTest) InputService14TestCaseOperation2Request(input *InputService14TestShapeInputService14TestCaseOperation2Input) (req *request.Request, output *InputService14TestShapeInputService14TestCaseOperation2Output) { - op := &request.Operation{ - Name: opInputService14TestCaseOperation2, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &InputService14TestShapeInputService14TestCaseOperation2Input{} - } - - output = &InputService14TestShapeInputService14TestCaseOperation2Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService14TestCaseOperation2 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService14TestCaseOperation2 for usage and error information. -func (c *InputService14ProtocolTest) InputService14TestCaseOperation2(input *InputService14TestShapeInputService14TestCaseOperation2Input) (*InputService14TestShapeInputService14TestCaseOperation2Output, error) { - req, out := c.InputService14TestCaseOperation2Request(input) - return out, req.Send() -} - -// InputService14TestCaseOperation2WithContext is the same as InputService14TestCaseOperation2 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService14TestCaseOperation2 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService14ProtocolTest) InputService14TestCaseOperation2WithContext(ctx aws.Context, input *InputService14TestShapeInputService14TestCaseOperation2Input, opts ...request.Option) (*InputService14TestShapeInputService14TestCaseOperation2Output, error) { - req, out := c.InputService14TestCaseOperation2Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type InputService14TestShapeFooShape struct { - _ struct{} `locationName:"foo" type:"structure"` - - Baz *string `locationName:"baz" type:"string"` -} - -// SetBaz sets the Baz field's value. -func (s *InputService14TestShapeFooShape) SetBaz(v string) *InputService14TestShapeFooShape { - s.Baz = &v - return s -} - -type InputService14TestShapeInputService14TestCaseOperation1Output struct { - _ struct{} `type:"structure"` -} - -type InputService14TestShapeInputService14TestCaseOperation2Input struct { - _ struct{} `type:"structure" payload:"Foo"` - - Foo *InputService14TestShapeFooShape `locationName:"foo" type:"structure"` -} - -// SetFoo sets the Foo field's value. -func (s *InputService14TestShapeInputService14TestCaseOperation2Input) SetFoo(v *InputService14TestShapeFooShape) *InputService14TestShapeInputService14TestCaseOperation2Input { - s.Foo = v - return s -} - -type InputService14TestShapeInputService14TestCaseOperation2Output struct { - _ struct{} `type:"structure"` -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type InputService15ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the InputService15ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a InputService15ProtocolTest client from just a session. -// svc := inputservice15protocoltest.New(mySession) -// -// // Create a InputService15ProtocolTest client with additional configuration -// svc := inputservice15protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewInputService15ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService15ProtocolTest { - c := p.ClientConfig("inputservice15protocoltest", cfgs...) - return newInputService15ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newInputService15ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService15ProtocolTest { - svc := &InputService15ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "inputservice15protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-01-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a InputService15ProtocolTest operation and runs any -// custom request initialization. -func (c *InputService15ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opInputService15TestCaseOperation1 = "OperationName" - -// InputService15TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the InputService15TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService15TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService15TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService15TestCaseOperation1Request method. -// req, resp := client.InputService15TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService15ProtocolTest) InputService15TestCaseOperation1Request(input *InputService15TestShapeInputService15TestCaseOperation2Input) (req *request.Request, output *InputService15TestShapeInputService15TestCaseOperation1Output) { - op := &request.Operation{ - Name: opInputService15TestCaseOperation1, - HTTPMethod: "POST", - HTTPPath: "/path", - } - - if input == nil { - input = &InputService15TestShapeInputService15TestCaseOperation2Input{} - } - - output = &InputService15TestShapeInputService15TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService15TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService15TestCaseOperation1 for usage and error information. -func (c *InputService15ProtocolTest) InputService15TestCaseOperation1(input *InputService15TestShapeInputService15TestCaseOperation2Input) (*InputService15TestShapeInputService15TestCaseOperation1Output, error) { - req, out := c.InputService15TestCaseOperation1Request(input) - return out, req.Send() -} - -// InputService15TestCaseOperation1WithContext is the same as InputService15TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService15TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService15ProtocolTest) InputService15TestCaseOperation1WithContext(ctx aws.Context, input *InputService15TestShapeInputService15TestCaseOperation2Input, opts ...request.Option) (*InputService15TestShapeInputService15TestCaseOperation1Output, error) { - req, out := c.InputService15TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opInputService15TestCaseOperation2 = "OperationName" - -// InputService15TestCaseOperation2Request generates a "aws/request.Request" representing the -// client's request for the InputService15TestCaseOperation2 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService15TestCaseOperation2 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService15TestCaseOperation2 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService15TestCaseOperation2Request method. -// req, resp := client.InputService15TestCaseOperation2Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService15ProtocolTest) InputService15TestCaseOperation2Request(input *InputService15TestShapeInputService15TestCaseOperation2Input) (req *request.Request, output *InputService15TestShapeInputService15TestCaseOperation2Output) { - op := &request.Operation{ - Name: opInputService15TestCaseOperation2, - HTTPMethod: "POST", - HTTPPath: "/path?abc=mno", - } - - if input == nil { - input = &InputService15TestShapeInputService15TestCaseOperation2Input{} - } - - output = &InputService15TestShapeInputService15TestCaseOperation2Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService15TestCaseOperation2 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService15TestCaseOperation2 for usage and error information. -func (c *InputService15ProtocolTest) InputService15TestCaseOperation2(input *InputService15TestShapeInputService15TestCaseOperation2Input) (*InputService15TestShapeInputService15TestCaseOperation2Output, error) { - req, out := c.InputService15TestCaseOperation2Request(input) - return out, req.Send() -} - -// InputService15TestCaseOperation2WithContext is the same as InputService15TestCaseOperation2 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService15TestCaseOperation2 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService15ProtocolTest) InputService15TestCaseOperation2WithContext(ctx aws.Context, input *InputService15TestShapeInputService15TestCaseOperation2Input, opts ...request.Option) (*InputService15TestShapeInputService15TestCaseOperation2Output, error) { - req, out := c.InputService15TestCaseOperation2Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type InputService15TestShapeInputService15TestCaseOperation1Output struct { - _ struct{} `type:"structure"` -} - -type InputService15TestShapeInputService15TestCaseOperation2Input struct { - _ struct{} `type:"structure"` - - Foo *string `location:"querystring" locationName:"param-name" type:"string"` -} - -// SetFoo sets the Foo field's value. -func (s *InputService15TestShapeInputService15TestCaseOperation2Input) SetFoo(v string) *InputService15TestShapeInputService15TestCaseOperation2Input { - s.Foo = &v - return s -} - -type InputService15TestShapeInputService15TestCaseOperation2Output struct { - _ struct{} `type:"structure"` -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type InputService16ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the InputService16ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a InputService16ProtocolTest client from just a session. -// svc := inputservice16protocoltest.New(mySession) -// -// // Create a InputService16ProtocolTest client with additional configuration -// svc := inputservice16protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewInputService16ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService16ProtocolTest { - c := p.ClientConfig("inputservice16protocoltest", cfgs...) - return newInputService16ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newInputService16ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService16ProtocolTest { - svc := &InputService16ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "inputservice16protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-01-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a InputService16ProtocolTest operation and runs any -// custom request initialization. -func (c *InputService16ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opInputService16TestCaseOperation1 = "OperationName" - -// InputService16TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the InputService16TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService16TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService16TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService16TestCaseOperation1Request method. -// req, resp := client.InputService16TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService16ProtocolTest) InputService16TestCaseOperation1Request(input *InputService16TestShapeInputService16TestCaseOperation6Input) (req *request.Request, output *InputService16TestShapeInputService16TestCaseOperation1Output) { - op := &request.Operation{ - Name: opInputService16TestCaseOperation1, - HTTPMethod: "POST", - HTTPPath: "/path", - } - - if input == nil { - input = &InputService16TestShapeInputService16TestCaseOperation6Input{} - } - - output = &InputService16TestShapeInputService16TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService16TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService16TestCaseOperation1 for usage and error information. -func (c *InputService16ProtocolTest) InputService16TestCaseOperation1(input *InputService16TestShapeInputService16TestCaseOperation6Input) (*InputService16TestShapeInputService16TestCaseOperation1Output, error) { - req, out := c.InputService16TestCaseOperation1Request(input) - return out, req.Send() -} - -// InputService16TestCaseOperation1WithContext is the same as InputService16TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService16TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService16ProtocolTest) InputService16TestCaseOperation1WithContext(ctx aws.Context, input *InputService16TestShapeInputService16TestCaseOperation6Input, opts ...request.Option) (*InputService16TestShapeInputService16TestCaseOperation1Output, error) { - req, out := c.InputService16TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opInputService16TestCaseOperation2 = "OperationName" - -// InputService16TestCaseOperation2Request generates a "aws/request.Request" representing the -// client's request for the InputService16TestCaseOperation2 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService16TestCaseOperation2 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService16TestCaseOperation2 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService16TestCaseOperation2Request method. -// req, resp := client.InputService16TestCaseOperation2Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService16ProtocolTest) InputService16TestCaseOperation2Request(input *InputService16TestShapeInputService16TestCaseOperation6Input) (req *request.Request, output *InputService16TestShapeInputService16TestCaseOperation2Output) { - op := &request.Operation{ - Name: opInputService16TestCaseOperation2, - HTTPMethod: "POST", - HTTPPath: "/path", - } - - if input == nil { - input = &InputService16TestShapeInputService16TestCaseOperation6Input{} - } - - output = &InputService16TestShapeInputService16TestCaseOperation2Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService16TestCaseOperation2 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService16TestCaseOperation2 for usage and error information. -func (c *InputService16ProtocolTest) InputService16TestCaseOperation2(input *InputService16TestShapeInputService16TestCaseOperation6Input) (*InputService16TestShapeInputService16TestCaseOperation2Output, error) { - req, out := c.InputService16TestCaseOperation2Request(input) - return out, req.Send() -} - -// InputService16TestCaseOperation2WithContext is the same as InputService16TestCaseOperation2 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService16TestCaseOperation2 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService16ProtocolTest) InputService16TestCaseOperation2WithContext(ctx aws.Context, input *InputService16TestShapeInputService16TestCaseOperation6Input, opts ...request.Option) (*InputService16TestShapeInputService16TestCaseOperation2Output, error) { - req, out := c.InputService16TestCaseOperation2Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opInputService16TestCaseOperation3 = "OperationName" - -// InputService16TestCaseOperation3Request generates a "aws/request.Request" representing the -// client's request for the InputService16TestCaseOperation3 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService16TestCaseOperation3 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService16TestCaseOperation3 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService16TestCaseOperation3Request method. -// req, resp := client.InputService16TestCaseOperation3Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService16ProtocolTest) InputService16TestCaseOperation3Request(input *InputService16TestShapeInputService16TestCaseOperation6Input) (req *request.Request, output *InputService16TestShapeInputService16TestCaseOperation3Output) { - op := &request.Operation{ - Name: opInputService16TestCaseOperation3, - HTTPMethod: "POST", - HTTPPath: "/path", - } - - if input == nil { - input = &InputService16TestShapeInputService16TestCaseOperation6Input{} - } - - output = &InputService16TestShapeInputService16TestCaseOperation3Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService16TestCaseOperation3 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService16TestCaseOperation3 for usage and error information. -func (c *InputService16ProtocolTest) InputService16TestCaseOperation3(input *InputService16TestShapeInputService16TestCaseOperation6Input) (*InputService16TestShapeInputService16TestCaseOperation3Output, error) { - req, out := c.InputService16TestCaseOperation3Request(input) - return out, req.Send() -} - -// InputService16TestCaseOperation3WithContext is the same as InputService16TestCaseOperation3 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService16TestCaseOperation3 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService16ProtocolTest) InputService16TestCaseOperation3WithContext(ctx aws.Context, input *InputService16TestShapeInputService16TestCaseOperation6Input, opts ...request.Option) (*InputService16TestShapeInputService16TestCaseOperation3Output, error) { - req, out := c.InputService16TestCaseOperation3Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opInputService16TestCaseOperation4 = "OperationName" - -// InputService16TestCaseOperation4Request generates a "aws/request.Request" representing the -// client's request for the InputService16TestCaseOperation4 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService16TestCaseOperation4 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService16TestCaseOperation4 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService16TestCaseOperation4Request method. -// req, resp := client.InputService16TestCaseOperation4Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService16ProtocolTest) InputService16TestCaseOperation4Request(input *InputService16TestShapeInputService16TestCaseOperation6Input) (req *request.Request, output *InputService16TestShapeInputService16TestCaseOperation4Output) { - op := &request.Operation{ - Name: opInputService16TestCaseOperation4, - HTTPMethod: "POST", - HTTPPath: "/path", - } - - if input == nil { - input = &InputService16TestShapeInputService16TestCaseOperation6Input{} - } - - output = &InputService16TestShapeInputService16TestCaseOperation4Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService16TestCaseOperation4 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService16TestCaseOperation4 for usage and error information. -func (c *InputService16ProtocolTest) InputService16TestCaseOperation4(input *InputService16TestShapeInputService16TestCaseOperation6Input) (*InputService16TestShapeInputService16TestCaseOperation4Output, error) { - req, out := c.InputService16TestCaseOperation4Request(input) - return out, req.Send() -} - -// InputService16TestCaseOperation4WithContext is the same as InputService16TestCaseOperation4 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService16TestCaseOperation4 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService16ProtocolTest) InputService16TestCaseOperation4WithContext(ctx aws.Context, input *InputService16TestShapeInputService16TestCaseOperation6Input, opts ...request.Option) (*InputService16TestShapeInputService16TestCaseOperation4Output, error) { - req, out := c.InputService16TestCaseOperation4Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opInputService16TestCaseOperation5 = "OperationName" - -// InputService16TestCaseOperation5Request generates a "aws/request.Request" representing the -// client's request for the InputService16TestCaseOperation5 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService16TestCaseOperation5 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService16TestCaseOperation5 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService16TestCaseOperation5Request method. -// req, resp := client.InputService16TestCaseOperation5Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService16ProtocolTest) InputService16TestCaseOperation5Request(input *InputService16TestShapeInputService16TestCaseOperation6Input) (req *request.Request, output *InputService16TestShapeInputService16TestCaseOperation5Output) { - op := &request.Operation{ - Name: opInputService16TestCaseOperation5, - HTTPMethod: "POST", - HTTPPath: "/path", - } - - if input == nil { - input = &InputService16TestShapeInputService16TestCaseOperation6Input{} - } - - output = &InputService16TestShapeInputService16TestCaseOperation5Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService16TestCaseOperation5 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService16TestCaseOperation5 for usage and error information. -func (c *InputService16ProtocolTest) InputService16TestCaseOperation5(input *InputService16TestShapeInputService16TestCaseOperation6Input) (*InputService16TestShapeInputService16TestCaseOperation5Output, error) { - req, out := c.InputService16TestCaseOperation5Request(input) - return out, req.Send() -} - -// InputService16TestCaseOperation5WithContext is the same as InputService16TestCaseOperation5 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService16TestCaseOperation5 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService16ProtocolTest) InputService16TestCaseOperation5WithContext(ctx aws.Context, input *InputService16TestShapeInputService16TestCaseOperation6Input, opts ...request.Option) (*InputService16TestShapeInputService16TestCaseOperation5Output, error) { - req, out := c.InputService16TestCaseOperation5Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opInputService16TestCaseOperation6 = "OperationName" - -// InputService16TestCaseOperation6Request generates a "aws/request.Request" representing the -// client's request for the InputService16TestCaseOperation6 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService16TestCaseOperation6 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService16TestCaseOperation6 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService16TestCaseOperation6Request method. -// req, resp := client.InputService16TestCaseOperation6Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService16ProtocolTest) InputService16TestCaseOperation6Request(input *InputService16TestShapeInputService16TestCaseOperation6Input) (req *request.Request, output *InputService16TestShapeInputService16TestCaseOperation6Output) { - op := &request.Operation{ - Name: opInputService16TestCaseOperation6, - HTTPMethod: "POST", - HTTPPath: "/path", - } - - if input == nil { - input = &InputService16TestShapeInputService16TestCaseOperation6Input{} - } - - output = &InputService16TestShapeInputService16TestCaseOperation6Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService16TestCaseOperation6 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService16TestCaseOperation6 for usage and error information. -func (c *InputService16ProtocolTest) InputService16TestCaseOperation6(input *InputService16TestShapeInputService16TestCaseOperation6Input) (*InputService16TestShapeInputService16TestCaseOperation6Output, error) { - req, out := c.InputService16TestCaseOperation6Request(input) - return out, req.Send() -} - -// InputService16TestCaseOperation6WithContext is the same as InputService16TestCaseOperation6 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService16TestCaseOperation6 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService16ProtocolTest) InputService16TestCaseOperation6WithContext(ctx aws.Context, input *InputService16TestShapeInputService16TestCaseOperation6Input, opts ...request.Option) (*InputService16TestShapeInputService16TestCaseOperation6Output, error) { - req, out := c.InputService16TestCaseOperation6Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type InputService16TestShapeInputService16TestCaseOperation1Output struct { - _ struct{} `type:"structure"` -} - -type InputService16TestShapeInputService16TestCaseOperation2Output struct { - _ struct{} `type:"structure"` -} - -type InputService16TestShapeInputService16TestCaseOperation3Output struct { - _ struct{} `type:"structure"` -} - -type InputService16TestShapeInputService16TestCaseOperation4Output struct { - _ struct{} `type:"structure"` -} - -type InputService16TestShapeInputService16TestCaseOperation5Output struct { - _ struct{} `type:"structure"` -} - -type InputService16TestShapeInputService16TestCaseOperation6Input struct { - _ struct{} `type:"structure"` - - RecursiveStruct *InputService16TestShapeRecursiveStructType `type:"structure"` -} - -// SetRecursiveStruct sets the RecursiveStruct field's value. -func (s *InputService16TestShapeInputService16TestCaseOperation6Input) SetRecursiveStruct(v *InputService16TestShapeRecursiveStructType) *InputService16TestShapeInputService16TestCaseOperation6Input { - s.RecursiveStruct = v - return s -} - -type InputService16TestShapeInputService16TestCaseOperation6Output struct { - _ struct{} `type:"structure"` -} - -type InputService16TestShapeRecursiveStructType struct { - _ struct{} `type:"structure"` - - NoRecurse *string `type:"string"` - - RecursiveList []*InputService16TestShapeRecursiveStructType `type:"list"` - - RecursiveMap map[string]*InputService16TestShapeRecursiveStructType `type:"map"` - - RecursiveStruct *InputService16TestShapeRecursiveStructType `type:"structure"` -} - -// SetNoRecurse sets the NoRecurse field's value. -func (s *InputService16TestShapeRecursiveStructType) SetNoRecurse(v string) *InputService16TestShapeRecursiveStructType { - s.NoRecurse = &v - return s -} - -// SetRecursiveList sets the RecursiveList field's value. -func (s *InputService16TestShapeRecursiveStructType) SetRecursiveList(v []*InputService16TestShapeRecursiveStructType) *InputService16TestShapeRecursiveStructType { - s.RecursiveList = v - return s -} - -// SetRecursiveMap sets the RecursiveMap field's value. -func (s *InputService16TestShapeRecursiveStructType) SetRecursiveMap(v map[string]*InputService16TestShapeRecursiveStructType) *InputService16TestShapeRecursiveStructType { - s.RecursiveMap = v - return s -} - -// SetRecursiveStruct sets the RecursiveStruct field's value. -func (s *InputService16TestShapeRecursiveStructType) SetRecursiveStruct(v *InputService16TestShapeRecursiveStructType) *InputService16TestShapeRecursiveStructType { - s.RecursiveStruct = v - return s -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type InputService17ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the InputService17ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a InputService17ProtocolTest client from just a session. -// svc := inputservice17protocoltest.New(mySession) -// -// // Create a InputService17ProtocolTest client with additional configuration -// svc := inputservice17protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewInputService17ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService17ProtocolTest { - c := p.ClientConfig("inputservice17protocoltest", cfgs...) - return newInputService17ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newInputService17ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService17ProtocolTest { - svc := &InputService17ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "inputservice17protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-01-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a InputService17ProtocolTest operation and runs any -// custom request initialization. -func (c *InputService17ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opInputService17TestCaseOperation1 = "OperationName" - -// InputService17TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the InputService17TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService17TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService17TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService17TestCaseOperation1Request method. -// req, resp := client.InputService17TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService17ProtocolTest) InputService17TestCaseOperation1Request(input *InputService17TestShapeInputService17TestCaseOperation2Input) (req *request.Request, output *InputService17TestShapeInputService17TestCaseOperation1Output) { - op := &request.Operation{ - Name: opInputService17TestCaseOperation1, - HTTPMethod: "POST", - HTTPPath: "/path", - } - - if input == nil { - input = &InputService17TestShapeInputService17TestCaseOperation2Input{} - } - - output = &InputService17TestShapeInputService17TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService17TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService17TestCaseOperation1 for usage and error information. -func (c *InputService17ProtocolTest) InputService17TestCaseOperation1(input *InputService17TestShapeInputService17TestCaseOperation2Input) (*InputService17TestShapeInputService17TestCaseOperation1Output, error) { - req, out := c.InputService17TestCaseOperation1Request(input) - return out, req.Send() -} - -// InputService17TestCaseOperation1WithContext is the same as InputService17TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService17TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService17ProtocolTest) InputService17TestCaseOperation1WithContext(ctx aws.Context, input *InputService17TestShapeInputService17TestCaseOperation2Input, opts ...request.Option) (*InputService17TestShapeInputService17TestCaseOperation1Output, error) { - req, out := c.InputService17TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opInputService17TestCaseOperation2 = "OperationName" - -// InputService17TestCaseOperation2Request generates a "aws/request.Request" representing the -// client's request for the InputService17TestCaseOperation2 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService17TestCaseOperation2 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService17TestCaseOperation2 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService17TestCaseOperation2Request method. -// req, resp := client.InputService17TestCaseOperation2Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService17ProtocolTest) InputService17TestCaseOperation2Request(input *InputService17TestShapeInputService17TestCaseOperation2Input) (req *request.Request, output *InputService17TestShapeInputService17TestCaseOperation2Output) { - op := &request.Operation{ - Name: opInputService17TestCaseOperation2, - HTTPMethod: "POST", - HTTPPath: "/path", - } - - if input == nil { - input = &InputService17TestShapeInputService17TestCaseOperation2Input{} - } - - output = &InputService17TestShapeInputService17TestCaseOperation2Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService17TestCaseOperation2 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService17TestCaseOperation2 for usage and error information. -func (c *InputService17ProtocolTest) InputService17TestCaseOperation2(input *InputService17TestShapeInputService17TestCaseOperation2Input) (*InputService17TestShapeInputService17TestCaseOperation2Output, error) { - req, out := c.InputService17TestCaseOperation2Request(input) - return out, req.Send() -} - -// InputService17TestCaseOperation2WithContext is the same as InputService17TestCaseOperation2 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService17TestCaseOperation2 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService17ProtocolTest) InputService17TestCaseOperation2WithContext(ctx aws.Context, input *InputService17TestShapeInputService17TestCaseOperation2Input, opts ...request.Option) (*InputService17TestShapeInputService17TestCaseOperation2Output, error) { - req, out := c.InputService17TestCaseOperation2Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type InputService17TestShapeInputService17TestCaseOperation1Output struct { - _ struct{} `type:"structure"` -} - -type InputService17TestShapeInputService17TestCaseOperation2Input struct { - _ struct{} `type:"structure"` - - TimeArg *time.Time `type:"timestamp" timestampFormat:"unix"` - - TimeArgInHeader *time.Time `location:"header" locationName:"x-amz-timearg" type:"timestamp" timestampFormat:"rfc822"` -} - -// SetTimeArg sets the TimeArg field's value. -func (s *InputService17TestShapeInputService17TestCaseOperation2Input) SetTimeArg(v time.Time) *InputService17TestShapeInputService17TestCaseOperation2Input { - s.TimeArg = &v - return s -} - -// SetTimeArgInHeader sets the TimeArgInHeader field's value. -func (s *InputService17TestShapeInputService17TestCaseOperation2Input) SetTimeArgInHeader(v time.Time) *InputService17TestShapeInputService17TestCaseOperation2Input { - s.TimeArgInHeader = &v - return s -} - -type InputService17TestShapeInputService17TestCaseOperation2Output struct { - _ struct{} `type:"structure"` -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type InputService18ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the InputService18ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a InputService18ProtocolTest client from just a session. -// svc := inputservice18protocoltest.New(mySession) -// -// // Create a InputService18ProtocolTest client with additional configuration -// svc := inputservice18protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewInputService18ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService18ProtocolTest { - c := p.ClientConfig("inputservice18protocoltest", cfgs...) - return newInputService18ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newInputService18ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService18ProtocolTest { - svc := &InputService18ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "inputservice18protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-01-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a InputService18ProtocolTest operation and runs any -// custom request initialization. -func (c *InputService18ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opInputService18TestCaseOperation1 = "OperationName" - -// InputService18TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the InputService18TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService18TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService18TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService18TestCaseOperation1Request method. -// req, resp := client.InputService18TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService18ProtocolTest) InputService18TestCaseOperation1Request(input *InputService18TestShapeInputService18TestCaseOperation1Input) (req *request.Request, output *InputService18TestShapeInputService18TestCaseOperation1Output) { - op := &request.Operation{ - Name: opInputService18TestCaseOperation1, - HTTPMethod: "POST", - HTTPPath: "/path", - } - - if input == nil { - input = &InputService18TestShapeInputService18TestCaseOperation1Input{} - } - - output = &InputService18TestShapeInputService18TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService18TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService18TestCaseOperation1 for usage and error information. -func (c *InputService18ProtocolTest) InputService18TestCaseOperation1(input *InputService18TestShapeInputService18TestCaseOperation1Input) (*InputService18TestShapeInputService18TestCaseOperation1Output, error) { - req, out := c.InputService18TestCaseOperation1Request(input) - return out, req.Send() -} - -// InputService18TestCaseOperation1WithContext is the same as InputService18TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService18TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService18ProtocolTest) InputService18TestCaseOperation1WithContext(ctx aws.Context, input *InputService18TestShapeInputService18TestCaseOperation1Input, opts ...request.Option) (*InputService18TestShapeInputService18TestCaseOperation1Output, error) { - req, out := c.InputService18TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type InputService18TestShapeInputService18TestCaseOperation1Input struct { - _ struct{} `type:"structure"` - - TimeArg *time.Time `locationName:"timestamp_location" type:"timestamp" timestampFormat:"unix"` -} - -// SetTimeArg sets the TimeArg field's value. -func (s *InputService18TestShapeInputService18TestCaseOperation1Input) SetTimeArg(v time.Time) *InputService18TestShapeInputService18TestCaseOperation1Input { - s.TimeArg = &v - return s -} - -type InputService18TestShapeInputService18TestCaseOperation1Output struct { - _ struct{} `type:"structure"` -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type InputService19ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the InputService19ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a InputService19ProtocolTest client from just a session. -// svc := inputservice19protocoltest.New(mySession) -// -// // Create a InputService19ProtocolTest client with additional configuration -// svc := inputservice19protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewInputService19ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService19ProtocolTest { - c := p.ClientConfig("inputservice19protocoltest", cfgs...) - return newInputService19ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newInputService19ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService19ProtocolTest { - svc := &InputService19ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "inputservice19protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-01-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a InputService19ProtocolTest operation and runs any -// custom request initialization. -func (c *InputService19ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opInputService19TestCaseOperation1 = "OperationName" - -// InputService19TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the InputService19TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService19TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService19TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService19TestCaseOperation1Request method. -// req, resp := client.InputService19TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService19ProtocolTest) InputService19TestCaseOperation1Request(input *InputService19TestShapeInputService19TestCaseOperation1Input) (req *request.Request, output *InputService19TestShapeInputService19TestCaseOperation1Output) { - op := &request.Operation{ - Name: opInputService19TestCaseOperation1, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &InputService19TestShapeInputService19TestCaseOperation1Input{} - } - - output = &InputService19TestShapeInputService19TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService19TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService19TestCaseOperation1 for usage and error information. -func (c *InputService19ProtocolTest) InputService19TestCaseOperation1(input *InputService19TestShapeInputService19TestCaseOperation1Input) (*InputService19TestShapeInputService19TestCaseOperation1Output, error) { - req, out := c.InputService19TestCaseOperation1Request(input) - return out, req.Send() -} - -// InputService19TestCaseOperation1WithContext is the same as InputService19TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService19TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService19ProtocolTest) InputService19TestCaseOperation1WithContext(ctx aws.Context, input *InputService19TestShapeInputService19TestCaseOperation1Input, opts ...request.Option) (*InputService19TestShapeInputService19TestCaseOperation1Output, error) { - req, out := c.InputService19TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type InputService19TestShapeInputService19TestCaseOperation1Input struct { - _ struct{} `type:"structure" payload:"Foo"` - - Foo *string `locationName:"foo" type:"string"` -} - -// SetFoo sets the Foo field's value. -func (s *InputService19TestShapeInputService19TestCaseOperation1Input) SetFoo(v string) *InputService19TestShapeInputService19TestCaseOperation1Input { - s.Foo = &v - return s -} - -type InputService19TestShapeInputService19TestCaseOperation1Output struct { - _ struct{} `type:"structure"` -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type InputService20ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the InputService20ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a InputService20ProtocolTest client from just a session. -// svc := inputservice20protocoltest.New(mySession) -// -// // Create a InputService20ProtocolTest client with additional configuration -// svc := inputservice20protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewInputService20ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService20ProtocolTest { - c := p.ClientConfig("inputservice20protocoltest", cfgs...) - return newInputService20ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newInputService20ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService20ProtocolTest { - svc := &InputService20ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "inputservice20protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-01-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a InputService20ProtocolTest operation and runs any -// custom request initialization. -func (c *InputService20ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opInputService20TestCaseOperation1 = "OperationName" - -// InputService20TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the InputService20TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService20TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService20TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService20TestCaseOperation1Request method. -// req, resp := client.InputService20TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService20ProtocolTest) InputService20TestCaseOperation1Request(input *InputService20TestShapeInputService20TestCaseOperation2Input) (req *request.Request, output *InputService20TestShapeInputService20TestCaseOperation1Output) { - op := &request.Operation{ - Name: opInputService20TestCaseOperation1, - HTTPMethod: "POST", - HTTPPath: "/path", - } - - if input == nil { - input = &InputService20TestShapeInputService20TestCaseOperation2Input{} - } - - output = &InputService20TestShapeInputService20TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService20TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService20TestCaseOperation1 for usage and error information. -func (c *InputService20ProtocolTest) InputService20TestCaseOperation1(input *InputService20TestShapeInputService20TestCaseOperation2Input) (*InputService20TestShapeInputService20TestCaseOperation1Output, error) { - req, out := c.InputService20TestCaseOperation1Request(input) - return out, req.Send() -} - -// InputService20TestCaseOperation1WithContext is the same as InputService20TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService20TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService20ProtocolTest) InputService20TestCaseOperation1WithContext(ctx aws.Context, input *InputService20TestShapeInputService20TestCaseOperation2Input, opts ...request.Option) (*InputService20TestShapeInputService20TestCaseOperation1Output, error) { - req, out := c.InputService20TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opInputService20TestCaseOperation2 = "OperationName" - -// InputService20TestCaseOperation2Request generates a "aws/request.Request" representing the -// client's request for the InputService20TestCaseOperation2 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService20TestCaseOperation2 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService20TestCaseOperation2 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService20TestCaseOperation2Request method. -// req, resp := client.InputService20TestCaseOperation2Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService20ProtocolTest) InputService20TestCaseOperation2Request(input *InputService20TestShapeInputService20TestCaseOperation2Input) (req *request.Request, output *InputService20TestShapeInputService20TestCaseOperation2Output) { - op := &request.Operation{ - Name: opInputService20TestCaseOperation2, - HTTPMethod: "POST", - HTTPPath: "/path", - } - - if input == nil { - input = &InputService20TestShapeInputService20TestCaseOperation2Input{} - } - - output = &InputService20TestShapeInputService20TestCaseOperation2Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService20TestCaseOperation2 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService20TestCaseOperation2 for usage and error information. -func (c *InputService20ProtocolTest) InputService20TestCaseOperation2(input *InputService20TestShapeInputService20TestCaseOperation2Input) (*InputService20TestShapeInputService20TestCaseOperation2Output, error) { - req, out := c.InputService20TestCaseOperation2Request(input) - return out, req.Send() -} - -// InputService20TestCaseOperation2WithContext is the same as InputService20TestCaseOperation2 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService20TestCaseOperation2 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService20ProtocolTest) InputService20TestCaseOperation2WithContext(ctx aws.Context, input *InputService20TestShapeInputService20TestCaseOperation2Input, opts ...request.Option) (*InputService20TestShapeInputService20TestCaseOperation2Output, error) { - req, out := c.InputService20TestCaseOperation2Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type InputService20TestShapeInputService20TestCaseOperation1Output struct { - _ struct{} `type:"structure"` -} - -type InputService20TestShapeInputService20TestCaseOperation2Input struct { - _ struct{} `type:"structure"` - - Token *string `type:"string" idempotencyToken:"true"` -} - -// SetToken sets the Token field's value. -func (s *InputService20TestShapeInputService20TestCaseOperation2Input) SetToken(v string) *InputService20TestShapeInputService20TestCaseOperation2Input { - s.Token = &v - return s -} - -type InputService20TestShapeInputService20TestCaseOperation2Output struct { - _ struct{} `type:"structure"` -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type InputService21ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the InputService21ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a InputService21ProtocolTest client from just a session. -// svc := inputservice21protocoltest.New(mySession) -// -// // Create a InputService21ProtocolTest client with additional configuration -// svc := inputservice21protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewInputService21ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService21ProtocolTest { - c := p.ClientConfig("inputservice21protocoltest", cfgs...) - return newInputService21ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newInputService21ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService21ProtocolTest { - svc := &InputService21ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "inputservice21protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-01-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a InputService21ProtocolTest operation and runs any -// custom request initialization. -func (c *InputService21ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opInputService21TestCaseOperation1 = "OperationName" - -// InputService21TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the InputService21TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService21TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService21TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService21TestCaseOperation1Request method. -// req, resp := client.InputService21TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService21ProtocolTest) InputService21TestCaseOperation1Request(input *InputService21TestShapeInputService21TestCaseOperation2Input) (req *request.Request, output *InputService21TestShapeInputService21TestCaseOperation1Output) { - op := &request.Operation{ - Name: opInputService21TestCaseOperation1, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &InputService21TestShapeInputService21TestCaseOperation2Input{} - } - - output = &InputService21TestShapeInputService21TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService21TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService21TestCaseOperation1 for usage and error information. -func (c *InputService21ProtocolTest) InputService21TestCaseOperation1(input *InputService21TestShapeInputService21TestCaseOperation2Input) (*InputService21TestShapeInputService21TestCaseOperation1Output, error) { - req, out := c.InputService21TestCaseOperation1Request(input) - return out, req.Send() -} - -// InputService21TestCaseOperation1WithContext is the same as InputService21TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService21TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService21ProtocolTest) InputService21TestCaseOperation1WithContext(ctx aws.Context, input *InputService21TestShapeInputService21TestCaseOperation2Input, opts ...request.Option) (*InputService21TestShapeInputService21TestCaseOperation1Output, error) { - req, out := c.InputService21TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opInputService21TestCaseOperation2 = "OperationName" - -// InputService21TestCaseOperation2Request generates a "aws/request.Request" representing the -// client's request for the InputService21TestCaseOperation2 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService21TestCaseOperation2 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService21TestCaseOperation2 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService21TestCaseOperation2Request method. -// req, resp := client.InputService21TestCaseOperation2Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService21ProtocolTest) InputService21TestCaseOperation2Request(input *InputService21TestShapeInputService21TestCaseOperation2Input) (req *request.Request, output *InputService21TestShapeInputService21TestCaseOperation2Output) { - op := &request.Operation{ - Name: opInputService21TestCaseOperation2, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &InputService21TestShapeInputService21TestCaseOperation2Input{} - } - - output = &InputService21TestShapeInputService21TestCaseOperation2Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService21TestCaseOperation2 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService21TestCaseOperation2 for usage and error information. -func (c *InputService21ProtocolTest) InputService21TestCaseOperation2(input *InputService21TestShapeInputService21TestCaseOperation2Input) (*InputService21TestShapeInputService21TestCaseOperation2Output, error) { - req, out := c.InputService21TestCaseOperation2Request(input) - return out, req.Send() -} - -// InputService21TestCaseOperation2WithContext is the same as InputService21TestCaseOperation2 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService21TestCaseOperation2 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService21ProtocolTest) InputService21TestCaseOperation2WithContext(ctx aws.Context, input *InputService21TestShapeInputService21TestCaseOperation2Input, opts ...request.Option) (*InputService21TestShapeInputService21TestCaseOperation2Output, error) { - req, out := c.InputService21TestCaseOperation2Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type InputService21TestShapeInputService21TestCaseOperation1Output struct { - _ struct{} `type:"structure"` -} - -type InputService21TestShapeInputService21TestCaseOperation2Input struct { - _ struct{} `type:"structure"` - - Attr aws.JSONValue `location:"header" locationName:"X-Amz-Foo" type:"jsonvalue"` -} - -// SetAttr sets the Attr field's value. -func (s *InputService21TestShapeInputService21TestCaseOperation2Input) SetAttr(v aws.JSONValue) *InputService21TestShapeInputService21TestCaseOperation2Input { - s.Attr = v - return s -} - -type InputService21TestShapeInputService21TestCaseOperation2Output struct { - _ struct{} `type:"structure"` -} - -// -// Tests begin here -// - -func TestInputService1ProtocolTestNoParametersCase1(t *testing.T) { - svc := NewInputService1ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - req, _ := svc.InputService1TestCaseOperation1Request(nil) - r := req.HTTPRequest - - // build request - restjson.Build(req) - assert.NoError(t, req.Error) - - // assert URL - awstesting.AssertURL(t, "https://test/2014-01-01/jobs", r.URL.String()) - - // assert headers - -} - -func TestInputService2ProtocolTestURIParameterOnlyWithNoLocationNameCase1(t *testing.T) { - svc := NewInputService2ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService2TestShapeInputService2TestCaseOperation1Input{ - PipelineId: aws.String("foo"), - } - req, _ := svc.InputService2TestCaseOperation1Request(input) - r := req.HTTPRequest - - // build request - restjson.Build(req) - assert.NoError(t, req.Error) - - // assert URL - awstesting.AssertURL(t, "https://test/2014-01-01/jobsByPipeline/foo", r.URL.String()) - - // assert headers - -} - -func TestInputService3ProtocolTestURIParameterOnlyWithLocationNameCase1(t *testing.T) { - svc := NewInputService3ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService3TestShapeInputService3TestCaseOperation1Input{ - Foo: aws.String("bar"), - } - req, _ := svc.InputService3TestCaseOperation1Request(input) - r := req.HTTPRequest - - // build request - restjson.Build(req) - assert.NoError(t, req.Error) - - // assert URL - awstesting.AssertURL(t, "https://test/2014-01-01/jobsByPipeline/bar", r.URL.String()) - - // assert headers - -} - -func TestInputService4ProtocolTestQuerystringListOfStringsCase1(t *testing.T) { - svc := NewInputService4ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService4TestShapeInputService4TestCaseOperation1Input{ - Items: []*string{ - aws.String("value1"), - aws.String("value2"), - }, - } - req, _ := svc.InputService4TestCaseOperation1Request(input) - r := req.HTTPRequest - - // build request - restjson.Build(req) - assert.NoError(t, req.Error) - - // assert URL - awstesting.AssertURL(t, "https://test/path?item=value1&item=value2", r.URL.String()) - - // assert headers - -} - -func TestInputService5ProtocolTestStringToStringMapsInQuerystringCase1(t *testing.T) { - svc := NewInputService5ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService5TestShapeInputService5TestCaseOperation1Input{ - PipelineId: aws.String("foo"), - QueryDoc: map[string]*string{ - "bar": aws.String("baz"), - "fizz": aws.String("buzz"), - }, - } - req, _ := svc.InputService5TestCaseOperation1Request(input) - r := req.HTTPRequest - - // build request - restjson.Build(req) - assert.NoError(t, req.Error) - - // assert URL - awstesting.AssertURL(t, "https://test/2014-01-01/jobsByPipeline/foo?bar=baz&fizz=buzz", r.URL.String()) - - // assert headers - -} - -func TestInputService6ProtocolTestStringToStringListMapsInQuerystringCase1(t *testing.T) { - svc := NewInputService6ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService6TestShapeInputService6TestCaseOperation1Input{ - PipelineId: aws.String("id"), - QueryDoc: map[string][]*string{ - "fizz": { - aws.String("buzz"), - aws.String("pop"), - }, - "foo": { - aws.String("bar"), - aws.String("baz"), - }, - }, - } - req, _ := svc.InputService6TestCaseOperation1Request(input) - r := req.HTTPRequest - - // build request - restjson.Build(req) - assert.NoError(t, req.Error) - - // assert URL - awstesting.AssertURL(t, "https://test/2014-01-01/jobsByPipeline/id?foo=bar&foo=baz&fizz=buzz&fizz=pop", r.URL.String()) - - // assert headers - -} - -func TestInputService7ProtocolTestBooleanInQuerystringCase1(t *testing.T) { - svc := NewInputService7ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService7TestShapeInputService7TestCaseOperation2Input{ - BoolQuery: aws.Bool(true), - } - req, _ := svc.InputService7TestCaseOperation1Request(input) - r := req.HTTPRequest - - // build request - restjson.Build(req) - assert.NoError(t, req.Error) - - // assert URL - awstesting.AssertURL(t, "https://test/path?bool-query=true", r.URL.String()) - - // assert headers - -} - -func TestInputService7ProtocolTestBooleanInQuerystringCase2(t *testing.T) { - svc := NewInputService7ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService7TestShapeInputService7TestCaseOperation2Input{ - BoolQuery: aws.Bool(false), - } - req, _ := svc.InputService7TestCaseOperation2Request(input) - r := req.HTTPRequest - - // build request - restjson.Build(req) - assert.NoError(t, req.Error) - - // assert URL - awstesting.AssertURL(t, "https://test/path?bool-query=false", r.URL.String()) - - // assert headers - -} - -func TestInputService8ProtocolTestURIParameterAndQuerystringParamsCase1(t *testing.T) { - svc := NewInputService8ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService8TestShapeInputService8TestCaseOperation1Input{ - Ascending: aws.String("true"), - PageToken: aws.String("bar"), - PipelineId: aws.String("foo"), - } - req, _ := svc.InputService8TestCaseOperation1Request(input) - r := req.HTTPRequest - - // build request - restjson.Build(req) - assert.NoError(t, req.Error) - - // assert URL - awstesting.AssertURL(t, "https://test/2014-01-01/jobsByPipeline/foo?Ascending=true&PageToken=bar", r.URL.String()) - - // assert headers - -} - -func TestInputService9ProtocolTestURIParameterQuerystringParamsAndJSONBodyCase1(t *testing.T) { - svc := NewInputService9ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService9TestShapeInputService9TestCaseOperation1Input{ - Ascending: aws.String("true"), - Config: &InputService9TestShapeStructType{ - A: aws.String("one"), - B: aws.String("two"), - }, - PageToken: aws.String("bar"), - PipelineId: aws.String("foo"), - } - req, _ := svc.InputService9TestCaseOperation1Request(input) - r := req.HTTPRequest - - // build request - restjson.Build(req) - assert.NoError(t, req.Error) - - // assert body - assert.NotNil(t, r.Body) - body, _ := ioutil.ReadAll(r.Body) - awstesting.AssertJSON(t, `{"Config":{"A":"one","B":"two"}}`, util.Trim(string(body))) - - // assert URL - awstesting.AssertURL(t, "https://test/2014-01-01/jobsByPipeline/foo?Ascending=true&PageToken=bar", r.URL.String()) - - // assert headers - -} - -func TestInputService10ProtocolTestURIParameterQuerystringParamsHeadersAndJSONBodyCase1(t *testing.T) { - svc := NewInputService10ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService10TestShapeInputService10TestCaseOperation1Input{ - Ascending: aws.String("true"), - Checksum: aws.String("12345"), - Config: &InputService10TestShapeStructType{ - A: aws.String("one"), - B: aws.String("two"), - }, - PageToken: aws.String("bar"), - PipelineId: aws.String("foo"), - } - req, _ := svc.InputService10TestCaseOperation1Request(input) - r := req.HTTPRequest - - // build request - restjson.Build(req) - assert.NoError(t, req.Error) - - // assert body - assert.NotNil(t, r.Body) - body, _ := ioutil.ReadAll(r.Body) - awstesting.AssertJSON(t, `{"Config":{"A":"one","B":"two"}}`, util.Trim(string(body))) - - // assert URL - awstesting.AssertURL(t, "https://test/2014-01-01/jobsByPipeline/foo?Ascending=true&PageToken=bar", r.URL.String()) - - // assert headers - assert.Equal(t, "12345", r.Header.Get("x-amz-checksum")) - -} - -func TestInputService11ProtocolTestStreamingPayloadCase1(t *testing.T) { - svc := NewInputService11ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService11TestShapeInputService11TestCaseOperation1Input{ - Body: bytes.NewReader([]byte("contents")), - Checksum: aws.String("foo"), - VaultName: aws.String("name"), - } - req, _ := svc.InputService11TestCaseOperation1Request(input) - r := req.HTTPRequest - - // build request - restjson.Build(req) - assert.NoError(t, req.Error) - - // assert body - assert.NotNil(t, r.Body) - body, _ := ioutil.ReadAll(r.Body) - assert.Equal(t, `contents`, util.Trim(string(body))) - - // assert URL - awstesting.AssertURL(t, "https://test/2014-01-01/vaults/name/archives", r.URL.String()) - - // assert headers - assert.Equal(t, "foo", r.Header.Get("x-amz-sha256-tree-hash")) - -} - -func TestInputService12ProtocolTestSerializeBlobsInBodyCase1(t *testing.T) { - svc := NewInputService12ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService12TestShapeInputService12TestCaseOperation1Input{ - Bar: []byte("Blob param"), - Foo: aws.String("foo_name"), - } - req, _ := svc.InputService12TestCaseOperation1Request(input) - r := req.HTTPRequest - - // build request - restjson.Build(req) - assert.NoError(t, req.Error) - - // assert body - assert.NotNil(t, r.Body) - body, _ := ioutil.ReadAll(r.Body) - awstesting.AssertJSON(t, `{"Bar":"QmxvYiBwYXJhbQ=="}`, util.Trim(string(body))) - - // assert URL - awstesting.AssertURL(t, "https://test/2014-01-01/foo_name", r.URL.String()) - - // assert headers - -} - -func TestInputService13ProtocolTestBlobPayloadCase1(t *testing.T) { - svc := NewInputService13ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService13TestShapeInputService13TestCaseOperation2Input{ - Foo: []byte("bar"), - } - req, _ := svc.InputService13TestCaseOperation1Request(input) - r := req.HTTPRequest - - // build request - restjson.Build(req) - assert.NoError(t, req.Error) - - // assert body - assert.NotNil(t, r.Body) - body, _ := ioutil.ReadAll(r.Body) - assert.Equal(t, `bar`, util.Trim(string(body))) - - // assert URL - awstesting.AssertURL(t, "https://test/", r.URL.String()) - - // assert headers - -} - -func TestInputService13ProtocolTestBlobPayloadCase2(t *testing.T) { - svc := NewInputService13ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService13TestShapeInputService13TestCaseOperation2Input{} - req, _ := svc.InputService13TestCaseOperation2Request(input) - r := req.HTTPRequest - - // build request - restjson.Build(req) - assert.NoError(t, req.Error) - - // assert URL - awstesting.AssertURL(t, "https://test/", r.URL.String()) - - // assert headers - -} - -func TestInputService14ProtocolTestStructurePayloadCase1(t *testing.T) { - svc := NewInputService14ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService14TestShapeInputService14TestCaseOperation2Input{ - Foo: &InputService14TestShapeFooShape{ - Baz: aws.String("bar"), - }, - } - req, _ := svc.InputService14TestCaseOperation1Request(input) - r := req.HTTPRequest - - // build request - restjson.Build(req) - assert.NoError(t, req.Error) - - // assert body - assert.NotNil(t, r.Body) - body, _ := ioutil.ReadAll(r.Body) - awstesting.AssertJSON(t, `{"baz":"bar"}`, util.Trim(string(body))) - - // assert URL - awstesting.AssertURL(t, "https://test/", r.URL.String()) - - // assert headers - -} - -func TestInputService14ProtocolTestStructurePayloadCase2(t *testing.T) { - svc := NewInputService14ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService14TestShapeInputService14TestCaseOperation2Input{} - req, _ := svc.InputService14TestCaseOperation2Request(input) - r := req.HTTPRequest - - // build request - restjson.Build(req) - assert.NoError(t, req.Error) - - // assert URL - awstesting.AssertURL(t, "https://test/", r.URL.String()) - - // assert headers - -} - -func TestInputService15ProtocolTestOmitsNullQueryParamsButSerializesEmptyStringsCase1(t *testing.T) { - svc := NewInputService15ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService15TestShapeInputService15TestCaseOperation2Input{} - req, _ := svc.InputService15TestCaseOperation1Request(input) - r := req.HTTPRequest - - // build request - restjson.Build(req) - assert.NoError(t, req.Error) - - // assert URL - awstesting.AssertURL(t, "https://test/path", r.URL.String()) - - // assert headers - -} - -func TestInputService15ProtocolTestOmitsNullQueryParamsButSerializesEmptyStringsCase2(t *testing.T) { - svc := NewInputService15ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService15TestShapeInputService15TestCaseOperation2Input{ - Foo: aws.String(""), - } - req, _ := svc.InputService15TestCaseOperation2Request(input) - r := req.HTTPRequest - - // build request - restjson.Build(req) - assert.NoError(t, req.Error) - - // assert URL - awstesting.AssertURL(t, "https://test/path?abc=mno¶m-name=", r.URL.String()) - - // assert headers - -} - -func TestInputService16ProtocolTestRecursiveShapesCase1(t *testing.T) { - svc := NewInputService16ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService16TestShapeInputService16TestCaseOperation6Input{ - RecursiveStruct: &InputService16TestShapeRecursiveStructType{ - NoRecurse: aws.String("foo"), - }, - } - req, _ := svc.InputService16TestCaseOperation1Request(input) - r := req.HTTPRequest - - // build request - restjson.Build(req) - assert.NoError(t, req.Error) - - // assert body - assert.NotNil(t, r.Body) - body, _ := ioutil.ReadAll(r.Body) - awstesting.AssertJSON(t, `{"RecursiveStruct":{"NoRecurse":"foo"}}`, util.Trim(string(body))) - - // assert URL - awstesting.AssertURL(t, "https://test/path", r.URL.String()) - - // assert headers - -} - -func TestInputService16ProtocolTestRecursiveShapesCase2(t *testing.T) { - svc := NewInputService16ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService16TestShapeInputService16TestCaseOperation6Input{ - RecursiveStruct: &InputService16TestShapeRecursiveStructType{ - RecursiveStruct: &InputService16TestShapeRecursiveStructType{ - NoRecurse: aws.String("foo"), - }, - }, - } - req, _ := svc.InputService16TestCaseOperation2Request(input) - r := req.HTTPRequest - - // build request - restjson.Build(req) - assert.NoError(t, req.Error) - - // assert body - assert.NotNil(t, r.Body) - body, _ := ioutil.ReadAll(r.Body) - awstesting.AssertJSON(t, `{"RecursiveStruct":{"RecursiveStruct":{"NoRecurse":"foo"}}}`, util.Trim(string(body))) - - // assert URL - awstesting.AssertURL(t, "https://test/path", r.URL.String()) - - // assert headers - -} - -func TestInputService16ProtocolTestRecursiveShapesCase3(t *testing.T) { - svc := NewInputService16ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService16TestShapeInputService16TestCaseOperation6Input{ - RecursiveStruct: &InputService16TestShapeRecursiveStructType{ - RecursiveStruct: &InputService16TestShapeRecursiveStructType{ - RecursiveStruct: &InputService16TestShapeRecursiveStructType{ - RecursiveStruct: &InputService16TestShapeRecursiveStructType{ - NoRecurse: aws.String("foo"), - }, - }, - }, - }, - } - req, _ := svc.InputService16TestCaseOperation3Request(input) - r := req.HTTPRequest - - // build request - restjson.Build(req) - assert.NoError(t, req.Error) - - // assert body - assert.NotNil(t, r.Body) - body, _ := ioutil.ReadAll(r.Body) - awstesting.AssertJSON(t, `{"RecursiveStruct":{"RecursiveStruct":{"RecursiveStruct":{"RecursiveStruct":{"NoRecurse":"foo"}}}}}`, util.Trim(string(body))) - - // assert URL - awstesting.AssertURL(t, "https://test/path", r.URL.String()) - - // assert headers - -} - -func TestInputService16ProtocolTestRecursiveShapesCase4(t *testing.T) { - svc := NewInputService16ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService16TestShapeInputService16TestCaseOperation6Input{ - RecursiveStruct: &InputService16TestShapeRecursiveStructType{ - RecursiveList: []*InputService16TestShapeRecursiveStructType{ - { - NoRecurse: aws.String("foo"), - }, - { - NoRecurse: aws.String("bar"), - }, - }, - }, - } - req, _ := svc.InputService16TestCaseOperation4Request(input) - r := req.HTTPRequest - - // build request - restjson.Build(req) - assert.NoError(t, req.Error) - - // assert body - assert.NotNil(t, r.Body) - body, _ := ioutil.ReadAll(r.Body) - awstesting.AssertJSON(t, `{"RecursiveStruct":{"RecursiveList":[{"NoRecurse":"foo"},{"NoRecurse":"bar"}]}}`, util.Trim(string(body))) - - // assert URL - awstesting.AssertURL(t, "https://test/path", r.URL.String()) - - // assert headers - -} - -func TestInputService16ProtocolTestRecursiveShapesCase5(t *testing.T) { - svc := NewInputService16ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService16TestShapeInputService16TestCaseOperation6Input{ - RecursiveStruct: &InputService16TestShapeRecursiveStructType{ - RecursiveList: []*InputService16TestShapeRecursiveStructType{ - { - NoRecurse: aws.String("foo"), - }, - { - RecursiveStruct: &InputService16TestShapeRecursiveStructType{ - NoRecurse: aws.String("bar"), - }, - }, - }, - }, - } - req, _ := svc.InputService16TestCaseOperation5Request(input) - r := req.HTTPRequest - - // build request - restjson.Build(req) - assert.NoError(t, req.Error) - - // assert body - assert.NotNil(t, r.Body) - body, _ := ioutil.ReadAll(r.Body) - awstesting.AssertJSON(t, `{"RecursiveStruct":{"RecursiveList":[{"NoRecurse":"foo"},{"RecursiveStruct":{"NoRecurse":"bar"}}]}}`, util.Trim(string(body))) - - // assert URL - awstesting.AssertURL(t, "https://test/path", r.URL.String()) - - // assert headers - -} - -func TestInputService16ProtocolTestRecursiveShapesCase6(t *testing.T) { - svc := NewInputService16ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService16TestShapeInputService16TestCaseOperation6Input{ - RecursiveStruct: &InputService16TestShapeRecursiveStructType{ - RecursiveMap: map[string]*InputService16TestShapeRecursiveStructType{ - "bar": { - NoRecurse: aws.String("bar"), - }, - "foo": { - NoRecurse: aws.String("foo"), - }, - }, - }, - } - req, _ := svc.InputService16TestCaseOperation6Request(input) - r := req.HTTPRequest - - // build request - restjson.Build(req) - assert.NoError(t, req.Error) - - // assert body - assert.NotNil(t, r.Body) - body, _ := ioutil.ReadAll(r.Body) - awstesting.AssertJSON(t, `{"RecursiveStruct":{"RecursiveMap":{"foo":{"NoRecurse":"foo"},"bar":{"NoRecurse":"bar"}}}}`, util.Trim(string(body))) - - // assert URL - awstesting.AssertURL(t, "https://test/path", r.URL.String()) - - // assert headers - -} - -func TestInputService17ProtocolTestTimestampValuesCase1(t *testing.T) { - svc := NewInputService17ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService17TestShapeInputService17TestCaseOperation2Input{ - TimeArg: aws.Time(time.Unix(1422172800, 0)), - } - req, _ := svc.InputService17TestCaseOperation1Request(input) - r := req.HTTPRequest - - // build request - restjson.Build(req) - assert.NoError(t, req.Error) - - // assert body - assert.NotNil(t, r.Body) - body, _ := ioutil.ReadAll(r.Body) - awstesting.AssertJSON(t, `{"TimeArg":1422172800}`, util.Trim(string(body))) - - // assert URL - awstesting.AssertURL(t, "https://test/path", r.URL.String()) - - // assert headers - -} - -func TestInputService17ProtocolTestTimestampValuesCase2(t *testing.T) { - svc := NewInputService17ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService17TestShapeInputService17TestCaseOperation2Input{ - TimeArgInHeader: aws.Time(time.Unix(1422172800, 0)), - } - req, _ := svc.InputService17TestCaseOperation2Request(input) - r := req.HTTPRequest - - // build request - restjson.Build(req) - assert.NoError(t, req.Error) - - // assert URL - awstesting.AssertURL(t, "https://test/path", r.URL.String()) - - // assert headers - assert.Equal(t, "Sun, 25 Jan 2015 08:00:00 GMT", r.Header.Get("x-amz-timearg")) - -} - -func TestInputService18ProtocolTestNamedLocationsInJSONBodyCase1(t *testing.T) { - svc := NewInputService18ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService18TestShapeInputService18TestCaseOperation1Input{ - TimeArg: aws.Time(time.Unix(1422172800, 0)), - } - req, _ := svc.InputService18TestCaseOperation1Request(input) - r := req.HTTPRequest - - // build request - restjson.Build(req) - assert.NoError(t, req.Error) - - // assert body - assert.NotNil(t, r.Body) - body, _ := ioutil.ReadAll(r.Body) - awstesting.AssertJSON(t, `{"timestamp_location":1422172800}`, util.Trim(string(body))) - - // assert URL - awstesting.AssertURL(t, "https://test/path", r.URL.String()) - - // assert headers - -} - -func TestInputService19ProtocolTestStringPayloadCase1(t *testing.T) { - svc := NewInputService19ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService19TestShapeInputService19TestCaseOperation1Input{ - Foo: aws.String("bar"), - } - req, _ := svc.InputService19TestCaseOperation1Request(input) - r := req.HTTPRequest - - // build request - restjson.Build(req) - assert.NoError(t, req.Error) - - // assert body - assert.NotNil(t, r.Body) - body, _ := ioutil.ReadAll(r.Body) - assert.Equal(t, `bar`, util.Trim(string(body))) - - // assert URL - awstesting.AssertURL(t, "https://test/", r.URL.String()) - - // assert headers - -} - -func TestInputService20ProtocolTestIdempotencyTokenAutoFillCase1(t *testing.T) { - svc := NewInputService20ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService20TestShapeInputService20TestCaseOperation2Input{ - Token: aws.String("abc123"), - } - req, _ := svc.InputService20TestCaseOperation1Request(input) - r := req.HTTPRequest - - // build request - restjson.Build(req) - assert.NoError(t, req.Error) - - // assert body - assert.NotNil(t, r.Body) - body, _ := ioutil.ReadAll(r.Body) - awstesting.AssertJSON(t, `{"Token":"abc123"}`, util.Trim(string(body))) - - // assert URL - awstesting.AssertURL(t, "https://test/path", r.URL.String()) - - // assert headers - -} - -func TestInputService20ProtocolTestIdempotencyTokenAutoFillCase2(t *testing.T) { - svc := NewInputService20ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService20TestShapeInputService20TestCaseOperation2Input{} - req, _ := svc.InputService20TestCaseOperation2Request(input) - r := req.HTTPRequest - - // build request - restjson.Build(req) - assert.NoError(t, req.Error) - - // assert body - assert.NotNil(t, r.Body) - body, _ := ioutil.ReadAll(r.Body) - awstesting.AssertJSON(t, `{"Token":"00000000-0000-4000-8000-000000000000"}`, util.Trim(string(body))) - - // assert URL - awstesting.AssertURL(t, "https://test/path", r.URL.String()) - - // assert headers - -} - -func TestInputService21ProtocolTestJSONValueTraitCase1(t *testing.T) { - svc := NewInputService21ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService21TestShapeInputService21TestCaseOperation2Input{} - input.Attr = aws.JSONValue{"Foo": "Bar"} - req, _ := svc.InputService21TestCaseOperation1Request(input) - r := req.HTTPRequest - - // build request - restjson.Build(req) - assert.NoError(t, req.Error) - - // assert URL - awstesting.AssertURL(t, "https://test/", r.URL.String()) - - // assert headers - assert.Equal(t, "eyJGb28iOiJCYXIifQ==", r.Header.Get("X-Amz-Foo")) - -} - -func TestInputService21ProtocolTestJSONValueTraitCase2(t *testing.T) { - svc := NewInputService21ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService21TestShapeInputService21TestCaseOperation2Input{} - req, _ := svc.InputService21TestCaseOperation2Request(input) - r := req.HTTPRequest - - // build request - restjson.Build(req) - assert.NoError(t, req.Error) - - // assert URL - awstesting.AssertURL(t, "https://test/", r.URL.String()) - - // assert headers - -} diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/restjson/restjson.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/restjson/restjson.go deleted file mode 100644 index b1d5294..0000000 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/restjson/restjson.go +++ /dev/null @@ -1,92 +0,0 @@ -// Package restjson provides RESTful JSON serialization of AWS -// requests and responses. -package restjson - -//go:generate go run -tags codegen ../../../models/protocol_tests/generate.go ../../../models/protocol_tests/input/rest-json.json build_test.go -//go:generate go run -tags codegen ../../../models/protocol_tests/generate.go ../../../models/protocol_tests/output/rest-json.json unmarshal_test.go - -import ( - "encoding/json" - "io/ioutil" - "strings" - - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" - "github.com/aws/aws-sdk-go/private/protocol/rest" -) - -// BuildHandler is a named request handler for building restjson protocol requests -var BuildHandler = request.NamedHandler{Name: "awssdk.restjson.Build", Fn: Build} - -// UnmarshalHandler is a named request handler for unmarshaling restjson protocol requests -var UnmarshalHandler = request.NamedHandler{Name: "awssdk.restjson.Unmarshal", Fn: Unmarshal} - -// UnmarshalMetaHandler is a named request handler for unmarshaling restjson protocol request metadata -var UnmarshalMetaHandler = request.NamedHandler{Name: "awssdk.restjson.UnmarshalMeta", Fn: UnmarshalMeta} - -// UnmarshalErrorHandler is a named request handler for unmarshaling restjson protocol request errors -var UnmarshalErrorHandler = request.NamedHandler{Name: "awssdk.restjson.UnmarshalError", Fn: UnmarshalError} - -// Build builds a request for the REST JSON protocol. -func Build(r *request.Request) { - rest.Build(r) - - if t := rest.PayloadType(r.Params); t == "structure" || t == "" { - jsonrpc.Build(r) - } -} - -// Unmarshal unmarshals a response body for the REST JSON protocol. -func Unmarshal(r *request.Request) { - if t := rest.PayloadType(r.Data); t == "structure" || t == "" { - jsonrpc.Unmarshal(r) - } else { - rest.Unmarshal(r) - } -} - -// UnmarshalMeta unmarshals response headers for the REST JSON protocol. -func UnmarshalMeta(r *request.Request) { - rest.UnmarshalMeta(r) -} - -// UnmarshalError unmarshals a response error for the REST JSON protocol. -func UnmarshalError(r *request.Request) { - defer r.HTTPResponse.Body.Close() - code := r.HTTPResponse.Header.Get("X-Amzn-Errortype") - bodyBytes, err := ioutil.ReadAll(r.HTTPResponse.Body) - if err != nil { - r.Error = awserr.New("SerializationError", "failed reading REST JSON error response", err) - return - } - if len(bodyBytes) == 0 { - r.Error = awserr.NewRequestFailure( - awserr.New("SerializationError", r.HTTPResponse.Status, nil), - r.HTTPResponse.StatusCode, - "", - ) - return - } - var jsonErr jsonErrorResponse - if err := json.Unmarshal(bodyBytes, &jsonErr); err != nil { - r.Error = awserr.New("SerializationError", "failed decoding REST JSON error response", err) - return - } - - if code == "" { - code = jsonErr.Code - } - - code = strings.SplitN(code, ":", 2)[0] - r.Error = awserr.NewRequestFailure( - awserr.New(code, jsonErr.Message, nil), - r.HTTPResponse.StatusCode, - r.RequestID, - ) -} - -type jsonErrorResponse struct { - Code string `json:"code"` - Message string `json:"message"` -} diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/restjson/unmarshal_test.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/restjson/unmarshal_test.go deleted file mode 100644 index ae9e9ee..0000000 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/restjson/unmarshal_test.go +++ /dev/null @@ -1,2160 +0,0 @@ -package restjson_test - -import ( - "bytes" - "encoding/json" - "encoding/xml" - "fmt" - "io" - "io/ioutil" - "net/http" - "net/url" - "reflect" - "testing" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/awstesting" - "github.com/aws/aws-sdk-go/awstesting/unit" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/restjson" - "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil" - "github.com/aws/aws-sdk-go/private/util" - "github.com/stretchr/testify/assert" -) - -var _ bytes.Buffer // always import bytes -var _ http.Request -var _ json.Marshaler -var _ time.Time -var _ xmlutil.XMLNode -var _ xml.Attr -var _ = ioutil.Discard -var _ = util.Trim("") -var _ = url.Values{} -var _ = io.EOF -var _ = aws.String -var _ = fmt.Println -var _ = reflect.Value{} - -func init() { - protocol.RandReader = &awstesting.ZeroReader{} -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type OutputService1ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the OutputService1ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a OutputService1ProtocolTest client from just a session. -// svc := outputservice1protocoltest.New(mySession) -// -// // Create a OutputService1ProtocolTest client with additional configuration -// svc := outputservice1protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewOutputService1ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService1ProtocolTest { - c := p.ClientConfig("outputservice1protocoltest", cfgs...) - return newOutputService1ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newOutputService1ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *OutputService1ProtocolTest { - svc := &OutputService1ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "outputservice1protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a OutputService1ProtocolTest operation and runs any -// custom request initialization. -func (c *OutputService1ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opOutputService1TestCaseOperation1 = "OperationName" - -// OutputService1TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the OutputService1TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See OutputService1TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the OutputService1TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the OutputService1TestCaseOperation1Request method. -// req, resp := client.OutputService1TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *OutputService1ProtocolTest) OutputService1TestCaseOperation1Request(input *OutputService1TestShapeOutputService1TestCaseOperation1Input) (req *request.Request, output *OutputService1TestShapeOutputService1TestCaseOperation1Output) { - op := &request.Operation{ - Name: opOutputService1TestCaseOperation1, - HTTPPath: "/", - } - - if input == nil { - input = &OutputService1TestShapeOutputService1TestCaseOperation1Input{} - } - - output = &OutputService1TestShapeOutputService1TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - return -} - -// OutputService1TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation OutputService1TestCaseOperation1 for usage and error information. -func (c *OutputService1ProtocolTest) OutputService1TestCaseOperation1(input *OutputService1TestShapeOutputService1TestCaseOperation1Input) (*OutputService1TestShapeOutputService1TestCaseOperation1Output, error) { - req, out := c.OutputService1TestCaseOperation1Request(input) - return out, req.Send() -} - -// OutputService1TestCaseOperation1WithContext is the same as OutputService1TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See OutputService1TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OutputService1ProtocolTest) OutputService1TestCaseOperation1WithContext(ctx aws.Context, input *OutputService1TestShapeOutputService1TestCaseOperation1Input, opts ...request.Option) (*OutputService1TestShapeOutputService1TestCaseOperation1Output, error) { - req, out := c.OutputService1TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type OutputService1TestShapeOutputService1TestCaseOperation1Input struct { - _ struct{} `type:"structure"` -} - -type OutputService1TestShapeOutputService1TestCaseOperation1Output struct { - _ struct{} `type:"structure"` - - Char *string `type:"character"` - - Double *float64 `type:"double"` - - FalseBool *bool `type:"boolean"` - - Float *float64 `type:"float"` - - ImaHeader *string `location:"header" type:"string"` - - ImaHeaderLocation *string `location:"header" locationName:"X-Foo" type:"string"` - - Long *int64 `type:"long"` - - Num *int64 `type:"integer"` - - Status *int64 `location:"statusCode" type:"integer"` - - Str *string `type:"string"` - - TrueBool *bool `type:"boolean"` -} - -// SetChar sets the Char field's value. -func (s *OutputService1TestShapeOutputService1TestCaseOperation1Output) SetChar(v string) *OutputService1TestShapeOutputService1TestCaseOperation1Output { - s.Char = &v - return s -} - -// SetDouble sets the Double field's value. -func (s *OutputService1TestShapeOutputService1TestCaseOperation1Output) SetDouble(v float64) *OutputService1TestShapeOutputService1TestCaseOperation1Output { - s.Double = &v - return s -} - -// SetFalseBool sets the FalseBool field's value. -func (s *OutputService1TestShapeOutputService1TestCaseOperation1Output) SetFalseBool(v bool) *OutputService1TestShapeOutputService1TestCaseOperation1Output { - s.FalseBool = &v - return s -} - -// SetFloat sets the Float field's value. -func (s *OutputService1TestShapeOutputService1TestCaseOperation1Output) SetFloat(v float64) *OutputService1TestShapeOutputService1TestCaseOperation1Output { - s.Float = &v - return s -} - -// SetImaHeader sets the ImaHeader field's value. -func (s *OutputService1TestShapeOutputService1TestCaseOperation1Output) SetImaHeader(v string) *OutputService1TestShapeOutputService1TestCaseOperation1Output { - s.ImaHeader = &v - return s -} - -// SetImaHeaderLocation sets the ImaHeaderLocation field's value. -func (s *OutputService1TestShapeOutputService1TestCaseOperation1Output) SetImaHeaderLocation(v string) *OutputService1TestShapeOutputService1TestCaseOperation1Output { - s.ImaHeaderLocation = &v - return s -} - -// SetLong sets the Long field's value. -func (s *OutputService1TestShapeOutputService1TestCaseOperation1Output) SetLong(v int64) *OutputService1TestShapeOutputService1TestCaseOperation1Output { - s.Long = &v - return s -} - -// SetNum sets the Num field's value. -func (s *OutputService1TestShapeOutputService1TestCaseOperation1Output) SetNum(v int64) *OutputService1TestShapeOutputService1TestCaseOperation1Output { - s.Num = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *OutputService1TestShapeOutputService1TestCaseOperation1Output) SetStatus(v int64) *OutputService1TestShapeOutputService1TestCaseOperation1Output { - s.Status = &v - return s -} - -// SetStr sets the Str field's value. -func (s *OutputService1TestShapeOutputService1TestCaseOperation1Output) SetStr(v string) *OutputService1TestShapeOutputService1TestCaseOperation1Output { - s.Str = &v - return s -} - -// SetTrueBool sets the TrueBool field's value. -func (s *OutputService1TestShapeOutputService1TestCaseOperation1Output) SetTrueBool(v bool) *OutputService1TestShapeOutputService1TestCaseOperation1Output { - s.TrueBool = &v - return s -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type OutputService2ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the OutputService2ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a OutputService2ProtocolTest client from just a session. -// svc := outputservice2protocoltest.New(mySession) -// -// // Create a OutputService2ProtocolTest client with additional configuration -// svc := outputservice2protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewOutputService2ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService2ProtocolTest { - c := p.ClientConfig("outputservice2protocoltest", cfgs...) - return newOutputService2ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newOutputService2ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *OutputService2ProtocolTest { - svc := &OutputService2ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "outputservice2protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a OutputService2ProtocolTest operation and runs any -// custom request initialization. -func (c *OutputService2ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opOutputService2TestCaseOperation1 = "OperationName" - -// OutputService2TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the OutputService2TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See OutputService2TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the OutputService2TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the OutputService2TestCaseOperation1Request method. -// req, resp := client.OutputService2TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *OutputService2ProtocolTest) OutputService2TestCaseOperation1Request(input *OutputService2TestShapeOutputService2TestCaseOperation1Input) (req *request.Request, output *OutputService2TestShapeOutputService2TestCaseOperation1Output) { - op := &request.Operation{ - Name: opOutputService2TestCaseOperation1, - HTTPPath: "/", - } - - if input == nil { - input = &OutputService2TestShapeOutputService2TestCaseOperation1Input{} - } - - output = &OutputService2TestShapeOutputService2TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - return -} - -// OutputService2TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation OutputService2TestCaseOperation1 for usage and error information. -func (c *OutputService2ProtocolTest) OutputService2TestCaseOperation1(input *OutputService2TestShapeOutputService2TestCaseOperation1Input) (*OutputService2TestShapeOutputService2TestCaseOperation1Output, error) { - req, out := c.OutputService2TestCaseOperation1Request(input) - return out, req.Send() -} - -// OutputService2TestCaseOperation1WithContext is the same as OutputService2TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See OutputService2TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OutputService2ProtocolTest) OutputService2TestCaseOperation1WithContext(ctx aws.Context, input *OutputService2TestShapeOutputService2TestCaseOperation1Input, opts ...request.Option) (*OutputService2TestShapeOutputService2TestCaseOperation1Output, error) { - req, out := c.OutputService2TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type OutputService2TestShapeBlobContainer struct { - _ struct{} `type:"structure"` - - // Foo is automatically base64 encoded/decoded by the SDK. - Foo []byte `locationName:"foo" type:"blob"` -} - -// SetFoo sets the Foo field's value. -func (s *OutputService2TestShapeBlobContainer) SetFoo(v []byte) *OutputService2TestShapeBlobContainer { - s.Foo = v - return s -} - -type OutputService2TestShapeOutputService2TestCaseOperation1Input struct { - _ struct{} `type:"structure"` -} - -type OutputService2TestShapeOutputService2TestCaseOperation1Output struct { - _ struct{} `type:"structure"` - - // BlobMember is automatically base64 encoded/decoded by the SDK. - BlobMember []byte `type:"blob"` - - StructMember *OutputService2TestShapeBlobContainer `type:"structure"` -} - -// SetBlobMember sets the BlobMember field's value. -func (s *OutputService2TestShapeOutputService2TestCaseOperation1Output) SetBlobMember(v []byte) *OutputService2TestShapeOutputService2TestCaseOperation1Output { - s.BlobMember = v - return s -} - -// SetStructMember sets the StructMember field's value. -func (s *OutputService2TestShapeOutputService2TestCaseOperation1Output) SetStructMember(v *OutputService2TestShapeBlobContainer) *OutputService2TestShapeOutputService2TestCaseOperation1Output { - s.StructMember = v - return s -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type OutputService3ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the OutputService3ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a OutputService3ProtocolTest client from just a session. -// svc := outputservice3protocoltest.New(mySession) -// -// // Create a OutputService3ProtocolTest client with additional configuration -// svc := outputservice3protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewOutputService3ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService3ProtocolTest { - c := p.ClientConfig("outputservice3protocoltest", cfgs...) - return newOutputService3ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newOutputService3ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *OutputService3ProtocolTest { - svc := &OutputService3ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "outputservice3protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a OutputService3ProtocolTest operation and runs any -// custom request initialization. -func (c *OutputService3ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opOutputService3TestCaseOperation1 = "OperationName" - -// OutputService3TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the OutputService3TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See OutputService3TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the OutputService3TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the OutputService3TestCaseOperation1Request method. -// req, resp := client.OutputService3TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *OutputService3ProtocolTest) OutputService3TestCaseOperation1Request(input *OutputService3TestShapeOutputService3TestCaseOperation1Input) (req *request.Request, output *OutputService3TestShapeOutputService3TestCaseOperation1Output) { - op := &request.Operation{ - Name: opOutputService3TestCaseOperation1, - HTTPPath: "/", - } - - if input == nil { - input = &OutputService3TestShapeOutputService3TestCaseOperation1Input{} - } - - output = &OutputService3TestShapeOutputService3TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - return -} - -// OutputService3TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation OutputService3TestCaseOperation1 for usage and error information. -func (c *OutputService3ProtocolTest) OutputService3TestCaseOperation1(input *OutputService3TestShapeOutputService3TestCaseOperation1Input) (*OutputService3TestShapeOutputService3TestCaseOperation1Output, error) { - req, out := c.OutputService3TestCaseOperation1Request(input) - return out, req.Send() -} - -// OutputService3TestCaseOperation1WithContext is the same as OutputService3TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See OutputService3TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OutputService3ProtocolTest) OutputService3TestCaseOperation1WithContext(ctx aws.Context, input *OutputService3TestShapeOutputService3TestCaseOperation1Input, opts ...request.Option) (*OutputService3TestShapeOutputService3TestCaseOperation1Output, error) { - req, out := c.OutputService3TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type OutputService3TestShapeOutputService3TestCaseOperation1Input struct { - _ struct{} `type:"structure"` -} - -type OutputService3TestShapeOutputService3TestCaseOperation1Output struct { - _ struct{} `type:"structure"` - - StructMember *OutputService3TestShapeTimeContainer `type:"structure"` - - TimeMember *time.Time `type:"timestamp" timestampFormat:"unix"` -} - -// SetStructMember sets the StructMember field's value. -func (s *OutputService3TestShapeOutputService3TestCaseOperation1Output) SetStructMember(v *OutputService3TestShapeTimeContainer) *OutputService3TestShapeOutputService3TestCaseOperation1Output { - s.StructMember = v - return s -} - -// SetTimeMember sets the TimeMember field's value. -func (s *OutputService3TestShapeOutputService3TestCaseOperation1Output) SetTimeMember(v time.Time) *OutputService3TestShapeOutputService3TestCaseOperation1Output { - s.TimeMember = &v - return s -} - -type OutputService3TestShapeTimeContainer struct { - _ struct{} `type:"structure"` - - Foo *time.Time `locationName:"foo" type:"timestamp" timestampFormat:"unix"` -} - -// SetFoo sets the Foo field's value. -func (s *OutputService3TestShapeTimeContainer) SetFoo(v time.Time) *OutputService3TestShapeTimeContainer { - s.Foo = &v - return s -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type OutputService4ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the OutputService4ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a OutputService4ProtocolTest client from just a session. -// svc := outputservice4protocoltest.New(mySession) -// -// // Create a OutputService4ProtocolTest client with additional configuration -// svc := outputservice4protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewOutputService4ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService4ProtocolTest { - c := p.ClientConfig("outputservice4protocoltest", cfgs...) - return newOutputService4ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newOutputService4ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *OutputService4ProtocolTest { - svc := &OutputService4ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "outputservice4protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a OutputService4ProtocolTest operation and runs any -// custom request initialization. -func (c *OutputService4ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opOutputService4TestCaseOperation1 = "OperationName" - -// OutputService4TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the OutputService4TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See OutputService4TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the OutputService4TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the OutputService4TestCaseOperation1Request method. -// req, resp := client.OutputService4TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *OutputService4ProtocolTest) OutputService4TestCaseOperation1Request(input *OutputService4TestShapeOutputService4TestCaseOperation1Input) (req *request.Request, output *OutputService4TestShapeOutputService4TestCaseOperation1Output) { - op := &request.Operation{ - Name: opOutputService4TestCaseOperation1, - HTTPPath: "/", - } - - if input == nil { - input = &OutputService4TestShapeOutputService4TestCaseOperation1Input{} - } - - output = &OutputService4TestShapeOutputService4TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - return -} - -// OutputService4TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation OutputService4TestCaseOperation1 for usage and error information. -func (c *OutputService4ProtocolTest) OutputService4TestCaseOperation1(input *OutputService4TestShapeOutputService4TestCaseOperation1Input) (*OutputService4TestShapeOutputService4TestCaseOperation1Output, error) { - req, out := c.OutputService4TestCaseOperation1Request(input) - return out, req.Send() -} - -// OutputService4TestCaseOperation1WithContext is the same as OutputService4TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See OutputService4TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OutputService4ProtocolTest) OutputService4TestCaseOperation1WithContext(ctx aws.Context, input *OutputService4TestShapeOutputService4TestCaseOperation1Input, opts ...request.Option) (*OutputService4TestShapeOutputService4TestCaseOperation1Output, error) { - req, out := c.OutputService4TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type OutputService4TestShapeOutputService4TestCaseOperation1Input struct { - _ struct{} `type:"structure"` -} - -type OutputService4TestShapeOutputService4TestCaseOperation1Output struct { - _ struct{} `type:"structure"` - - ListMember []*string `type:"list"` -} - -// SetListMember sets the ListMember field's value. -func (s *OutputService4TestShapeOutputService4TestCaseOperation1Output) SetListMember(v []*string) *OutputService4TestShapeOutputService4TestCaseOperation1Output { - s.ListMember = v - return s -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type OutputService5ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the OutputService5ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a OutputService5ProtocolTest client from just a session. -// svc := outputservice5protocoltest.New(mySession) -// -// // Create a OutputService5ProtocolTest client with additional configuration -// svc := outputservice5protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewOutputService5ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService5ProtocolTest { - c := p.ClientConfig("outputservice5protocoltest", cfgs...) - return newOutputService5ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newOutputService5ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *OutputService5ProtocolTest { - svc := &OutputService5ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "outputservice5protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a OutputService5ProtocolTest operation and runs any -// custom request initialization. -func (c *OutputService5ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opOutputService5TestCaseOperation1 = "OperationName" - -// OutputService5TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the OutputService5TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See OutputService5TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the OutputService5TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the OutputService5TestCaseOperation1Request method. -// req, resp := client.OutputService5TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *OutputService5ProtocolTest) OutputService5TestCaseOperation1Request(input *OutputService5TestShapeOutputService5TestCaseOperation1Input) (req *request.Request, output *OutputService5TestShapeOutputService5TestCaseOperation1Output) { - op := &request.Operation{ - Name: opOutputService5TestCaseOperation1, - HTTPPath: "/", - } - - if input == nil { - input = &OutputService5TestShapeOutputService5TestCaseOperation1Input{} - } - - output = &OutputService5TestShapeOutputService5TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - return -} - -// OutputService5TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation OutputService5TestCaseOperation1 for usage and error information. -func (c *OutputService5ProtocolTest) OutputService5TestCaseOperation1(input *OutputService5TestShapeOutputService5TestCaseOperation1Input) (*OutputService5TestShapeOutputService5TestCaseOperation1Output, error) { - req, out := c.OutputService5TestCaseOperation1Request(input) - return out, req.Send() -} - -// OutputService5TestCaseOperation1WithContext is the same as OutputService5TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See OutputService5TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OutputService5ProtocolTest) OutputService5TestCaseOperation1WithContext(ctx aws.Context, input *OutputService5TestShapeOutputService5TestCaseOperation1Input, opts ...request.Option) (*OutputService5TestShapeOutputService5TestCaseOperation1Output, error) { - req, out := c.OutputService5TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type OutputService5TestShapeOutputService5TestCaseOperation1Input struct { - _ struct{} `type:"structure"` -} - -type OutputService5TestShapeOutputService5TestCaseOperation1Output struct { - _ struct{} `type:"structure"` - - ListMember []*OutputService5TestShapeSingleStruct `type:"list"` -} - -// SetListMember sets the ListMember field's value. -func (s *OutputService5TestShapeOutputService5TestCaseOperation1Output) SetListMember(v []*OutputService5TestShapeSingleStruct) *OutputService5TestShapeOutputService5TestCaseOperation1Output { - s.ListMember = v - return s -} - -type OutputService5TestShapeSingleStruct struct { - _ struct{} `type:"structure"` - - Foo *string `type:"string"` -} - -// SetFoo sets the Foo field's value. -func (s *OutputService5TestShapeSingleStruct) SetFoo(v string) *OutputService5TestShapeSingleStruct { - s.Foo = &v - return s -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type OutputService6ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the OutputService6ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a OutputService6ProtocolTest client from just a session. -// svc := outputservice6protocoltest.New(mySession) -// -// // Create a OutputService6ProtocolTest client with additional configuration -// svc := outputservice6protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewOutputService6ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService6ProtocolTest { - c := p.ClientConfig("outputservice6protocoltest", cfgs...) - return newOutputService6ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newOutputService6ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *OutputService6ProtocolTest { - svc := &OutputService6ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "outputservice6protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a OutputService6ProtocolTest operation and runs any -// custom request initialization. -func (c *OutputService6ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opOutputService6TestCaseOperation1 = "OperationName" - -// OutputService6TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the OutputService6TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See OutputService6TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the OutputService6TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the OutputService6TestCaseOperation1Request method. -// req, resp := client.OutputService6TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *OutputService6ProtocolTest) OutputService6TestCaseOperation1Request(input *OutputService6TestShapeOutputService6TestCaseOperation1Input) (req *request.Request, output *OutputService6TestShapeOutputService6TestCaseOperation1Output) { - op := &request.Operation{ - Name: opOutputService6TestCaseOperation1, - HTTPPath: "/", - } - - if input == nil { - input = &OutputService6TestShapeOutputService6TestCaseOperation1Input{} - } - - output = &OutputService6TestShapeOutputService6TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - return -} - -// OutputService6TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation OutputService6TestCaseOperation1 for usage and error information. -func (c *OutputService6ProtocolTest) OutputService6TestCaseOperation1(input *OutputService6TestShapeOutputService6TestCaseOperation1Input) (*OutputService6TestShapeOutputService6TestCaseOperation1Output, error) { - req, out := c.OutputService6TestCaseOperation1Request(input) - return out, req.Send() -} - -// OutputService6TestCaseOperation1WithContext is the same as OutputService6TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See OutputService6TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OutputService6ProtocolTest) OutputService6TestCaseOperation1WithContext(ctx aws.Context, input *OutputService6TestShapeOutputService6TestCaseOperation1Input, opts ...request.Option) (*OutputService6TestShapeOutputService6TestCaseOperation1Output, error) { - req, out := c.OutputService6TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type OutputService6TestShapeOutputService6TestCaseOperation1Input struct { - _ struct{} `type:"structure"` -} - -type OutputService6TestShapeOutputService6TestCaseOperation1Output struct { - _ struct{} `type:"structure"` - - MapMember map[string][]*int64 `type:"map"` -} - -// SetMapMember sets the MapMember field's value. -func (s *OutputService6TestShapeOutputService6TestCaseOperation1Output) SetMapMember(v map[string][]*int64) *OutputService6TestShapeOutputService6TestCaseOperation1Output { - s.MapMember = v - return s -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type OutputService7ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the OutputService7ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a OutputService7ProtocolTest client from just a session. -// svc := outputservice7protocoltest.New(mySession) -// -// // Create a OutputService7ProtocolTest client with additional configuration -// svc := outputservice7protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewOutputService7ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService7ProtocolTest { - c := p.ClientConfig("outputservice7protocoltest", cfgs...) - return newOutputService7ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newOutputService7ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *OutputService7ProtocolTest { - svc := &OutputService7ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "outputservice7protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a OutputService7ProtocolTest operation and runs any -// custom request initialization. -func (c *OutputService7ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opOutputService7TestCaseOperation1 = "OperationName" - -// OutputService7TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the OutputService7TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See OutputService7TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the OutputService7TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the OutputService7TestCaseOperation1Request method. -// req, resp := client.OutputService7TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *OutputService7ProtocolTest) OutputService7TestCaseOperation1Request(input *OutputService7TestShapeOutputService7TestCaseOperation1Input) (req *request.Request, output *OutputService7TestShapeOutputService7TestCaseOperation1Output) { - op := &request.Operation{ - Name: opOutputService7TestCaseOperation1, - HTTPPath: "/", - } - - if input == nil { - input = &OutputService7TestShapeOutputService7TestCaseOperation1Input{} - } - - output = &OutputService7TestShapeOutputService7TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - return -} - -// OutputService7TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation OutputService7TestCaseOperation1 for usage and error information. -func (c *OutputService7ProtocolTest) OutputService7TestCaseOperation1(input *OutputService7TestShapeOutputService7TestCaseOperation1Input) (*OutputService7TestShapeOutputService7TestCaseOperation1Output, error) { - req, out := c.OutputService7TestCaseOperation1Request(input) - return out, req.Send() -} - -// OutputService7TestCaseOperation1WithContext is the same as OutputService7TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See OutputService7TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OutputService7ProtocolTest) OutputService7TestCaseOperation1WithContext(ctx aws.Context, input *OutputService7TestShapeOutputService7TestCaseOperation1Input, opts ...request.Option) (*OutputService7TestShapeOutputService7TestCaseOperation1Output, error) { - req, out := c.OutputService7TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type OutputService7TestShapeOutputService7TestCaseOperation1Input struct { - _ struct{} `type:"structure"` -} - -type OutputService7TestShapeOutputService7TestCaseOperation1Output struct { - _ struct{} `type:"structure"` - - MapMember map[string]*time.Time `type:"map"` -} - -// SetMapMember sets the MapMember field's value. -func (s *OutputService7TestShapeOutputService7TestCaseOperation1Output) SetMapMember(v map[string]*time.Time) *OutputService7TestShapeOutputService7TestCaseOperation1Output { - s.MapMember = v - return s -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type OutputService8ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the OutputService8ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a OutputService8ProtocolTest client from just a session. -// svc := outputservice8protocoltest.New(mySession) -// -// // Create a OutputService8ProtocolTest client with additional configuration -// svc := outputservice8protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewOutputService8ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService8ProtocolTest { - c := p.ClientConfig("outputservice8protocoltest", cfgs...) - return newOutputService8ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newOutputService8ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *OutputService8ProtocolTest { - svc := &OutputService8ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "outputservice8protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a OutputService8ProtocolTest operation and runs any -// custom request initialization. -func (c *OutputService8ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opOutputService8TestCaseOperation1 = "OperationName" - -// OutputService8TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the OutputService8TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See OutputService8TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the OutputService8TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the OutputService8TestCaseOperation1Request method. -// req, resp := client.OutputService8TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *OutputService8ProtocolTest) OutputService8TestCaseOperation1Request(input *OutputService8TestShapeOutputService8TestCaseOperation1Input) (req *request.Request, output *OutputService8TestShapeOutputService8TestCaseOperation1Output) { - op := &request.Operation{ - Name: opOutputService8TestCaseOperation1, - HTTPPath: "/", - } - - if input == nil { - input = &OutputService8TestShapeOutputService8TestCaseOperation1Input{} - } - - output = &OutputService8TestShapeOutputService8TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - return -} - -// OutputService8TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation OutputService8TestCaseOperation1 for usage and error information. -func (c *OutputService8ProtocolTest) OutputService8TestCaseOperation1(input *OutputService8TestShapeOutputService8TestCaseOperation1Input) (*OutputService8TestShapeOutputService8TestCaseOperation1Output, error) { - req, out := c.OutputService8TestCaseOperation1Request(input) - return out, req.Send() -} - -// OutputService8TestCaseOperation1WithContext is the same as OutputService8TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See OutputService8TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OutputService8ProtocolTest) OutputService8TestCaseOperation1WithContext(ctx aws.Context, input *OutputService8TestShapeOutputService8TestCaseOperation1Input, opts ...request.Option) (*OutputService8TestShapeOutputService8TestCaseOperation1Output, error) { - req, out := c.OutputService8TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type OutputService8TestShapeOutputService8TestCaseOperation1Input struct { - _ struct{} `type:"structure"` -} - -type OutputService8TestShapeOutputService8TestCaseOperation1Output struct { - _ struct{} `type:"structure"` - - StrType *string `type:"string"` -} - -// SetStrType sets the StrType field's value. -func (s *OutputService8TestShapeOutputService8TestCaseOperation1Output) SetStrType(v string) *OutputService8TestShapeOutputService8TestCaseOperation1Output { - s.StrType = &v - return s -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type OutputService9ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the OutputService9ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a OutputService9ProtocolTest client from just a session. -// svc := outputservice9protocoltest.New(mySession) -// -// // Create a OutputService9ProtocolTest client with additional configuration -// svc := outputservice9protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewOutputService9ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService9ProtocolTest { - c := p.ClientConfig("outputservice9protocoltest", cfgs...) - return newOutputService9ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newOutputService9ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *OutputService9ProtocolTest { - svc := &OutputService9ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "outputservice9protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a OutputService9ProtocolTest operation and runs any -// custom request initialization. -func (c *OutputService9ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opOutputService9TestCaseOperation1 = "OperationName" - -// OutputService9TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the OutputService9TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See OutputService9TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the OutputService9TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the OutputService9TestCaseOperation1Request method. -// req, resp := client.OutputService9TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *OutputService9ProtocolTest) OutputService9TestCaseOperation1Request(input *OutputService9TestShapeOutputService9TestCaseOperation1Input) (req *request.Request, output *OutputService9TestShapeOutputService9TestCaseOperation1Output) { - op := &request.Operation{ - Name: opOutputService9TestCaseOperation1, - HTTPPath: "/", - } - - if input == nil { - input = &OutputService9TestShapeOutputService9TestCaseOperation1Input{} - } - - output = &OutputService9TestShapeOutputService9TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - return -} - -// OutputService9TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation OutputService9TestCaseOperation1 for usage and error information. -func (c *OutputService9ProtocolTest) OutputService9TestCaseOperation1(input *OutputService9TestShapeOutputService9TestCaseOperation1Input) (*OutputService9TestShapeOutputService9TestCaseOperation1Output, error) { - req, out := c.OutputService9TestCaseOperation1Request(input) - return out, req.Send() -} - -// OutputService9TestCaseOperation1WithContext is the same as OutputService9TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See OutputService9TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OutputService9ProtocolTest) OutputService9TestCaseOperation1WithContext(ctx aws.Context, input *OutputService9TestShapeOutputService9TestCaseOperation1Input, opts ...request.Option) (*OutputService9TestShapeOutputService9TestCaseOperation1Output, error) { - req, out := c.OutputService9TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type OutputService9TestShapeOutputService9TestCaseOperation1Input struct { - _ struct{} `type:"structure"` -} - -type OutputService9TestShapeOutputService9TestCaseOperation1Output struct { - _ struct{} `type:"structure"` - - AllHeaders map[string]*string `location:"headers" type:"map"` - - PrefixedHeaders map[string]*string `location:"headers" locationName:"X-" type:"map"` -} - -// SetAllHeaders sets the AllHeaders field's value. -func (s *OutputService9TestShapeOutputService9TestCaseOperation1Output) SetAllHeaders(v map[string]*string) *OutputService9TestShapeOutputService9TestCaseOperation1Output { - s.AllHeaders = v - return s -} - -// SetPrefixedHeaders sets the PrefixedHeaders field's value. -func (s *OutputService9TestShapeOutputService9TestCaseOperation1Output) SetPrefixedHeaders(v map[string]*string) *OutputService9TestShapeOutputService9TestCaseOperation1Output { - s.PrefixedHeaders = v - return s -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type OutputService10ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the OutputService10ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a OutputService10ProtocolTest client from just a session. -// svc := outputservice10protocoltest.New(mySession) -// -// // Create a OutputService10ProtocolTest client with additional configuration -// svc := outputservice10protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewOutputService10ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService10ProtocolTest { - c := p.ClientConfig("outputservice10protocoltest", cfgs...) - return newOutputService10ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newOutputService10ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *OutputService10ProtocolTest { - svc := &OutputService10ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "outputservice10protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a OutputService10ProtocolTest operation and runs any -// custom request initialization. -func (c *OutputService10ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opOutputService10TestCaseOperation1 = "OperationName" - -// OutputService10TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the OutputService10TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See OutputService10TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the OutputService10TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the OutputService10TestCaseOperation1Request method. -// req, resp := client.OutputService10TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *OutputService10ProtocolTest) OutputService10TestCaseOperation1Request(input *OutputService10TestShapeOutputService10TestCaseOperation1Input) (req *request.Request, output *OutputService10TestShapeOutputService10TestCaseOperation1Output) { - op := &request.Operation{ - Name: opOutputService10TestCaseOperation1, - HTTPPath: "/", - } - - if input == nil { - input = &OutputService10TestShapeOutputService10TestCaseOperation1Input{} - } - - output = &OutputService10TestShapeOutputService10TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - return -} - -// OutputService10TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation OutputService10TestCaseOperation1 for usage and error information. -func (c *OutputService10ProtocolTest) OutputService10TestCaseOperation1(input *OutputService10TestShapeOutputService10TestCaseOperation1Input) (*OutputService10TestShapeOutputService10TestCaseOperation1Output, error) { - req, out := c.OutputService10TestCaseOperation1Request(input) - return out, req.Send() -} - -// OutputService10TestCaseOperation1WithContext is the same as OutputService10TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See OutputService10TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OutputService10ProtocolTest) OutputService10TestCaseOperation1WithContext(ctx aws.Context, input *OutputService10TestShapeOutputService10TestCaseOperation1Input, opts ...request.Option) (*OutputService10TestShapeOutputService10TestCaseOperation1Output, error) { - req, out := c.OutputService10TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type OutputService10TestShapeBodyStructure struct { - _ struct{} `type:"structure"` - - Foo *string `type:"string"` -} - -// SetFoo sets the Foo field's value. -func (s *OutputService10TestShapeBodyStructure) SetFoo(v string) *OutputService10TestShapeBodyStructure { - s.Foo = &v - return s -} - -type OutputService10TestShapeOutputService10TestCaseOperation1Input struct { - _ struct{} `type:"structure"` -} - -type OutputService10TestShapeOutputService10TestCaseOperation1Output struct { - _ struct{} `type:"structure" payload:"Data"` - - Data *OutputService10TestShapeBodyStructure `type:"structure"` - - Header *string `location:"header" locationName:"X-Foo" type:"string"` -} - -// SetData sets the Data field's value. -func (s *OutputService10TestShapeOutputService10TestCaseOperation1Output) SetData(v *OutputService10TestShapeBodyStructure) *OutputService10TestShapeOutputService10TestCaseOperation1Output { - s.Data = v - return s -} - -// SetHeader sets the Header field's value. -func (s *OutputService10TestShapeOutputService10TestCaseOperation1Output) SetHeader(v string) *OutputService10TestShapeOutputService10TestCaseOperation1Output { - s.Header = &v - return s -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type OutputService11ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the OutputService11ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a OutputService11ProtocolTest client from just a session. -// svc := outputservice11protocoltest.New(mySession) -// -// // Create a OutputService11ProtocolTest client with additional configuration -// svc := outputservice11protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewOutputService11ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService11ProtocolTest { - c := p.ClientConfig("outputservice11protocoltest", cfgs...) - return newOutputService11ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newOutputService11ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *OutputService11ProtocolTest { - svc := &OutputService11ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "outputservice11protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a OutputService11ProtocolTest operation and runs any -// custom request initialization. -func (c *OutputService11ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opOutputService11TestCaseOperation1 = "OperationName" - -// OutputService11TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the OutputService11TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See OutputService11TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the OutputService11TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the OutputService11TestCaseOperation1Request method. -// req, resp := client.OutputService11TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *OutputService11ProtocolTest) OutputService11TestCaseOperation1Request(input *OutputService11TestShapeOutputService11TestCaseOperation1Input) (req *request.Request, output *OutputService11TestShapeOutputService11TestCaseOperation1Output) { - op := &request.Operation{ - Name: opOutputService11TestCaseOperation1, - HTTPPath: "/", - } - - if input == nil { - input = &OutputService11TestShapeOutputService11TestCaseOperation1Input{} - } - - output = &OutputService11TestShapeOutputService11TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - return -} - -// OutputService11TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation OutputService11TestCaseOperation1 for usage and error information. -func (c *OutputService11ProtocolTest) OutputService11TestCaseOperation1(input *OutputService11TestShapeOutputService11TestCaseOperation1Input) (*OutputService11TestShapeOutputService11TestCaseOperation1Output, error) { - req, out := c.OutputService11TestCaseOperation1Request(input) - return out, req.Send() -} - -// OutputService11TestCaseOperation1WithContext is the same as OutputService11TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See OutputService11TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OutputService11ProtocolTest) OutputService11TestCaseOperation1WithContext(ctx aws.Context, input *OutputService11TestShapeOutputService11TestCaseOperation1Input, opts ...request.Option) (*OutputService11TestShapeOutputService11TestCaseOperation1Output, error) { - req, out := c.OutputService11TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type OutputService11TestShapeOutputService11TestCaseOperation1Input struct { - _ struct{} `type:"structure"` -} - -type OutputService11TestShapeOutputService11TestCaseOperation1Output struct { - _ struct{} `type:"structure" payload:"Stream"` - - Stream []byte `type:"blob"` -} - -// SetStream sets the Stream field's value. -func (s *OutputService11TestShapeOutputService11TestCaseOperation1Output) SetStream(v []byte) *OutputService11TestShapeOutputService11TestCaseOperation1Output { - s.Stream = v - return s -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type OutputService12ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the OutputService12ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a OutputService12ProtocolTest client from just a session. -// svc := outputservice12protocoltest.New(mySession) -// -// // Create a OutputService12ProtocolTest client with additional configuration -// svc := outputservice12protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewOutputService12ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService12ProtocolTest { - c := p.ClientConfig("outputservice12protocoltest", cfgs...) - return newOutputService12ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newOutputService12ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *OutputService12ProtocolTest { - svc := &OutputService12ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "outputservice12protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a OutputService12ProtocolTest operation and runs any -// custom request initialization. -func (c *OutputService12ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opOutputService12TestCaseOperation1 = "OperationName" - -// OutputService12TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the OutputService12TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See OutputService12TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the OutputService12TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the OutputService12TestCaseOperation1Request method. -// req, resp := client.OutputService12TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *OutputService12ProtocolTest) OutputService12TestCaseOperation1Request(input *OutputService12TestShapeOutputService12TestCaseOperation1Input) (req *request.Request, output *OutputService12TestShapeOutputService12TestCaseOperation1Output) { - op := &request.Operation{ - Name: opOutputService12TestCaseOperation1, - HTTPPath: "/", - } - - if input == nil { - input = &OutputService12TestShapeOutputService12TestCaseOperation1Input{} - } - - output = &OutputService12TestShapeOutputService12TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - return -} - -// OutputService12TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation OutputService12TestCaseOperation1 for usage and error information. -func (c *OutputService12ProtocolTest) OutputService12TestCaseOperation1(input *OutputService12TestShapeOutputService12TestCaseOperation1Input) (*OutputService12TestShapeOutputService12TestCaseOperation1Output, error) { - req, out := c.OutputService12TestCaseOperation1Request(input) - return out, req.Send() -} - -// OutputService12TestCaseOperation1WithContext is the same as OutputService12TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See OutputService12TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OutputService12ProtocolTest) OutputService12TestCaseOperation1WithContext(ctx aws.Context, input *OutputService12TestShapeOutputService12TestCaseOperation1Input, opts ...request.Option) (*OutputService12TestShapeOutputService12TestCaseOperation1Output, error) { - req, out := c.OutputService12TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type OutputService12TestShapeOutputService12TestCaseOperation1Input struct { - _ struct{} `type:"structure"` -} - -type OutputService12TestShapeOutputService12TestCaseOperation1Output struct { - _ struct{} `type:"structure"` - - Attr aws.JSONValue `location:"header" locationName:"X-Amz-Foo" type:"jsonvalue"` -} - -// SetAttr sets the Attr field's value. -func (s *OutputService12TestShapeOutputService12TestCaseOperation1Output) SetAttr(v aws.JSONValue) *OutputService12TestShapeOutputService12TestCaseOperation1Output { - s.Attr = v - return s -} - -// -// Tests begin here -// - -func TestOutputService1ProtocolTestScalarMembersCase1(t *testing.T) { - svc := NewOutputService1ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - - buf := bytes.NewReader([]byte("{\"Str\": \"myname\", \"Num\": 123, \"FalseBool\": false, \"TrueBool\": true, \"Float\": 1.2, \"Double\": 1.3, \"Long\": 200, \"Char\": \"a\"}")) - req, out := svc.OutputService1TestCaseOperation1Request(nil) - req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} - - // set headers - req.HTTPResponse.Header.Set("ImaHeader", "test") - req.HTTPResponse.Header.Set("X-Foo", "abc") - - // unmarshal response - restjson.UnmarshalMeta(req) - restjson.Unmarshal(req) - assert.NoError(t, req.Error) - - // assert response - assert.NotNil(t, out) // ensure out variable is used - assert.Equal(t, "a", *out.Char) - assert.Equal(t, 1.3, *out.Double) - assert.Equal(t, false, *out.FalseBool) - assert.Equal(t, 1.2, *out.Float) - assert.Equal(t, "test", *out.ImaHeader) - assert.Equal(t, "abc", *out.ImaHeaderLocation) - assert.Equal(t, int64(200), *out.Long) - assert.Equal(t, int64(123), *out.Num) - assert.Equal(t, int64(200), *out.Status) - assert.Equal(t, "myname", *out.Str) - assert.Equal(t, true, *out.TrueBool) - -} - -func TestOutputService2ProtocolTestBlobMembersCase1(t *testing.T) { - svc := NewOutputService2ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - - buf := bytes.NewReader([]byte("{\"BlobMember\": \"aGkh\", \"StructMember\": {\"foo\": \"dGhlcmUh\"}}")) - req, out := svc.OutputService2TestCaseOperation1Request(nil) - req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} - - // set headers - - // unmarshal response - restjson.UnmarshalMeta(req) - restjson.Unmarshal(req) - assert.NoError(t, req.Error) - - // assert response - assert.NotNil(t, out) // ensure out variable is used - assert.Equal(t, "hi!", string(out.BlobMember)) - assert.Equal(t, "there!", string(out.StructMember.Foo)) - -} - -func TestOutputService3ProtocolTestTimestampMembersCase1(t *testing.T) { - svc := NewOutputService3ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - - buf := bytes.NewReader([]byte("{\"TimeMember\": 1398796238, \"StructMember\": {\"foo\": 1398796238}}")) - req, out := svc.OutputService3TestCaseOperation1Request(nil) - req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} - - // set headers - - // unmarshal response - restjson.UnmarshalMeta(req) - restjson.Unmarshal(req) - assert.NoError(t, req.Error) - - // assert response - assert.NotNil(t, out) // ensure out variable is used - assert.Equal(t, time.Unix(1.398796238e+09, 0).UTC().String(), out.StructMember.Foo.String()) - assert.Equal(t, time.Unix(1.398796238e+09, 0).UTC().String(), out.TimeMember.String()) - -} - -func TestOutputService4ProtocolTestListsCase1(t *testing.T) { - svc := NewOutputService4ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - - buf := bytes.NewReader([]byte("{\"ListMember\": [\"a\", \"b\"]}")) - req, out := svc.OutputService4TestCaseOperation1Request(nil) - req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} - - // set headers - - // unmarshal response - restjson.UnmarshalMeta(req) - restjson.Unmarshal(req) - assert.NoError(t, req.Error) - - // assert response - assert.NotNil(t, out) // ensure out variable is used - assert.Equal(t, "a", *out.ListMember[0]) - assert.Equal(t, "b", *out.ListMember[1]) - -} - -func TestOutputService5ProtocolTestListsWithStructureMemberCase1(t *testing.T) { - svc := NewOutputService5ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - - buf := bytes.NewReader([]byte("{\"ListMember\": [{\"Foo\": \"a\"}, {\"Foo\": \"b\"}]}")) - req, out := svc.OutputService5TestCaseOperation1Request(nil) - req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} - - // set headers - - // unmarshal response - restjson.UnmarshalMeta(req) - restjson.Unmarshal(req) - assert.NoError(t, req.Error) - - // assert response - assert.NotNil(t, out) // ensure out variable is used - assert.Equal(t, "a", *out.ListMember[0].Foo) - assert.Equal(t, "b", *out.ListMember[1].Foo) - -} - -func TestOutputService6ProtocolTestMapsCase1(t *testing.T) { - svc := NewOutputService6ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - - buf := bytes.NewReader([]byte("{\"MapMember\": {\"a\": [1, 2], \"b\": [3, 4]}}")) - req, out := svc.OutputService6TestCaseOperation1Request(nil) - req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} - - // set headers - - // unmarshal response - restjson.UnmarshalMeta(req) - restjson.Unmarshal(req) - assert.NoError(t, req.Error) - - // assert response - assert.NotNil(t, out) // ensure out variable is used - assert.Equal(t, int64(1), *out.MapMember["a"][0]) - assert.Equal(t, int64(2), *out.MapMember["a"][1]) - assert.Equal(t, int64(3), *out.MapMember["b"][0]) - assert.Equal(t, int64(4), *out.MapMember["b"][1]) - -} - -func TestOutputService7ProtocolTestComplexMapValuesCase1(t *testing.T) { - svc := NewOutputService7ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - - buf := bytes.NewReader([]byte("{\"MapMember\": {\"a\": 1398796238, \"b\": 1398796238}}")) - req, out := svc.OutputService7TestCaseOperation1Request(nil) - req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} - - // set headers - - // unmarshal response - restjson.UnmarshalMeta(req) - restjson.Unmarshal(req) - assert.NoError(t, req.Error) - - // assert response - assert.NotNil(t, out) // ensure out variable is used - assert.Equal(t, time.Unix(1.398796238e+09, 0).UTC().String(), out.MapMember["a"].String()) - assert.Equal(t, time.Unix(1.398796238e+09, 0).UTC().String(), out.MapMember["b"].String()) - -} - -func TestOutputService8ProtocolTestIgnoresExtraDataCase1(t *testing.T) { - svc := NewOutputService8ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - - buf := bytes.NewReader([]byte("{\"foo\": \"bar\"}")) - req, out := svc.OutputService8TestCaseOperation1Request(nil) - req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} - - // set headers - - // unmarshal response - restjson.UnmarshalMeta(req) - restjson.Unmarshal(req) - assert.NoError(t, req.Error) - - // assert response - assert.NotNil(t, out) // ensure out variable is used - -} - -func TestOutputService9ProtocolTestSupportsHeaderMapsCase1(t *testing.T) { - svc := NewOutputService9ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - - buf := bytes.NewReader([]byte("{}")) - req, out := svc.OutputService9TestCaseOperation1Request(nil) - req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} - - // set headers - req.HTTPResponse.Header.Set("Content-Length", "10") - req.HTTPResponse.Header.Set("X-Bam", "boo") - req.HTTPResponse.Header.Set("X-Foo", "bar") - - // unmarshal response - restjson.UnmarshalMeta(req) - restjson.Unmarshal(req) - assert.NoError(t, req.Error) - - // assert response - assert.NotNil(t, out) // ensure out variable is used - assert.Equal(t, "10", *out.AllHeaders["Content-Length"]) - assert.Equal(t, "boo", *out.AllHeaders["X-Bam"]) - assert.Equal(t, "bar", *out.AllHeaders["X-Foo"]) - assert.Equal(t, "boo", *out.PrefixedHeaders["Bam"]) - assert.Equal(t, "bar", *out.PrefixedHeaders["Foo"]) - -} - -func TestOutputService10ProtocolTestJSONPayloadCase1(t *testing.T) { - svc := NewOutputService10ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - - buf := bytes.NewReader([]byte("{\"Foo\": \"abc\"}")) - req, out := svc.OutputService10TestCaseOperation1Request(nil) - req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} - - // set headers - req.HTTPResponse.Header.Set("X-Foo", "baz") - - // unmarshal response - restjson.UnmarshalMeta(req) - restjson.Unmarshal(req) - assert.NoError(t, req.Error) - - // assert response - assert.NotNil(t, out) // ensure out variable is used - assert.Equal(t, "abc", *out.Data.Foo) - assert.Equal(t, "baz", *out.Header) - -} - -func TestOutputService11ProtocolTestStreamingPayloadCase1(t *testing.T) { - svc := NewOutputService11ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - - buf := bytes.NewReader([]byte("abc")) - req, out := svc.OutputService11TestCaseOperation1Request(nil) - req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} - - // set headers - - // unmarshal response - restjson.UnmarshalMeta(req) - restjson.Unmarshal(req) - assert.NoError(t, req.Error) - - // assert response - assert.NotNil(t, out) // ensure out variable is used - assert.Equal(t, "abc", string(out.Stream)) - -} - -func TestOutputService12ProtocolTestJSONValueTraitCase1(t *testing.T) { - svc := NewOutputService12ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - - buf := bytes.NewReader([]byte("")) - req, out := svc.OutputService12TestCaseOperation1Request(nil) - req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} - - // set headers - req.HTTPResponse.Header.Set("X-Amz-Foo", "eyJGb28iOiJCYXIifQ==") - - // unmarshal response - restjson.UnmarshalMeta(req) - restjson.Unmarshal(req) - assert.NoError(t, req.Error) - - // assert response - assert.NotNil(t, out) // ensure out variable is used - reflect.DeepEqual(out.Attr, map[string]interface{}{"Foo": "Bar"}) -} diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/restxml/build_bench_test.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/restxml/build_bench_test.go deleted file mode 100644 index 0817167..0000000 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/restxml/build_bench_test.go +++ /dev/null @@ -1,246 +0,0 @@ -// +build bench - -package restxml_test - -import ( - "testing" - - "bytes" - "encoding/xml" - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/awstesting" - "github.com/aws/aws-sdk-go/private/protocol/restxml" - "github.com/aws/aws-sdk-go/service/cloudfront" -) - -func BenchmarkRESTXMLBuild_Complex_cloudfrontCreateDistribution(b *testing.B) { - params := restxmlBuildCreateDistroParms - - op := &request.Operation{ - Name: "CreateDistribution", - HTTPMethod: "POST", - HTTPPath: "/2015-04-17/distribution/{DistributionId}/invalidation", - } - - benchRESTXMLBuild(b, op, params) -} - -func BenchmarkRESTXMLBuild_Simple_cloudfrontDeleteStreamingDistribution(b *testing.B) { - params := &cloudfront.DeleteDistributionInput{ - Id: aws.String("string"), // Required - IfMatch: aws.String("string"), - } - op := &request.Operation{ - Name: "DeleteStreamingDistribution", - HTTPMethod: "DELETE", - HTTPPath: "/2015-04-17/streaming-distribution/{Id}", - } - benchRESTXMLBuild(b, op, params) -} - -func BenchmarkEncodingXMLMarshal_Simple_cloudfrontDeleteStreamingDistribution(b *testing.B) { - params := &cloudfront.DeleteDistributionInput{ - Id: aws.String("string"), // Required - IfMatch: aws.String("string"), - } - - for i := 0; i < b.N; i++ { - buf := &bytes.Buffer{} - encoder := xml.NewEncoder(buf) - if err := encoder.Encode(params); err != nil { - b.Fatal("Unexpected error", err) - } - } -} - -func benchRESTXMLBuild(b *testing.B, op *request.Operation, params interface{}) { - svc := awstesting.NewClient() - svc.ServiceName = "cloudfront" - svc.APIVersion = "2015-04-17" - - for i := 0; i < b.N; i++ { - r := svc.NewRequest(op, params, nil) - restxml.Build(r) - if r.Error != nil { - b.Fatal("Unexpected error", r.Error) - } - } -} - -var restxmlBuildCreateDistroParms = &cloudfront.CreateDistributionInput{ - DistributionConfig: &cloudfront.DistributionConfig{ // Required - CallerReference: aws.String("string"), // Required - Comment: aws.String("string"), // Required - DefaultCacheBehavior: &cloudfront.DefaultCacheBehavior{ // Required - ForwardedValues: &cloudfront.ForwardedValues{ // Required - Cookies: &cloudfront.CookiePreference{ // Required - Forward: aws.String("ItemSelection"), // Required - WhitelistedNames: &cloudfront.CookieNames{ - Quantity: aws.Int64(1), // Required - Items: []*string{ - aws.String("string"), // Required - // More values... - }, - }, - }, - QueryString: aws.Bool(true), // Required - Headers: &cloudfront.Headers{ - Quantity: aws.Int64(1), // Required - Items: []*string{ - aws.String("string"), // Required - // More values... - }, - }, - }, - MinTTL: aws.Int64(1), // Required - TargetOriginId: aws.String("string"), // Required - TrustedSigners: &cloudfront.TrustedSigners{ // Required - Enabled: aws.Bool(true), // Required - Quantity: aws.Int64(1), // Required - Items: []*string{ - aws.String("string"), // Required - // More values... - }, - }, - ViewerProtocolPolicy: aws.String("ViewerProtocolPolicy"), // Required - AllowedMethods: &cloudfront.AllowedMethods{ - Items: []*string{ // Required - aws.String("Method"), // Required - // More values... - }, - Quantity: aws.Int64(1), // Required - CachedMethods: &cloudfront.CachedMethods{ - Items: []*string{ // Required - aws.String("Method"), // Required - // More values... - }, - Quantity: aws.Int64(1), // Required - }, - }, - DefaultTTL: aws.Int64(1), - MaxTTL: aws.Int64(1), - SmoothStreaming: aws.Bool(true), - }, - Enabled: aws.Bool(true), // Required - Origins: &cloudfront.Origins{ // Required - Quantity: aws.Int64(1), // Required - Items: []*cloudfront.Origin{ - { // Required - DomainName: aws.String("string"), // Required - Id: aws.String("string"), // Required - CustomOriginConfig: &cloudfront.CustomOriginConfig{ - HTTPPort: aws.Int64(1), // Required - HTTPSPort: aws.Int64(1), // Required - OriginProtocolPolicy: aws.String("OriginProtocolPolicy"), // Required - }, - OriginPath: aws.String("string"), - S3OriginConfig: &cloudfront.S3OriginConfig{ - OriginAccessIdentity: aws.String("string"), // Required - }, - }, - // More values... - }, - }, - Aliases: &cloudfront.Aliases{ - Quantity: aws.Int64(1), // Required - Items: []*string{ - aws.String("string"), // Required - // More values... - }, - }, - CacheBehaviors: &cloudfront.CacheBehaviors{ - Quantity: aws.Int64(1), // Required - Items: []*cloudfront.CacheBehavior{ - { // Required - ForwardedValues: &cloudfront.ForwardedValues{ // Required - Cookies: &cloudfront.CookiePreference{ // Required - Forward: aws.String("ItemSelection"), // Required - WhitelistedNames: &cloudfront.CookieNames{ - Quantity: aws.Int64(1), // Required - Items: []*string{ - aws.String("string"), // Required - // More values... - }, - }, - }, - QueryString: aws.Bool(true), // Required - Headers: &cloudfront.Headers{ - Quantity: aws.Int64(1), // Required - Items: []*string{ - aws.String("string"), // Required - // More values... - }, - }, - }, - MinTTL: aws.Int64(1), // Required - PathPattern: aws.String("string"), // Required - TargetOriginId: aws.String("string"), // Required - TrustedSigners: &cloudfront.TrustedSigners{ // Required - Enabled: aws.Bool(true), // Required - Quantity: aws.Int64(1), // Required - Items: []*string{ - aws.String("string"), // Required - // More values... - }, - }, - ViewerProtocolPolicy: aws.String("ViewerProtocolPolicy"), // Required - AllowedMethods: &cloudfront.AllowedMethods{ - Items: []*string{ // Required - aws.String("Method"), // Required - // More values... - }, - Quantity: aws.Int64(1), // Required - CachedMethods: &cloudfront.CachedMethods{ - Items: []*string{ // Required - aws.String("Method"), // Required - // More values... - }, - Quantity: aws.Int64(1), // Required - }, - }, - DefaultTTL: aws.Int64(1), - MaxTTL: aws.Int64(1), - SmoothStreaming: aws.Bool(true), - }, - // More values... - }, - }, - CustomErrorResponses: &cloudfront.CustomErrorResponses{ - Quantity: aws.Int64(1), // Required - Items: []*cloudfront.CustomErrorResponse{ - { // Required - ErrorCode: aws.Int64(1), // Required - ErrorCachingMinTTL: aws.Int64(1), - ResponseCode: aws.String("string"), - ResponsePagePath: aws.String("string"), - }, - // More values... - }, - }, - DefaultRootObject: aws.String("string"), - Logging: &cloudfront.LoggingConfig{ - Bucket: aws.String("string"), // Required - Enabled: aws.Bool(true), // Required - IncludeCookies: aws.Bool(true), // Required - Prefix: aws.String("string"), // Required - }, - PriceClass: aws.String("PriceClass"), - Restrictions: &cloudfront.Restrictions{ - GeoRestriction: &cloudfront.GeoRestriction{ // Required - Quantity: aws.Int64(1), // Required - RestrictionType: aws.String("GeoRestrictionType"), // Required - Items: []*string{ - aws.String("string"), // Required - // More values... - }, - }, - }, - ViewerCertificate: &cloudfront.ViewerCertificate{ - CloudFrontDefaultCertificate: aws.Bool(true), - IAMCertificateId: aws.String("string"), - MinimumProtocolVersion: aws.String("MinimumProtocolVersion"), - SSLSupportMethod: aws.String("SSLSupportMethod"), - }, - }, -} diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/restxml/build_test.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/restxml/build_test.go deleted file mode 100644 index 9b13461..0000000 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/restxml/build_test.go +++ /dev/null @@ -1,5821 +0,0 @@ -package restxml_test - -import ( - "bytes" - "encoding/json" - "encoding/xml" - "fmt" - "io" - "io/ioutil" - "net/http" - "net/url" - "reflect" - "testing" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/awstesting" - "github.com/aws/aws-sdk-go/awstesting/unit" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/restxml" - "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil" - "github.com/aws/aws-sdk-go/private/util" - "github.com/stretchr/testify/assert" -) - -var _ bytes.Buffer // always import bytes -var _ http.Request -var _ json.Marshaler -var _ time.Time -var _ xmlutil.XMLNode -var _ xml.Attr -var _ = ioutil.Discard -var _ = util.Trim("") -var _ = url.Values{} -var _ = io.EOF -var _ = aws.String -var _ = fmt.Println -var _ = reflect.Value{} - -func init() { - protocol.RandReader = &awstesting.ZeroReader{} -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type InputService1ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the InputService1ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a InputService1ProtocolTest client from just a session. -// svc := inputservice1protocoltest.New(mySession) -// -// // Create a InputService1ProtocolTest client with additional configuration -// svc := inputservice1protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewInputService1ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService1ProtocolTest { - c := p.ClientConfig("inputservice1protocoltest", cfgs...) - return newInputService1ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newInputService1ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService1ProtocolTest { - svc := &InputService1ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "inputservice1protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-01-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restxml.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a InputService1ProtocolTest operation and runs any -// custom request initialization. -func (c *InputService1ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opInputService1TestCaseOperation1 = "OperationName" - -// InputService1TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the InputService1TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService1TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService1TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService1TestCaseOperation1Request method. -// req, resp := client.InputService1TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService1ProtocolTest) InputService1TestCaseOperation1Request(input *InputService1TestShapeInputService1TestCaseOperation2Input) (req *request.Request, output *InputService1TestShapeInputService1TestCaseOperation1Output) { - op := &request.Operation{ - Name: opInputService1TestCaseOperation1, - HTTPMethod: "POST", - HTTPPath: "/2014-01-01/hostedzone", - } - - if input == nil { - input = &InputService1TestShapeInputService1TestCaseOperation2Input{} - } - - output = &InputService1TestShapeInputService1TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService1TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService1TestCaseOperation1 for usage and error information. -func (c *InputService1ProtocolTest) InputService1TestCaseOperation1(input *InputService1TestShapeInputService1TestCaseOperation2Input) (*InputService1TestShapeInputService1TestCaseOperation1Output, error) { - req, out := c.InputService1TestCaseOperation1Request(input) - return out, req.Send() -} - -// InputService1TestCaseOperation1WithContext is the same as InputService1TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService1TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService1ProtocolTest) InputService1TestCaseOperation1WithContext(ctx aws.Context, input *InputService1TestShapeInputService1TestCaseOperation2Input, opts ...request.Option) (*InputService1TestShapeInputService1TestCaseOperation1Output, error) { - req, out := c.InputService1TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opInputService1TestCaseOperation2 = "OperationName" - -// InputService1TestCaseOperation2Request generates a "aws/request.Request" representing the -// client's request for the InputService1TestCaseOperation2 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService1TestCaseOperation2 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService1TestCaseOperation2 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService1TestCaseOperation2Request method. -// req, resp := client.InputService1TestCaseOperation2Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService1ProtocolTest) InputService1TestCaseOperation2Request(input *InputService1TestShapeInputService1TestCaseOperation2Input) (req *request.Request, output *InputService1TestShapeInputService1TestCaseOperation2Output) { - op := &request.Operation{ - Name: opInputService1TestCaseOperation2, - HTTPMethod: "PUT", - HTTPPath: "/2014-01-01/hostedzone", - } - - if input == nil { - input = &InputService1TestShapeInputService1TestCaseOperation2Input{} - } - - output = &InputService1TestShapeInputService1TestCaseOperation2Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService1TestCaseOperation2 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService1TestCaseOperation2 for usage and error information. -func (c *InputService1ProtocolTest) InputService1TestCaseOperation2(input *InputService1TestShapeInputService1TestCaseOperation2Input) (*InputService1TestShapeInputService1TestCaseOperation2Output, error) { - req, out := c.InputService1TestCaseOperation2Request(input) - return out, req.Send() -} - -// InputService1TestCaseOperation2WithContext is the same as InputService1TestCaseOperation2 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService1TestCaseOperation2 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService1ProtocolTest) InputService1TestCaseOperation2WithContext(ctx aws.Context, input *InputService1TestShapeInputService1TestCaseOperation2Input, opts ...request.Option) (*InputService1TestShapeInputService1TestCaseOperation2Output, error) { - req, out := c.InputService1TestCaseOperation2Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opInputService1TestCaseOperation3 = "OperationName" - -// InputService1TestCaseOperation3Request generates a "aws/request.Request" representing the -// client's request for the InputService1TestCaseOperation3 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService1TestCaseOperation3 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService1TestCaseOperation3 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService1TestCaseOperation3Request method. -// req, resp := client.InputService1TestCaseOperation3Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService1ProtocolTest) InputService1TestCaseOperation3Request(input *InputService1TestShapeInputService1TestCaseOperation3Input) (req *request.Request, output *InputService1TestShapeInputService1TestCaseOperation3Output) { - op := &request.Operation{ - Name: opInputService1TestCaseOperation3, - HTTPMethod: "GET", - HTTPPath: "/2014-01-01/hostedzone", - } - - if input == nil { - input = &InputService1TestShapeInputService1TestCaseOperation3Input{} - } - - output = &InputService1TestShapeInputService1TestCaseOperation3Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService1TestCaseOperation3 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService1TestCaseOperation3 for usage and error information. -func (c *InputService1ProtocolTest) InputService1TestCaseOperation3(input *InputService1TestShapeInputService1TestCaseOperation3Input) (*InputService1TestShapeInputService1TestCaseOperation3Output, error) { - req, out := c.InputService1TestCaseOperation3Request(input) - return out, req.Send() -} - -// InputService1TestCaseOperation3WithContext is the same as InputService1TestCaseOperation3 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService1TestCaseOperation3 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService1ProtocolTest) InputService1TestCaseOperation3WithContext(ctx aws.Context, input *InputService1TestShapeInputService1TestCaseOperation3Input, opts ...request.Option) (*InputService1TestShapeInputService1TestCaseOperation3Output, error) { - req, out := c.InputService1TestCaseOperation3Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type InputService1TestShapeInputService1TestCaseOperation1Output struct { - _ struct{} `type:"structure"` -} - -type InputService1TestShapeInputService1TestCaseOperation2Input struct { - _ struct{} `locationName:"OperationRequest" type:"structure" xmlURI:"https://foo/"` - - Description *string `type:"string"` - - Name *string `type:"string"` -} - -// SetDescription sets the Description field's value. -func (s *InputService1TestShapeInputService1TestCaseOperation2Input) SetDescription(v string) *InputService1TestShapeInputService1TestCaseOperation2Input { - s.Description = &v - return s -} - -// SetName sets the Name field's value. -func (s *InputService1TestShapeInputService1TestCaseOperation2Input) SetName(v string) *InputService1TestShapeInputService1TestCaseOperation2Input { - s.Name = &v - return s -} - -type InputService1TestShapeInputService1TestCaseOperation2Output struct { - _ struct{} `type:"structure"` -} - -type InputService1TestShapeInputService1TestCaseOperation3Input struct { - _ struct{} `type:"structure"` -} - -type InputService1TestShapeInputService1TestCaseOperation3Output struct { - _ struct{} `type:"structure"` -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type InputService2ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the InputService2ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a InputService2ProtocolTest client from just a session. -// svc := inputservice2protocoltest.New(mySession) -// -// // Create a InputService2ProtocolTest client with additional configuration -// svc := inputservice2protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewInputService2ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService2ProtocolTest { - c := p.ClientConfig("inputservice2protocoltest", cfgs...) - return newInputService2ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newInputService2ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService2ProtocolTest { - svc := &InputService2ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "inputservice2protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-01-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restxml.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a InputService2ProtocolTest operation and runs any -// custom request initialization. -func (c *InputService2ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opInputService2TestCaseOperation1 = "OperationName" - -// InputService2TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the InputService2TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService2TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService2TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService2TestCaseOperation1Request method. -// req, resp := client.InputService2TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService2ProtocolTest) InputService2TestCaseOperation1Request(input *InputService2TestShapeInputService2TestCaseOperation1Input) (req *request.Request, output *InputService2TestShapeInputService2TestCaseOperation1Output) { - op := &request.Operation{ - Name: opInputService2TestCaseOperation1, - HTTPMethod: "POST", - HTTPPath: "/2014-01-01/hostedzone", - } - - if input == nil { - input = &InputService2TestShapeInputService2TestCaseOperation1Input{} - } - - output = &InputService2TestShapeInputService2TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService2TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService2TestCaseOperation1 for usage and error information. -func (c *InputService2ProtocolTest) InputService2TestCaseOperation1(input *InputService2TestShapeInputService2TestCaseOperation1Input) (*InputService2TestShapeInputService2TestCaseOperation1Output, error) { - req, out := c.InputService2TestCaseOperation1Request(input) - return out, req.Send() -} - -// InputService2TestCaseOperation1WithContext is the same as InputService2TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService2TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService2ProtocolTest) InputService2TestCaseOperation1WithContext(ctx aws.Context, input *InputService2TestShapeInputService2TestCaseOperation1Input, opts ...request.Option) (*InputService2TestShapeInputService2TestCaseOperation1Output, error) { - req, out := c.InputService2TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type InputService2TestShapeInputService2TestCaseOperation1Input struct { - _ struct{} `locationName:"OperationRequest" type:"structure" xmlURI:"https://foo/"` - - First *bool `type:"boolean"` - - Fourth *int64 `type:"integer"` - - Second *bool `type:"boolean"` - - Third *float64 `type:"float"` -} - -// SetFirst sets the First field's value. -func (s *InputService2TestShapeInputService2TestCaseOperation1Input) SetFirst(v bool) *InputService2TestShapeInputService2TestCaseOperation1Input { - s.First = &v - return s -} - -// SetFourth sets the Fourth field's value. -func (s *InputService2TestShapeInputService2TestCaseOperation1Input) SetFourth(v int64) *InputService2TestShapeInputService2TestCaseOperation1Input { - s.Fourth = &v - return s -} - -// SetSecond sets the Second field's value. -func (s *InputService2TestShapeInputService2TestCaseOperation1Input) SetSecond(v bool) *InputService2TestShapeInputService2TestCaseOperation1Input { - s.Second = &v - return s -} - -// SetThird sets the Third field's value. -func (s *InputService2TestShapeInputService2TestCaseOperation1Input) SetThird(v float64) *InputService2TestShapeInputService2TestCaseOperation1Input { - s.Third = &v - return s -} - -type InputService2TestShapeInputService2TestCaseOperation1Output struct { - _ struct{} `type:"structure"` -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type InputService3ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the InputService3ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a InputService3ProtocolTest client from just a session. -// svc := inputservice3protocoltest.New(mySession) -// -// // Create a InputService3ProtocolTest client with additional configuration -// svc := inputservice3protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewInputService3ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService3ProtocolTest { - c := p.ClientConfig("inputservice3protocoltest", cfgs...) - return newInputService3ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newInputService3ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService3ProtocolTest { - svc := &InputService3ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "inputservice3protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-01-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restxml.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a InputService3ProtocolTest operation and runs any -// custom request initialization. -func (c *InputService3ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opInputService3TestCaseOperation1 = "OperationName" - -// InputService3TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the InputService3TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService3TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService3TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService3TestCaseOperation1Request method. -// req, resp := client.InputService3TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService3ProtocolTest) InputService3TestCaseOperation1Request(input *InputService3TestShapeInputService3TestCaseOperation2Input) (req *request.Request, output *InputService3TestShapeInputService3TestCaseOperation1Output) { - op := &request.Operation{ - Name: opInputService3TestCaseOperation1, - HTTPMethod: "POST", - HTTPPath: "/2014-01-01/hostedzone", - } - - if input == nil { - input = &InputService3TestShapeInputService3TestCaseOperation2Input{} - } - - output = &InputService3TestShapeInputService3TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService3TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService3TestCaseOperation1 for usage and error information. -func (c *InputService3ProtocolTest) InputService3TestCaseOperation1(input *InputService3TestShapeInputService3TestCaseOperation2Input) (*InputService3TestShapeInputService3TestCaseOperation1Output, error) { - req, out := c.InputService3TestCaseOperation1Request(input) - return out, req.Send() -} - -// InputService3TestCaseOperation1WithContext is the same as InputService3TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService3TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService3ProtocolTest) InputService3TestCaseOperation1WithContext(ctx aws.Context, input *InputService3TestShapeInputService3TestCaseOperation2Input, opts ...request.Option) (*InputService3TestShapeInputService3TestCaseOperation1Output, error) { - req, out := c.InputService3TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opInputService3TestCaseOperation2 = "OperationName" - -// InputService3TestCaseOperation2Request generates a "aws/request.Request" representing the -// client's request for the InputService3TestCaseOperation2 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService3TestCaseOperation2 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService3TestCaseOperation2 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService3TestCaseOperation2Request method. -// req, resp := client.InputService3TestCaseOperation2Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService3ProtocolTest) InputService3TestCaseOperation2Request(input *InputService3TestShapeInputService3TestCaseOperation2Input) (req *request.Request, output *InputService3TestShapeInputService3TestCaseOperation2Output) { - op := &request.Operation{ - Name: opInputService3TestCaseOperation2, - HTTPMethod: "POST", - HTTPPath: "/2014-01-01/hostedzone", - } - - if input == nil { - input = &InputService3TestShapeInputService3TestCaseOperation2Input{} - } - - output = &InputService3TestShapeInputService3TestCaseOperation2Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService3TestCaseOperation2 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService3TestCaseOperation2 for usage and error information. -func (c *InputService3ProtocolTest) InputService3TestCaseOperation2(input *InputService3TestShapeInputService3TestCaseOperation2Input) (*InputService3TestShapeInputService3TestCaseOperation2Output, error) { - req, out := c.InputService3TestCaseOperation2Request(input) - return out, req.Send() -} - -// InputService3TestCaseOperation2WithContext is the same as InputService3TestCaseOperation2 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService3TestCaseOperation2 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService3ProtocolTest) InputService3TestCaseOperation2WithContext(ctx aws.Context, input *InputService3TestShapeInputService3TestCaseOperation2Input, opts ...request.Option) (*InputService3TestShapeInputService3TestCaseOperation2Output, error) { - req, out := c.InputService3TestCaseOperation2Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type InputService3TestShapeInputService3TestCaseOperation1Output struct { - _ struct{} `type:"structure"` -} - -type InputService3TestShapeInputService3TestCaseOperation2Input struct { - _ struct{} `locationName:"OperationRequest" type:"structure" xmlURI:"https://foo/"` - - Description *string `type:"string"` - - SubStructure *InputService3TestShapeSubStructure `type:"structure"` -} - -// SetDescription sets the Description field's value. -func (s *InputService3TestShapeInputService3TestCaseOperation2Input) SetDescription(v string) *InputService3TestShapeInputService3TestCaseOperation2Input { - s.Description = &v - return s -} - -// SetSubStructure sets the SubStructure field's value. -func (s *InputService3TestShapeInputService3TestCaseOperation2Input) SetSubStructure(v *InputService3TestShapeSubStructure) *InputService3TestShapeInputService3TestCaseOperation2Input { - s.SubStructure = v - return s -} - -type InputService3TestShapeInputService3TestCaseOperation2Output struct { - _ struct{} `type:"structure"` -} - -type InputService3TestShapeSubStructure struct { - _ struct{} `type:"structure"` - - Bar *string `type:"string"` - - Foo *string `type:"string"` -} - -// SetBar sets the Bar field's value. -func (s *InputService3TestShapeSubStructure) SetBar(v string) *InputService3TestShapeSubStructure { - s.Bar = &v - return s -} - -// SetFoo sets the Foo field's value. -func (s *InputService3TestShapeSubStructure) SetFoo(v string) *InputService3TestShapeSubStructure { - s.Foo = &v - return s -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type InputService4ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the InputService4ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a InputService4ProtocolTest client from just a session. -// svc := inputservice4protocoltest.New(mySession) -// -// // Create a InputService4ProtocolTest client with additional configuration -// svc := inputservice4protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewInputService4ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService4ProtocolTest { - c := p.ClientConfig("inputservice4protocoltest", cfgs...) - return newInputService4ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newInputService4ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService4ProtocolTest { - svc := &InputService4ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "inputservice4protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-01-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restxml.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a InputService4ProtocolTest operation and runs any -// custom request initialization. -func (c *InputService4ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opInputService4TestCaseOperation1 = "OperationName" - -// InputService4TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the InputService4TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService4TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService4TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService4TestCaseOperation1Request method. -// req, resp := client.InputService4TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService4ProtocolTest) InputService4TestCaseOperation1Request(input *InputService4TestShapeInputService4TestCaseOperation1Input) (req *request.Request, output *InputService4TestShapeInputService4TestCaseOperation1Output) { - op := &request.Operation{ - Name: opInputService4TestCaseOperation1, - HTTPMethod: "POST", - HTTPPath: "/2014-01-01/hostedzone", - } - - if input == nil { - input = &InputService4TestShapeInputService4TestCaseOperation1Input{} - } - - output = &InputService4TestShapeInputService4TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService4TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService4TestCaseOperation1 for usage and error information. -func (c *InputService4ProtocolTest) InputService4TestCaseOperation1(input *InputService4TestShapeInputService4TestCaseOperation1Input) (*InputService4TestShapeInputService4TestCaseOperation1Output, error) { - req, out := c.InputService4TestCaseOperation1Request(input) - return out, req.Send() -} - -// InputService4TestCaseOperation1WithContext is the same as InputService4TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService4TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService4ProtocolTest) InputService4TestCaseOperation1WithContext(ctx aws.Context, input *InputService4TestShapeInputService4TestCaseOperation1Input, opts ...request.Option) (*InputService4TestShapeInputService4TestCaseOperation1Output, error) { - req, out := c.InputService4TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type InputService4TestShapeInputService4TestCaseOperation1Input struct { - _ struct{} `locationName:"OperationRequest" type:"structure" xmlURI:"https://foo/"` - - Description *string `type:"string"` - - SubStructure *InputService4TestShapeSubStructure `type:"structure"` -} - -// SetDescription sets the Description field's value. -func (s *InputService4TestShapeInputService4TestCaseOperation1Input) SetDescription(v string) *InputService4TestShapeInputService4TestCaseOperation1Input { - s.Description = &v - return s -} - -// SetSubStructure sets the SubStructure field's value. -func (s *InputService4TestShapeInputService4TestCaseOperation1Input) SetSubStructure(v *InputService4TestShapeSubStructure) *InputService4TestShapeInputService4TestCaseOperation1Input { - s.SubStructure = v - return s -} - -type InputService4TestShapeInputService4TestCaseOperation1Output struct { - _ struct{} `type:"structure"` -} - -type InputService4TestShapeSubStructure struct { - _ struct{} `type:"structure"` - - Bar *string `type:"string"` - - Foo *string `type:"string"` -} - -// SetBar sets the Bar field's value. -func (s *InputService4TestShapeSubStructure) SetBar(v string) *InputService4TestShapeSubStructure { - s.Bar = &v - return s -} - -// SetFoo sets the Foo field's value. -func (s *InputService4TestShapeSubStructure) SetFoo(v string) *InputService4TestShapeSubStructure { - s.Foo = &v - return s -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type InputService5ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the InputService5ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a InputService5ProtocolTest client from just a session. -// svc := inputservice5protocoltest.New(mySession) -// -// // Create a InputService5ProtocolTest client with additional configuration -// svc := inputservice5protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewInputService5ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService5ProtocolTest { - c := p.ClientConfig("inputservice5protocoltest", cfgs...) - return newInputService5ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newInputService5ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService5ProtocolTest { - svc := &InputService5ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "inputservice5protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-01-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restxml.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a InputService5ProtocolTest operation and runs any -// custom request initialization. -func (c *InputService5ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opInputService5TestCaseOperation1 = "OperationName" - -// InputService5TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the InputService5TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService5TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService5TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService5TestCaseOperation1Request method. -// req, resp := client.InputService5TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService5ProtocolTest) InputService5TestCaseOperation1Request(input *InputService5TestShapeInputService5TestCaseOperation1Input) (req *request.Request, output *InputService5TestShapeInputService5TestCaseOperation1Output) { - op := &request.Operation{ - Name: opInputService5TestCaseOperation1, - HTTPMethod: "POST", - HTTPPath: "/2014-01-01/hostedzone", - } - - if input == nil { - input = &InputService5TestShapeInputService5TestCaseOperation1Input{} - } - - output = &InputService5TestShapeInputService5TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService5TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService5TestCaseOperation1 for usage and error information. -func (c *InputService5ProtocolTest) InputService5TestCaseOperation1(input *InputService5TestShapeInputService5TestCaseOperation1Input) (*InputService5TestShapeInputService5TestCaseOperation1Output, error) { - req, out := c.InputService5TestCaseOperation1Request(input) - return out, req.Send() -} - -// InputService5TestCaseOperation1WithContext is the same as InputService5TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService5TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService5ProtocolTest) InputService5TestCaseOperation1WithContext(ctx aws.Context, input *InputService5TestShapeInputService5TestCaseOperation1Input, opts ...request.Option) (*InputService5TestShapeInputService5TestCaseOperation1Output, error) { - req, out := c.InputService5TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type InputService5TestShapeInputService5TestCaseOperation1Input struct { - _ struct{} `locationName:"OperationRequest" type:"structure" xmlURI:"https://foo/"` - - ListParam []*string `type:"list"` -} - -// SetListParam sets the ListParam field's value. -func (s *InputService5TestShapeInputService5TestCaseOperation1Input) SetListParam(v []*string) *InputService5TestShapeInputService5TestCaseOperation1Input { - s.ListParam = v - return s -} - -type InputService5TestShapeInputService5TestCaseOperation1Output struct { - _ struct{} `type:"structure"` -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type InputService6ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the InputService6ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a InputService6ProtocolTest client from just a session. -// svc := inputservice6protocoltest.New(mySession) -// -// // Create a InputService6ProtocolTest client with additional configuration -// svc := inputservice6protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewInputService6ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService6ProtocolTest { - c := p.ClientConfig("inputservice6protocoltest", cfgs...) - return newInputService6ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newInputService6ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService6ProtocolTest { - svc := &InputService6ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "inputservice6protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-01-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restxml.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a InputService6ProtocolTest operation and runs any -// custom request initialization. -func (c *InputService6ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opInputService6TestCaseOperation1 = "OperationName" - -// InputService6TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the InputService6TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService6TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService6TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService6TestCaseOperation1Request method. -// req, resp := client.InputService6TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService6ProtocolTest) InputService6TestCaseOperation1Request(input *InputService6TestShapeInputService6TestCaseOperation1Input) (req *request.Request, output *InputService6TestShapeInputService6TestCaseOperation1Output) { - op := &request.Operation{ - Name: opInputService6TestCaseOperation1, - HTTPMethod: "POST", - HTTPPath: "/2014-01-01/hostedzone", - } - - if input == nil { - input = &InputService6TestShapeInputService6TestCaseOperation1Input{} - } - - output = &InputService6TestShapeInputService6TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService6TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService6TestCaseOperation1 for usage and error information. -func (c *InputService6ProtocolTest) InputService6TestCaseOperation1(input *InputService6TestShapeInputService6TestCaseOperation1Input) (*InputService6TestShapeInputService6TestCaseOperation1Output, error) { - req, out := c.InputService6TestCaseOperation1Request(input) - return out, req.Send() -} - -// InputService6TestCaseOperation1WithContext is the same as InputService6TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService6TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService6ProtocolTest) InputService6TestCaseOperation1WithContext(ctx aws.Context, input *InputService6TestShapeInputService6TestCaseOperation1Input, opts ...request.Option) (*InputService6TestShapeInputService6TestCaseOperation1Output, error) { - req, out := c.InputService6TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type InputService6TestShapeInputService6TestCaseOperation1Input struct { - _ struct{} `locationName:"OperationRequest" type:"structure" xmlURI:"https://foo/"` - - ListParam []*string `locationName:"AlternateName" locationNameList:"NotMember" type:"list"` -} - -// SetListParam sets the ListParam field's value. -func (s *InputService6TestShapeInputService6TestCaseOperation1Input) SetListParam(v []*string) *InputService6TestShapeInputService6TestCaseOperation1Input { - s.ListParam = v - return s -} - -type InputService6TestShapeInputService6TestCaseOperation1Output struct { - _ struct{} `type:"structure"` -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type InputService7ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the InputService7ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a InputService7ProtocolTest client from just a session. -// svc := inputservice7protocoltest.New(mySession) -// -// // Create a InputService7ProtocolTest client with additional configuration -// svc := inputservice7protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewInputService7ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService7ProtocolTest { - c := p.ClientConfig("inputservice7protocoltest", cfgs...) - return newInputService7ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newInputService7ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService7ProtocolTest { - svc := &InputService7ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "inputservice7protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-01-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restxml.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a InputService7ProtocolTest operation and runs any -// custom request initialization. -func (c *InputService7ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opInputService7TestCaseOperation1 = "OperationName" - -// InputService7TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the InputService7TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService7TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService7TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService7TestCaseOperation1Request method. -// req, resp := client.InputService7TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService7ProtocolTest) InputService7TestCaseOperation1Request(input *InputService7TestShapeInputService7TestCaseOperation1Input) (req *request.Request, output *InputService7TestShapeInputService7TestCaseOperation1Output) { - op := &request.Operation{ - Name: opInputService7TestCaseOperation1, - HTTPMethod: "POST", - HTTPPath: "/2014-01-01/hostedzone", - } - - if input == nil { - input = &InputService7TestShapeInputService7TestCaseOperation1Input{} - } - - output = &InputService7TestShapeInputService7TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService7TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService7TestCaseOperation1 for usage and error information. -func (c *InputService7ProtocolTest) InputService7TestCaseOperation1(input *InputService7TestShapeInputService7TestCaseOperation1Input) (*InputService7TestShapeInputService7TestCaseOperation1Output, error) { - req, out := c.InputService7TestCaseOperation1Request(input) - return out, req.Send() -} - -// InputService7TestCaseOperation1WithContext is the same as InputService7TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService7TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService7ProtocolTest) InputService7TestCaseOperation1WithContext(ctx aws.Context, input *InputService7TestShapeInputService7TestCaseOperation1Input, opts ...request.Option) (*InputService7TestShapeInputService7TestCaseOperation1Output, error) { - req, out := c.InputService7TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type InputService7TestShapeInputService7TestCaseOperation1Input struct { - _ struct{} `locationName:"OperationRequest" type:"structure" xmlURI:"https://foo/"` - - ListParam []*string `type:"list" flattened:"true"` -} - -// SetListParam sets the ListParam field's value. -func (s *InputService7TestShapeInputService7TestCaseOperation1Input) SetListParam(v []*string) *InputService7TestShapeInputService7TestCaseOperation1Input { - s.ListParam = v - return s -} - -type InputService7TestShapeInputService7TestCaseOperation1Output struct { - _ struct{} `type:"structure"` -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type InputService8ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the InputService8ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a InputService8ProtocolTest client from just a session. -// svc := inputservice8protocoltest.New(mySession) -// -// // Create a InputService8ProtocolTest client with additional configuration -// svc := inputservice8protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewInputService8ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService8ProtocolTest { - c := p.ClientConfig("inputservice8protocoltest", cfgs...) - return newInputService8ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newInputService8ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService8ProtocolTest { - svc := &InputService8ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "inputservice8protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-01-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restxml.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a InputService8ProtocolTest operation and runs any -// custom request initialization. -func (c *InputService8ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opInputService8TestCaseOperation1 = "OperationName" - -// InputService8TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the InputService8TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService8TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService8TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService8TestCaseOperation1Request method. -// req, resp := client.InputService8TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService8ProtocolTest) InputService8TestCaseOperation1Request(input *InputService8TestShapeInputService8TestCaseOperation1Input) (req *request.Request, output *InputService8TestShapeInputService8TestCaseOperation1Output) { - op := &request.Operation{ - Name: opInputService8TestCaseOperation1, - HTTPMethod: "POST", - HTTPPath: "/2014-01-01/hostedzone", - } - - if input == nil { - input = &InputService8TestShapeInputService8TestCaseOperation1Input{} - } - - output = &InputService8TestShapeInputService8TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService8TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService8TestCaseOperation1 for usage and error information. -func (c *InputService8ProtocolTest) InputService8TestCaseOperation1(input *InputService8TestShapeInputService8TestCaseOperation1Input) (*InputService8TestShapeInputService8TestCaseOperation1Output, error) { - req, out := c.InputService8TestCaseOperation1Request(input) - return out, req.Send() -} - -// InputService8TestCaseOperation1WithContext is the same as InputService8TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService8TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService8ProtocolTest) InputService8TestCaseOperation1WithContext(ctx aws.Context, input *InputService8TestShapeInputService8TestCaseOperation1Input, opts ...request.Option) (*InputService8TestShapeInputService8TestCaseOperation1Output, error) { - req, out := c.InputService8TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type InputService8TestShapeInputService8TestCaseOperation1Input struct { - _ struct{} `locationName:"OperationRequest" type:"structure" xmlURI:"https://foo/"` - - ListParam []*string `locationName:"item" type:"list" flattened:"true"` -} - -// SetListParam sets the ListParam field's value. -func (s *InputService8TestShapeInputService8TestCaseOperation1Input) SetListParam(v []*string) *InputService8TestShapeInputService8TestCaseOperation1Input { - s.ListParam = v - return s -} - -type InputService8TestShapeInputService8TestCaseOperation1Output struct { - _ struct{} `type:"structure"` -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type InputService9ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the InputService9ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a InputService9ProtocolTest client from just a session. -// svc := inputservice9protocoltest.New(mySession) -// -// // Create a InputService9ProtocolTest client with additional configuration -// svc := inputservice9protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewInputService9ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService9ProtocolTest { - c := p.ClientConfig("inputservice9protocoltest", cfgs...) - return newInputService9ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newInputService9ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService9ProtocolTest { - svc := &InputService9ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "inputservice9protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-01-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restxml.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a InputService9ProtocolTest operation and runs any -// custom request initialization. -func (c *InputService9ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opInputService9TestCaseOperation1 = "OperationName" - -// InputService9TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the InputService9TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService9TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService9TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService9TestCaseOperation1Request method. -// req, resp := client.InputService9TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService9ProtocolTest) InputService9TestCaseOperation1Request(input *InputService9TestShapeInputService9TestCaseOperation1Input) (req *request.Request, output *InputService9TestShapeInputService9TestCaseOperation1Output) { - op := &request.Operation{ - Name: opInputService9TestCaseOperation1, - HTTPMethod: "POST", - HTTPPath: "/2014-01-01/hostedzone", - } - - if input == nil { - input = &InputService9TestShapeInputService9TestCaseOperation1Input{} - } - - output = &InputService9TestShapeInputService9TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService9TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService9TestCaseOperation1 for usage and error information. -func (c *InputService9ProtocolTest) InputService9TestCaseOperation1(input *InputService9TestShapeInputService9TestCaseOperation1Input) (*InputService9TestShapeInputService9TestCaseOperation1Output, error) { - req, out := c.InputService9TestCaseOperation1Request(input) - return out, req.Send() -} - -// InputService9TestCaseOperation1WithContext is the same as InputService9TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService9TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService9ProtocolTest) InputService9TestCaseOperation1WithContext(ctx aws.Context, input *InputService9TestShapeInputService9TestCaseOperation1Input, opts ...request.Option) (*InputService9TestShapeInputService9TestCaseOperation1Output, error) { - req, out := c.InputService9TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type InputService9TestShapeInputService9TestCaseOperation1Input struct { - _ struct{} `locationName:"OperationRequest" type:"structure" xmlURI:"https://foo/"` - - ListParam []*InputService9TestShapeSingleFieldStruct `locationName:"item" type:"list" flattened:"true"` -} - -// SetListParam sets the ListParam field's value. -func (s *InputService9TestShapeInputService9TestCaseOperation1Input) SetListParam(v []*InputService9TestShapeSingleFieldStruct) *InputService9TestShapeInputService9TestCaseOperation1Input { - s.ListParam = v - return s -} - -type InputService9TestShapeInputService9TestCaseOperation1Output struct { - _ struct{} `type:"structure"` -} - -type InputService9TestShapeSingleFieldStruct struct { - _ struct{} `type:"structure"` - - Element *string `locationName:"value" type:"string"` -} - -// SetElement sets the Element field's value. -func (s *InputService9TestShapeSingleFieldStruct) SetElement(v string) *InputService9TestShapeSingleFieldStruct { - s.Element = &v - return s -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type InputService10ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the InputService10ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a InputService10ProtocolTest client from just a session. -// svc := inputservice10protocoltest.New(mySession) -// -// // Create a InputService10ProtocolTest client with additional configuration -// svc := inputservice10protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewInputService10ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService10ProtocolTest { - c := p.ClientConfig("inputservice10protocoltest", cfgs...) - return newInputService10ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newInputService10ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService10ProtocolTest { - svc := &InputService10ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "inputservice10protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-01-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restxml.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a InputService10ProtocolTest operation and runs any -// custom request initialization. -func (c *InputService10ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opInputService10TestCaseOperation1 = "OperationName" - -// InputService10TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the InputService10TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService10TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService10TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService10TestCaseOperation1Request method. -// req, resp := client.InputService10TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService10ProtocolTest) InputService10TestCaseOperation1Request(input *InputService10TestShapeInputService10TestCaseOperation1Input) (req *request.Request, output *InputService10TestShapeInputService10TestCaseOperation1Output) { - op := &request.Operation{ - Name: opInputService10TestCaseOperation1, - HTTPMethod: "POST", - HTTPPath: "/2014-01-01/hostedzone", - } - - if input == nil { - input = &InputService10TestShapeInputService10TestCaseOperation1Input{} - } - - output = &InputService10TestShapeInputService10TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService10TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService10TestCaseOperation1 for usage and error information. -func (c *InputService10ProtocolTest) InputService10TestCaseOperation1(input *InputService10TestShapeInputService10TestCaseOperation1Input) (*InputService10TestShapeInputService10TestCaseOperation1Output, error) { - req, out := c.InputService10TestCaseOperation1Request(input) - return out, req.Send() -} - -// InputService10TestCaseOperation1WithContext is the same as InputService10TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService10TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService10ProtocolTest) InputService10TestCaseOperation1WithContext(ctx aws.Context, input *InputService10TestShapeInputService10TestCaseOperation1Input, opts ...request.Option) (*InputService10TestShapeInputService10TestCaseOperation1Output, error) { - req, out := c.InputService10TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type InputService10TestShapeInputService10TestCaseOperation1Input struct { - _ struct{} `locationName:"OperationRequest" type:"structure" xmlURI:"https://foo/"` - - StructureParam *InputService10TestShapeStructureShape `type:"structure"` -} - -// SetStructureParam sets the StructureParam field's value. -func (s *InputService10TestShapeInputService10TestCaseOperation1Input) SetStructureParam(v *InputService10TestShapeStructureShape) *InputService10TestShapeInputService10TestCaseOperation1Input { - s.StructureParam = v - return s -} - -type InputService10TestShapeInputService10TestCaseOperation1Output struct { - _ struct{} `type:"structure"` -} - -type InputService10TestShapeStructureShape struct { - _ struct{} `type:"structure"` - - // B is automatically base64 encoded/decoded by the SDK. - B []byte `locationName:"b" type:"blob"` - - T *time.Time `locationName:"t" type:"timestamp" timestampFormat:"iso8601"` -} - -// SetB sets the B field's value. -func (s *InputService10TestShapeStructureShape) SetB(v []byte) *InputService10TestShapeStructureShape { - s.B = v - return s -} - -// SetT sets the T field's value. -func (s *InputService10TestShapeStructureShape) SetT(v time.Time) *InputService10TestShapeStructureShape { - s.T = &v - return s -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type InputService11ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the InputService11ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a InputService11ProtocolTest client from just a session. -// svc := inputservice11protocoltest.New(mySession) -// -// // Create a InputService11ProtocolTest client with additional configuration -// svc := inputservice11protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewInputService11ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService11ProtocolTest { - c := p.ClientConfig("inputservice11protocoltest", cfgs...) - return newInputService11ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newInputService11ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService11ProtocolTest { - svc := &InputService11ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "inputservice11protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-01-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restxml.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a InputService11ProtocolTest operation and runs any -// custom request initialization. -func (c *InputService11ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opInputService11TestCaseOperation1 = "OperationName" - -// InputService11TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the InputService11TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService11TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService11TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService11TestCaseOperation1Request method. -// req, resp := client.InputService11TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService11ProtocolTest) InputService11TestCaseOperation1Request(input *InputService11TestShapeInputService11TestCaseOperation1Input) (req *request.Request, output *InputService11TestShapeInputService11TestCaseOperation1Output) { - op := &request.Operation{ - Name: opInputService11TestCaseOperation1, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &InputService11TestShapeInputService11TestCaseOperation1Input{} - } - - output = &InputService11TestShapeInputService11TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService11TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService11TestCaseOperation1 for usage and error information. -func (c *InputService11ProtocolTest) InputService11TestCaseOperation1(input *InputService11TestShapeInputService11TestCaseOperation1Input) (*InputService11TestShapeInputService11TestCaseOperation1Output, error) { - req, out := c.InputService11TestCaseOperation1Request(input) - return out, req.Send() -} - -// InputService11TestCaseOperation1WithContext is the same as InputService11TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService11TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService11ProtocolTest) InputService11TestCaseOperation1WithContext(ctx aws.Context, input *InputService11TestShapeInputService11TestCaseOperation1Input, opts ...request.Option) (*InputService11TestShapeInputService11TestCaseOperation1Output, error) { - req, out := c.InputService11TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type InputService11TestShapeInputService11TestCaseOperation1Input struct { - _ struct{} `locationName:"OperationRequest" type:"structure" xmlURI:"https://foo/"` - - Foo map[string]*string `location:"headers" locationName:"x-foo-" type:"map"` -} - -// SetFoo sets the Foo field's value. -func (s *InputService11TestShapeInputService11TestCaseOperation1Input) SetFoo(v map[string]*string) *InputService11TestShapeInputService11TestCaseOperation1Input { - s.Foo = v - return s -} - -type InputService11TestShapeInputService11TestCaseOperation1Output struct { - _ struct{} `type:"structure"` -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type InputService12ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the InputService12ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a InputService12ProtocolTest client from just a session. -// svc := inputservice12protocoltest.New(mySession) -// -// // Create a InputService12ProtocolTest client with additional configuration -// svc := inputservice12protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewInputService12ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService12ProtocolTest { - c := p.ClientConfig("inputservice12protocoltest", cfgs...) - return newInputService12ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newInputService12ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService12ProtocolTest { - svc := &InputService12ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "inputservice12protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-01-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restxml.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a InputService12ProtocolTest operation and runs any -// custom request initialization. -func (c *InputService12ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opInputService12TestCaseOperation1 = "OperationName" - -// InputService12TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the InputService12TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService12TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService12TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService12TestCaseOperation1Request method. -// req, resp := client.InputService12TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService12ProtocolTest) InputService12TestCaseOperation1Request(input *InputService12TestShapeInputService12TestCaseOperation1Input) (req *request.Request, output *InputService12TestShapeInputService12TestCaseOperation1Output) { - op := &request.Operation{ - Name: opInputService12TestCaseOperation1, - HTTPMethod: "GET", - HTTPPath: "/path", - } - - if input == nil { - input = &InputService12TestShapeInputService12TestCaseOperation1Input{} - } - - output = &InputService12TestShapeInputService12TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService12TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService12TestCaseOperation1 for usage and error information. -func (c *InputService12ProtocolTest) InputService12TestCaseOperation1(input *InputService12TestShapeInputService12TestCaseOperation1Input) (*InputService12TestShapeInputService12TestCaseOperation1Output, error) { - req, out := c.InputService12TestCaseOperation1Request(input) - return out, req.Send() -} - -// InputService12TestCaseOperation1WithContext is the same as InputService12TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService12TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService12ProtocolTest) InputService12TestCaseOperation1WithContext(ctx aws.Context, input *InputService12TestShapeInputService12TestCaseOperation1Input, opts ...request.Option) (*InputService12TestShapeInputService12TestCaseOperation1Output, error) { - req, out := c.InputService12TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type InputService12TestShapeInputService12TestCaseOperation1Input struct { - _ struct{} `type:"structure"` - - Items []*string `location:"querystring" locationName:"item" type:"list"` -} - -// SetItems sets the Items field's value. -func (s *InputService12TestShapeInputService12TestCaseOperation1Input) SetItems(v []*string) *InputService12TestShapeInputService12TestCaseOperation1Input { - s.Items = v - return s -} - -type InputService12TestShapeInputService12TestCaseOperation1Output struct { - _ struct{} `type:"structure"` -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type InputService13ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the InputService13ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a InputService13ProtocolTest client from just a session. -// svc := inputservice13protocoltest.New(mySession) -// -// // Create a InputService13ProtocolTest client with additional configuration -// svc := inputservice13protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewInputService13ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService13ProtocolTest { - c := p.ClientConfig("inputservice13protocoltest", cfgs...) - return newInputService13ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newInputService13ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService13ProtocolTest { - svc := &InputService13ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "inputservice13protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-01-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restxml.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a InputService13ProtocolTest operation and runs any -// custom request initialization. -func (c *InputService13ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opInputService13TestCaseOperation1 = "OperationName" - -// InputService13TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the InputService13TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService13TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService13TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService13TestCaseOperation1Request method. -// req, resp := client.InputService13TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService13ProtocolTest) InputService13TestCaseOperation1Request(input *InputService13TestShapeInputService13TestCaseOperation1Input) (req *request.Request, output *InputService13TestShapeInputService13TestCaseOperation1Output) { - op := &request.Operation{ - Name: opInputService13TestCaseOperation1, - HTTPMethod: "GET", - HTTPPath: "/2014-01-01/jobsByPipeline/{PipelineId}", - } - - if input == nil { - input = &InputService13TestShapeInputService13TestCaseOperation1Input{} - } - - output = &InputService13TestShapeInputService13TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService13TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService13TestCaseOperation1 for usage and error information. -func (c *InputService13ProtocolTest) InputService13TestCaseOperation1(input *InputService13TestShapeInputService13TestCaseOperation1Input) (*InputService13TestShapeInputService13TestCaseOperation1Output, error) { - req, out := c.InputService13TestCaseOperation1Request(input) - return out, req.Send() -} - -// InputService13TestCaseOperation1WithContext is the same as InputService13TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService13TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService13ProtocolTest) InputService13TestCaseOperation1WithContext(ctx aws.Context, input *InputService13TestShapeInputService13TestCaseOperation1Input, opts ...request.Option) (*InputService13TestShapeInputService13TestCaseOperation1Output, error) { - req, out := c.InputService13TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type InputService13TestShapeInputService13TestCaseOperation1Input struct { - _ struct{} `type:"structure"` - - PipelineId *string `location:"uri" type:"string"` - - QueryDoc map[string]*string `location:"querystring" type:"map"` -} - -// SetPipelineId sets the PipelineId field's value. -func (s *InputService13TestShapeInputService13TestCaseOperation1Input) SetPipelineId(v string) *InputService13TestShapeInputService13TestCaseOperation1Input { - s.PipelineId = &v - return s -} - -// SetQueryDoc sets the QueryDoc field's value. -func (s *InputService13TestShapeInputService13TestCaseOperation1Input) SetQueryDoc(v map[string]*string) *InputService13TestShapeInputService13TestCaseOperation1Input { - s.QueryDoc = v - return s -} - -type InputService13TestShapeInputService13TestCaseOperation1Output struct { - _ struct{} `type:"structure"` -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type InputService14ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the InputService14ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a InputService14ProtocolTest client from just a session. -// svc := inputservice14protocoltest.New(mySession) -// -// // Create a InputService14ProtocolTest client with additional configuration -// svc := inputservice14protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewInputService14ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService14ProtocolTest { - c := p.ClientConfig("inputservice14protocoltest", cfgs...) - return newInputService14ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newInputService14ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService14ProtocolTest { - svc := &InputService14ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "inputservice14protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-01-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restxml.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a InputService14ProtocolTest operation and runs any -// custom request initialization. -func (c *InputService14ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opInputService14TestCaseOperation1 = "OperationName" - -// InputService14TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the InputService14TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService14TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService14TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService14TestCaseOperation1Request method. -// req, resp := client.InputService14TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService14ProtocolTest) InputService14TestCaseOperation1Request(input *InputService14TestShapeInputService14TestCaseOperation1Input) (req *request.Request, output *InputService14TestShapeInputService14TestCaseOperation1Output) { - op := &request.Operation{ - Name: opInputService14TestCaseOperation1, - HTTPMethod: "GET", - HTTPPath: "/2014-01-01/jobsByPipeline/{PipelineId}", - } - - if input == nil { - input = &InputService14TestShapeInputService14TestCaseOperation1Input{} - } - - output = &InputService14TestShapeInputService14TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService14TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService14TestCaseOperation1 for usage and error information. -func (c *InputService14ProtocolTest) InputService14TestCaseOperation1(input *InputService14TestShapeInputService14TestCaseOperation1Input) (*InputService14TestShapeInputService14TestCaseOperation1Output, error) { - req, out := c.InputService14TestCaseOperation1Request(input) - return out, req.Send() -} - -// InputService14TestCaseOperation1WithContext is the same as InputService14TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService14TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService14ProtocolTest) InputService14TestCaseOperation1WithContext(ctx aws.Context, input *InputService14TestShapeInputService14TestCaseOperation1Input, opts ...request.Option) (*InputService14TestShapeInputService14TestCaseOperation1Output, error) { - req, out := c.InputService14TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type InputService14TestShapeInputService14TestCaseOperation1Input struct { - _ struct{} `type:"structure"` - - PipelineId *string `location:"uri" type:"string"` - - QueryDoc map[string][]*string `location:"querystring" type:"map"` -} - -// SetPipelineId sets the PipelineId field's value. -func (s *InputService14TestShapeInputService14TestCaseOperation1Input) SetPipelineId(v string) *InputService14TestShapeInputService14TestCaseOperation1Input { - s.PipelineId = &v - return s -} - -// SetQueryDoc sets the QueryDoc field's value. -func (s *InputService14TestShapeInputService14TestCaseOperation1Input) SetQueryDoc(v map[string][]*string) *InputService14TestShapeInputService14TestCaseOperation1Input { - s.QueryDoc = v - return s -} - -type InputService14TestShapeInputService14TestCaseOperation1Output struct { - _ struct{} `type:"structure"` -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type InputService15ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the InputService15ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a InputService15ProtocolTest client from just a session. -// svc := inputservice15protocoltest.New(mySession) -// -// // Create a InputService15ProtocolTest client with additional configuration -// svc := inputservice15protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewInputService15ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService15ProtocolTest { - c := p.ClientConfig("inputservice15protocoltest", cfgs...) - return newInputService15ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newInputService15ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService15ProtocolTest { - svc := &InputService15ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "inputservice15protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-01-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restxml.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a InputService15ProtocolTest operation and runs any -// custom request initialization. -func (c *InputService15ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opInputService15TestCaseOperation1 = "OperationName" - -// InputService15TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the InputService15TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService15TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService15TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService15TestCaseOperation1Request method. -// req, resp := client.InputService15TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService15ProtocolTest) InputService15TestCaseOperation1Request(input *InputService15TestShapeInputService15TestCaseOperation2Input) (req *request.Request, output *InputService15TestShapeInputService15TestCaseOperation1Output) { - op := &request.Operation{ - Name: opInputService15TestCaseOperation1, - HTTPMethod: "GET", - HTTPPath: "/path", - } - - if input == nil { - input = &InputService15TestShapeInputService15TestCaseOperation2Input{} - } - - output = &InputService15TestShapeInputService15TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService15TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService15TestCaseOperation1 for usage and error information. -func (c *InputService15ProtocolTest) InputService15TestCaseOperation1(input *InputService15TestShapeInputService15TestCaseOperation2Input) (*InputService15TestShapeInputService15TestCaseOperation1Output, error) { - req, out := c.InputService15TestCaseOperation1Request(input) - return out, req.Send() -} - -// InputService15TestCaseOperation1WithContext is the same as InputService15TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService15TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService15ProtocolTest) InputService15TestCaseOperation1WithContext(ctx aws.Context, input *InputService15TestShapeInputService15TestCaseOperation2Input, opts ...request.Option) (*InputService15TestShapeInputService15TestCaseOperation1Output, error) { - req, out := c.InputService15TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opInputService15TestCaseOperation2 = "OperationName" - -// InputService15TestCaseOperation2Request generates a "aws/request.Request" representing the -// client's request for the InputService15TestCaseOperation2 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService15TestCaseOperation2 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService15TestCaseOperation2 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService15TestCaseOperation2Request method. -// req, resp := client.InputService15TestCaseOperation2Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService15ProtocolTest) InputService15TestCaseOperation2Request(input *InputService15TestShapeInputService15TestCaseOperation2Input) (req *request.Request, output *InputService15TestShapeInputService15TestCaseOperation2Output) { - op := &request.Operation{ - Name: opInputService15TestCaseOperation2, - HTTPMethod: "GET", - HTTPPath: "/path", - } - - if input == nil { - input = &InputService15TestShapeInputService15TestCaseOperation2Input{} - } - - output = &InputService15TestShapeInputService15TestCaseOperation2Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService15TestCaseOperation2 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService15TestCaseOperation2 for usage and error information. -func (c *InputService15ProtocolTest) InputService15TestCaseOperation2(input *InputService15TestShapeInputService15TestCaseOperation2Input) (*InputService15TestShapeInputService15TestCaseOperation2Output, error) { - req, out := c.InputService15TestCaseOperation2Request(input) - return out, req.Send() -} - -// InputService15TestCaseOperation2WithContext is the same as InputService15TestCaseOperation2 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService15TestCaseOperation2 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService15ProtocolTest) InputService15TestCaseOperation2WithContext(ctx aws.Context, input *InputService15TestShapeInputService15TestCaseOperation2Input, opts ...request.Option) (*InputService15TestShapeInputService15TestCaseOperation2Output, error) { - req, out := c.InputService15TestCaseOperation2Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type InputService15TestShapeInputService15TestCaseOperation1Output struct { - _ struct{} `type:"structure"` -} - -type InputService15TestShapeInputService15TestCaseOperation2Input struct { - _ struct{} `type:"structure"` - - BoolQuery *bool `location:"querystring" locationName:"bool-query" type:"boolean"` -} - -// SetBoolQuery sets the BoolQuery field's value. -func (s *InputService15TestShapeInputService15TestCaseOperation2Input) SetBoolQuery(v bool) *InputService15TestShapeInputService15TestCaseOperation2Input { - s.BoolQuery = &v - return s -} - -type InputService15TestShapeInputService15TestCaseOperation2Output struct { - _ struct{} `type:"structure"` -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type InputService16ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the InputService16ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a InputService16ProtocolTest client from just a session. -// svc := inputservice16protocoltest.New(mySession) -// -// // Create a InputService16ProtocolTest client with additional configuration -// svc := inputservice16protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewInputService16ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService16ProtocolTest { - c := p.ClientConfig("inputservice16protocoltest", cfgs...) - return newInputService16ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newInputService16ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService16ProtocolTest { - svc := &InputService16ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "inputservice16protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-01-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restxml.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a InputService16ProtocolTest operation and runs any -// custom request initialization. -func (c *InputService16ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opInputService16TestCaseOperation1 = "OperationName" - -// InputService16TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the InputService16TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService16TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService16TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService16TestCaseOperation1Request method. -// req, resp := client.InputService16TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService16ProtocolTest) InputService16TestCaseOperation1Request(input *InputService16TestShapeInputService16TestCaseOperation1Input) (req *request.Request, output *InputService16TestShapeInputService16TestCaseOperation1Output) { - op := &request.Operation{ - Name: opInputService16TestCaseOperation1, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &InputService16TestShapeInputService16TestCaseOperation1Input{} - } - - output = &InputService16TestShapeInputService16TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService16TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService16TestCaseOperation1 for usage and error information. -func (c *InputService16ProtocolTest) InputService16TestCaseOperation1(input *InputService16TestShapeInputService16TestCaseOperation1Input) (*InputService16TestShapeInputService16TestCaseOperation1Output, error) { - req, out := c.InputService16TestCaseOperation1Request(input) - return out, req.Send() -} - -// InputService16TestCaseOperation1WithContext is the same as InputService16TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService16TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService16ProtocolTest) InputService16TestCaseOperation1WithContext(ctx aws.Context, input *InputService16TestShapeInputService16TestCaseOperation1Input, opts ...request.Option) (*InputService16TestShapeInputService16TestCaseOperation1Output, error) { - req, out := c.InputService16TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type InputService16TestShapeInputService16TestCaseOperation1Input struct { - _ struct{} `type:"structure" payload:"Foo"` - - Foo *string `locationName:"foo" type:"string"` -} - -// SetFoo sets the Foo field's value. -func (s *InputService16TestShapeInputService16TestCaseOperation1Input) SetFoo(v string) *InputService16TestShapeInputService16TestCaseOperation1Input { - s.Foo = &v - return s -} - -type InputService16TestShapeInputService16TestCaseOperation1Output struct { - _ struct{} `type:"structure"` -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type InputService17ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the InputService17ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a InputService17ProtocolTest client from just a session. -// svc := inputservice17protocoltest.New(mySession) -// -// // Create a InputService17ProtocolTest client with additional configuration -// svc := inputservice17protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewInputService17ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService17ProtocolTest { - c := p.ClientConfig("inputservice17protocoltest", cfgs...) - return newInputService17ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newInputService17ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService17ProtocolTest { - svc := &InputService17ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "inputservice17protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-01-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restxml.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a InputService17ProtocolTest operation and runs any -// custom request initialization. -func (c *InputService17ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opInputService17TestCaseOperation1 = "OperationName" - -// InputService17TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the InputService17TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService17TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService17TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService17TestCaseOperation1Request method. -// req, resp := client.InputService17TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService17ProtocolTest) InputService17TestCaseOperation1Request(input *InputService17TestShapeInputService17TestCaseOperation2Input) (req *request.Request, output *InputService17TestShapeInputService17TestCaseOperation1Output) { - op := &request.Operation{ - Name: opInputService17TestCaseOperation1, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &InputService17TestShapeInputService17TestCaseOperation2Input{} - } - - output = &InputService17TestShapeInputService17TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService17TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService17TestCaseOperation1 for usage and error information. -func (c *InputService17ProtocolTest) InputService17TestCaseOperation1(input *InputService17TestShapeInputService17TestCaseOperation2Input) (*InputService17TestShapeInputService17TestCaseOperation1Output, error) { - req, out := c.InputService17TestCaseOperation1Request(input) - return out, req.Send() -} - -// InputService17TestCaseOperation1WithContext is the same as InputService17TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService17TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService17ProtocolTest) InputService17TestCaseOperation1WithContext(ctx aws.Context, input *InputService17TestShapeInputService17TestCaseOperation2Input, opts ...request.Option) (*InputService17TestShapeInputService17TestCaseOperation1Output, error) { - req, out := c.InputService17TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opInputService17TestCaseOperation2 = "OperationName" - -// InputService17TestCaseOperation2Request generates a "aws/request.Request" representing the -// client's request for the InputService17TestCaseOperation2 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService17TestCaseOperation2 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService17TestCaseOperation2 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService17TestCaseOperation2Request method. -// req, resp := client.InputService17TestCaseOperation2Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService17ProtocolTest) InputService17TestCaseOperation2Request(input *InputService17TestShapeInputService17TestCaseOperation2Input) (req *request.Request, output *InputService17TestShapeInputService17TestCaseOperation2Output) { - op := &request.Operation{ - Name: opInputService17TestCaseOperation2, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &InputService17TestShapeInputService17TestCaseOperation2Input{} - } - - output = &InputService17TestShapeInputService17TestCaseOperation2Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService17TestCaseOperation2 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService17TestCaseOperation2 for usage and error information. -func (c *InputService17ProtocolTest) InputService17TestCaseOperation2(input *InputService17TestShapeInputService17TestCaseOperation2Input) (*InputService17TestShapeInputService17TestCaseOperation2Output, error) { - req, out := c.InputService17TestCaseOperation2Request(input) - return out, req.Send() -} - -// InputService17TestCaseOperation2WithContext is the same as InputService17TestCaseOperation2 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService17TestCaseOperation2 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService17ProtocolTest) InputService17TestCaseOperation2WithContext(ctx aws.Context, input *InputService17TestShapeInputService17TestCaseOperation2Input, opts ...request.Option) (*InputService17TestShapeInputService17TestCaseOperation2Output, error) { - req, out := c.InputService17TestCaseOperation2Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type InputService17TestShapeInputService17TestCaseOperation1Output struct { - _ struct{} `type:"structure"` -} - -type InputService17TestShapeInputService17TestCaseOperation2Input struct { - _ struct{} `type:"structure" payload:"Foo"` - - Foo []byte `locationName:"foo" type:"blob"` -} - -// SetFoo sets the Foo field's value. -func (s *InputService17TestShapeInputService17TestCaseOperation2Input) SetFoo(v []byte) *InputService17TestShapeInputService17TestCaseOperation2Input { - s.Foo = v - return s -} - -type InputService17TestShapeInputService17TestCaseOperation2Output struct { - _ struct{} `type:"structure"` -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type InputService18ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the InputService18ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a InputService18ProtocolTest client from just a session. -// svc := inputservice18protocoltest.New(mySession) -// -// // Create a InputService18ProtocolTest client with additional configuration -// svc := inputservice18protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewInputService18ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService18ProtocolTest { - c := p.ClientConfig("inputservice18protocoltest", cfgs...) - return newInputService18ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newInputService18ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService18ProtocolTest { - svc := &InputService18ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "inputservice18protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-01-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restxml.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a InputService18ProtocolTest operation and runs any -// custom request initialization. -func (c *InputService18ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opInputService18TestCaseOperation1 = "OperationName" - -// InputService18TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the InputService18TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService18TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService18TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService18TestCaseOperation1Request method. -// req, resp := client.InputService18TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService18ProtocolTest) InputService18TestCaseOperation1Request(input *InputService18TestShapeInputService18TestCaseOperation4Input) (req *request.Request, output *InputService18TestShapeInputService18TestCaseOperation1Output) { - op := &request.Operation{ - Name: opInputService18TestCaseOperation1, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &InputService18TestShapeInputService18TestCaseOperation4Input{} - } - - output = &InputService18TestShapeInputService18TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService18TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService18TestCaseOperation1 for usage and error information. -func (c *InputService18ProtocolTest) InputService18TestCaseOperation1(input *InputService18TestShapeInputService18TestCaseOperation4Input) (*InputService18TestShapeInputService18TestCaseOperation1Output, error) { - req, out := c.InputService18TestCaseOperation1Request(input) - return out, req.Send() -} - -// InputService18TestCaseOperation1WithContext is the same as InputService18TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService18TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService18ProtocolTest) InputService18TestCaseOperation1WithContext(ctx aws.Context, input *InputService18TestShapeInputService18TestCaseOperation4Input, opts ...request.Option) (*InputService18TestShapeInputService18TestCaseOperation1Output, error) { - req, out := c.InputService18TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opInputService18TestCaseOperation2 = "OperationName" - -// InputService18TestCaseOperation2Request generates a "aws/request.Request" representing the -// client's request for the InputService18TestCaseOperation2 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService18TestCaseOperation2 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService18TestCaseOperation2 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService18TestCaseOperation2Request method. -// req, resp := client.InputService18TestCaseOperation2Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService18ProtocolTest) InputService18TestCaseOperation2Request(input *InputService18TestShapeInputService18TestCaseOperation4Input) (req *request.Request, output *InputService18TestShapeInputService18TestCaseOperation2Output) { - op := &request.Operation{ - Name: opInputService18TestCaseOperation2, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &InputService18TestShapeInputService18TestCaseOperation4Input{} - } - - output = &InputService18TestShapeInputService18TestCaseOperation2Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService18TestCaseOperation2 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService18TestCaseOperation2 for usage and error information. -func (c *InputService18ProtocolTest) InputService18TestCaseOperation2(input *InputService18TestShapeInputService18TestCaseOperation4Input) (*InputService18TestShapeInputService18TestCaseOperation2Output, error) { - req, out := c.InputService18TestCaseOperation2Request(input) - return out, req.Send() -} - -// InputService18TestCaseOperation2WithContext is the same as InputService18TestCaseOperation2 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService18TestCaseOperation2 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService18ProtocolTest) InputService18TestCaseOperation2WithContext(ctx aws.Context, input *InputService18TestShapeInputService18TestCaseOperation4Input, opts ...request.Option) (*InputService18TestShapeInputService18TestCaseOperation2Output, error) { - req, out := c.InputService18TestCaseOperation2Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opInputService18TestCaseOperation3 = "OperationName" - -// InputService18TestCaseOperation3Request generates a "aws/request.Request" representing the -// client's request for the InputService18TestCaseOperation3 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService18TestCaseOperation3 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService18TestCaseOperation3 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService18TestCaseOperation3Request method. -// req, resp := client.InputService18TestCaseOperation3Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService18ProtocolTest) InputService18TestCaseOperation3Request(input *InputService18TestShapeInputService18TestCaseOperation4Input) (req *request.Request, output *InputService18TestShapeInputService18TestCaseOperation3Output) { - op := &request.Operation{ - Name: opInputService18TestCaseOperation3, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &InputService18TestShapeInputService18TestCaseOperation4Input{} - } - - output = &InputService18TestShapeInputService18TestCaseOperation3Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService18TestCaseOperation3 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService18TestCaseOperation3 for usage and error information. -func (c *InputService18ProtocolTest) InputService18TestCaseOperation3(input *InputService18TestShapeInputService18TestCaseOperation4Input) (*InputService18TestShapeInputService18TestCaseOperation3Output, error) { - req, out := c.InputService18TestCaseOperation3Request(input) - return out, req.Send() -} - -// InputService18TestCaseOperation3WithContext is the same as InputService18TestCaseOperation3 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService18TestCaseOperation3 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService18ProtocolTest) InputService18TestCaseOperation3WithContext(ctx aws.Context, input *InputService18TestShapeInputService18TestCaseOperation4Input, opts ...request.Option) (*InputService18TestShapeInputService18TestCaseOperation3Output, error) { - req, out := c.InputService18TestCaseOperation3Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opInputService18TestCaseOperation4 = "OperationName" - -// InputService18TestCaseOperation4Request generates a "aws/request.Request" representing the -// client's request for the InputService18TestCaseOperation4 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService18TestCaseOperation4 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService18TestCaseOperation4 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService18TestCaseOperation4Request method. -// req, resp := client.InputService18TestCaseOperation4Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService18ProtocolTest) InputService18TestCaseOperation4Request(input *InputService18TestShapeInputService18TestCaseOperation4Input) (req *request.Request, output *InputService18TestShapeInputService18TestCaseOperation4Output) { - op := &request.Operation{ - Name: opInputService18TestCaseOperation4, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &InputService18TestShapeInputService18TestCaseOperation4Input{} - } - - output = &InputService18TestShapeInputService18TestCaseOperation4Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService18TestCaseOperation4 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService18TestCaseOperation4 for usage and error information. -func (c *InputService18ProtocolTest) InputService18TestCaseOperation4(input *InputService18TestShapeInputService18TestCaseOperation4Input) (*InputService18TestShapeInputService18TestCaseOperation4Output, error) { - req, out := c.InputService18TestCaseOperation4Request(input) - return out, req.Send() -} - -// InputService18TestCaseOperation4WithContext is the same as InputService18TestCaseOperation4 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService18TestCaseOperation4 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService18ProtocolTest) InputService18TestCaseOperation4WithContext(ctx aws.Context, input *InputService18TestShapeInputService18TestCaseOperation4Input, opts ...request.Option) (*InputService18TestShapeInputService18TestCaseOperation4Output, error) { - req, out := c.InputService18TestCaseOperation4Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type InputService18TestShapeFooShape struct { - _ struct{} `locationName:"foo" type:"structure"` - - Baz *string `locationName:"baz" type:"string"` -} - -// SetBaz sets the Baz field's value. -func (s *InputService18TestShapeFooShape) SetBaz(v string) *InputService18TestShapeFooShape { - s.Baz = &v - return s -} - -type InputService18TestShapeInputService18TestCaseOperation1Output struct { - _ struct{} `type:"structure"` -} - -type InputService18TestShapeInputService18TestCaseOperation2Output struct { - _ struct{} `type:"structure"` -} - -type InputService18TestShapeInputService18TestCaseOperation3Output struct { - _ struct{} `type:"structure"` -} - -type InputService18TestShapeInputService18TestCaseOperation4Input struct { - _ struct{} `type:"structure" payload:"Foo"` - - Foo *InputService18TestShapeFooShape `locationName:"foo" type:"structure"` -} - -// SetFoo sets the Foo field's value. -func (s *InputService18TestShapeInputService18TestCaseOperation4Input) SetFoo(v *InputService18TestShapeFooShape) *InputService18TestShapeInputService18TestCaseOperation4Input { - s.Foo = v - return s -} - -type InputService18TestShapeInputService18TestCaseOperation4Output struct { - _ struct{} `type:"structure"` -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type InputService19ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the InputService19ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a InputService19ProtocolTest client from just a session. -// svc := inputservice19protocoltest.New(mySession) -// -// // Create a InputService19ProtocolTest client with additional configuration -// svc := inputservice19protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewInputService19ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService19ProtocolTest { - c := p.ClientConfig("inputservice19protocoltest", cfgs...) - return newInputService19ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newInputService19ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService19ProtocolTest { - svc := &InputService19ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "inputservice19protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-01-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restxml.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a InputService19ProtocolTest operation and runs any -// custom request initialization. -func (c *InputService19ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opInputService19TestCaseOperation1 = "OperationName" - -// InputService19TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the InputService19TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService19TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService19TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService19TestCaseOperation1Request method. -// req, resp := client.InputService19TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService19ProtocolTest) InputService19TestCaseOperation1Request(input *InputService19TestShapeInputService19TestCaseOperation1Input) (req *request.Request, output *InputService19TestShapeInputService19TestCaseOperation1Output) { - op := &request.Operation{ - Name: opInputService19TestCaseOperation1, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &InputService19TestShapeInputService19TestCaseOperation1Input{} - } - - output = &InputService19TestShapeInputService19TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService19TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService19TestCaseOperation1 for usage and error information. -func (c *InputService19ProtocolTest) InputService19TestCaseOperation1(input *InputService19TestShapeInputService19TestCaseOperation1Input) (*InputService19TestShapeInputService19TestCaseOperation1Output, error) { - req, out := c.InputService19TestCaseOperation1Request(input) - return out, req.Send() -} - -// InputService19TestCaseOperation1WithContext is the same as InputService19TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService19TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService19ProtocolTest) InputService19TestCaseOperation1WithContext(ctx aws.Context, input *InputService19TestShapeInputService19TestCaseOperation1Input, opts ...request.Option) (*InputService19TestShapeInputService19TestCaseOperation1Output, error) { - req, out := c.InputService19TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type InputService19TestShapeGrant struct { - _ struct{} `locationName:"Grant" type:"structure"` - - Grantee *InputService19TestShapeGrantee `type:"structure"` -} - -// SetGrantee sets the Grantee field's value. -func (s *InputService19TestShapeGrant) SetGrantee(v *InputService19TestShapeGrantee) *InputService19TestShapeGrant { - s.Grantee = v - return s -} - -type InputService19TestShapeGrantee struct { - _ struct{} `type:"structure" xmlPrefix:"xsi" xmlURI:"http://www.w3.org/2001/XMLSchema-instance"` - - EmailAddress *string `type:"string"` - - Type *string `locationName:"xsi:type" type:"string" xmlAttribute:"true"` -} - -// SetEmailAddress sets the EmailAddress field's value. -func (s *InputService19TestShapeGrantee) SetEmailAddress(v string) *InputService19TestShapeGrantee { - s.EmailAddress = &v - return s -} - -// SetType sets the Type field's value. -func (s *InputService19TestShapeGrantee) SetType(v string) *InputService19TestShapeGrantee { - s.Type = &v - return s -} - -type InputService19TestShapeInputService19TestCaseOperation1Input struct { - _ struct{} `type:"structure" payload:"Grant"` - - Grant *InputService19TestShapeGrant `locationName:"Grant" type:"structure"` -} - -// SetGrant sets the Grant field's value. -func (s *InputService19TestShapeInputService19TestCaseOperation1Input) SetGrant(v *InputService19TestShapeGrant) *InputService19TestShapeInputService19TestCaseOperation1Input { - s.Grant = v - return s -} - -type InputService19TestShapeInputService19TestCaseOperation1Output struct { - _ struct{} `type:"structure"` -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type InputService20ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the InputService20ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a InputService20ProtocolTest client from just a session. -// svc := inputservice20protocoltest.New(mySession) -// -// // Create a InputService20ProtocolTest client with additional configuration -// svc := inputservice20protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewInputService20ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService20ProtocolTest { - c := p.ClientConfig("inputservice20protocoltest", cfgs...) - return newInputService20ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newInputService20ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService20ProtocolTest { - svc := &InputService20ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "inputservice20protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-01-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restxml.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a InputService20ProtocolTest operation and runs any -// custom request initialization. -func (c *InputService20ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opInputService20TestCaseOperation1 = "OperationName" - -// InputService20TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the InputService20TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService20TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService20TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService20TestCaseOperation1Request method. -// req, resp := client.InputService20TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService20ProtocolTest) InputService20TestCaseOperation1Request(input *InputService20TestShapeInputService20TestCaseOperation1Input) (req *request.Request, output *InputService20TestShapeInputService20TestCaseOperation1Output) { - op := &request.Operation{ - Name: opInputService20TestCaseOperation1, - HTTPMethod: "GET", - HTTPPath: "/{Bucket}/{Key+}", - } - - if input == nil { - input = &InputService20TestShapeInputService20TestCaseOperation1Input{} - } - - output = &InputService20TestShapeInputService20TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService20TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService20TestCaseOperation1 for usage and error information. -func (c *InputService20ProtocolTest) InputService20TestCaseOperation1(input *InputService20TestShapeInputService20TestCaseOperation1Input) (*InputService20TestShapeInputService20TestCaseOperation1Output, error) { - req, out := c.InputService20TestCaseOperation1Request(input) - return out, req.Send() -} - -// InputService20TestCaseOperation1WithContext is the same as InputService20TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService20TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService20ProtocolTest) InputService20TestCaseOperation1WithContext(ctx aws.Context, input *InputService20TestShapeInputService20TestCaseOperation1Input, opts ...request.Option) (*InputService20TestShapeInputService20TestCaseOperation1Output, error) { - req, out := c.InputService20TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type InputService20TestShapeInputService20TestCaseOperation1Input struct { - _ struct{} `type:"structure"` - - Bucket *string `location:"uri" type:"string"` - - Key *string `location:"uri" type:"string"` -} - -// SetBucket sets the Bucket field's value. -func (s *InputService20TestShapeInputService20TestCaseOperation1Input) SetBucket(v string) *InputService20TestShapeInputService20TestCaseOperation1Input { - s.Bucket = &v - return s -} - -// SetKey sets the Key field's value. -func (s *InputService20TestShapeInputService20TestCaseOperation1Input) SetKey(v string) *InputService20TestShapeInputService20TestCaseOperation1Input { - s.Key = &v - return s -} - -type InputService20TestShapeInputService20TestCaseOperation1Output struct { - _ struct{} `type:"structure"` -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type InputService21ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the InputService21ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a InputService21ProtocolTest client from just a session. -// svc := inputservice21protocoltest.New(mySession) -// -// // Create a InputService21ProtocolTest client with additional configuration -// svc := inputservice21protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewInputService21ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService21ProtocolTest { - c := p.ClientConfig("inputservice21protocoltest", cfgs...) - return newInputService21ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newInputService21ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService21ProtocolTest { - svc := &InputService21ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "inputservice21protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-01-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restxml.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a InputService21ProtocolTest operation and runs any -// custom request initialization. -func (c *InputService21ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opInputService21TestCaseOperation1 = "OperationName" - -// InputService21TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the InputService21TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService21TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService21TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService21TestCaseOperation1Request method. -// req, resp := client.InputService21TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService21ProtocolTest) InputService21TestCaseOperation1Request(input *InputService21TestShapeInputService21TestCaseOperation2Input) (req *request.Request, output *InputService21TestShapeInputService21TestCaseOperation1Output) { - op := &request.Operation{ - Name: opInputService21TestCaseOperation1, - HTTPMethod: "POST", - HTTPPath: "/path", - } - - if input == nil { - input = &InputService21TestShapeInputService21TestCaseOperation2Input{} - } - - output = &InputService21TestShapeInputService21TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService21TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService21TestCaseOperation1 for usage and error information. -func (c *InputService21ProtocolTest) InputService21TestCaseOperation1(input *InputService21TestShapeInputService21TestCaseOperation2Input) (*InputService21TestShapeInputService21TestCaseOperation1Output, error) { - req, out := c.InputService21TestCaseOperation1Request(input) - return out, req.Send() -} - -// InputService21TestCaseOperation1WithContext is the same as InputService21TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService21TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService21ProtocolTest) InputService21TestCaseOperation1WithContext(ctx aws.Context, input *InputService21TestShapeInputService21TestCaseOperation2Input, opts ...request.Option) (*InputService21TestShapeInputService21TestCaseOperation1Output, error) { - req, out := c.InputService21TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opInputService21TestCaseOperation2 = "OperationName" - -// InputService21TestCaseOperation2Request generates a "aws/request.Request" representing the -// client's request for the InputService21TestCaseOperation2 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService21TestCaseOperation2 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService21TestCaseOperation2 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService21TestCaseOperation2Request method. -// req, resp := client.InputService21TestCaseOperation2Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService21ProtocolTest) InputService21TestCaseOperation2Request(input *InputService21TestShapeInputService21TestCaseOperation2Input) (req *request.Request, output *InputService21TestShapeInputService21TestCaseOperation2Output) { - op := &request.Operation{ - Name: opInputService21TestCaseOperation2, - HTTPMethod: "POST", - HTTPPath: "/path?abc=mno", - } - - if input == nil { - input = &InputService21TestShapeInputService21TestCaseOperation2Input{} - } - - output = &InputService21TestShapeInputService21TestCaseOperation2Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService21TestCaseOperation2 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService21TestCaseOperation2 for usage and error information. -func (c *InputService21ProtocolTest) InputService21TestCaseOperation2(input *InputService21TestShapeInputService21TestCaseOperation2Input) (*InputService21TestShapeInputService21TestCaseOperation2Output, error) { - req, out := c.InputService21TestCaseOperation2Request(input) - return out, req.Send() -} - -// InputService21TestCaseOperation2WithContext is the same as InputService21TestCaseOperation2 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService21TestCaseOperation2 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService21ProtocolTest) InputService21TestCaseOperation2WithContext(ctx aws.Context, input *InputService21TestShapeInputService21TestCaseOperation2Input, opts ...request.Option) (*InputService21TestShapeInputService21TestCaseOperation2Output, error) { - req, out := c.InputService21TestCaseOperation2Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type InputService21TestShapeInputService21TestCaseOperation1Output struct { - _ struct{} `type:"structure"` -} - -type InputService21TestShapeInputService21TestCaseOperation2Input struct { - _ struct{} `type:"structure"` - - Foo *string `location:"querystring" locationName:"param-name" type:"string"` -} - -// SetFoo sets the Foo field's value. -func (s *InputService21TestShapeInputService21TestCaseOperation2Input) SetFoo(v string) *InputService21TestShapeInputService21TestCaseOperation2Input { - s.Foo = &v - return s -} - -type InputService21TestShapeInputService21TestCaseOperation2Output struct { - _ struct{} `type:"structure"` -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type InputService22ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the InputService22ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a InputService22ProtocolTest client from just a session. -// svc := inputservice22protocoltest.New(mySession) -// -// // Create a InputService22ProtocolTest client with additional configuration -// svc := inputservice22protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewInputService22ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService22ProtocolTest { - c := p.ClientConfig("inputservice22protocoltest", cfgs...) - return newInputService22ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newInputService22ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService22ProtocolTest { - svc := &InputService22ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "inputservice22protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-01-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restxml.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a InputService22ProtocolTest operation and runs any -// custom request initialization. -func (c *InputService22ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opInputService22TestCaseOperation1 = "OperationName" - -// InputService22TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the InputService22TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService22TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService22TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService22TestCaseOperation1Request method. -// req, resp := client.InputService22TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService22ProtocolTest) InputService22TestCaseOperation1Request(input *InputService22TestShapeInputService22TestCaseOperation6Input) (req *request.Request, output *InputService22TestShapeInputService22TestCaseOperation1Output) { - op := &request.Operation{ - Name: opInputService22TestCaseOperation1, - HTTPMethod: "POST", - HTTPPath: "/path", - } - - if input == nil { - input = &InputService22TestShapeInputService22TestCaseOperation6Input{} - } - - output = &InputService22TestShapeInputService22TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService22TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService22TestCaseOperation1 for usage and error information. -func (c *InputService22ProtocolTest) InputService22TestCaseOperation1(input *InputService22TestShapeInputService22TestCaseOperation6Input) (*InputService22TestShapeInputService22TestCaseOperation1Output, error) { - req, out := c.InputService22TestCaseOperation1Request(input) - return out, req.Send() -} - -// InputService22TestCaseOperation1WithContext is the same as InputService22TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService22TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService22ProtocolTest) InputService22TestCaseOperation1WithContext(ctx aws.Context, input *InputService22TestShapeInputService22TestCaseOperation6Input, opts ...request.Option) (*InputService22TestShapeInputService22TestCaseOperation1Output, error) { - req, out := c.InputService22TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opInputService22TestCaseOperation2 = "OperationName" - -// InputService22TestCaseOperation2Request generates a "aws/request.Request" representing the -// client's request for the InputService22TestCaseOperation2 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService22TestCaseOperation2 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService22TestCaseOperation2 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService22TestCaseOperation2Request method. -// req, resp := client.InputService22TestCaseOperation2Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService22ProtocolTest) InputService22TestCaseOperation2Request(input *InputService22TestShapeInputService22TestCaseOperation6Input) (req *request.Request, output *InputService22TestShapeInputService22TestCaseOperation2Output) { - op := &request.Operation{ - Name: opInputService22TestCaseOperation2, - HTTPMethod: "POST", - HTTPPath: "/path", - } - - if input == nil { - input = &InputService22TestShapeInputService22TestCaseOperation6Input{} - } - - output = &InputService22TestShapeInputService22TestCaseOperation2Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService22TestCaseOperation2 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService22TestCaseOperation2 for usage and error information. -func (c *InputService22ProtocolTest) InputService22TestCaseOperation2(input *InputService22TestShapeInputService22TestCaseOperation6Input) (*InputService22TestShapeInputService22TestCaseOperation2Output, error) { - req, out := c.InputService22TestCaseOperation2Request(input) - return out, req.Send() -} - -// InputService22TestCaseOperation2WithContext is the same as InputService22TestCaseOperation2 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService22TestCaseOperation2 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService22ProtocolTest) InputService22TestCaseOperation2WithContext(ctx aws.Context, input *InputService22TestShapeInputService22TestCaseOperation6Input, opts ...request.Option) (*InputService22TestShapeInputService22TestCaseOperation2Output, error) { - req, out := c.InputService22TestCaseOperation2Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opInputService22TestCaseOperation3 = "OperationName" - -// InputService22TestCaseOperation3Request generates a "aws/request.Request" representing the -// client's request for the InputService22TestCaseOperation3 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService22TestCaseOperation3 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService22TestCaseOperation3 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService22TestCaseOperation3Request method. -// req, resp := client.InputService22TestCaseOperation3Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService22ProtocolTest) InputService22TestCaseOperation3Request(input *InputService22TestShapeInputService22TestCaseOperation6Input) (req *request.Request, output *InputService22TestShapeInputService22TestCaseOperation3Output) { - op := &request.Operation{ - Name: opInputService22TestCaseOperation3, - HTTPMethod: "POST", - HTTPPath: "/path", - } - - if input == nil { - input = &InputService22TestShapeInputService22TestCaseOperation6Input{} - } - - output = &InputService22TestShapeInputService22TestCaseOperation3Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService22TestCaseOperation3 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService22TestCaseOperation3 for usage and error information. -func (c *InputService22ProtocolTest) InputService22TestCaseOperation3(input *InputService22TestShapeInputService22TestCaseOperation6Input) (*InputService22TestShapeInputService22TestCaseOperation3Output, error) { - req, out := c.InputService22TestCaseOperation3Request(input) - return out, req.Send() -} - -// InputService22TestCaseOperation3WithContext is the same as InputService22TestCaseOperation3 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService22TestCaseOperation3 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService22ProtocolTest) InputService22TestCaseOperation3WithContext(ctx aws.Context, input *InputService22TestShapeInputService22TestCaseOperation6Input, opts ...request.Option) (*InputService22TestShapeInputService22TestCaseOperation3Output, error) { - req, out := c.InputService22TestCaseOperation3Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opInputService22TestCaseOperation4 = "OperationName" - -// InputService22TestCaseOperation4Request generates a "aws/request.Request" representing the -// client's request for the InputService22TestCaseOperation4 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService22TestCaseOperation4 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService22TestCaseOperation4 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService22TestCaseOperation4Request method. -// req, resp := client.InputService22TestCaseOperation4Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService22ProtocolTest) InputService22TestCaseOperation4Request(input *InputService22TestShapeInputService22TestCaseOperation6Input) (req *request.Request, output *InputService22TestShapeInputService22TestCaseOperation4Output) { - op := &request.Operation{ - Name: opInputService22TestCaseOperation4, - HTTPMethod: "POST", - HTTPPath: "/path", - } - - if input == nil { - input = &InputService22TestShapeInputService22TestCaseOperation6Input{} - } - - output = &InputService22TestShapeInputService22TestCaseOperation4Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService22TestCaseOperation4 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService22TestCaseOperation4 for usage and error information. -func (c *InputService22ProtocolTest) InputService22TestCaseOperation4(input *InputService22TestShapeInputService22TestCaseOperation6Input) (*InputService22TestShapeInputService22TestCaseOperation4Output, error) { - req, out := c.InputService22TestCaseOperation4Request(input) - return out, req.Send() -} - -// InputService22TestCaseOperation4WithContext is the same as InputService22TestCaseOperation4 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService22TestCaseOperation4 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService22ProtocolTest) InputService22TestCaseOperation4WithContext(ctx aws.Context, input *InputService22TestShapeInputService22TestCaseOperation6Input, opts ...request.Option) (*InputService22TestShapeInputService22TestCaseOperation4Output, error) { - req, out := c.InputService22TestCaseOperation4Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opInputService22TestCaseOperation5 = "OperationName" - -// InputService22TestCaseOperation5Request generates a "aws/request.Request" representing the -// client's request for the InputService22TestCaseOperation5 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService22TestCaseOperation5 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService22TestCaseOperation5 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService22TestCaseOperation5Request method. -// req, resp := client.InputService22TestCaseOperation5Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService22ProtocolTest) InputService22TestCaseOperation5Request(input *InputService22TestShapeInputService22TestCaseOperation6Input) (req *request.Request, output *InputService22TestShapeInputService22TestCaseOperation5Output) { - op := &request.Operation{ - Name: opInputService22TestCaseOperation5, - HTTPMethod: "POST", - HTTPPath: "/path", - } - - if input == nil { - input = &InputService22TestShapeInputService22TestCaseOperation6Input{} - } - - output = &InputService22TestShapeInputService22TestCaseOperation5Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService22TestCaseOperation5 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService22TestCaseOperation5 for usage and error information. -func (c *InputService22ProtocolTest) InputService22TestCaseOperation5(input *InputService22TestShapeInputService22TestCaseOperation6Input) (*InputService22TestShapeInputService22TestCaseOperation5Output, error) { - req, out := c.InputService22TestCaseOperation5Request(input) - return out, req.Send() -} - -// InputService22TestCaseOperation5WithContext is the same as InputService22TestCaseOperation5 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService22TestCaseOperation5 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService22ProtocolTest) InputService22TestCaseOperation5WithContext(ctx aws.Context, input *InputService22TestShapeInputService22TestCaseOperation6Input, opts ...request.Option) (*InputService22TestShapeInputService22TestCaseOperation5Output, error) { - req, out := c.InputService22TestCaseOperation5Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opInputService22TestCaseOperation6 = "OperationName" - -// InputService22TestCaseOperation6Request generates a "aws/request.Request" representing the -// client's request for the InputService22TestCaseOperation6 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService22TestCaseOperation6 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService22TestCaseOperation6 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService22TestCaseOperation6Request method. -// req, resp := client.InputService22TestCaseOperation6Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService22ProtocolTest) InputService22TestCaseOperation6Request(input *InputService22TestShapeInputService22TestCaseOperation6Input) (req *request.Request, output *InputService22TestShapeInputService22TestCaseOperation6Output) { - op := &request.Operation{ - Name: opInputService22TestCaseOperation6, - HTTPMethod: "POST", - HTTPPath: "/path", - } - - if input == nil { - input = &InputService22TestShapeInputService22TestCaseOperation6Input{} - } - - output = &InputService22TestShapeInputService22TestCaseOperation6Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService22TestCaseOperation6 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService22TestCaseOperation6 for usage and error information. -func (c *InputService22ProtocolTest) InputService22TestCaseOperation6(input *InputService22TestShapeInputService22TestCaseOperation6Input) (*InputService22TestShapeInputService22TestCaseOperation6Output, error) { - req, out := c.InputService22TestCaseOperation6Request(input) - return out, req.Send() -} - -// InputService22TestCaseOperation6WithContext is the same as InputService22TestCaseOperation6 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService22TestCaseOperation6 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService22ProtocolTest) InputService22TestCaseOperation6WithContext(ctx aws.Context, input *InputService22TestShapeInputService22TestCaseOperation6Input, opts ...request.Option) (*InputService22TestShapeInputService22TestCaseOperation6Output, error) { - req, out := c.InputService22TestCaseOperation6Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type InputService22TestShapeInputService22TestCaseOperation1Output struct { - _ struct{} `type:"structure"` -} - -type InputService22TestShapeInputService22TestCaseOperation2Output struct { - _ struct{} `type:"structure"` -} - -type InputService22TestShapeInputService22TestCaseOperation3Output struct { - _ struct{} `type:"structure"` -} - -type InputService22TestShapeInputService22TestCaseOperation4Output struct { - _ struct{} `type:"structure"` -} - -type InputService22TestShapeInputService22TestCaseOperation5Output struct { - _ struct{} `type:"structure"` -} - -type InputService22TestShapeInputService22TestCaseOperation6Input struct { - _ struct{} `locationName:"OperationRequest" type:"structure" xmlURI:"https://foo/"` - - RecursiveStruct *InputService22TestShapeRecursiveStructType `type:"structure"` -} - -// SetRecursiveStruct sets the RecursiveStruct field's value. -func (s *InputService22TestShapeInputService22TestCaseOperation6Input) SetRecursiveStruct(v *InputService22TestShapeRecursiveStructType) *InputService22TestShapeInputService22TestCaseOperation6Input { - s.RecursiveStruct = v - return s -} - -type InputService22TestShapeInputService22TestCaseOperation6Output struct { - _ struct{} `type:"structure"` -} - -type InputService22TestShapeRecursiveStructType struct { - _ struct{} `type:"structure"` - - NoRecurse *string `type:"string"` - - RecursiveList []*InputService22TestShapeRecursiveStructType `type:"list"` - - RecursiveMap map[string]*InputService22TestShapeRecursiveStructType `type:"map"` - - RecursiveStruct *InputService22TestShapeRecursiveStructType `type:"structure"` -} - -// SetNoRecurse sets the NoRecurse field's value. -func (s *InputService22TestShapeRecursiveStructType) SetNoRecurse(v string) *InputService22TestShapeRecursiveStructType { - s.NoRecurse = &v - return s -} - -// SetRecursiveList sets the RecursiveList field's value. -func (s *InputService22TestShapeRecursiveStructType) SetRecursiveList(v []*InputService22TestShapeRecursiveStructType) *InputService22TestShapeRecursiveStructType { - s.RecursiveList = v - return s -} - -// SetRecursiveMap sets the RecursiveMap field's value. -func (s *InputService22TestShapeRecursiveStructType) SetRecursiveMap(v map[string]*InputService22TestShapeRecursiveStructType) *InputService22TestShapeRecursiveStructType { - s.RecursiveMap = v - return s -} - -// SetRecursiveStruct sets the RecursiveStruct field's value. -func (s *InputService22TestShapeRecursiveStructType) SetRecursiveStruct(v *InputService22TestShapeRecursiveStructType) *InputService22TestShapeRecursiveStructType { - s.RecursiveStruct = v - return s -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type InputService23ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the InputService23ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a InputService23ProtocolTest client from just a session. -// svc := inputservice23protocoltest.New(mySession) -// -// // Create a InputService23ProtocolTest client with additional configuration -// svc := inputservice23protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewInputService23ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService23ProtocolTest { - c := p.ClientConfig("inputservice23protocoltest", cfgs...) - return newInputService23ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newInputService23ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService23ProtocolTest { - svc := &InputService23ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "inputservice23protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-01-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restxml.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a InputService23ProtocolTest operation and runs any -// custom request initialization. -func (c *InputService23ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opInputService23TestCaseOperation1 = "OperationName" - -// InputService23TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the InputService23TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService23TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService23TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService23TestCaseOperation1Request method. -// req, resp := client.InputService23TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService23ProtocolTest) InputService23TestCaseOperation1Request(input *InputService23TestShapeInputService23TestCaseOperation1Input) (req *request.Request, output *InputService23TestShapeInputService23TestCaseOperation1Output) { - op := &request.Operation{ - Name: opInputService23TestCaseOperation1, - HTTPMethod: "POST", - HTTPPath: "/path", - } - - if input == nil { - input = &InputService23TestShapeInputService23TestCaseOperation1Input{} - } - - output = &InputService23TestShapeInputService23TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService23TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService23TestCaseOperation1 for usage and error information. -func (c *InputService23ProtocolTest) InputService23TestCaseOperation1(input *InputService23TestShapeInputService23TestCaseOperation1Input) (*InputService23TestShapeInputService23TestCaseOperation1Output, error) { - req, out := c.InputService23TestCaseOperation1Request(input) - return out, req.Send() -} - -// InputService23TestCaseOperation1WithContext is the same as InputService23TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService23TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService23ProtocolTest) InputService23TestCaseOperation1WithContext(ctx aws.Context, input *InputService23TestShapeInputService23TestCaseOperation1Input, opts ...request.Option) (*InputService23TestShapeInputService23TestCaseOperation1Output, error) { - req, out := c.InputService23TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type InputService23TestShapeInputService23TestCaseOperation1Input struct { - _ struct{} `type:"structure"` - - TimeArgInHeader *time.Time `location:"header" locationName:"x-amz-timearg" type:"timestamp" timestampFormat:"rfc822"` -} - -// SetTimeArgInHeader sets the TimeArgInHeader field's value. -func (s *InputService23TestShapeInputService23TestCaseOperation1Input) SetTimeArgInHeader(v time.Time) *InputService23TestShapeInputService23TestCaseOperation1Input { - s.TimeArgInHeader = &v - return s -} - -type InputService23TestShapeInputService23TestCaseOperation1Output struct { - _ struct{} `type:"structure"` -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type InputService24ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the InputService24ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a InputService24ProtocolTest client from just a session. -// svc := inputservice24protocoltest.New(mySession) -// -// // Create a InputService24ProtocolTest client with additional configuration -// svc := inputservice24protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewInputService24ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService24ProtocolTest { - c := p.ClientConfig("inputservice24protocoltest", cfgs...) - return newInputService24ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newInputService24ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *InputService24ProtocolTest { - svc := &InputService24ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "inputservice24protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-01-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restxml.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a InputService24ProtocolTest operation and runs any -// custom request initialization. -func (c *InputService24ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opInputService24TestCaseOperation1 = "OperationName" - -// InputService24TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the InputService24TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService24TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService24TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService24TestCaseOperation1Request method. -// req, resp := client.InputService24TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService24ProtocolTest) InputService24TestCaseOperation1Request(input *InputService24TestShapeInputService24TestCaseOperation2Input) (req *request.Request, output *InputService24TestShapeInputService24TestCaseOperation1Output) { - op := &request.Operation{ - Name: opInputService24TestCaseOperation1, - HTTPMethod: "POST", - HTTPPath: "/path", - } - - if input == nil { - input = &InputService24TestShapeInputService24TestCaseOperation2Input{} - } - - output = &InputService24TestShapeInputService24TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService24TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService24TestCaseOperation1 for usage and error information. -func (c *InputService24ProtocolTest) InputService24TestCaseOperation1(input *InputService24TestShapeInputService24TestCaseOperation2Input) (*InputService24TestShapeInputService24TestCaseOperation1Output, error) { - req, out := c.InputService24TestCaseOperation1Request(input) - return out, req.Send() -} - -// InputService24TestCaseOperation1WithContext is the same as InputService24TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService24TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService24ProtocolTest) InputService24TestCaseOperation1WithContext(ctx aws.Context, input *InputService24TestShapeInputService24TestCaseOperation2Input, opts ...request.Option) (*InputService24TestShapeInputService24TestCaseOperation1Output, error) { - req, out := c.InputService24TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opInputService24TestCaseOperation2 = "OperationName" - -// InputService24TestCaseOperation2Request generates a "aws/request.Request" representing the -// client's request for the InputService24TestCaseOperation2 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See InputService24TestCaseOperation2 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InputService24TestCaseOperation2 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the InputService24TestCaseOperation2Request method. -// req, resp := client.InputService24TestCaseOperation2Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *InputService24ProtocolTest) InputService24TestCaseOperation2Request(input *InputService24TestShapeInputService24TestCaseOperation2Input) (req *request.Request, output *InputService24TestShapeInputService24TestCaseOperation2Output) { - op := &request.Operation{ - Name: opInputService24TestCaseOperation2, - HTTPMethod: "POST", - HTTPPath: "/path", - } - - if input == nil { - input = &InputService24TestShapeInputService24TestCaseOperation2Input{} - } - - output = &InputService24TestShapeInputService24TestCaseOperation2Output{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// InputService24TestCaseOperation2 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation InputService24TestCaseOperation2 for usage and error information. -func (c *InputService24ProtocolTest) InputService24TestCaseOperation2(input *InputService24TestShapeInputService24TestCaseOperation2Input) (*InputService24TestShapeInputService24TestCaseOperation2Output, error) { - req, out := c.InputService24TestCaseOperation2Request(input) - return out, req.Send() -} - -// InputService24TestCaseOperation2WithContext is the same as InputService24TestCaseOperation2 with the addition of -// the ability to pass a context and additional request options. -// -// See InputService24TestCaseOperation2 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *InputService24ProtocolTest) InputService24TestCaseOperation2WithContext(ctx aws.Context, input *InputService24TestShapeInputService24TestCaseOperation2Input, opts ...request.Option) (*InputService24TestShapeInputService24TestCaseOperation2Output, error) { - req, out := c.InputService24TestCaseOperation2Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type InputService24TestShapeInputService24TestCaseOperation1Output struct { - _ struct{} `type:"structure"` -} - -type InputService24TestShapeInputService24TestCaseOperation2Input struct { - _ struct{} `type:"structure"` - - Token *string `type:"string" idempotencyToken:"true"` -} - -// SetToken sets the Token field's value. -func (s *InputService24TestShapeInputService24TestCaseOperation2Input) SetToken(v string) *InputService24TestShapeInputService24TestCaseOperation2Input { - s.Token = &v - return s -} - -type InputService24TestShapeInputService24TestCaseOperation2Output struct { - _ struct{} `type:"structure"` -} - -// -// Tests begin here -// - -func TestInputService1ProtocolTestBasicXMLSerializationCase1(t *testing.T) { - svc := NewInputService1ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService1TestShapeInputService1TestCaseOperation2Input{ - Description: aws.String("bar"), - Name: aws.String("foo"), - } - req, _ := svc.InputService1TestCaseOperation1Request(input) - r := req.HTTPRequest - - // build request - restxml.Build(req) - assert.NoError(t, req.Error) - - // assert body - assert.NotNil(t, r.Body) - body := util.SortXML(r.Body) - awstesting.AssertXML(t, `barfoo`, util.Trim(string(body)), InputService1TestShapeInputService1TestCaseOperation2Input{}) - - // assert URL - awstesting.AssertURL(t, "https://test/2014-01-01/hostedzone", r.URL.String()) - - // assert headers - -} - -func TestInputService1ProtocolTestBasicXMLSerializationCase2(t *testing.T) { - svc := NewInputService1ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService1TestShapeInputService1TestCaseOperation2Input{ - Description: aws.String("bar"), - Name: aws.String("foo"), - } - req, _ := svc.InputService1TestCaseOperation2Request(input) - r := req.HTTPRequest - - // build request - restxml.Build(req) - assert.NoError(t, req.Error) - - // assert body - assert.NotNil(t, r.Body) - body := util.SortXML(r.Body) - awstesting.AssertXML(t, `barfoo`, util.Trim(string(body)), InputService1TestShapeInputService1TestCaseOperation2Input{}) - - // assert URL - awstesting.AssertURL(t, "https://test/2014-01-01/hostedzone", r.URL.String()) - - // assert headers - -} - -func TestInputService1ProtocolTestBasicXMLSerializationCase3(t *testing.T) { - svc := NewInputService1ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService1TestShapeInputService1TestCaseOperation3Input{} - req, _ := svc.InputService1TestCaseOperation3Request(input) - r := req.HTTPRequest - - // build request - restxml.Build(req) - assert.NoError(t, req.Error) - - // assert URL - awstesting.AssertURL(t, "https://test/2014-01-01/hostedzone", r.URL.String()) - - // assert headers - -} - -func TestInputService2ProtocolTestSerializeOtherScalarTypesCase1(t *testing.T) { - svc := NewInputService2ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService2TestShapeInputService2TestCaseOperation1Input{ - First: aws.Bool(true), - Fourth: aws.Int64(3), - Second: aws.Bool(false), - Third: aws.Float64(1.2), - } - req, _ := svc.InputService2TestCaseOperation1Request(input) - r := req.HTTPRequest - - // build request - restxml.Build(req) - assert.NoError(t, req.Error) - - // assert body - assert.NotNil(t, r.Body) - body := util.SortXML(r.Body) - awstesting.AssertXML(t, `true3false1.2`, util.Trim(string(body)), InputService2TestShapeInputService2TestCaseOperation1Input{}) - - // assert URL - awstesting.AssertURL(t, "https://test/2014-01-01/hostedzone", r.URL.String()) - - // assert headers - -} - -func TestInputService3ProtocolTestNestedStructuresCase1(t *testing.T) { - svc := NewInputService3ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService3TestShapeInputService3TestCaseOperation2Input{ - Description: aws.String("baz"), - SubStructure: &InputService3TestShapeSubStructure{ - Bar: aws.String("b"), - Foo: aws.String("a"), - }, - } - req, _ := svc.InputService3TestCaseOperation1Request(input) - r := req.HTTPRequest - - // build request - restxml.Build(req) - assert.NoError(t, req.Error) - - // assert body - assert.NotNil(t, r.Body) - body := util.SortXML(r.Body) - awstesting.AssertXML(t, `bazba`, util.Trim(string(body)), InputService3TestShapeInputService3TestCaseOperation2Input{}) - - // assert URL - awstesting.AssertURL(t, "https://test/2014-01-01/hostedzone", r.URL.String()) - - // assert headers - -} - -func TestInputService3ProtocolTestNestedStructuresCase2(t *testing.T) { - svc := NewInputService3ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService3TestShapeInputService3TestCaseOperation2Input{ - Description: aws.String("baz"), - SubStructure: &InputService3TestShapeSubStructure{ - Foo: aws.String("a"), - }, - } - req, _ := svc.InputService3TestCaseOperation2Request(input) - r := req.HTTPRequest - - // build request - restxml.Build(req) - assert.NoError(t, req.Error) - - // assert body - assert.NotNil(t, r.Body) - body := util.SortXML(r.Body) - awstesting.AssertXML(t, `baza`, util.Trim(string(body)), InputService3TestShapeInputService3TestCaseOperation2Input{}) - - // assert URL - awstesting.AssertURL(t, "https://test/2014-01-01/hostedzone", r.URL.String()) - - // assert headers - -} - -func TestInputService4ProtocolTestNestedStructuresCase1(t *testing.T) { - svc := NewInputService4ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService4TestShapeInputService4TestCaseOperation1Input{ - Description: aws.String("baz"), - SubStructure: &InputService4TestShapeSubStructure{}, - } - req, _ := svc.InputService4TestCaseOperation1Request(input) - r := req.HTTPRequest - - // build request - restxml.Build(req) - assert.NoError(t, req.Error) - - // assert body - assert.NotNil(t, r.Body) - body := util.SortXML(r.Body) - awstesting.AssertXML(t, `baz`, util.Trim(string(body)), InputService4TestShapeInputService4TestCaseOperation1Input{}) - - // assert URL - awstesting.AssertURL(t, "https://test/2014-01-01/hostedzone", r.URL.String()) - - // assert headers - -} - -func TestInputService5ProtocolTestNonFlattenedListsCase1(t *testing.T) { - svc := NewInputService5ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService5TestShapeInputService5TestCaseOperation1Input{ - ListParam: []*string{ - aws.String("one"), - aws.String("two"), - aws.String("three"), - }, - } - req, _ := svc.InputService5TestCaseOperation1Request(input) - r := req.HTTPRequest - - // build request - restxml.Build(req) - assert.NoError(t, req.Error) - - // assert body - assert.NotNil(t, r.Body) - body := util.SortXML(r.Body) - awstesting.AssertXML(t, `onetwothree`, util.Trim(string(body)), InputService5TestShapeInputService5TestCaseOperation1Input{}) - - // assert URL - awstesting.AssertURL(t, "https://test/2014-01-01/hostedzone", r.URL.String()) - - // assert headers - -} - -func TestInputService6ProtocolTestNonFlattenedListsWithLocationNameCase1(t *testing.T) { - svc := NewInputService6ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService6TestShapeInputService6TestCaseOperation1Input{ - ListParam: []*string{ - aws.String("one"), - aws.String("two"), - aws.String("three"), - }, - } - req, _ := svc.InputService6TestCaseOperation1Request(input) - r := req.HTTPRequest - - // build request - restxml.Build(req) - assert.NoError(t, req.Error) - - // assert body - assert.NotNil(t, r.Body) - body := util.SortXML(r.Body) - awstesting.AssertXML(t, `onetwothree`, util.Trim(string(body)), InputService6TestShapeInputService6TestCaseOperation1Input{}) - - // assert URL - awstesting.AssertURL(t, "https://test/2014-01-01/hostedzone", r.URL.String()) - - // assert headers - -} - -func TestInputService7ProtocolTestFlattenedListsCase1(t *testing.T) { - svc := NewInputService7ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService7TestShapeInputService7TestCaseOperation1Input{ - ListParam: []*string{ - aws.String("one"), - aws.String("two"), - aws.String("three"), - }, - } - req, _ := svc.InputService7TestCaseOperation1Request(input) - r := req.HTTPRequest - - // build request - restxml.Build(req) - assert.NoError(t, req.Error) - - // assert body - assert.NotNil(t, r.Body) - body := util.SortXML(r.Body) - awstesting.AssertXML(t, `onetwothree`, util.Trim(string(body)), InputService7TestShapeInputService7TestCaseOperation1Input{}) - - // assert URL - awstesting.AssertURL(t, "https://test/2014-01-01/hostedzone", r.URL.String()) - - // assert headers - -} - -func TestInputService8ProtocolTestFlattenedListsWithLocationNameCase1(t *testing.T) { - svc := NewInputService8ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService8TestShapeInputService8TestCaseOperation1Input{ - ListParam: []*string{ - aws.String("one"), - aws.String("two"), - aws.String("three"), - }, - } - req, _ := svc.InputService8TestCaseOperation1Request(input) - r := req.HTTPRequest - - // build request - restxml.Build(req) - assert.NoError(t, req.Error) - - // assert body - assert.NotNil(t, r.Body) - body := util.SortXML(r.Body) - awstesting.AssertXML(t, `onetwothree`, util.Trim(string(body)), InputService8TestShapeInputService8TestCaseOperation1Input{}) - - // assert URL - awstesting.AssertURL(t, "https://test/2014-01-01/hostedzone", r.URL.String()) - - // assert headers - -} - -func TestInputService9ProtocolTestListOfStructuresCase1(t *testing.T) { - svc := NewInputService9ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService9TestShapeInputService9TestCaseOperation1Input{ - ListParam: []*InputService9TestShapeSingleFieldStruct{ - { - Element: aws.String("one"), - }, - { - Element: aws.String("two"), - }, - { - Element: aws.String("three"), - }, - }, - } - req, _ := svc.InputService9TestCaseOperation1Request(input) - r := req.HTTPRequest - - // build request - restxml.Build(req) - assert.NoError(t, req.Error) - - // assert body - assert.NotNil(t, r.Body) - body := util.SortXML(r.Body) - awstesting.AssertXML(t, `onetwothree`, util.Trim(string(body)), InputService9TestShapeInputService9TestCaseOperation1Input{}) - - // assert URL - awstesting.AssertURL(t, "https://test/2014-01-01/hostedzone", r.URL.String()) - - // assert headers - -} - -func TestInputService10ProtocolTestBlobAndTimestampShapesCase1(t *testing.T) { - svc := NewInputService10ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService10TestShapeInputService10TestCaseOperation1Input{ - StructureParam: &InputService10TestShapeStructureShape{ - B: []byte("foo"), - T: aws.Time(time.Unix(1422172800, 0)), - }, - } - req, _ := svc.InputService10TestCaseOperation1Request(input) - r := req.HTTPRequest - - // build request - restxml.Build(req) - assert.NoError(t, req.Error) - - // assert body - assert.NotNil(t, r.Body) - body := util.SortXML(r.Body) - awstesting.AssertXML(t, `Zm9v2015-01-25T08:00:00Z`, util.Trim(string(body)), InputService10TestShapeInputService10TestCaseOperation1Input{}) - - // assert URL - awstesting.AssertURL(t, "https://test/2014-01-01/hostedzone", r.URL.String()) - - // assert headers - -} - -func TestInputService11ProtocolTestHeaderMapsCase1(t *testing.T) { - svc := NewInputService11ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService11TestShapeInputService11TestCaseOperation1Input{ - Foo: map[string]*string{ - "a": aws.String("b"), - "c": aws.String("d"), - }, - } - req, _ := svc.InputService11TestCaseOperation1Request(input) - r := req.HTTPRequest - - // build request - restxml.Build(req) - assert.NoError(t, req.Error) - - // assert URL - awstesting.AssertURL(t, "https://test/", r.URL.String()) - - // assert headers - assert.Equal(t, "b", r.Header.Get("x-foo-a")) - assert.Equal(t, "d", r.Header.Get("x-foo-c")) - -} - -func TestInputService12ProtocolTestQuerystringListOfStringsCase1(t *testing.T) { - svc := NewInputService12ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService12TestShapeInputService12TestCaseOperation1Input{ - Items: []*string{ - aws.String("value1"), - aws.String("value2"), - }, - } - req, _ := svc.InputService12TestCaseOperation1Request(input) - r := req.HTTPRequest - - // build request - restxml.Build(req) - assert.NoError(t, req.Error) - - // assert URL - awstesting.AssertURL(t, "https://test/path?item=value1&item=value2", r.URL.String()) - - // assert headers - -} - -func TestInputService13ProtocolTestStringToStringMapsInQuerystringCase1(t *testing.T) { - svc := NewInputService13ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService13TestShapeInputService13TestCaseOperation1Input{ - PipelineId: aws.String("foo"), - QueryDoc: map[string]*string{ - "bar": aws.String("baz"), - "fizz": aws.String("buzz"), - }, - } - req, _ := svc.InputService13TestCaseOperation1Request(input) - r := req.HTTPRequest - - // build request - restxml.Build(req) - assert.NoError(t, req.Error) - - // assert URL - awstesting.AssertURL(t, "https://test/2014-01-01/jobsByPipeline/foo?bar=baz&fizz=buzz", r.URL.String()) - - // assert headers - -} - -func TestInputService14ProtocolTestStringToStringListMapsInQuerystringCase1(t *testing.T) { - svc := NewInputService14ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService14TestShapeInputService14TestCaseOperation1Input{ - PipelineId: aws.String("id"), - QueryDoc: map[string][]*string{ - "fizz": { - aws.String("buzz"), - aws.String("pop"), - }, - "foo": { - aws.String("bar"), - aws.String("baz"), - }, - }, - } - req, _ := svc.InputService14TestCaseOperation1Request(input) - r := req.HTTPRequest - - // build request - restxml.Build(req) - assert.NoError(t, req.Error) - - // assert URL - awstesting.AssertURL(t, "https://test/2014-01-01/jobsByPipeline/id?foo=bar&foo=baz&fizz=buzz&fizz=pop", r.URL.String()) - - // assert headers - -} - -func TestInputService15ProtocolTestBooleanInQuerystringCase1(t *testing.T) { - svc := NewInputService15ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService15TestShapeInputService15TestCaseOperation2Input{ - BoolQuery: aws.Bool(true), - } - req, _ := svc.InputService15TestCaseOperation1Request(input) - r := req.HTTPRequest - - // build request - restxml.Build(req) - assert.NoError(t, req.Error) - - // assert URL - awstesting.AssertURL(t, "https://test/path?bool-query=true", r.URL.String()) - - // assert headers - -} - -func TestInputService15ProtocolTestBooleanInQuerystringCase2(t *testing.T) { - svc := NewInputService15ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService15TestShapeInputService15TestCaseOperation2Input{ - BoolQuery: aws.Bool(false), - } - req, _ := svc.InputService15TestCaseOperation2Request(input) - r := req.HTTPRequest - - // build request - restxml.Build(req) - assert.NoError(t, req.Error) - - // assert URL - awstesting.AssertURL(t, "https://test/path?bool-query=false", r.URL.String()) - - // assert headers - -} - -func TestInputService16ProtocolTestStringPayloadCase1(t *testing.T) { - svc := NewInputService16ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService16TestShapeInputService16TestCaseOperation1Input{ - Foo: aws.String("bar"), - } - req, _ := svc.InputService16TestCaseOperation1Request(input) - r := req.HTTPRequest - - // build request - restxml.Build(req) - assert.NoError(t, req.Error) - - // assert body - assert.NotNil(t, r.Body) - body := util.SortXML(r.Body) - assert.Equal(t, `bar`, util.Trim(string(body))) - - // assert URL - awstesting.AssertURL(t, "https://test/", r.URL.String()) - - // assert headers - -} - -func TestInputService17ProtocolTestBlobPayloadCase1(t *testing.T) { - svc := NewInputService17ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService17TestShapeInputService17TestCaseOperation2Input{ - Foo: []byte("bar"), - } - req, _ := svc.InputService17TestCaseOperation1Request(input) - r := req.HTTPRequest - - // build request - restxml.Build(req) - assert.NoError(t, req.Error) - - // assert body - assert.NotNil(t, r.Body) - body := util.SortXML(r.Body) - assert.Equal(t, `bar`, util.Trim(string(body))) - - // assert URL - awstesting.AssertURL(t, "https://test/", r.URL.String()) - - // assert headers - -} - -func TestInputService17ProtocolTestBlobPayloadCase2(t *testing.T) { - svc := NewInputService17ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService17TestShapeInputService17TestCaseOperation2Input{} - req, _ := svc.InputService17TestCaseOperation2Request(input) - r := req.HTTPRequest - - // build request - restxml.Build(req) - assert.NoError(t, req.Error) - - // assert URL - awstesting.AssertURL(t, "https://test/", r.URL.String()) - - // assert headers - -} - -func TestInputService18ProtocolTestStructurePayloadCase1(t *testing.T) { - svc := NewInputService18ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService18TestShapeInputService18TestCaseOperation4Input{ - Foo: &InputService18TestShapeFooShape{ - Baz: aws.String("bar"), - }, - } - req, _ := svc.InputService18TestCaseOperation1Request(input) - r := req.HTTPRequest - - // build request - restxml.Build(req) - assert.NoError(t, req.Error) - - // assert body - assert.NotNil(t, r.Body) - body := util.SortXML(r.Body) - awstesting.AssertXML(t, `bar`, util.Trim(string(body)), InputService18TestShapeInputService18TestCaseOperation4Input{}) - - // assert URL - awstesting.AssertURL(t, "https://test/", r.URL.String()) - - // assert headers - -} - -func TestInputService18ProtocolTestStructurePayloadCase2(t *testing.T) { - svc := NewInputService18ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService18TestShapeInputService18TestCaseOperation4Input{} - req, _ := svc.InputService18TestCaseOperation2Request(input) - r := req.HTTPRequest - - // build request - restxml.Build(req) - assert.NoError(t, req.Error) - - // assert URL - awstesting.AssertURL(t, "https://test/", r.URL.String()) - - // assert headers - -} - -func TestInputService18ProtocolTestStructurePayloadCase3(t *testing.T) { - svc := NewInputService18ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService18TestShapeInputService18TestCaseOperation4Input{ - Foo: &InputService18TestShapeFooShape{}, - } - req, _ := svc.InputService18TestCaseOperation3Request(input) - r := req.HTTPRequest - - // build request - restxml.Build(req) - assert.NoError(t, req.Error) - - // assert body - assert.NotNil(t, r.Body) - body := util.SortXML(r.Body) - awstesting.AssertXML(t, ``, util.Trim(string(body)), InputService18TestShapeInputService18TestCaseOperation4Input{}) - - // assert URL - awstesting.AssertURL(t, "https://test/", r.URL.String()) - - // assert headers - -} - -func TestInputService18ProtocolTestStructurePayloadCase4(t *testing.T) { - svc := NewInputService18ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService18TestShapeInputService18TestCaseOperation4Input{} - req, _ := svc.InputService18TestCaseOperation4Request(input) - r := req.HTTPRequest - - // build request - restxml.Build(req) - assert.NoError(t, req.Error) - - // assert URL - awstesting.AssertURL(t, "https://test/", r.URL.String()) - - // assert headers - -} - -func TestInputService19ProtocolTestXMLAttributeCase1(t *testing.T) { - svc := NewInputService19ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService19TestShapeInputService19TestCaseOperation1Input{ - Grant: &InputService19TestShapeGrant{ - Grantee: &InputService19TestShapeGrantee{ - EmailAddress: aws.String("foo@example.com"), - Type: aws.String("CanonicalUser"), - }, - }, - } - req, _ := svc.InputService19TestCaseOperation1Request(input) - r := req.HTTPRequest - - // build request - restxml.Build(req) - assert.NoError(t, req.Error) - - // assert body - assert.NotNil(t, r.Body) - body := util.SortXML(r.Body) - awstesting.AssertXML(t, `foo@example.com`, util.Trim(string(body)), InputService19TestShapeInputService19TestCaseOperation1Input{}) - - // assert URL - awstesting.AssertURL(t, "https://test/", r.URL.String()) - - // assert headers - -} - -func TestInputService20ProtocolTestGreedyKeysCase1(t *testing.T) { - svc := NewInputService20ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService20TestShapeInputService20TestCaseOperation1Input{ - Bucket: aws.String("my/bucket"), - Key: aws.String("testing /123"), - } - req, _ := svc.InputService20TestCaseOperation1Request(input) - r := req.HTTPRequest - - // build request - restxml.Build(req) - assert.NoError(t, req.Error) - - // assert URL - awstesting.AssertURL(t, "https://test/my%2Fbucket/testing%20/123", r.URL.String()) - - // assert headers - -} - -func TestInputService21ProtocolTestOmitsNullQueryParamsButSerializesEmptyStringsCase1(t *testing.T) { - svc := NewInputService21ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService21TestShapeInputService21TestCaseOperation2Input{} - req, _ := svc.InputService21TestCaseOperation1Request(input) - r := req.HTTPRequest - - // build request - restxml.Build(req) - assert.NoError(t, req.Error) - - // assert URL - awstesting.AssertURL(t, "https://test/path", r.URL.String()) - - // assert headers - -} - -func TestInputService21ProtocolTestOmitsNullQueryParamsButSerializesEmptyStringsCase2(t *testing.T) { - svc := NewInputService21ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService21TestShapeInputService21TestCaseOperation2Input{ - Foo: aws.String(""), - } - req, _ := svc.InputService21TestCaseOperation2Request(input) - r := req.HTTPRequest - - // build request - restxml.Build(req) - assert.NoError(t, req.Error) - - // assert URL - awstesting.AssertURL(t, "https://test/path?abc=mno¶m-name=", r.URL.String()) - - // assert headers - -} - -func TestInputService22ProtocolTestRecursiveShapesCase1(t *testing.T) { - svc := NewInputService22ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService22TestShapeInputService22TestCaseOperation6Input{ - RecursiveStruct: &InputService22TestShapeRecursiveStructType{ - NoRecurse: aws.String("foo"), - }, - } - req, _ := svc.InputService22TestCaseOperation1Request(input) - r := req.HTTPRequest - - // build request - restxml.Build(req) - assert.NoError(t, req.Error) - - // assert body - assert.NotNil(t, r.Body) - body := util.SortXML(r.Body) - awstesting.AssertXML(t, `foo`, util.Trim(string(body)), InputService22TestShapeInputService22TestCaseOperation6Input{}) - - // assert URL - awstesting.AssertURL(t, "https://test/path", r.URL.String()) - - // assert headers - -} - -func TestInputService22ProtocolTestRecursiveShapesCase2(t *testing.T) { - svc := NewInputService22ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService22TestShapeInputService22TestCaseOperation6Input{ - RecursiveStruct: &InputService22TestShapeRecursiveStructType{ - RecursiveStruct: &InputService22TestShapeRecursiveStructType{ - NoRecurse: aws.String("foo"), - }, - }, - } - req, _ := svc.InputService22TestCaseOperation2Request(input) - r := req.HTTPRequest - - // build request - restxml.Build(req) - assert.NoError(t, req.Error) - - // assert body - assert.NotNil(t, r.Body) - body := util.SortXML(r.Body) - awstesting.AssertXML(t, `foo`, util.Trim(string(body)), InputService22TestShapeInputService22TestCaseOperation6Input{}) - - // assert URL - awstesting.AssertURL(t, "https://test/path", r.URL.String()) - - // assert headers - -} - -func TestInputService22ProtocolTestRecursiveShapesCase3(t *testing.T) { - svc := NewInputService22ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService22TestShapeInputService22TestCaseOperation6Input{ - RecursiveStruct: &InputService22TestShapeRecursiveStructType{ - RecursiveStruct: &InputService22TestShapeRecursiveStructType{ - RecursiveStruct: &InputService22TestShapeRecursiveStructType{ - RecursiveStruct: &InputService22TestShapeRecursiveStructType{ - NoRecurse: aws.String("foo"), - }, - }, - }, - }, - } - req, _ := svc.InputService22TestCaseOperation3Request(input) - r := req.HTTPRequest - - // build request - restxml.Build(req) - assert.NoError(t, req.Error) - - // assert body - assert.NotNil(t, r.Body) - body := util.SortXML(r.Body) - awstesting.AssertXML(t, `foo`, util.Trim(string(body)), InputService22TestShapeInputService22TestCaseOperation6Input{}) - - // assert URL - awstesting.AssertURL(t, "https://test/path", r.URL.String()) - - // assert headers - -} - -func TestInputService22ProtocolTestRecursiveShapesCase4(t *testing.T) { - svc := NewInputService22ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService22TestShapeInputService22TestCaseOperation6Input{ - RecursiveStruct: &InputService22TestShapeRecursiveStructType{ - RecursiveList: []*InputService22TestShapeRecursiveStructType{ - { - NoRecurse: aws.String("foo"), - }, - { - NoRecurse: aws.String("bar"), - }, - }, - }, - } - req, _ := svc.InputService22TestCaseOperation4Request(input) - r := req.HTTPRequest - - // build request - restxml.Build(req) - assert.NoError(t, req.Error) - - // assert body - assert.NotNil(t, r.Body) - body := util.SortXML(r.Body) - awstesting.AssertXML(t, `foobar`, util.Trim(string(body)), InputService22TestShapeInputService22TestCaseOperation6Input{}) - - // assert URL - awstesting.AssertURL(t, "https://test/path", r.URL.String()) - - // assert headers - -} - -func TestInputService22ProtocolTestRecursiveShapesCase5(t *testing.T) { - svc := NewInputService22ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService22TestShapeInputService22TestCaseOperation6Input{ - RecursiveStruct: &InputService22TestShapeRecursiveStructType{ - RecursiveList: []*InputService22TestShapeRecursiveStructType{ - { - NoRecurse: aws.String("foo"), - }, - { - RecursiveStruct: &InputService22TestShapeRecursiveStructType{ - NoRecurse: aws.String("bar"), - }, - }, - }, - }, - } - req, _ := svc.InputService22TestCaseOperation5Request(input) - r := req.HTTPRequest - - // build request - restxml.Build(req) - assert.NoError(t, req.Error) - - // assert body - assert.NotNil(t, r.Body) - body := util.SortXML(r.Body) - awstesting.AssertXML(t, `foobar`, util.Trim(string(body)), InputService22TestShapeInputService22TestCaseOperation6Input{}) - - // assert URL - awstesting.AssertURL(t, "https://test/path", r.URL.String()) - - // assert headers - -} - -func TestInputService22ProtocolTestRecursiveShapesCase6(t *testing.T) { - svc := NewInputService22ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService22TestShapeInputService22TestCaseOperation6Input{ - RecursiveStruct: &InputService22TestShapeRecursiveStructType{ - RecursiveMap: map[string]*InputService22TestShapeRecursiveStructType{ - "bar": { - NoRecurse: aws.String("bar"), - }, - "foo": { - NoRecurse: aws.String("foo"), - }, - }, - }, - } - req, _ := svc.InputService22TestCaseOperation6Request(input) - r := req.HTTPRequest - - // build request - restxml.Build(req) - assert.NoError(t, req.Error) - - // assert body - assert.NotNil(t, r.Body) - body := util.SortXML(r.Body) - awstesting.AssertXML(t, `foofoobarbar`, util.Trim(string(body)), InputService22TestShapeInputService22TestCaseOperation6Input{}) - - // assert URL - awstesting.AssertURL(t, "https://test/path", r.URL.String()) - - // assert headers - -} - -func TestInputService23ProtocolTestTimestampInHeaderCase1(t *testing.T) { - svc := NewInputService23ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService23TestShapeInputService23TestCaseOperation1Input{ - TimeArgInHeader: aws.Time(time.Unix(1422172800, 0)), - } - req, _ := svc.InputService23TestCaseOperation1Request(input) - r := req.HTTPRequest - - // build request - restxml.Build(req) - assert.NoError(t, req.Error) - - // assert URL - awstesting.AssertURL(t, "https://test/path", r.URL.String()) - - // assert headers - assert.Equal(t, "Sun, 25 Jan 2015 08:00:00 GMT", r.Header.Get("x-amz-timearg")) - -} - -func TestInputService24ProtocolTestIdempotencyTokenAutoFillCase1(t *testing.T) { - svc := NewInputService24ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService24TestShapeInputService24TestCaseOperation2Input{ - Token: aws.String("abc123"), - } - req, _ := svc.InputService24TestCaseOperation1Request(input) - r := req.HTTPRequest - - // build request - restxml.Build(req) - assert.NoError(t, req.Error) - - // assert body - assert.NotNil(t, r.Body) - body := util.SortXML(r.Body) - awstesting.AssertXML(t, `abc123`, util.Trim(string(body)), InputService24TestShapeInputService24TestCaseOperation2Input{}) - - // assert URL - awstesting.AssertURL(t, "https://test/path", r.URL.String()) - - // assert headers - -} - -func TestInputService24ProtocolTestIdempotencyTokenAutoFillCase2(t *testing.T) { - svc := NewInputService24ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - input := &InputService24TestShapeInputService24TestCaseOperation2Input{} - req, _ := svc.InputService24TestCaseOperation2Request(input) - r := req.HTTPRequest - - // build request - restxml.Build(req) - assert.NoError(t, req.Error) - - // assert body - assert.NotNil(t, r.Body) - body := util.SortXML(r.Body) - awstesting.AssertXML(t, `00000000-0000-4000-8000-000000000000`, util.Trim(string(body)), InputService24TestShapeInputService24TestCaseOperation2Input{}) - - // assert URL - awstesting.AssertURL(t, "https://test/path", r.URL.String()) - - // assert headers - -} diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/restxml/restxml.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/restxml/restxml.go deleted file mode 100644 index 7bdf4c8..0000000 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/restxml/restxml.go +++ /dev/null @@ -1,69 +0,0 @@ -// Package restxml provides RESTful XML serialization of AWS -// requests and responses. -package restxml - -//go:generate go run -tags codegen ../../../models/protocol_tests/generate.go ../../../models/protocol_tests/input/rest-xml.json build_test.go -//go:generate go run -tags codegen ../../../models/protocol_tests/generate.go ../../../models/protocol_tests/output/rest-xml.json unmarshal_test.go - -import ( - "bytes" - "encoding/xml" - - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol/query" - "github.com/aws/aws-sdk-go/private/protocol/rest" - "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil" -) - -// BuildHandler is a named request handler for building restxml protocol requests -var BuildHandler = request.NamedHandler{Name: "awssdk.restxml.Build", Fn: Build} - -// UnmarshalHandler is a named request handler for unmarshaling restxml protocol requests -var UnmarshalHandler = request.NamedHandler{Name: "awssdk.restxml.Unmarshal", Fn: Unmarshal} - -// UnmarshalMetaHandler is a named request handler for unmarshaling restxml protocol request metadata -var UnmarshalMetaHandler = request.NamedHandler{Name: "awssdk.restxml.UnmarshalMeta", Fn: UnmarshalMeta} - -// UnmarshalErrorHandler is a named request handler for unmarshaling restxml protocol request errors -var UnmarshalErrorHandler = request.NamedHandler{Name: "awssdk.restxml.UnmarshalError", Fn: UnmarshalError} - -// Build builds a request payload for the REST XML protocol. -func Build(r *request.Request) { - rest.Build(r) - - if t := rest.PayloadType(r.Params); t == "structure" || t == "" { - var buf bytes.Buffer - err := xmlutil.BuildXML(r.Params, xml.NewEncoder(&buf)) - if err != nil { - r.Error = awserr.New("SerializationError", "failed to encode rest XML request", err) - return - } - r.SetBufferBody(buf.Bytes()) - } -} - -// Unmarshal unmarshals a payload response for the REST XML protocol. -func Unmarshal(r *request.Request) { - if t := rest.PayloadType(r.Data); t == "structure" || t == "" { - defer r.HTTPResponse.Body.Close() - decoder := xml.NewDecoder(r.HTTPResponse.Body) - err := xmlutil.UnmarshalXML(r.Data, decoder, "") - if err != nil { - r.Error = awserr.New("SerializationError", "failed to decode REST XML response", err) - return - } - } else { - rest.Unmarshal(r) - } -} - -// UnmarshalMeta unmarshals response headers for the REST XML protocol. -func UnmarshalMeta(r *request.Request) { - rest.UnmarshalMeta(r) -} - -// UnmarshalError unmarshals a response error for the REST XML protocol. -func UnmarshalError(r *request.Request) { - query.UnmarshalError(r) -} diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/restxml/unmarshal_test.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/restxml/unmarshal_test.go deleted file mode 100644 index 9404bb7..0000000 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/restxml/unmarshal_test.go +++ /dev/null @@ -1,2289 +0,0 @@ -package restxml_test - -import ( - "bytes" - "encoding/json" - "encoding/xml" - "fmt" - "io" - "io/ioutil" - "net/http" - "net/url" - "reflect" - "testing" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/awstesting" - "github.com/aws/aws-sdk-go/awstesting/unit" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/restxml" - "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil" - "github.com/aws/aws-sdk-go/private/util" - "github.com/stretchr/testify/assert" -) - -var _ bytes.Buffer // always import bytes -var _ http.Request -var _ json.Marshaler -var _ time.Time -var _ xmlutil.XMLNode -var _ xml.Attr -var _ = ioutil.Discard -var _ = util.Trim("") -var _ = url.Values{} -var _ = io.EOF -var _ = aws.String -var _ = fmt.Println -var _ = reflect.Value{} - -func init() { - protocol.RandReader = &awstesting.ZeroReader{} -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type OutputService1ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the OutputService1ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a OutputService1ProtocolTest client from just a session. -// svc := outputservice1protocoltest.New(mySession) -// -// // Create a OutputService1ProtocolTest client with additional configuration -// svc := outputservice1protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewOutputService1ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService1ProtocolTest { - c := p.ClientConfig("outputservice1protocoltest", cfgs...) - return newOutputService1ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newOutputService1ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *OutputService1ProtocolTest { - svc := &OutputService1ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "outputservice1protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restxml.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a OutputService1ProtocolTest operation and runs any -// custom request initialization. -func (c *OutputService1ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opOutputService1TestCaseOperation1 = "OperationName" - -// OutputService1TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the OutputService1TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See OutputService1TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the OutputService1TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the OutputService1TestCaseOperation1Request method. -// req, resp := client.OutputService1TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *OutputService1ProtocolTest) OutputService1TestCaseOperation1Request(input *OutputService1TestShapeOutputService1TestCaseOperation1Input) (req *request.Request, output *OutputService1TestShapeOutputService1TestCaseOperation2Output) { - op := &request.Operation{ - Name: opOutputService1TestCaseOperation1, - HTTPPath: "/", - } - - if input == nil { - input = &OutputService1TestShapeOutputService1TestCaseOperation1Input{} - } - - output = &OutputService1TestShapeOutputService1TestCaseOperation2Output{} - req = c.newRequest(op, input, output) - return -} - -// OutputService1TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation OutputService1TestCaseOperation1 for usage and error information. -func (c *OutputService1ProtocolTest) OutputService1TestCaseOperation1(input *OutputService1TestShapeOutputService1TestCaseOperation1Input) (*OutputService1TestShapeOutputService1TestCaseOperation2Output, error) { - req, out := c.OutputService1TestCaseOperation1Request(input) - return out, req.Send() -} - -// OutputService1TestCaseOperation1WithContext is the same as OutputService1TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See OutputService1TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OutputService1ProtocolTest) OutputService1TestCaseOperation1WithContext(ctx aws.Context, input *OutputService1TestShapeOutputService1TestCaseOperation1Input, opts ...request.Option) (*OutputService1TestShapeOutputService1TestCaseOperation2Output, error) { - req, out := c.OutputService1TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opOutputService1TestCaseOperation2 = "OperationName" - -// OutputService1TestCaseOperation2Request generates a "aws/request.Request" representing the -// client's request for the OutputService1TestCaseOperation2 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See OutputService1TestCaseOperation2 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the OutputService1TestCaseOperation2 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the OutputService1TestCaseOperation2Request method. -// req, resp := client.OutputService1TestCaseOperation2Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *OutputService1ProtocolTest) OutputService1TestCaseOperation2Request(input *OutputService1TestShapeOutputService1TestCaseOperation2Input) (req *request.Request, output *OutputService1TestShapeOutputService1TestCaseOperation2Output) { - op := &request.Operation{ - Name: opOutputService1TestCaseOperation2, - HTTPPath: "/", - } - - if input == nil { - input = &OutputService1TestShapeOutputService1TestCaseOperation2Input{} - } - - output = &OutputService1TestShapeOutputService1TestCaseOperation2Output{} - req = c.newRequest(op, input, output) - return -} - -// OutputService1TestCaseOperation2 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation OutputService1TestCaseOperation2 for usage and error information. -func (c *OutputService1ProtocolTest) OutputService1TestCaseOperation2(input *OutputService1TestShapeOutputService1TestCaseOperation2Input) (*OutputService1TestShapeOutputService1TestCaseOperation2Output, error) { - req, out := c.OutputService1TestCaseOperation2Request(input) - return out, req.Send() -} - -// OutputService1TestCaseOperation2WithContext is the same as OutputService1TestCaseOperation2 with the addition of -// the ability to pass a context and additional request options. -// -// See OutputService1TestCaseOperation2 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OutputService1ProtocolTest) OutputService1TestCaseOperation2WithContext(ctx aws.Context, input *OutputService1TestShapeOutputService1TestCaseOperation2Input, opts ...request.Option) (*OutputService1TestShapeOutputService1TestCaseOperation2Output, error) { - req, out := c.OutputService1TestCaseOperation2Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type OutputService1TestShapeOutputService1TestCaseOperation1Input struct { - _ struct{} `type:"structure"` -} - -type OutputService1TestShapeOutputService1TestCaseOperation2Input struct { - _ struct{} `type:"structure"` -} - -type OutputService1TestShapeOutputService1TestCaseOperation2Output struct { - _ struct{} `type:"structure"` - - Char *string `type:"character"` - - Double *float64 `type:"double"` - - FalseBool *bool `type:"boolean"` - - Float *float64 `type:"float"` - - ImaHeader *string `location:"header" type:"string"` - - ImaHeaderLocation *string `location:"header" locationName:"X-Foo" type:"string"` - - Long *int64 `type:"long"` - - Num *int64 `locationName:"FooNum" type:"integer"` - - Str *string `type:"string"` - - Timestamp *time.Time `type:"timestamp" timestampFormat:"iso8601"` - - TrueBool *bool `type:"boolean"` -} - -// SetChar sets the Char field's value. -func (s *OutputService1TestShapeOutputService1TestCaseOperation2Output) SetChar(v string) *OutputService1TestShapeOutputService1TestCaseOperation2Output { - s.Char = &v - return s -} - -// SetDouble sets the Double field's value. -func (s *OutputService1TestShapeOutputService1TestCaseOperation2Output) SetDouble(v float64) *OutputService1TestShapeOutputService1TestCaseOperation2Output { - s.Double = &v - return s -} - -// SetFalseBool sets the FalseBool field's value. -func (s *OutputService1TestShapeOutputService1TestCaseOperation2Output) SetFalseBool(v bool) *OutputService1TestShapeOutputService1TestCaseOperation2Output { - s.FalseBool = &v - return s -} - -// SetFloat sets the Float field's value. -func (s *OutputService1TestShapeOutputService1TestCaseOperation2Output) SetFloat(v float64) *OutputService1TestShapeOutputService1TestCaseOperation2Output { - s.Float = &v - return s -} - -// SetImaHeader sets the ImaHeader field's value. -func (s *OutputService1TestShapeOutputService1TestCaseOperation2Output) SetImaHeader(v string) *OutputService1TestShapeOutputService1TestCaseOperation2Output { - s.ImaHeader = &v - return s -} - -// SetImaHeaderLocation sets the ImaHeaderLocation field's value. -func (s *OutputService1TestShapeOutputService1TestCaseOperation2Output) SetImaHeaderLocation(v string) *OutputService1TestShapeOutputService1TestCaseOperation2Output { - s.ImaHeaderLocation = &v - return s -} - -// SetLong sets the Long field's value. -func (s *OutputService1TestShapeOutputService1TestCaseOperation2Output) SetLong(v int64) *OutputService1TestShapeOutputService1TestCaseOperation2Output { - s.Long = &v - return s -} - -// SetNum sets the Num field's value. -func (s *OutputService1TestShapeOutputService1TestCaseOperation2Output) SetNum(v int64) *OutputService1TestShapeOutputService1TestCaseOperation2Output { - s.Num = &v - return s -} - -// SetStr sets the Str field's value. -func (s *OutputService1TestShapeOutputService1TestCaseOperation2Output) SetStr(v string) *OutputService1TestShapeOutputService1TestCaseOperation2Output { - s.Str = &v - return s -} - -// SetTimestamp sets the Timestamp field's value. -func (s *OutputService1TestShapeOutputService1TestCaseOperation2Output) SetTimestamp(v time.Time) *OutputService1TestShapeOutputService1TestCaseOperation2Output { - s.Timestamp = &v - return s -} - -// SetTrueBool sets the TrueBool field's value. -func (s *OutputService1TestShapeOutputService1TestCaseOperation2Output) SetTrueBool(v bool) *OutputService1TestShapeOutputService1TestCaseOperation2Output { - s.TrueBool = &v - return s -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type OutputService2ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the OutputService2ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a OutputService2ProtocolTest client from just a session. -// svc := outputservice2protocoltest.New(mySession) -// -// // Create a OutputService2ProtocolTest client with additional configuration -// svc := outputservice2protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewOutputService2ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService2ProtocolTest { - c := p.ClientConfig("outputservice2protocoltest", cfgs...) - return newOutputService2ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newOutputService2ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *OutputService2ProtocolTest { - svc := &OutputService2ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "outputservice2protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restxml.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a OutputService2ProtocolTest operation and runs any -// custom request initialization. -func (c *OutputService2ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opOutputService2TestCaseOperation1 = "OperationName" - -// OutputService2TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the OutputService2TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See OutputService2TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the OutputService2TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the OutputService2TestCaseOperation1Request method. -// req, resp := client.OutputService2TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *OutputService2ProtocolTest) OutputService2TestCaseOperation1Request(input *OutputService2TestShapeOutputService2TestCaseOperation1Input) (req *request.Request, output *OutputService2TestShapeOutputService2TestCaseOperation1Output) { - op := &request.Operation{ - Name: opOutputService2TestCaseOperation1, - HTTPPath: "/", - } - - if input == nil { - input = &OutputService2TestShapeOutputService2TestCaseOperation1Input{} - } - - output = &OutputService2TestShapeOutputService2TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - return -} - -// OutputService2TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation OutputService2TestCaseOperation1 for usage and error information. -func (c *OutputService2ProtocolTest) OutputService2TestCaseOperation1(input *OutputService2TestShapeOutputService2TestCaseOperation1Input) (*OutputService2TestShapeOutputService2TestCaseOperation1Output, error) { - req, out := c.OutputService2TestCaseOperation1Request(input) - return out, req.Send() -} - -// OutputService2TestCaseOperation1WithContext is the same as OutputService2TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See OutputService2TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OutputService2ProtocolTest) OutputService2TestCaseOperation1WithContext(ctx aws.Context, input *OutputService2TestShapeOutputService2TestCaseOperation1Input, opts ...request.Option) (*OutputService2TestShapeOutputService2TestCaseOperation1Output, error) { - req, out := c.OutputService2TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type OutputService2TestShapeOutputService2TestCaseOperation1Input struct { - _ struct{} `type:"structure"` -} - -type OutputService2TestShapeOutputService2TestCaseOperation1Output struct { - _ struct{} `type:"structure"` - - // Blob is automatically base64 encoded/decoded by the SDK. - Blob []byte `type:"blob"` -} - -// SetBlob sets the Blob field's value. -func (s *OutputService2TestShapeOutputService2TestCaseOperation1Output) SetBlob(v []byte) *OutputService2TestShapeOutputService2TestCaseOperation1Output { - s.Blob = v - return s -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type OutputService3ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the OutputService3ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a OutputService3ProtocolTest client from just a session. -// svc := outputservice3protocoltest.New(mySession) -// -// // Create a OutputService3ProtocolTest client with additional configuration -// svc := outputservice3protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewOutputService3ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService3ProtocolTest { - c := p.ClientConfig("outputservice3protocoltest", cfgs...) - return newOutputService3ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newOutputService3ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *OutputService3ProtocolTest { - svc := &OutputService3ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "outputservice3protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restxml.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a OutputService3ProtocolTest operation and runs any -// custom request initialization. -func (c *OutputService3ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opOutputService3TestCaseOperation1 = "OperationName" - -// OutputService3TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the OutputService3TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See OutputService3TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the OutputService3TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the OutputService3TestCaseOperation1Request method. -// req, resp := client.OutputService3TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *OutputService3ProtocolTest) OutputService3TestCaseOperation1Request(input *OutputService3TestShapeOutputService3TestCaseOperation1Input) (req *request.Request, output *OutputService3TestShapeOutputService3TestCaseOperation1Output) { - op := &request.Operation{ - Name: opOutputService3TestCaseOperation1, - HTTPPath: "/", - } - - if input == nil { - input = &OutputService3TestShapeOutputService3TestCaseOperation1Input{} - } - - output = &OutputService3TestShapeOutputService3TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - return -} - -// OutputService3TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation OutputService3TestCaseOperation1 for usage and error information. -func (c *OutputService3ProtocolTest) OutputService3TestCaseOperation1(input *OutputService3TestShapeOutputService3TestCaseOperation1Input) (*OutputService3TestShapeOutputService3TestCaseOperation1Output, error) { - req, out := c.OutputService3TestCaseOperation1Request(input) - return out, req.Send() -} - -// OutputService3TestCaseOperation1WithContext is the same as OutputService3TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See OutputService3TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OutputService3ProtocolTest) OutputService3TestCaseOperation1WithContext(ctx aws.Context, input *OutputService3TestShapeOutputService3TestCaseOperation1Input, opts ...request.Option) (*OutputService3TestShapeOutputService3TestCaseOperation1Output, error) { - req, out := c.OutputService3TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type OutputService3TestShapeOutputService3TestCaseOperation1Input struct { - _ struct{} `type:"structure"` -} - -type OutputService3TestShapeOutputService3TestCaseOperation1Output struct { - _ struct{} `type:"structure"` - - ListMember []*string `type:"list"` -} - -// SetListMember sets the ListMember field's value. -func (s *OutputService3TestShapeOutputService3TestCaseOperation1Output) SetListMember(v []*string) *OutputService3TestShapeOutputService3TestCaseOperation1Output { - s.ListMember = v - return s -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type OutputService4ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the OutputService4ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a OutputService4ProtocolTest client from just a session. -// svc := outputservice4protocoltest.New(mySession) -// -// // Create a OutputService4ProtocolTest client with additional configuration -// svc := outputservice4protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewOutputService4ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService4ProtocolTest { - c := p.ClientConfig("outputservice4protocoltest", cfgs...) - return newOutputService4ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newOutputService4ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *OutputService4ProtocolTest { - svc := &OutputService4ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "outputservice4protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restxml.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a OutputService4ProtocolTest operation and runs any -// custom request initialization. -func (c *OutputService4ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opOutputService4TestCaseOperation1 = "OperationName" - -// OutputService4TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the OutputService4TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See OutputService4TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the OutputService4TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the OutputService4TestCaseOperation1Request method. -// req, resp := client.OutputService4TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *OutputService4ProtocolTest) OutputService4TestCaseOperation1Request(input *OutputService4TestShapeOutputService4TestCaseOperation1Input) (req *request.Request, output *OutputService4TestShapeOutputService4TestCaseOperation1Output) { - op := &request.Operation{ - Name: opOutputService4TestCaseOperation1, - HTTPPath: "/", - } - - if input == nil { - input = &OutputService4TestShapeOutputService4TestCaseOperation1Input{} - } - - output = &OutputService4TestShapeOutputService4TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - return -} - -// OutputService4TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation OutputService4TestCaseOperation1 for usage and error information. -func (c *OutputService4ProtocolTest) OutputService4TestCaseOperation1(input *OutputService4TestShapeOutputService4TestCaseOperation1Input) (*OutputService4TestShapeOutputService4TestCaseOperation1Output, error) { - req, out := c.OutputService4TestCaseOperation1Request(input) - return out, req.Send() -} - -// OutputService4TestCaseOperation1WithContext is the same as OutputService4TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See OutputService4TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OutputService4ProtocolTest) OutputService4TestCaseOperation1WithContext(ctx aws.Context, input *OutputService4TestShapeOutputService4TestCaseOperation1Input, opts ...request.Option) (*OutputService4TestShapeOutputService4TestCaseOperation1Output, error) { - req, out := c.OutputService4TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type OutputService4TestShapeOutputService4TestCaseOperation1Input struct { - _ struct{} `type:"structure"` -} - -type OutputService4TestShapeOutputService4TestCaseOperation1Output struct { - _ struct{} `type:"structure"` - - ListMember []*string `locationNameList:"item" type:"list"` -} - -// SetListMember sets the ListMember field's value. -func (s *OutputService4TestShapeOutputService4TestCaseOperation1Output) SetListMember(v []*string) *OutputService4TestShapeOutputService4TestCaseOperation1Output { - s.ListMember = v - return s -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type OutputService5ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the OutputService5ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a OutputService5ProtocolTest client from just a session. -// svc := outputservice5protocoltest.New(mySession) -// -// // Create a OutputService5ProtocolTest client with additional configuration -// svc := outputservice5protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewOutputService5ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService5ProtocolTest { - c := p.ClientConfig("outputservice5protocoltest", cfgs...) - return newOutputService5ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newOutputService5ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *OutputService5ProtocolTest { - svc := &OutputService5ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "outputservice5protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restxml.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a OutputService5ProtocolTest operation and runs any -// custom request initialization. -func (c *OutputService5ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opOutputService5TestCaseOperation1 = "OperationName" - -// OutputService5TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the OutputService5TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See OutputService5TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the OutputService5TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the OutputService5TestCaseOperation1Request method. -// req, resp := client.OutputService5TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *OutputService5ProtocolTest) OutputService5TestCaseOperation1Request(input *OutputService5TestShapeOutputService5TestCaseOperation1Input) (req *request.Request, output *OutputService5TestShapeOutputService5TestCaseOperation1Output) { - op := &request.Operation{ - Name: opOutputService5TestCaseOperation1, - HTTPPath: "/", - } - - if input == nil { - input = &OutputService5TestShapeOutputService5TestCaseOperation1Input{} - } - - output = &OutputService5TestShapeOutputService5TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - return -} - -// OutputService5TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation OutputService5TestCaseOperation1 for usage and error information. -func (c *OutputService5ProtocolTest) OutputService5TestCaseOperation1(input *OutputService5TestShapeOutputService5TestCaseOperation1Input) (*OutputService5TestShapeOutputService5TestCaseOperation1Output, error) { - req, out := c.OutputService5TestCaseOperation1Request(input) - return out, req.Send() -} - -// OutputService5TestCaseOperation1WithContext is the same as OutputService5TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See OutputService5TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OutputService5ProtocolTest) OutputService5TestCaseOperation1WithContext(ctx aws.Context, input *OutputService5TestShapeOutputService5TestCaseOperation1Input, opts ...request.Option) (*OutputService5TestShapeOutputService5TestCaseOperation1Output, error) { - req, out := c.OutputService5TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type OutputService5TestShapeOutputService5TestCaseOperation1Input struct { - _ struct{} `type:"structure"` -} - -type OutputService5TestShapeOutputService5TestCaseOperation1Output struct { - _ struct{} `type:"structure"` - - ListMember []*string `type:"list" flattened:"true"` -} - -// SetListMember sets the ListMember field's value. -func (s *OutputService5TestShapeOutputService5TestCaseOperation1Output) SetListMember(v []*string) *OutputService5TestShapeOutputService5TestCaseOperation1Output { - s.ListMember = v - return s -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type OutputService6ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the OutputService6ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a OutputService6ProtocolTest client from just a session. -// svc := outputservice6protocoltest.New(mySession) -// -// // Create a OutputService6ProtocolTest client with additional configuration -// svc := outputservice6protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewOutputService6ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService6ProtocolTest { - c := p.ClientConfig("outputservice6protocoltest", cfgs...) - return newOutputService6ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newOutputService6ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *OutputService6ProtocolTest { - svc := &OutputService6ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "outputservice6protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restxml.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a OutputService6ProtocolTest operation and runs any -// custom request initialization. -func (c *OutputService6ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opOutputService6TestCaseOperation1 = "OperationName" - -// OutputService6TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the OutputService6TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See OutputService6TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the OutputService6TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the OutputService6TestCaseOperation1Request method. -// req, resp := client.OutputService6TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *OutputService6ProtocolTest) OutputService6TestCaseOperation1Request(input *OutputService6TestShapeOutputService6TestCaseOperation1Input) (req *request.Request, output *OutputService6TestShapeOutputService6TestCaseOperation1Output) { - op := &request.Operation{ - Name: opOutputService6TestCaseOperation1, - HTTPPath: "/", - } - - if input == nil { - input = &OutputService6TestShapeOutputService6TestCaseOperation1Input{} - } - - output = &OutputService6TestShapeOutputService6TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - return -} - -// OutputService6TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation OutputService6TestCaseOperation1 for usage and error information. -func (c *OutputService6ProtocolTest) OutputService6TestCaseOperation1(input *OutputService6TestShapeOutputService6TestCaseOperation1Input) (*OutputService6TestShapeOutputService6TestCaseOperation1Output, error) { - req, out := c.OutputService6TestCaseOperation1Request(input) - return out, req.Send() -} - -// OutputService6TestCaseOperation1WithContext is the same as OutputService6TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See OutputService6TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OutputService6ProtocolTest) OutputService6TestCaseOperation1WithContext(ctx aws.Context, input *OutputService6TestShapeOutputService6TestCaseOperation1Input, opts ...request.Option) (*OutputService6TestShapeOutputService6TestCaseOperation1Output, error) { - req, out := c.OutputService6TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type OutputService6TestShapeOutputService6TestCaseOperation1Input struct { - _ struct{} `type:"structure"` -} - -type OutputService6TestShapeOutputService6TestCaseOperation1Output struct { - _ struct{} `type:"structure"` - - Map map[string]*OutputService6TestShapeSingleStructure `type:"map"` -} - -// SetMap sets the Map field's value. -func (s *OutputService6TestShapeOutputService6TestCaseOperation1Output) SetMap(v map[string]*OutputService6TestShapeSingleStructure) *OutputService6TestShapeOutputService6TestCaseOperation1Output { - s.Map = v - return s -} - -type OutputService6TestShapeSingleStructure struct { - _ struct{} `type:"structure"` - - Foo *string `locationName:"foo" type:"string"` -} - -// SetFoo sets the Foo field's value. -func (s *OutputService6TestShapeSingleStructure) SetFoo(v string) *OutputService6TestShapeSingleStructure { - s.Foo = &v - return s -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type OutputService7ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the OutputService7ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a OutputService7ProtocolTest client from just a session. -// svc := outputservice7protocoltest.New(mySession) -// -// // Create a OutputService7ProtocolTest client with additional configuration -// svc := outputservice7protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewOutputService7ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService7ProtocolTest { - c := p.ClientConfig("outputservice7protocoltest", cfgs...) - return newOutputService7ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newOutputService7ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *OutputService7ProtocolTest { - svc := &OutputService7ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "outputservice7protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restxml.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a OutputService7ProtocolTest operation and runs any -// custom request initialization. -func (c *OutputService7ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opOutputService7TestCaseOperation1 = "OperationName" - -// OutputService7TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the OutputService7TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See OutputService7TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the OutputService7TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the OutputService7TestCaseOperation1Request method. -// req, resp := client.OutputService7TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *OutputService7ProtocolTest) OutputService7TestCaseOperation1Request(input *OutputService7TestShapeOutputService7TestCaseOperation1Input) (req *request.Request, output *OutputService7TestShapeOutputService7TestCaseOperation1Output) { - op := &request.Operation{ - Name: opOutputService7TestCaseOperation1, - HTTPPath: "/", - } - - if input == nil { - input = &OutputService7TestShapeOutputService7TestCaseOperation1Input{} - } - - output = &OutputService7TestShapeOutputService7TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - return -} - -// OutputService7TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation OutputService7TestCaseOperation1 for usage and error information. -func (c *OutputService7ProtocolTest) OutputService7TestCaseOperation1(input *OutputService7TestShapeOutputService7TestCaseOperation1Input) (*OutputService7TestShapeOutputService7TestCaseOperation1Output, error) { - req, out := c.OutputService7TestCaseOperation1Request(input) - return out, req.Send() -} - -// OutputService7TestCaseOperation1WithContext is the same as OutputService7TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See OutputService7TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OutputService7ProtocolTest) OutputService7TestCaseOperation1WithContext(ctx aws.Context, input *OutputService7TestShapeOutputService7TestCaseOperation1Input, opts ...request.Option) (*OutputService7TestShapeOutputService7TestCaseOperation1Output, error) { - req, out := c.OutputService7TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type OutputService7TestShapeOutputService7TestCaseOperation1Input struct { - _ struct{} `type:"structure"` -} - -type OutputService7TestShapeOutputService7TestCaseOperation1Output struct { - _ struct{} `type:"structure"` - - Map map[string]*string `type:"map" flattened:"true"` -} - -// SetMap sets the Map field's value. -func (s *OutputService7TestShapeOutputService7TestCaseOperation1Output) SetMap(v map[string]*string) *OutputService7TestShapeOutputService7TestCaseOperation1Output { - s.Map = v - return s -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type OutputService8ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the OutputService8ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a OutputService8ProtocolTest client from just a session. -// svc := outputservice8protocoltest.New(mySession) -// -// // Create a OutputService8ProtocolTest client with additional configuration -// svc := outputservice8protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewOutputService8ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService8ProtocolTest { - c := p.ClientConfig("outputservice8protocoltest", cfgs...) - return newOutputService8ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newOutputService8ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *OutputService8ProtocolTest { - svc := &OutputService8ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "outputservice8protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restxml.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a OutputService8ProtocolTest operation and runs any -// custom request initialization. -func (c *OutputService8ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opOutputService8TestCaseOperation1 = "OperationName" - -// OutputService8TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the OutputService8TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See OutputService8TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the OutputService8TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the OutputService8TestCaseOperation1Request method. -// req, resp := client.OutputService8TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *OutputService8ProtocolTest) OutputService8TestCaseOperation1Request(input *OutputService8TestShapeOutputService8TestCaseOperation1Input) (req *request.Request, output *OutputService8TestShapeOutputService8TestCaseOperation1Output) { - op := &request.Operation{ - Name: opOutputService8TestCaseOperation1, - HTTPPath: "/", - } - - if input == nil { - input = &OutputService8TestShapeOutputService8TestCaseOperation1Input{} - } - - output = &OutputService8TestShapeOutputService8TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - return -} - -// OutputService8TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation OutputService8TestCaseOperation1 for usage and error information. -func (c *OutputService8ProtocolTest) OutputService8TestCaseOperation1(input *OutputService8TestShapeOutputService8TestCaseOperation1Input) (*OutputService8TestShapeOutputService8TestCaseOperation1Output, error) { - req, out := c.OutputService8TestCaseOperation1Request(input) - return out, req.Send() -} - -// OutputService8TestCaseOperation1WithContext is the same as OutputService8TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See OutputService8TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OutputService8ProtocolTest) OutputService8TestCaseOperation1WithContext(ctx aws.Context, input *OutputService8TestShapeOutputService8TestCaseOperation1Input, opts ...request.Option) (*OutputService8TestShapeOutputService8TestCaseOperation1Output, error) { - req, out := c.OutputService8TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type OutputService8TestShapeOutputService8TestCaseOperation1Input struct { - _ struct{} `type:"structure"` -} - -type OutputService8TestShapeOutputService8TestCaseOperation1Output struct { - _ struct{} `type:"structure"` - - Map map[string]*string `locationNameKey:"foo" locationNameValue:"bar" type:"map"` -} - -// SetMap sets the Map field's value. -func (s *OutputService8TestShapeOutputService8TestCaseOperation1Output) SetMap(v map[string]*string) *OutputService8TestShapeOutputService8TestCaseOperation1Output { - s.Map = v - return s -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type OutputService9ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the OutputService9ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a OutputService9ProtocolTest client from just a session. -// svc := outputservice9protocoltest.New(mySession) -// -// // Create a OutputService9ProtocolTest client with additional configuration -// svc := outputservice9protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewOutputService9ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService9ProtocolTest { - c := p.ClientConfig("outputservice9protocoltest", cfgs...) - return newOutputService9ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newOutputService9ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *OutputService9ProtocolTest { - svc := &OutputService9ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "outputservice9protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restxml.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a OutputService9ProtocolTest operation and runs any -// custom request initialization. -func (c *OutputService9ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opOutputService9TestCaseOperation1 = "OperationName" - -// OutputService9TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the OutputService9TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See OutputService9TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the OutputService9TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the OutputService9TestCaseOperation1Request method. -// req, resp := client.OutputService9TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *OutputService9ProtocolTest) OutputService9TestCaseOperation1Request(input *OutputService9TestShapeOutputService9TestCaseOperation1Input) (req *request.Request, output *OutputService9TestShapeOutputService9TestCaseOperation1Output) { - op := &request.Operation{ - Name: opOutputService9TestCaseOperation1, - HTTPPath: "/", - } - - if input == nil { - input = &OutputService9TestShapeOutputService9TestCaseOperation1Input{} - } - - output = &OutputService9TestShapeOutputService9TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - return -} - -// OutputService9TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation OutputService9TestCaseOperation1 for usage and error information. -func (c *OutputService9ProtocolTest) OutputService9TestCaseOperation1(input *OutputService9TestShapeOutputService9TestCaseOperation1Input) (*OutputService9TestShapeOutputService9TestCaseOperation1Output, error) { - req, out := c.OutputService9TestCaseOperation1Request(input) - return out, req.Send() -} - -// OutputService9TestCaseOperation1WithContext is the same as OutputService9TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See OutputService9TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OutputService9ProtocolTest) OutputService9TestCaseOperation1WithContext(ctx aws.Context, input *OutputService9TestShapeOutputService9TestCaseOperation1Input, opts ...request.Option) (*OutputService9TestShapeOutputService9TestCaseOperation1Output, error) { - req, out := c.OutputService9TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type OutputService9TestShapeOutputService9TestCaseOperation1Input struct { - _ struct{} `type:"structure"` -} - -type OutputService9TestShapeOutputService9TestCaseOperation1Output struct { - _ struct{} `type:"structure" payload:"Data"` - - Data *OutputService9TestShapeSingleStructure `type:"structure"` - - Header *string `location:"header" locationName:"X-Foo" type:"string"` -} - -// SetData sets the Data field's value. -func (s *OutputService9TestShapeOutputService9TestCaseOperation1Output) SetData(v *OutputService9TestShapeSingleStructure) *OutputService9TestShapeOutputService9TestCaseOperation1Output { - s.Data = v - return s -} - -// SetHeader sets the Header field's value. -func (s *OutputService9TestShapeOutputService9TestCaseOperation1Output) SetHeader(v string) *OutputService9TestShapeOutputService9TestCaseOperation1Output { - s.Header = &v - return s -} - -type OutputService9TestShapeSingleStructure struct { - _ struct{} `type:"structure"` - - Foo *string `type:"string"` -} - -// SetFoo sets the Foo field's value. -func (s *OutputService9TestShapeSingleStructure) SetFoo(v string) *OutputService9TestShapeSingleStructure { - s.Foo = &v - return s -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type OutputService10ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the OutputService10ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a OutputService10ProtocolTest client from just a session. -// svc := outputservice10protocoltest.New(mySession) -// -// // Create a OutputService10ProtocolTest client with additional configuration -// svc := outputservice10protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewOutputService10ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService10ProtocolTest { - c := p.ClientConfig("outputservice10protocoltest", cfgs...) - return newOutputService10ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newOutputService10ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *OutputService10ProtocolTest { - svc := &OutputService10ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "outputservice10protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restxml.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a OutputService10ProtocolTest operation and runs any -// custom request initialization. -func (c *OutputService10ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opOutputService10TestCaseOperation1 = "OperationName" - -// OutputService10TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the OutputService10TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See OutputService10TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the OutputService10TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the OutputService10TestCaseOperation1Request method. -// req, resp := client.OutputService10TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *OutputService10ProtocolTest) OutputService10TestCaseOperation1Request(input *OutputService10TestShapeOutputService10TestCaseOperation1Input) (req *request.Request, output *OutputService10TestShapeOutputService10TestCaseOperation1Output) { - op := &request.Operation{ - Name: opOutputService10TestCaseOperation1, - HTTPPath: "/", - } - - if input == nil { - input = &OutputService10TestShapeOutputService10TestCaseOperation1Input{} - } - - output = &OutputService10TestShapeOutputService10TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - return -} - -// OutputService10TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation OutputService10TestCaseOperation1 for usage and error information. -func (c *OutputService10ProtocolTest) OutputService10TestCaseOperation1(input *OutputService10TestShapeOutputService10TestCaseOperation1Input) (*OutputService10TestShapeOutputService10TestCaseOperation1Output, error) { - req, out := c.OutputService10TestCaseOperation1Request(input) - return out, req.Send() -} - -// OutputService10TestCaseOperation1WithContext is the same as OutputService10TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See OutputService10TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OutputService10ProtocolTest) OutputService10TestCaseOperation1WithContext(ctx aws.Context, input *OutputService10TestShapeOutputService10TestCaseOperation1Input, opts ...request.Option) (*OutputService10TestShapeOutputService10TestCaseOperation1Output, error) { - req, out := c.OutputService10TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type OutputService10TestShapeOutputService10TestCaseOperation1Input struct { - _ struct{} `type:"structure"` -} - -type OutputService10TestShapeOutputService10TestCaseOperation1Output struct { - _ struct{} `type:"structure" payload:"Stream"` - - Stream []byte `type:"blob"` -} - -// SetStream sets the Stream field's value. -func (s *OutputService10TestShapeOutputService10TestCaseOperation1Output) SetStream(v []byte) *OutputService10TestShapeOutputService10TestCaseOperation1Output { - s.Stream = v - return s -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type OutputService11ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the OutputService11ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a OutputService11ProtocolTest client from just a session. -// svc := outputservice11protocoltest.New(mySession) -// -// // Create a OutputService11ProtocolTest client with additional configuration -// svc := outputservice11protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewOutputService11ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService11ProtocolTest { - c := p.ClientConfig("outputservice11protocoltest", cfgs...) - return newOutputService11ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newOutputService11ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *OutputService11ProtocolTest { - svc := &OutputService11ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "outputservice11protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restxml.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a OutputService11ProtocolTest operation and runs any -// custom request initialization. -func (c *OutputService11ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opOutputService11TestCaseOperation1 = "OperationName" - -// OutputService11TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the OutputService11TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See OutputService11TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the OutputService11TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the OutputService11TestCaseOperation1Request method. -// req, resp := client.OutputService11TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *OutputService11ProtocolTest) OutputService11TestCaseOperation1Request(input *OutputService11TestShapeOutputService11TestCaseOperation1Input) (req *request.Request, output *OutputService11TestShapeOutputService11TestCaseOperation1Output) { - op := &request.Operation{ - Name: opOutputService11TestCaseOperation1, - HTTPPath: "/", - } - - if input == nil { - input = &OutputService11TestShapeOutputService11TestCaseOperation1Input{} - } - - output = &OutputService11TestShapeOutputService11TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - return -} - -// OutputService11TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation OutputService11TestCaseOperation1 for usage and error information. -func (c *OutputService11ProtocolTest) OutputService11TestCaseOperation1(input *OutputService11TestShapeOutputService11TestCaseOperation1Input) (*OutputService11TestShapeOutputService11TestCaseOperation1Output, error) { - req, out := c.OutputService11TestCaseOperation1Request(input) - return out, req.Send() -} - -// OutputService11TestCaseOperation1WithContext is the same as OutputService11TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See OutputService11TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OutputService11ProtocolTest) OutputService11TestCaseOperation1WithContext(ctx aws.Context, input *OutputService11TestShapeOutputService11TestCaseOperation1Input, opts ...request.Option) (*OutputService11TestShapeOutputService11TestCaseOperation1Output, error) { - req, out := c.OutputService11TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type OutputService11TestShapeOutputService11TestCaseOperation1Input struct { - _ struct{} `type:"structure"` -} - -type OutputService11TestShapeOutputService11TestCaseOperation1Output struct { - _ struct{} `type:"structure"` - - Char *string `location:"header" locationName:"x-char" type:"character"` - - Double *float64 `location:"header" locationName:"x-double" type:"double"` - - FalseBool *bool `location:"header" locationName:"x-false-bool" type:"boolean"` - - Float *float64 `location:"header" locationName:"x-float" type:"float"` - - Integer *int64 `location:"header" locationName:"x-int" type:"integer"` - - Long *int64 `location:"header" locationName:"x-long" type:"long"` - - Str *string `location:"header" locationName:"x-str" type:"string"` - - Timestamp *time.Time `location:"header" locationName:"x-timestamp" type:"timestamp" timestampFormat:"iso8601"` - - TrueBool *bool `location:"header" locationName:"x-true-bool" type:"boolean"` -} - -// SetChar sets the Char field's value. -func (s *OutputService11TestShapeOutputService11TestCaseOperation1Output) SetChar(v string) *OutputService11TestShapeOutputService11TestCaseOperation1Output { - s.Char = &v - return s -} - -// SetDouble sets the Double field's value. -func (s *OutputService11TestShapeOutputService11TestCaseOperation1Output) SetDouble(v float64) *OutputService11TestShapeOutputService11TestCaseOperation1Output { - s.Double = &v - return s -} - -// SetFalseBool sets the FalseBool field's value. -func (s *OutputService11TestShapeOutputService11TestCaseOperation1Output) SetFalseBool(v bool) *OutputService11TestShapeOutputService11TestCaseOperation1Output { - s.FalseBool = &v - return s -} - -// SetFloat sets the Float field's value. -func (s *OutputService11TestShapeOutputService11TestCaseOperation1Output) SetFloat(v float64) *OutputService11TestShapeOutputService11TestCaseOperation1Output { - s.Float = &v - return s -} - -// SetInteger sets the Integer field's value. -func (s *OutputService11TestShapeOutputService11TestCaseOperation1Output) SetInteger(v int64) *OutputService11TestShapeOutputService11TestCaseOperation1Output { - s.Integer = &v - return s -} - -// SetLong sets the Long field's value. -func (s *OutputService11TestShapeOutputService11TestCaseOperation1Output) SetLong(v int64) *OutputService11TestShapeOutputService11TestCaseOperation1Output { - s.Long = &v - return s -} - -// SetStr sets the Str field's value. -func (s *OutputService11TestShapeOutputService11TestCaseOperation1Output) SetStr(v string) *OutputService11TestShapeOutputService11TestCaseOperation1Output { - s.Str = &v - return s -} - -// SetTimestamp sets the Timestamp field's value. -func (s *OutputService11TestShapeOutputService11TestCaseOperation1Output) SetTimestamp(v time.Time) *OutputService11TestShapeOutputService11TestCaseOperation1Output { - s.Timestamp = &v - return s -} - -// SetTrueBool sets the TrueBool field's value. -func (s *OutputService11TestShapeOutputService11TestCaseOperation1Output) SetTrueBool(v bool) *OutputService11TestShapeOutputService11TestCaseOperation1Output { - s.TrueBool = &v - return s -} - -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -type OutputService12ProtocolTest struct { - *client.Client -} - -// New creates a new instance of the OutputService12ProtocolTest client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a OutputService12ProtocolTest client from just a session. -// svc := outputservice12protocoltest.New(mySession) -// -// // Create a OutputService12ProtocolTest client with additional configuration -// svc := outputservice12protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func NewOutputService12ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService12ProtocolTest { - c := p.ClientConfig("outputservice12protocoltest", cfgs...) - return newOutputService12ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newOutputService12ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *OutputService12ProtocolTest { - svc := &OutputService12ProtocolTest{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: "outputservice12protocoltest", - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restxml.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler) - - return svc -} - -// newRequest creates a new request for a OutputService12ProtocolTest operation and runs any -// custom request initialization. -func (c *OutputService12ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - return req -} - -const opOutputService12TestCaseOperation1 = "OperationName" - -// OutputService12TestCaseOperation1Request generates a "aws/request.Request" representing the -// client's request for the OutputService12TestCaseOperation1 operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. -// -// See OutputService12TestCaseOperation1 for usage and error information. -// -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the OutputService12TestCaseOperation1 method directly -// instead. -// -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. -// -// // Example sending a request using the OutputService12TestCaseOperation1Request method. -// req, resp := client.OutputService12TestCaseOperation1Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *OutputService12ProtocolTest) OutputService12TestCaseOperation1Request(input *OutputService12TestShapeOutputService12TestCaseOperation1Input) (req *request.Request, output *OutputService12TestShapeOutputService12TestCaseOperation1Output) { - op := &request.Operation{ - Name: opOutputService12TestCaseOperation1, - HTTPPath: "/", - } - - if input == nil { - input = &OutputService12TestShapeOutputService12TestCaseOperation1Input{} - } - - output = &OutputService12TestShapeOutputService12TestCaseOperation1Output{} - req = c.newRequest(op, input, output) - return -} - -// OutputService12TestCaseOperation1 API operation for . -// -// 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 -// the error. -// -// See the AWS API reference guide for 's -// API operation OutputService12TestCaseOperation1 for usage and error information. -func (c *OutputService12ProtocolTest) OutputService12TestCaseOperation1(input *OutputService12TestShapeOutputService12TestCaseOperation1Input) (*OutputService12TestShapeOutputService12TestCaseOperation1Output, error) { - req, out := c.OutputService12TestCaseOperation1Request(input) - return out, req.Send() -} - -// OutputService12TestCaseOperation1WithContext is the same as OutputService12TestCaseOperation1 with the addition of -// the ability to pass a context and additional request options. -// -// See OutputService12TestCaseOperation1 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OutputService12ProtocolTest) OutputService12TestCaseOperation1WithContext(ctx aws.Context, input *OutputService12TestShapeOutputService12TestCaseOperation1Input, opts ...request.Option) (*OutputService12TestShapeOutputService12TestCaseOperation1Output, error) { - req, out := c.OutputService12TestCaseOperation1Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type OutputService12TestShapeOutputService12TestCaseOperation1Input struct { - _ struct{} `type:"structure"` -} - -type OutputService12TestShapeOutputService12TestCaseOperation1Output struct { - _ struct{} `type:"structure"` - - Foo *string `type:"string"` -} - -// SetFoo sets the Foo field's value. -func (s *OutputService12TestShapeOutputService12TestCaseOperation1Output) SetFoo(v string) *OutputService12TestShapeOutputService12TestCaseOperation1Output { - s.Foo = &v - return s -} - -// -// Tests begin here -// - -func TestOutputService1ProtocolTestScalarMembersCase1(t *testing.T) { - svc := NewOutputService1ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - - buf := bytes.NewReader([]byte("myname123falsetrue1.21.3200a2015-01-25T08:00:00Z")) - req, out := svc.OutputService1TestCaseOperation1Request(nil) - req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} - - // set headers - req.HTTPResponse.Header.Set("ImaHeader", "test") - req.HTTPResponse.Header.Set("X-Foo", "abc") - - // unmarshal response - restxml.UnmarshalMeta(req) - restxml.Unmarshal(req) - assert.NoError(t, req.Error) - - // assert response - assert.NotNil(t, out) // ensure out variable is used - assert.Equal(t, "a", *out.Char) - assert.Equal(t, 1.3, *out.Double) - assert.Equal(t, false, *out.FalseBool) - assert.Equal(t, 1.2, *out.Float) - assert.Equal(t, "test", *out.ImaHeader) - assert.Equal(t, "abc", *out.ImaHeaderLocation) - assert.Equal(t, int64(200), *out.Long) - assert.Equal(t, int64(123), *out.Num) - assert.Equal(t, "myname", *out.Str) - assert.Equal(t, time.Unix(1.4221728e+09, 0).UTC().String(), out.Timestamp.String()) - assert.Equal(t, true, *out.TrueBool) - -} - -func TestOutputService1ProtocolTestScalarMembersCase2(t *testing.T) { - svc := NewOutputService1ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - - buf := bytes.NewReader([]byte("123falsetrue1.21.3200a2015-01-25T08:00:00Z")) - req, out := svc.OutputService1TestCaseOperation2Request(nil) - req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} - - // set headers - req.HTTPResponse.Header.Set("ImaHeader", "test") - req.HTTPResponse.Header.Set("X-Foo", "abc") - - // unmarshal response - restxml.UnmarshalMeta(req) - restxml.Unmarshal(req) - assert.NoError(t, req.Error) - - // assert response - assert.NotNil(t, out) // ensure out variable is used - assert.Equal(t, "a", *out.Char) - assert.Equal(t, 1.3, *out.Double) - assert.Equal(t, false, *out.FalseBool) - assert.Equal(t, 1.2, *out.Float) - assert.Equal(t, "test", *out.ImaHeader) - assert.Equal(t, "abc", *out.ImaHeaderLocation) - assert.Equal(t, int64(200), *out.Long) - assert.Equal(t, int64(123), *out.Num) - assert.Equal(t, "", *out.Str) - assert.Equal(t, time.Unix(1.4221728e+09, 0).UTC().String(), out.Timestamp.String()) - assert.Equal(t, true, *out.TrueBool) - -} - -func TestOutputService2ProtocolTestBlobCase1(t *testing.T) { - svc := NewOutputService2ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - - buf := bytes.NewReader([]byte("dmFsdWU=")) - req, out := svc.OutputService2TestCaseOperation1Request(nil) - req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} - - // set headers - - // unmarshal response - restxml.UnmarshalMeta(req) - restxml.Unmarshal(req) - assert.NoError(t, req.Error) - - // assert response - assert.NotNil(t, out) // ensure out variable is used - assert.Equal(t, "value", string(out.Blob)) - -} - -func TestOutputService3ProtocolTestListsCase1(t *testing.T) { - svc := NewOutputService3ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - - buf := bytes.NewReader([]byte("abc123")) - req, out := svc.OutputService3TestCaseOperation1Request(nil) - req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} - - // set headers - - // unmarshal response - restxml.UnmarshalMeta(req) - restxml.Unmarshal(req) - assert.NoError(t, req.Error) - - // assert response - assert.NotNil(t, out) // ensure out variable is used - assert.Equal(t, "abc", *out.ListMember[0]) - assert.Equal(t, "123", *out.ListMember[1]) - -} - -func TestOutputService4ProtocolTestListWithCustomMemberNameCase1(t *testing.T) { - svc := NewOutputService4ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - - buf := bytes.NewReader([]byte("abc123")) - req, out := svc.OutputService4TestCaseOperation1Request(nil) - req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} - - // set headers - - // unmarshal response - restxml.UnmarshalMeta(req) - restxml.Unmarshal(req) - assert.NoError(t, req.Error) - - // assert response - assert.NotNil(t, out) // ensure out variable is used - assert.Equal(t, "abc", *out.ListMember[0]) - assert.Equal(t, "123", *out.ListMember[1]) - -} - -func TestOutputService5ProtocolTestFlattenedListCase1(t *testing.T) { - svc := NewOutputService5ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - - buf := bytes.NewReader([]byte("abc123")) - req, out := svc.OutputService5TestCaseOperation1Request(nil) - req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} - - // set headers - - // unmarshal response - restxml.UnmarshalMeta(req) - restxml.Unmarshal(req) - assert.NoError(t, req.Error) - - // assert response - assert.NotNil(t, out) // ensure out variable is used - assert.Equal(t, "abc", *out.ListMember[0]) - assert.Equal(t, "123", *out.ListMember[1]) - -} - -func TestOutputService6ProtocolTestNormalMapCase1(t *testing.T) { - svc := NewOutputService6ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - - buf := bytes.NewReader([]byte("quxbarbazbam")) - req, out := svc.OutputService6TestCaseOperation1Request(nil) - req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} - - // set headers - - // unmarshal response - restxml.UnmarshalMeta(req) - restxml.Unmarshal(req) - assert.NoError(t, req.Error) - - // assert response - assert.NotNil(t, out) // ensure out variable is used - assert.Equal(t, "bam", *out.Map["baz"].Foo) - assert.Equal(t, "bar", *out.Map["qux"].Foo) - -} - -func TestOutputService7ProtocolTestFlattenedMapCase1(t *testing.T) { - svc := NewOutputService7ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - - buf := bytes.NewReader([]byte("quxbarbazbam")) - req, out := svc.OutputService7TestCaseOperation1Request(nil) - req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} - - // set headers - - // unmarshal response - restxml.UnmarshalMeta(req) - restxml.Unmarshal(req) - assert.NoError(t, req.Error) - - // assert response - assert.NotNil(t, out) // ensure out variable is used - assert.Equal(t, "bam", *out.Map["baz"]) - assert.Equal(t, "bar", *out.Map["qux"]) - -} - -func TestOutputService8ProtocolTestNamedMapCase1(t *testing.T) { - svc := NewOutputService8ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - - buf := bytes.NewReader([]byte("quxbarbazbam")) - req, out := svc.OutputService8TestCaseOperation1Request(nil) - req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} - - // set headers - - // unmarshal response - restxml.UnmarshalMeta(req) - restxml.Unmarshal(req) - assert.NoError(t, req.Error) - - // assert response - assert.NotNil(t, out) // ensure out variable is used - assert.Equal(t, "bam", *out.Map["baz"]) - assert.Equal(t, "bar", *out.Map["qux"]) - -} - -func TestOutputService9ProtocolTestXMLPayloadCase1(t *testing.T) { - svc := NewOutputService9ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - - buf := bytes.NewReader([]byte("abc")) - req, out := svc.OutputService9TestCaseOperation1Request(nil) - req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} - - // set headers - req.HTTPResponse.Header.Set("X-Foo", "baz") - - // unmarshal response - restxml.UnmarshalMeta(req) - restxml.Unmarshal(req) - assert.NoError(t, req.Error) - - // assert response - assert.NotNil(t, out) // ensure out variable is used - assert.Equal(t, "abc", *out.Data.Foo) - assert.Equal(t, "baz", *out.Header) - -} - -func TestOutputService10ProtocolTestStreamingPayloadCase1(t *testing.T) { - svc := NewOutputService10ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - - buf := bytes.NewReader([]byte("abc")) - req, out := svc.OutputService10TestCaseOperation1Request(nil) - req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} - - // set headers - - // unmarshal response - restxml.UnmarshalMeta(req) - restxml.Unmarshal(req) - assert.NoError(t, req.Error) - - // assert response - assert.NotNil(t, out) // ensure out variable is used - assert.Equal(t, "abc", string(out.Stream)) - -} - -func TestOutputService11ProtocolTestScalarMembersInHeadersCase1(t *testing.T) { - svc := NewOutputService11ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - - buf := bytes.NewReader([]byte("")) - req, out := svc.OutputService11TestCaseOperation1Request(nil) - req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} - - // set headers - req.HTTPResponse.Header.Set("x-char", "a") - req.HTTPResponse.Header.Set("x-double", "1.5") - req.HTTPResponse.Header.Set("x-false-bool", "false") - req.HTTPResponse.Header.Set("x-float", "1.5") - req.HTTPResponse.Header.Set("x-int", "1") - req.HTTPResponse.Header.Set("x-long", "100") - req.HTTPResponse.Header.Set("x-str", "string") - req.HTTPResponse.Header.Set("x-timestamp", "Sun, 25 Jan 2015 08:00:00 GMT") - req.HTTPResponse.Header.Set("x-true-bool", "true") - - // unmarshal response - restxml.UnmarshalMeta(req) - restxml.Unmarshal(req) - assert.NoError(t, req.Error) - - // assert response - assert.NotNil(t, out) // ensure out variable is used - assert.Equal(t, "a", *out.Char) - assert.Equal(t, 1.5, *out.Double) - assert.Equal(t, false, *out.FalseBool) - assert.Equal(t, 1.5, *out.Float) - assert.Equal(t, int64(1), *out.Integer) - assert.Equal(t, int64(100), *out.Long) - assert.Equal(t, "string", *out.Str) - assert.Equal(t, time.Unix(1.4221728e+09, 0).UTC().String(), out.Timestamp.String()) - assert.Equal(t, true, *out.TrueBool) - -} - -func TestOutputService12ProtocolTestEmptyStringCase1(t *testing.T) { - svc := NewOutputService12ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) - - buf := bytes.NewReader([]byte("requestid")) - req, out := svc.OutputService12TestCaseOperation1Request(nil) - req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} - - // set headers - - // unmarshal response - restxml.UnmarshalMeta(req) - restxml.Unmarshal(req) - assert.NoError(t, req.Error) - - // assert response - assert.NotNil(t, out) // ensure out variable is used - assert.Equal(t, "", *out.Foo) - -} diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/unmarshal.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/unmarshal.go index 8758462..a6c25ba 100644 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/unmarshal.go +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/unmarshal.go @@ -52,9 +52,15 @@ func parse(r reflect.Value, node *XMLNode, tag reflect.StructTag) error { if t == "" { switch rtype.Kind() { case reflect.Struct: - t = "structure" + // also it can't be a time object + if _, ok := r.Interface().(*time.Time); !ok { + t = "structure" + } case reflect.Slice: - t = "list" + // also it can't be a byte slice + if _, ok := r.Interface().([]byte); !ok { + t = "list" + } case reflect.Map: t = "map" } diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/xml_to_struct_test.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/xml_to_struct_test.go deleted file mode 100644 index 77d12bb..0000000 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/xml_to_struct_test.go +++ /dev/null @@ -1,66 +0,0 @@ -package xmlutil_test - -import ( - "net/http" - "net/http/httptest" - "testing" - - "github.com/stretchr/testify/assert" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/awstesting/unit" - "github.com/aws/aws-sdk-go/service/s3" -) - -func TestUnmarshal(t *testing.T) { - xmlVal := []byte(` - - - foo-id - user - - - - - foo-id - user - - FULL_CONTROL - - -`) - - var server = httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - w.Write(xmlVal) - })) - - sess := unit.Session - sess.Config.Endpoint = &server.URL - sess.Config.S3ForcePathStyle = aws.Bool(true) - svc := s3.New(sess) - - out, err := svc.GetBucketAcl(&s3.GetBucketAclInput{ - Bucket: aws.String("foo"), - }) - - assert.NoError(t, err) - - expected := &s3.GetBucketAclOutput{ - Grants: []*s3.Grant{ - { - Grantee: &s3.Grantee{ - DisplayName: aws.String("user"), - ID: aws.String("foo-id"), - Type: aws.String("type"), - }, - Permission: aws.String("FULL_CONTROL"), - }, - }, - - Owner: &s3.Owner{ - DisplayName: aws.String("user"), - ID: aws.String("foo-id"), - }, - } - assert.Equal(t, expected, out) -} diff --git a/vendor/github.com/aws/aws-sdk-go/private/signer/v2/v2.go b/vendor/github.com/aws/aws-sdk-go/private/signer/v2/v2.go deleted file mode 100644 index 88c3a2f..0000000 --- a/vendor/github.com/aws/aws-sdk-go/private/signer/v2/v2.go +++ /dev/null @@ -1,180 +0,0 @@ -package v2 - -import ( - "crypto/hmac" - "crypto/sha256" - "encoding/base64" - "errors" - "fmt" - "net/http" - "net/url" - "sort" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/credentials" - "github.com/aws/aws-sdk-go/aws/request" -) - -var ( - errInvalidMethod = errors.New("v2 signer only handles HTTP POST") -) - -const ( - signatureVersion = "2" - signatureMethod = "HmacSHA256" - timeFormat = "2006-01-02T15:04:05Z" -) - -type signer struct { - // Values that must be populated from the request - Request *http.Request - Time time.Time - Credentials *credentials.Credentials - Debug aws.LogLevelType - Logger aws.Logger - - Query url.Values - stringToSign string - signature string -} - -// SignRequestHandler is a named request handler the SDK will use to sign -// service client request with using the V4 signature. -var SignRequestHandler = request.NamedHandler{ - Name: "v2.SignRequestHandler", Fn: SignSDKRequest, -} - -// SignSDKRequest requests with signature version 2. -// -// Will sign the requests with the service config's Credentials object -// Signing is skipped if the credentials is the credentials.AnonymousCredentials -// object. -func SignSDKRequest(req *request.Request) { - // If the request does not need to be signed ignore the signing of the - // request if the AnonymousCredentials object is used. - if req.Config.Credentials == credentials.AnonymousCredentials { - return - } - - if req.HTTPRequest.Method != "POST" && req.HTTPRequest.Method != "GET" { - // The V2 signer only supports GET and POST - req.Error = errInvalidMethod - return - } - - v2 := signer{ - Request: req.HTTPRequest, - Time: req.Time, - Credentials: req.Config.Credentials, - Debug: req.Config.LogLevel.Value(), - Logger: req.Config.Logger, - } - - req.Error = v2.Sign() - - if req.Error != nil { - return - } - - if req.HTTPRequest.Method == "POST" { - // Set the body of the request based on the modified query parameters - req.SetStringBody(v2.Query.Encode()) - - // Now that the body has changed, remove any Content-Length header, - // because it will be incorrect - req.HTTPRequest.ContentLength = 0 - req.HTTPRequest.Header.Del("Content-Length") - } else { - req.HTTPRequest.URL.RawQuery = v2.Query.Encode() - } -} - -func (v2 *signer) Sign() error { - credValue, err := v2.Credentials.Get() - if err != nil { - return err - } - - if v2.Request.Method == "POST" { - // Parse the HTTP request to obtain the query parameters that will - // be used to build the string to sign. Note that because the HTTP - // request will need to be modified, the PostForm and Form properties - // are reset to nil after parsing. - v2.Request.ParseForm() - v2.Query = v2.Request.PostForm - v2.Request.PostForm = nil - v2.Request.Form = nil - } else { - v2.Query = v2.Request.URL.Query() - } - - // Set new query parameters - v2.Query.Set("AWSAccessKeyId", credValue.AccessKeyID) - v2.Query.Set("SignatureVersion", signatureVersion) - v2.Query.Set("SignatureMethod", signatureMethod) - v2.Query.Set("Timestamp", v2.Time.UTC().Format(timeFormat)) - if credValue.SessionToken != "" { - v2.Query.Set("SecurityToken", credValue.SessionToken) - } - - // in case this is a retry, ensure no signature present - v2.Query.Del("Signature") - - method := v2.Request.Method - host := v2.Request.URL.Host - path := v2.Request.URL.Path - if path == "" { - path = "/" - } - - // obtain all of the query keys and sort them - queryKeys := make([]string, 0, len(v2.Query)) - for key := range v2.Query { - queryKeys = append(queryKeys, key) - } - sort.Strings(queryKeys) - - // build URL-encoded query keys and values - queryKeysAndValues := make([]string, len(queryKeys)) - for i, key := range queryKeys { - k := strings.Replace(url.QueryEscape(key), "+", "%20", -1) - v := strings.Replace(url.QueryEscape(v2.Query.Get(key)), "+", "%20", -1) - queryKeysAndValues[i] = k + "=" + v - } - - // join into one query string - query := strings.Join(queryKeysAndValues, "&") - - // build the canonical string for the V2 signature - v2.stringToSign = strings.Join([]string{ - method, - host, - path, - query, - }, "\n") - - hash := hmac.New(sha256.New, []byte(credValue.SecretAccessKey)) - hash.Write([]byte(v2.stringToSign)) - v2.signature = base64.StdEncoding.EncodeToString(hash.Sum(nil)) - v2.Query.Set("Signature", v2.signature) - - if v2.Debug.Matches(aws.LogDebugWithSigning) { - v2.logSigningInfo() - } - - return nil -} - -const logSignInfoMsg = `DEBUG: Request Signature: ----[ STRING TO SIGN ]-------------------------------- -%s ----[ SIGNATURE ]------------------------------------- -%s ------------------------------------------------------` - -func (v2 *signer) logSigningInfo() { - msg := fmt.Sprintf(logSignInfoMsg, v2.stringToSign, v2.Query.Get("Signature")) - v2.Logger.Log(msg) -} diff --git a/vendor/github.com/aws/aws-sdk-go/private/signer/v2/v2_test.go b/vendor/github.com/aws/aws-sdk-go/private/signer/v2/v2_test.go deleted file mode 100644 index 1e8e04b..0000000 --- a/vendor/github.com/aws/aws-sdk-go/private/signer/v2/v2_test.go +++ /dev/null @@ -1,195 +0,0 @@ -package v2 - -import ( - "bytes" - "net/http" - "net/url" - "os" - "testing" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/credentials" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/awstesting" - "github.com/stretchr/testify/assert" -) - -type signerBuilder struct { - ServiceName string - Region string - SignTime time.Time - Query url.Values - Method string - SessionToken string -} - -func (sb signerBuilder) BuildSigner() signer { - endpoint := "https://" + sb.ServiceName + "." + sb.Region + ".amazonaws.com" - var req *http.Request - if sb.Method == "POST" { - body := []byte(sb.Query.Encode()) - reader := bytes.NewReader(body) - req, _ = http.NewRequest(sb.Method, endpoint, reader) - req.Header.Add("Content-Type", "application/x-www-form-urlencoded") - req.Header.Add("Content-Length", string(len(body))) - } else { - req, _ = http.NewRequest(sb.Method, endpoint, nil) - req.URL.RawQuery = sb.Query.Encode() - } - - sig := signer{ - Request: req, - Time: sb.SignTime, - Credentials: credentials.NewStaticCredentials( - "AKID", - "SECRET", - sb.SessionToken), - } - - if os.Getenv("DEBUG") != "" { - sig.Debug = aws.LogDebug - sig.Logger = aws.NewDefaultLogger() - } - - return sig -} - -func TestSignRequestWithAndWithoutSession(t *testing.T) { - assert := assert.New(t) - - // have to create more than once, so use a function - newQuery := func() url.Values { - query := make(url.Values) - query.Add("Action", "CreateDomain") - query.Add("DomainName", "TestDomain-1437033376") - query.Add("Version", "2009-04-15") - return query - } - - // create request without a SecurityToken (session) in the credentials - - query := newQuery() - timestamp := time.Date(2015, 7, 16, 7, 56, 16, 0, time.UTC) - builder := signerBuilder{ - Method: "POST", - ServiceName: "sdb", - Region: "ap-southeast-2", - SignTime: timestamp, - Query: query, - } - - signer := builder.BuildSigner() - - err := signer.Sign() - assert.NoError(err) - assert.Equal("tm4dX8Ks7pzFSVHz7qHdoJVXKRLuC4gWz9eti60d8ks=", signer.signature) - assert.Equal(8, len(signer.Query)) - assert.Equal("AKID", signer.Query.Get("AWSAccessKeyId")) - assert.Equal("2015-07-16T07:56:16Z", signer.Query.Get("Timestamp")) - assert.Equal("HmacSHA256", signer.Query.Get("SignatureMethod")) - assert.Equal("2", signer.Query.Get("SignatureVersion")) - assert.Equal("tm4dX8Ks7pzFSVHz7qHdoJVXKRLuC4gWz9eti60d8ks=", signer.Query.Get("Signature")) - assert.Equal("CreateDomain", signer.Query.Get("Action")) - assert.Equal("TestDomain-1437033376", signer.Query.Get("DomainName")) - assert.Equal("2009-04-15", signer.Query.Get("Version")) - - // should not have a SecurityToken parameter - _, ok := signer.Query["SecurityToken"] - assert.False(ok) - - // now sign again, this time with a security token (session) - - query = newQuery() - builder.SessionToken = "SESSION" - signer = builder.BuildSigner() - - err = signer.Sign() - assert.NoError(err) - assert.Equal("Ch6qv3rzXB1SLqY2vFhsgA1WQ9rnQIE2WJCigOvAJwI=", signer.signature) - assert.Equal(9, len(signer.Query)) // expect one more parameter - assert.Equal("Ch6qv3rzXB1SLqY2vFhsgA1WQ9rnQIE2WJCigOvAJwI=", signer.Query.Get("Signature")) - assert.Equal("SESSION", signer.Query.Get("SecurityToken")) -} - -func TestMoreComplexSignRequest(t *testing.T) { - assert := assert.New(t) - query := make(url.Values) - query.Add("Action", "PutAttributes") - query.Add("DomainName", "TestDomain-1437041569") - query.Add("Version", "2009-04-15") - query.Add("Attribute.2.Name", "Attr2") - query.Add("Attribute.2.Value", "Value2") - query.Add("Attribute.2.Replace", "true") - query.Add("Attribute.1.Name", "Attr1-%\\+ %") - query.Add("Attribute.1.Value", " \tValue1 +!@#$%^&*(){}[]\"';:?/.>,<\x12\x00") - query.Add("Attribute.1.Replace", "true") - query.Add("ItemName", "Item 1") - - timestamp := time.Date(2015, 7, 16, 10, 12, 51, 0, time.UTC) - builder := signerBuilder{ - Method: "POST", - ServiceName: "sdb", - Region: "ap-southeast-2", - SignTime: timestamp, - Query: query, - SessionToken: "SESSION", - } - - signer := builder.BuildSigner() - - err := signer.Sign() - assert.NoError(err) - assert.Equal("WNdE62UJKLKoA6XncVY/9RDbrKmcVMdQPQOTAs8SgwQ=", signer.signature) -} - -func TestGet(t *testing.T) { - assert := assert.New(t) - svc := awstesting.NewClient(&aws.Config{ - Credentials: credentials.NewStaticCredentials("AKID", "SECRET", "SESSION"), - Region: aws.String("ap-southeast-2"), - }) - r := svc.NewRequest( - &request.Operation{ - Name: "OpName", - HTTPMethod: "GET", - HTTPPath: "/", - }, - nil, - nil, - ) - - r.Build() - assert.Equal("GET", r.HTTPRequest.Method) - assert.Equal("", r.HTTPRequest.URL.Query().Get("Signature")) - - SignSDKRequest(r) - assert.NoError(r.Error) - t.Logf("Signature: %s", r.HTTPRequest.URL.Query().Get("Signature")) - assert.NotEqual("", r.HTTPRequest.URL.Query().Get("Signature")) -} - -func TestAnonymousCredentials(t *testing.T) { - assert := assert.New(t) - svc := awstesting.NewClient(&aws.Config{ - Credentials: credentials.AnonymousCredentials, - Region: aws.String("ap-southeast-2"), - }) - r := svc.NewRequest( - &request.Operation{ - Name: "PutAttributes", - HTTPMethod: "POST", - HTTPPath: "/", - }, - nil, - nil, - ) - r.Build() - - SignSDKRequest(r) - - req := r.HTTPRequest - req.ParseForm() - - assert.Empty(req.PostForm.Get("Signature")) -} diff --git a/vendor/github.com/aws/aws-sdk-go/private/util/sort_keys.go b/vendor/github.com/aws/aws-sdk-go/private/util/sort_keys.go deleted file mode 100644 index 4800056..0000000 --- a/vendor/github.com/aws/aws-sdk-go/private/util/sort_keys.go +++ /dev/null @@ -1,14 +0,0 @@ -package util - -import "sort" - -// SortedKeys returns a sorted slice of keys of a map. -func SortedKeys(m map[string]interface{}) []string { - i, sorted := 0, make([]string, len(m)) - for k := range m { - sorted[i] = k - i++ - } - sort.Strings(sorted) - return sorted -} diff --git a/vendor/github.com/aws/aws-sdk-go/private/util/util.go b/vendor/github.com/aws/aws-sdk-go/private/util/util.go deleted file mode 100644 index 5f2dab2..0000000 --- a/vendor/github.com/aws/aws-sdk-go/private/util/util.go +++ /dev/null @@ -1,109 +0,0 @@ -package util - -import ( - "bytes" - "encoding/xml" - "fmt" - "go/format" - "io" - "reflect" - "regexp" - "strings" - - "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil" -) - -// GoFmt returns the Go formated string of the input. -// -// Panics if the format fails. -func GoFmt(buf string) string { - formatted, err := format.Source([]byte(buf)) - if err != nil { - panic(fmt.Errorf("%s\nOriginal code:\n%s", err.Error(), buf)) - } - return string(formatted) -} - -var reTrim = regexp.MustCompile(`\s{2,}`) - -// Trim removes all leading and trailing white space. -// -// All consecutive spaces will be reduced to a single space. -func Trim(s string) string { - return strings.TrimSpace(reTrim.ReplaceAllString(s, " ")) -} - -// Capitalize capitalizes the first character of the string. -func Capitalize(s string) string { - if len(s) == 1 { - return strings.ToUpper(s) - } - return strings.ToUpper(s[0:1]) + s[1:] -} - -// SortXML sorts the reader's XML elements -func SortXML(r io.Reader) string { - var buf bytes.Buffer - d := xml.NewDecoder(r) - root, _ := xmlutil.XMLToStruct(d, nil) - e := xml.NewEncoder(&buf) - xmlutil.StructToXML(e, root, true) - return buf.String() -} - -// PrettyPrint generates a human readable representation of the value v. -// All values of v are recursively found and pretty printed also. -func PrettyPrint(v interface{}) string { - value := reflect.ValueOf(v) - switch value.Kind() { - case reflect.Struct: - str := fullName(value.Type()) + "{\n" - for i := 0; i < value.NumField(); i++ { - l := string(value.Type().Field(i).Name[0]) - if strings.ToUpper(l) == l { - str += value.Type().Field(i).Name + ": " - str += PrettyPrint(value.Field(i).Interface()) - str += ",\n" - } - } - str += "}" - return str - case reflect.Map: - str := "map[" + fullName(value.Type().Key()) + "]" + fullName(value.Type().Elem()) + "{\n" - for _, k := range value.MapKeys() { - str += "\"" + k.String() + "\": " - str += PrettyPrint(value.MapIndex(k).Interface()) - str += ",\n" - } - str += "}" - return str - case reflect.Ptr: - if e := value.Elem(); e.IsValid() { - return "&" + PrettyPrint(e.Interface()) - } - return "nil" - case reflect.Slice: - str := "[]" + fullName(value.Type().Elem()) + "{\n" - for i := 0; i < value.Len(); i++ { - str += PrettyPrint(value.Index(i).Interface()) - str += ",\n" - } - str += "}" - return str - default: - return fmt.Sprintf("%#v", v) - } -} - -func pkgName(t reflect.Type) string { - pkg := t.PkgPath() - c := strings.Split(pkg, "/") - return c[len(c)-1] -} - -func fullName(t reflect.Type) string { - if pkg := pkgName(t); pkg != "" { - return pkg + "." + t.Name() - } - return t.Name() -} diff --git a/vendor/github.com/aws/aws-sdk-go/sdk.go b/vendor/github.com/aws/aws-sdk-go/sdk.go deleted file mode 100644 index afa465a..0000000 --- a/vendor/github.com/aws/aws-sdk-go/sdk.go +++ /dev/null @@ -1,7 +0,0 @@ -// Package sdk is the official AWS SDK for the Go programming language. -// -// See our Developer Guide for information for on getting started and using -// the SDK. -// -// https://github.com/aws/aws-sdk-go/wiki -package sdk diff --git a/vendor/github.com/aws/aws-sdk-go/service/devicefarm/api.go b/vendor/github.com/aws/aws-sdk-go/service/devicefarm/api.go index f9bb0c4..f84b3bd 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/devicefarm/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/devicefarm/api.go @@ -1,6 +1,5 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// Package devicefarm provides a client for AWS Device Farm. package devicefarm import ( @@ -15,19 +14,18 @@ const opCreateDevicePool = "CreateDevicePool" // CreateDevicePoolRequest generates a "aws/request.Request" representing the // client's request for the CreateDevicePool operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. // -// See CreateDevicePool for usage and error information. +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the CreateDevicePool method directly -// instead. +// See CreateDevicePool for more information on using the CreateDevicePool +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the CreateDevicePoolRequest method. // req, resp := client.CreateDevicePoolRequest(params) @@ -37,7 +35,7 @@ const opCreateDevicePool = "CreateDevicePool" // fmt.Println(resp) // } // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateDevicePool +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateDevicePool func (c *DeviceFarm) CreateDevicePoolRequest(input *CreateDevicePoolInput) (req *request.Request, output *CreateDevicePoolOutput) { op := &request.Operation{ Name: opCreateDevicePool, @@ -78,7 +76,7 @@ func (c *DeviceFarm) CreateDevicePoolRequest(input *CreateDevicePoolInput) (req // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateDevicePool +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateDevicePool func (c *DeviceFarm) CreateDevicePool(input *CreateDevicePoolInput) (*CreateDevicePoolOutput, error) { req, out := c.CreateDevicePoolRequest(input) return out, req.Send() @@ -100,23 +98,111 @@ func (c *DeviceFarm) CreateDevicePoolWithContext(ctx aws.Context, input *CreateD return out, req.Send() } +const opCreateInstanceProfile = "CreateInstanceProfile" + +// CreateInstanceProfileRequest generates a "aws/request.Request" representing the +// client's request for the CreateInstanceProfile operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateInstanceProfile for more information on using the CreateInstanceProfile +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateInstanceProfileRequest method. +// req, resp := client.CreateInstanceProfileRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateInstanceProfile +func (c *DeviceFarm) CreateInstanceProfileRequest(input *CreateInstanceProfileInput) (req *request.Request, output *CreateInstanceProfileOutput) { + op := &request.Operation{ + Name: opCreateInstanceProfile, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateInstanceProfileInput{} + } + + output = &CreateInstanceProfileOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateInstanceProfile API operation for AWS Device Farm. +// +// Creates a profile that can be applied to one or more private fleet device +// instances. +// +// 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 +// the error. +// +// See the AWS API reference guide for AWS Device Farm's +// API operation CreateInstanceProfile for usage and error information. +// +// Returned Error Codes: +// * ErrCodeArgumentException "ArgumentException" +// An invalid argument was specified. +// +// * ErrCodeNotFoundException "NotFoundException" +// The specified entity was not found. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// A limit was exceeded. +// +// * ErrCodeServiceAccountException "ServiceAccountException" +// There was a problem with the service account. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateInstanceProfile +func (c *DeviceFarm) CreateInstanceProfile(input *CreateInstanceProfileInput) (*CreateInstanceProfileOutput, error) { + req, out := c.CreateInstanceProfileRequest(input) + return out, req.Send() +} + +// CreateInstanceProfileWithContext is the same as CreateInstanceProfile with the addition of +// the ability to pass a context and additional request options. +// +// See CreateInstanceProfile for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DeviceFarm) CreateInstanceProfileWithContext(ctx aws.Context, input *CreateInstanceProfileInput, opts ...request.Option) (*CreateInstanceProfileOutput, error) { + req, out := c.CreateInstanceProfileRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateNetworkProfile = "CreateNetworkProfile" // CreateNetworkProfileRequest generates a "aws/request.Request" representing the // client's request for the CreateNetworkProfile operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See CreateNetworkProfile for usage and error information. +// See CreateNetworkProfile for more information on using the CreateNetworkProfile +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the CreateNetworkProfile method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the CreateNetworkProfileRequest method. // req, resp := client.CreateNetworkProfileRequest(params) @@ -126,7 +212,7 @@ const opCreateNetworkProfile = "CreateNetworkProfile" // fmt.Println(resp) // } // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateNetworkProfile +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateNetworkProfile func (c *DeviceFarm) CreateNetworkProfileRequest(input *CreateNetworkProfileInput) (req *request.Request, output *CreateNetworkProfileOutput) { op := &request.Operation{ Name: opCreateNetworkProfile, @@ -167,7 +253,7 @@ func (c *DeviceFarm) CreateNetworkProfileRequest(input *CreateNetworkProfileInpu // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateNetworkProfile +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateNetworkProfile func (c *DeviceFarm) CreateNetworkProfile(input *CreateNetworkProfileInput) (*CreateNetworkProfileOutput, error) { req, out := c.CreateNetworkProfileRequest(input) return out, req.Send() @@ -193,19 +279,18 @@ const opCreateProject = "CreateProject" // CreateProjectRequest generates a "aws/request.Request" representing the // client's request for the CreateProject operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. // -// See CreateProject for usage and error information. +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the CreateProject method directly -// instead. +// See CreateProject for more information on using the CreateProject +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the CreateProjectRequest method. // req, resp := client.CreateProjectRequest(params) @@ -215,7 +300,7 @@ const opCreateProject = "CreateProject" // fmt.Println(resp) // } // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateProject +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateProject func (c *DeviceFarm) CreateProjectRequest(input *CreateProjectInput) (req *request.Request, output *CreateProjectOutput) { op := &request.Operation{ Name: opCreateProject, @@ -256,7 +341,7 @@ func (c *DeviceFarm) CreateProjectRequest(input *CreateProjectInput) (req *reque // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateProject +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateProject func (c *DeviceFarm) CreateProject(input *CreateProjectInput) (*CreateProjectOutput, error) { req, out := c.CreateProjectRequest(input) return out, req.Send() @@ -282,19 +367,18 @@ const opCreateRemoteAccessSession = "CreateRemoteAccessSession" // CreateRemoteAccessSessionRequest generates a "aws/request.Request" representing the // client's request for the CreateRemoteAccessSession operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See CreateRemoteAccessSession for usage and error information. +// See CreateRemoteAccessSession for more information on using the CreateRemoteAccessSession +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the CreateRemoteAccessSession method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the CreateRemoteAccessSessionRequest method. // req, resp := client.CreateRemoteAccessSessionRequest(params) @@ -304,7 +388,7 @@ const opCreateRemoteAccessSession = "CreateRemoteAccessSession" // fmt.Println(resp) // } // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateRemoteAccessSession +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateRemoteAccessSession func (c *DeviceFarm) CreateRemoteAccessSessionRequest(input *CreateRemoteAccessSessionInput) (req *request.Request, output *CreateRemoteAccessSessionOutput) { op := &request.Operation{ Name: opCreateRemoteAccessSession, @@ -345,7 +429,7 @@ func (c *DeviceFarm) CreateRemoteAccessSessionRequest(input *CreateRemoteAccessS // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateRemoteAccessSession +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateRemoteAccessSession func (c *DeviceFarm) CreateRemoteAccessSession(input *CreateRemoteAccessSessionInput) (*CreateRemoteAccessSessionOutput, error) { req, out := c.CreateRemoteAccessSessionRequest(input) return out, req.Send() @@ -371,19 +455,18 @@ const opCreateUpload = "CreateUpload" // CreateUploadRequest generates a "aws/request.Request" representing the // client's request for the CreateUpload operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. // -// See CreateUpload for usage and error information. +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the CreateUpload method directly -// instead. +// See CreateUpload for more information on using the CreateUpload +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the CreateUploadRequest method. // req, resp := client.CreateUploadRequest(params) @@ -393,7 +476,7 @@ const opCreateUpload = "CreateUpload" // fmt.Println(resp) // } // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateUpload +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateUpload func (c *DeviceFarm) CreateUploadRequest(input *CreateUploadInput) (req *request.Request, output *CreateUploadOutput) { op := &request.Operation{ Name: opCreateUpload, @@ -434,7 +517,7 @@ func (c *DeviceFarm) CreateUploadRequest(input *CreateUploadInput) (req *request // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateUpload +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateUpload func (c *DeviceFarm) CreateUpload(input *CreateUploadInput) (*CreateUploadOutput, error) { req, out := c.CreateUploadRequest(input) return out, req.Send() @@ -456,23 +539,108 @@ func (c *DeviceFarm) CreateUploadWithContext(ctx aws.Context, input *CreateUploa return out, req.Send() } +const opCreateVPCEConfiguration = "CreateVPCEConfiguration" + +// CreateVPCEConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the CreateVPCEConfiguration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateVPCEConfiguration for more information on using the CreateVPCEConfiguration +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateVPCEConfigurationRequest method. +// req, resp := client.CreateVPCEConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateVPCEConfiguration +func (c *DeviceFarm) CreateVPCEConfigurationRequest(input *CreateVPCEConfigurationInput) (req *request.Request, output *CreateVPCEConfigurationOutput) { + op := &request.Operation{ + Name: opCreateVPCEConfiguration, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateVPCEConfigurationInput{} + } + + output = &CreateVPCEConfigurationOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateVPCEConfiguration API operation for AWS Device Farm. +// +// Creates a configuration record in Device Farm for your Amazon Virtual Private +// Cloud (VPC) endpoint. +// +// 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 +// the error. +// +// See the AWS API reference guide for AWS Device Farm's +// API operation CreateVPCEConfiguration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeArgumentException "ArgumentException" +// An invalid argument was specified. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// A limit was exceeded. +// +// * ErrCodeServiceAccountException "ServiceAccountException" +// There was a problem with the service account. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateVPCEConfiguration +func (c *DeviceFarm) CreateVPCEConfiguration(input *CreateVPCEConfigurationInput) (*CreateVPCEConfigurationOutput, error) { + req, out := c.CreateVPCEConfigurationRequest(input) + return out, req.Send() +} + +// CreateVPCEConfigurationWithContext is the same as CreateVPCEConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See CreateVPCEConfiguration for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DeviceFarm) CreateVPCEConfigurationWithContext(ctx aws.Context, input *CreateVPCEConfigurationInput, opts ...request.Option) (*CreateVPCEConfigurationOutput, error) { + req, out := c.CreateVPCEConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteDevicePool = "DeleteDevicePool" // DeleteDevicePoolRequest generates a "aws/request.Request" representing the // client's request for the DeleteDevicePool operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. // -// See DeleteDevicePool for usage and error information. +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the DeleteDevicePool method directly -// instead. +// See DeleteDevicePool for more information on using the DeleteDevicePool +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the DeleteDevicePoolRequest method. // req, resp := client.DeleteDevicePoolRequest(params) @@ -482,7 +650,7 @@ const opDeleteDevicePool = "DeleteDevicePool" // fmt.Println(resp) // } // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteDevicePool +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteDevicePool func (c *DeviceFarm) DeleteDevicePoolRequest(input *DeleteDevicePoolInput) (req *request.Request, output *DeleteDevicePoolOutput) { op := &request.Operation{ Name: opDeleteDevicePool, @@ -524,7 +692,7 @@ func (c *DeviceFarm) DeleteDevicePoolRequest(input *DeleteDevicePoolInput) (req // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteDevicePool +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteDevicePool func (c *DeviceFarm) DeleteDevicePool(input *DeleteDevicePoolInput) (*DeleteDevicePoolOutput, error) { req, out := c.DeleteDevicePoolRequest(input) return out, req.Send() @@ -546,23 +714,110 @@ func (c *DeviceFarm) DeleteDevicePoolWithContext(ctx aws.Context, input *DeleteD return out, req.Send() } +const opDeleteInstanceProfile = "DeleteInstanceProfile" + +// DeleteInstanceProfileRequest generates a "aws/request.Request" representing the +// client's request for the DeleteInstanceProfile operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteInstanceProfile for more information on using the DeleteInstanceProfile +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteInstanceProfileRequest method. +// req, resp := client.DeleteInstanceProfileRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteInstanceProfile +func (c *DeviceFarm) DeleteInstanceProfileRequest(input *DeleteInstanceProfileInput) (req *request.Request, output *DeleteInstanceProfileOutput) { + op := &request.Operation{ + Name: opDeleteInstanceProfile, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteInstanceProfileInput{} + } + + output = &DeleteInstanceProfileOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteInstanceProfile API operation for AWS Device Farm. +// +// Deletes a profile that can be applied to one or more private device instances. +// +// 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 +// the error. +// +// See the AWS API reference guide for AWS Device Farm's +// API operation DeleteInstanceProfile for usage and error information. +// +// Returned Error Codes: +// * ErrCodeArgumentException "ArgumentException" +// An invalid argument was specified. +// +// * ErrCodeNotFoundException "NotFoundException" +// The specified entity was not found. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// A limit was exceeded. +// +// * ErrCodeServiceAccountException "ServiceAccountException" +// There was a problem with the service account. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteInstanceProfile +func (c *DeviceFarm) DeleteInstanceProfile(input *DeleteInstanceProfileInput) (*DeleteInstanceProfileOutput, error) { + req, out := c.DeleteInstanceProfileRequest(input) + return out, req.Send() +} + +// DeleteInstanceProfileWithContext is the same as DeleteInstanceProfile with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteInstanceProfile for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DeviceFarm) DeleteInstanceProfileWithContext(ctx aws.Context, input *DeleteInstanceProfileInput, opts ...request.Option) (*DeleteInstanceProfileOutput, error) { + req, out := c.DeleteInstanceProfileRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteNetworkProfile = "DeleteNetworkProfile" // DeleteNetworkProfileRequest generates a "aws/request.Request" representing the // client's request for the DeleteNetworkProfile operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See DeleteNetworkProfile for usage and error information. +// See DeleteNetworkProfile for more information on using the DeleteNetworkProfile +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the DeleteNetworkProfile method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the DeleteNetworkProfileRequest method. // req, resp := client.DeleteNetworkProfileRequest(params) @@ -572,7 +827,7 @@ const opDeleteNetworkProfile = "DeleteNetworkProfile" // fmt.Println(resp) // } // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteNetworkProfile +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteNetworkProfile func (c *DeviceFarm) DeleteNetworkProfileRequest(input *DeleteNetworkProfileInput) (req *request.Request, output *DeleteNetworkProfileOutput) { op := &request.Operation{ Name: opDeleteNetworkProfile, @@ -613,7 +868,7 @@ func (c *DeviceFarm) DeleteNetworkProfileRequest(input *DeleteNetworkProfileInpu // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteNetworkProfile +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteNetworkProfile func (c *DeviceFarm) DeleteNetworkProfile(input *DeleteNetworkProfileInput) (*DeleteNetworkProfileOutput, error) { req, out := c.DeleteNetworkProfileRequest(input) return out, req.Send() @@ -639,19 +894,18 @@ const opDeleteProject = "DeleteProject" // DeleteProjectRequest generates a "aws/request.Request" representing the // client's request for the DeleteProject operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. // -// See DeleteProject for usage and error information. +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the DeleteProject method directly -// instead. +// See DeleteProject for more information on using the DeleteProject +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the DeleteProjectRequest method. // req, resp := client.DeleteProjectRequest(params) @@ -661,7 +915,7 @@ const opDeleteProject = "DeleteProject" // fmt.Println(resp) // } // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteProject +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteProject func (c *DeviceFarm) DeleteProjectRequest(input *DeleteProjectInput) (req *request.Request, output *DeleteProjectOutput) { op := &request.Operation{ Name: opDeleteProject, @@ -704,7 +958,7 @@ func (c *DeviceFarm) DeleteProjectRequest(input *DeleteProjectInput) (req *reque // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteProject +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteProject func (c *DeviceFarm) DeleteProject(input *DeleteProjectInput) (*DeleteProjectOutput, error) { req, out := c.DeleteProjectRequest(input) return out, req.Send() @@ -730,19 +984,18 @@ const opDeleteRemoteAccessSession = "DeleteRemoteAccessSession" // DeleteRemoteAccessSessionRequest generates a "aws/request.Request" representing the // client's request for the DeleteRemoteAccessSession operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See DeleteRemoteAccessSession for usage and error information. +// See DeleteRemoteAccessSession for more information on using the DeleteRemoteAccessSession +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the DeleteRemoteAccessSession method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the DeleteRemoteAccessSessionRequest method. // req, resp := client.DeleteRemoteAccessSessionRequest(params) @@ -752,7 +1005,7 @@ const opDeleteRemoteAccessSession = "DeleteRemoteAccessSession" // fmt.Println(resp) // } // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteRemoteAccessSession +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteRemoteAccessSession func (c *DeviceFarm) DeleteRemoteAccessSessionRequest(input *DeleteRemoteAccessSessionInput) (req *request.Request, output *DeleteRemoteAccessSessionOutput) { op := &request.Operation{ Name: opDeleteRemoteAccessSession, @@ -793,7 +1046,7 @@ func (c *DeviceFarm) DeleteRemoteAccessSessionRequest(input *DeleteRemoteAccessS // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteRemoteAccessSession +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteRemoteAccessSession func (c *DeviceFarm) DeleteRemoteAccessSession(input *DeleteRemoteAccessSessionInput) (*DeleteRemoteAccessSessionOutput, error) { req, out := c.DeleteRemoteAccessSessionRequest(input) return out, req.Send() @@ -819,19 +1072,18 @@ const opDeleteRun = "DeleteRun" // DeleteRunRequest generates a "aws/request.Request" representing the // client's request for the DeleteRun operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. // -// See DeleteRun for usage and error information. +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the DeleteRun method directly -// instead. +// See DeleteRun for more information on using the DeleteRun +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the DeleteRunRequest method. // req, resp := client.DeleteRunRequest(params) @@ -841,7 +1093,7 @@ const opDeleteRun = "DeleteRun" // fmt.Println(resp) // } // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteRun +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteRun func (c *DeviceFarm) DeleteRunRequest(input *DeleteRunInput) (req *request.Request, output *DeleteRunOutput) { op := &request.Operation{ Name: opDeleteRun, @@ -884,7 +1136,7 @@ func (c *DeviceFarm) DeleteRunRequest(input *DeleteRunInput) (req *request.Reque // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteRun +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteRun func (c *DeviceFarm) DeleteRun(input *DeleteRunInput) (*DeleteRunOutput, error) { req, out := c.DeleteRunRequest(input) return out, req.Send() @@ -910,19 +1162,18 @@ const opDeleteUpload = "DeleteUpload" // DeleteUploadRequest generates a "aws/request.Request" representing the // client's request for the DeleteUpload operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See DeleteUpload for usage and error information. +// See DeleteUpload for more information on using the DeleteUpload +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the DeleteUpload method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the DeleteUploadRequest method. // req, resp := client.DeleteUploadRequest(params) @@ -932,7 +1183,7 @@ const opDeleteUpload = "DeleteUpload" // fmt.Println(resp) // } // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteUpload +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteUpload func (c *DeviceFarm) DeleteUploadRequest(input *DeleteUploadInput) (req *request.Request, output *DeleteUploadOutput) { op := &request.Operation{ Name: opDeleteUpload, @@ -973,7 +1224,7 @@ func (c *DeviceFarm) DeleteUploadRequest(input *DeleteUploadInput) (req *request // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteUpload +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteUpload func (c *DeviceFarm) DeleteUpload(input *DeleteUploadInput) (*DeleteUploadOutput, error) { req, out := c.DeleteUploadRequest(input) return out, req.Send() @@ -995,23 +1246,111 @@ func (c *DeviceFarm) DeleteUploadWithContext(ctx aws.Context, input *DeleteUploa return out, req.Send() } +const opDeleteVPCEConfiguration = "DeleteVPCEConfiguration" + +// DeleteVPCEConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the DeleteVPCEConfiguration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteVPCEConfiguration for more information on using the DeleteVPCEConfiguration +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteVPCEConfigurationRequest method. +// req, resp := client.DeleteVPCEConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteVPCEConfiguration +func (c *DeviceFarm) DeleteVPCEConfigurationRequest(input *DeleteVPCEConfigurationInput) (req *request.Request, output *DeleteVPCEConfigurationOutput) { + op := &request.Operation{ + Name: opDeleteVPCEConfiguration, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteVPCEConfigurationInput{} + } + + output = &DeleteVPCEConfigurationOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteVPCEConfiguration API operation for AWS Device Farm. +// +// Deletes a configuration for your Amazon Virtual Private Cloud (VPC) endpoint. +// +// 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 +// the error. +// +// See the AWS API reference guide for AWS Device Farm's +// API operation DeleteVPCEConfiguration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeArgumentException "ArgumentException" +// An invalid argument was specified. +// +// * ErrCodeNotFoundException "NotFoundException" +// The specified entity was not found. +// +// * ErrCodeServiceAccountException "ServiceAccountException" +// There was a problem with the service account. +// +// * ErrCodeInvalidOperationException "InvalidOperationException" +// There was an error with the update request, or you do not have sufficient +// permissions to update this VPC endpoint configuration. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteVPCEConfiguration +func (c *DeviceFarm) DeleteVPCEConfiguration(input *DeleteVPCEConfigurationInput) (*DeleteVPCEConfigurationOutput, error) { + req, out := c.DeleteVPCEConfigurationRequest(input) + return out, req.Send() +} + +// DeleteVPCEConfigurationWithContext is the same as DeleteVPCEConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteVPCEConfiguration for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DeviceFarm) DeleteVPCEConfigurationWithContext(ctx aws.Context, input *DeleteVPCEConfigurationInput, opts ...request.Option) (*DeleteVPCEConfigurationOutput, error) { + req, out := c.DeleteVPCEConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetAccountSettings = "GetAccountSettings" // GetAccountSettingsRequest generates a "aws/request.Request" representing the // client's request for the GetAccountSettings operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. // -// See GetAccountSettings for usage and error information. +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the GetAccountSettings method directly -// instead. +// See GetAccountSettings for more information on using the GetAccountSettings +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the GetAccountSettingsRequest method. // req, resp := client.GetAccountSettingsRequest(params) @@ -1021,7 +1360,7 @@ const opGetAccountSettings = "GetAccountSettings" // fmt.Println(resp) // } // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetAccountSettings +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetAccountSettings func (c *DeviceFarm) GetAccountSettingsRequest(input *GetAccountSettingsInput) (req *request.Request, output *GetAccountSettingsOutput) { op := &request.Operation{ Name: opGetAccountSettings, @@ -1063,7 +1402,7 @@ func (c *DeviceFarm) GetAccountSettingsRequest(input *GetAccountSettingsInput) ( // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetAccountSettings +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetAccountSettings func (c *DeviceFarm) GetAccountSettings(input *GetAccountSettingsInput) (*GetAccountSettingsOutput, error) { req, out := c.GetAccountSettingsRequest(input) return out, req.Send() @@ -1089,19 +1428,18 @@ const opGetDevice = "GetDevice" // GetDeviceRequest generates a "aws/request.Request" representing the // client's request for the GetDevice operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See GetDevice for usage and error information. +// See GetDevice for more information on using the GetDevice +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the GetDevice method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the GetDeviceRequest method. // req, resp := client.GetDeviceRequest(params) @@ -1111,7 +1449,7 @@ const opGetDevice = "GetDevice" // fmt.Println(resp) // } // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetDevice +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetDevice func (c *DeviceFarm) GetDeviceRequest(input *GetDeviceInput) (req *request.Request, output *GetDeviceOutput) { op := &request.Operation{ Name: opGetDevice, @@ -1152,7 +1490,7 @@ func (c *DeviceFarm) GetDeviceRequest(input *GetDeviceInput) (req *request.Reque // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetDevice +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetDevice func (c *DeviceFarm) GetDevice(input *GetDeviceInput) (*GetDeviceOutput, error) { req, out := c.GetDeviceRequest(input) return out, req.Send() @@ -1174,36 +1512,124 @@ func (c *DeviceFarm) GetDeviceWithContext(ctx aws.Context, input *GetDeviceInput return out, req.Send() } -const opGetDevicePool = "GetDevicePool" +const opGetDeviceInstance = "GetDeviceInstance" -// GetDevicePoolRequest generates a "aws/request.Request" representing the -// client's request for the GetDevicePool operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// GetDeviceInstanceRequest generates a "aws/request.Request" representing the +// client's request for the GetDeviceInstance operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. // -// See GetDevicePool for usage and error information. +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the GetDevicePool method directly -// instead. +// See GetDeviceInstance for more information on using the GetDeviceInstance +// API call, and error handling. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the GetDevicePoolRequest method. -// req, resp := client.GetDevicePoolRequest(params) +// +// // Example sending a request using the GetDeviceInstanceRequest method. +// req, resp := client.GetDeviceInstanceRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetDevicePool -func (c *DeviceFarm) GetDevicePoolRequest(input *GetDevicePoolInput) (req *request.Request, output *GetDevicePoolOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetDeviceInstance +func (c *DeviceFarm) GetDeviceInstanceRequest(input *GetDeviceInstanceInput) (req *request.Request, output *GetDeviceInstanceOutput) { op := &request.Operation{ - Name: opGetDevicePool, + Name: opGetDeviceInstance, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetDeviceInstanceInput{} + } + + output = &GetDeviceInstanceOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetDeviceInstance API operation for AWS Device Farm. +// +// Returns information about a device instance belonging to a private device +// fleet. +// +// 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 +// the error. +// +// See the AWS API reference guide for AWS Device Farm's +// API operation GetDeviceInstance for usage and error information. +// +// Returned Error Codes: +// * ErrCodeArgumentException "ArgumentException" +// An invalid argument was specified. +// +// * ErrCodeNotFoundException "NotFoundException" +// The specified entity was not found. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// A limit was exceeded. +// +// * ErrCodeServiceAccountException "ServiceAccountException" +// There was a problem with the service account. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetDeviceInstance +func (c *DeviceFarm) GetDeviceInstance(input *GetDeviceInstanceInput) (*GetDeviceInstanceOutput, error) { + req, out := c.GetDeviceInstanceRequest(input) + return out, req.Send() +} + +// GetDeviceInstanceWithContext is the same as GetDeviceInstance with the addition of +// the ability to pass a context and additional request options. +// +// See GetDeviceInstance for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DeviceFarm) GetDeviceInstanceWithContext(ctx aws.Context, input *GetDeviceInstanceInput, opts ...request.Option) (*GetDeviceInstanceOutput, error) { + req, out := c.GetDeviceInstanceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetDevicePool = "GetDevicePool" + +// GetDevicePoolRequest generates a "aws/request.Request" representing the +// client's request for the GetDevicePool operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetDevicePool for more information on using the GetDevicePool +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetDevicePoolRequest method. +// req, resp := client.GetDevicePoolRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetDevicePool +func (c *DeviceFarm) GetDevicePoolRequest(input *GetDevicePoolInput) (req *request.Request, output *GetDevicePoolOutput) { + op := &request.Operation{ + Name: opGetDevicePool, HTTPMethod: "POST", HTTPPath: "/", } @@ -1241,7 +1667,7 @@ func (c *DeviceFarm) GetDevicePoolRequest(input *GetDevicePoolInput) (req *reque // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetDevicePool +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetDevicePool func (c *DeviceFarm) GetDevicePool(input *GetDevicePoolInput) (*GetDevicePoolOutput, error) { req, out := c.GetDevicePoolRequest(input) return out, req.Send() @@ -1267,19 +1693,18 @@ const opGetDevicePoolCompatibility = "GetDevicePoolCompatibility" // GetDevicePoolCompatibilityRequest generates a "aws/request.Request" representing the // client's request for the GetDevicePoolCompatibility operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See GetDevicePoolCompatibility for usage and error information. +// See GetDevicePoolCompatibility for more information on using the GetDevicePoolCompatibility +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the GetDevicePoolCompatibility method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the GetDevicePoolCompatibilityRequest method. // req, resp := client.GetDevicePoolCompatibilityRequest(params) @@ -1289,7 +1714,7 @@ const opGetDevicePoolCompatibility = "GetDevicePoolCompatibility" // fmt.Println(resp) // } // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetDevicePoolCompatibility +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetDevicePoolCompatibility func (c *DeviceFarm) GetDevicePoolCompatibilityRequest(input *GetDevicePoolCompatibilityInput) (req *request.Request, output *GetDevicePoolCompatibilityOutput) { op := &request.Operation{ Name: opGetDevicePoolCompatibility, @@ -1330,7 +1755,7 @@ func (c *DeviceFarm) GetDevicePoolCompatibilityRequest(input *GetDevicePoolCompa // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetDevicePoolCompatibility +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetDevicePoolCompatibility func (c *DeviceFarm) GetDevicePoolCompatibility(input *GetDevicePoolCompatibilityInput) (*GetDevicePoolCompatibilityOutput, error) { req, out := c.GetDevicePoolCompatibilityRequest(input) return out, req.Send() @@ -1352,23 +1777,110 @@ func (c *DeviceFarm) GetDevicePoolCompatibilityWithContext(ctx aws.Context, inpu return out, req.Send() } +const opGetInstanceProfile = "GetInstanceProfile" + +// GetInstanceProfileRequest generates a "aws/request.Request" representing the +// client's request for the GetInstanceProfile operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetInstanceProfile for more information on using the GetInstanceProfile +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetInstanceProfileRequest method. +// req, resp := client.GetInstanceProfileRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetInstanceProfile +func (c *DeviceFarm) GetInstanceProfileRequest(input *GetInstanceProfileInput) (req *request.Request, output *GetInstanceProfileOutput) { + op := &request.Operation{ + Name: opGetInstanceProfile, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetInstanceProfileInput{} + } + + output = &GetInstanceProfileOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetInstanceProfile API operation for AWS Device Farm. +// +// Returns information about the specified instance profile. +// +// 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 +// the error. +// +// See the AWS API reference guide for AWS Device Farm's +// API operation GetInstanceProfile for usage and error information. +// +// Returned Error Codes: +// * ErrCodeArgumentException "ArgumentException" +// An invalid argument was specified. +// +// * ErrCodeNotFoundException "NotFoundException" +// The specified entity was not found. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// A limit was exceeded. +// +// * ErrCodeServiceAccountException "ServiceAccountException" +// There was a problem with the service account. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetInstanceProfile +func (c *DeviceFarm) GetInstanceProfile(input *GetInstanceProfileInput) (*GetInstanceProfileOutput, error) { + req, out := c.GetInstanceProfileRequest(input) + return out, req.Send() +} + +// GetInstanceProfileWithContext is the same as GetInstanceProfile with the addition of +// the ability to pass a context and additional request options. +// +// See GetInstanceProfile for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DeviceFarm) GetInstanceProfileWithContext(ctx aws.Context, input *GetInstanceProfileInput, opts ...request.Option) (*GetInstanceProfileOutput, error) { + req, out := c.GetInstanceProfileRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetJob = "GetJob" // GetJobRequest generates a "aws/request.Request" representing the // client's request for the GetJob operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. // -// See GetJob for usage and error information. +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the GetJob method directly -// instead. +// See GetJob for more information on using the GetJob +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the GetJobRequest method. // req, resp := client.GetJobRequest(params) @@ -1378,7 +1890,7 @@ const opGetJob = "GetJob" // fmt.Println(resp) // } // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetJob +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetJob func (c *DeviceFarm) GetJobRequest(input *GetJobInput) (req *request.Request, output *GetJobOutput) { op := &request.Operation{ Name: opGetJob, @@ -1419,7 +1931,7 @@ func (c *DeviceFarm) GetJobRequest(input *GetJobInput) (req *request.Request, ou // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetJob +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetJob func (c *DeviceFarm) GetJob(input *GetJobInput) (*GetJobOutput, error) { req, out := c.GetJobRequest(input) return out, req.Send() @@ -1445,19 +1957,18 @@ const opGetNetworkProfile = "GetNetworkProfile" // GetNetworkProfileRequest generates a "aws/request.Request" representing the // client's request for the GetNetworkProfile operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See GetNetworkProfile for usage and error information. +// See GetNetworkProfile for more information on using the GetNetworkProfile +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the GetNetworkProfile method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the GetNetworkProfileRequest method. // req, resp := client.GetNetworkProfileRequest(params) @@ -1467,7 +1978,7 @@ const opGetNetworkProfile = "GetNetworkProfile" // fmt.Println(resp) // } // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetNetworkProfile +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetNetworkProfile func (c *DeviceFarm) GetNetworkProfileRequest(input *GetNetworkProfileInput) (req *request.Request, output *GetNetworkProfileOutput) { op := &request.Operation{ Name: opGetNetworkProfile, @@ -1508,7 +2019,7 @@ func (c *DeviceFarm) GetNetworkProfileRequest(input *GetNetworkProfileInput) (re // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetNetworkProfile +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetNetworkProfile func (c *DeviceFarm) GetNetworkProfile(input *GetNetworkProfileInput) (*GetNetworkProfileOutput, error) { req, out := c.GetNetworkProfileRequest(input) return out, req.Send() @@ -1534,19 +2045,18 @@ const opGetOfferingStatus = "GetOfferingStatus" // GetOfferingStatusRequest generates a "aws/request.Request" representing the // client's request for the GetOfferingStatus operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. // -// See GetOfferingStatus for usage and error information. +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the GetOfferingStatus method directly -// instead. +// See GetOfferingStatus for more information on using the GetOfferingStatus +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the GetOfferingStatusRequest method. // req, resp := client.GetOfferingStatusRequest(params) @@ -1556,7 +2066,7 @@ const opGetOfferingStatus = "GetOfferingStatus" // fmt.Println(resp) // } // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetOfferingStatus +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetOfferingStatus func (c *DeviceFarm) GetOfferingStatusRequest(input *GetOfferingStatusInput) (req *request.Request, output *GetOfferingStatusOutput) { op := &request.Operation{ Name: opGetOfferingStatus, @@ -1612,7 +2122,7 @@ func (c *DeviceFarm) GetOfferingStatusRequest(input *GetOfferingStatusInput) (re // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetOfferingStatus +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetOfferingStatus func (c *DeviceFarm) GetOfferingStatus(input *GetOfferingStatusInput) (*GetOfferingStatusOutput, error) { req, out := c.GetOfferingStatusRequest(input) return out, req.Send() @@ -1688,19 +2198,18 @@ const opGetProject = "GetProject" // GetProjectRequest generates a "aws/request.Request" representing the // client's request for the GetProject operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See GetProject for usage and error information. +// See GetProject for more information on using the GetProject +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the GetProject method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the GetProjectRequest method. // req, resp := client.GetProjectRequest(params) @@ -1710,7 +2219,7 @@ const opGetProject = "GetProject" // fmt.Println(resp) // } // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetProject +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetProject func (c *DeviceFarm) GetProjectRequest(input *GetProjectInput) (req *request.Request, output *GetProjectOutput) { op := &request.Operation{ Name: opGetProject, @@ -1751,7 +2260,7 @@ func (c *DeviceFarm) GetProjectRequest(input *GetProjectInput) (req *request.Req // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetProject +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetProject func (c *DeviceFarm) GetProject(input *GetProjectInput) (*GetProjectOutput, error) { req, out := c.GetProjectRequest(input) return out, req.Send() @@ -1777,19 +2286,18 @@ const opGetRemoteAccessSession = "GetRemoteAccessSession" // GetRemoteAccessSessionRequest generates a "aws/request.Request" representing the // client's request for the GetRemoteAccessSession operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. // -// See GetRemoteAccessSession for usage and error information. +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the GetRemoteAccessSession method directly -// instead. +// See GetRemoteAccessSession for more information on using the GetRemoteAccessSession +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the GetRemoteAccessSessionRequest method. // req, resp := client.GetRemoteAccessSessionRequest(params) @@ -1799,7 +2307,7 @@ const opGetRemoteAccessSession = "GetRemoteAccessSession" // fmt.Println(resp) // } // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetRemoteAccessSession +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetRemoteAccessSession func (c *DeviceFarm) GetRemoteAccessSessionRequest(input *GetRemoteAccessSessionInput) (req *request.Request, output *GetRemoteAccessSessionOutput) { op := &request.Operation{ Name: opGetRemoteAccessSession, @@ -1840,7 +2348,7 @@ func (c *DeviceFarm) GetRemoteAccessSessionRequest(input *GetRemoteAccessSession // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetRemoteAccessSession +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetRemoteAccessSession func (c *DeviceFarm) GetRemoteAccessSession(input *GetRemoteAccessSessionInput) (*GetRemoteAccessSessionOutput, error) { req, out := c.GetRemoteAccessSessionRequest(input) return out, req.Send() @@ -1866,19 +2374,18 @@ const opGetRun = "GetRun" // GetRunRequest generates a "aws/request.Request" representing the // client's request for the GetRun operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See GetRun for usage and error information. +// See GetRun for more information on using the GetRun +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the GetRun method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the GetRunRequest method. // req, resp := client.GetRunRequest(params) @@ -1888,7 +2395,7 @@ const opGetRun = "GetRun" // fmt.Println(resp) // } // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetRun +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetRun func (c *DeviceFarm) GetRunRequest(input *GetRunInput) (req *request.Request, output *GetRunOutput) { op := &request.Operation{ Name: opGetRun, @@ -1929,7 +2436,7 @@ func (c *DeviceFarm) GetRunRequest(input *GetRunInput) (req *request.Request, ou // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetRun +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetRun func (c *DeviceFarm) GetRun(input *GetRunInput) (*GetRunOutput, error) { req, out := c.GetRunRequest(input) return out, req.Send() @@ -1955,19 +2462,18 @@ const opGetSuite = "GetSuite" // GetSuiteRequest generates a "aws/request.Request" representing the // client's request for the GetSuite operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. // -// See GetSuite for usage and error information. +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the GetSuite method directly -// instead. +// See GetSuite for more information on using the GetSuite +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the GetSuiteRequest method. // req, resp := client.GetSuiteRequest(params) @@ -1977,7 +2483,7 @@ const opGetSuite = "GetSuite" // fmt.Println(resp) // } // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetSuite +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetSuite func (c *DeviceFarm) GetSuiteRequest(input *GetSuiteInput) (req *request.Request, output *GetSuiteOutput) { op := &request.Operation{ Name: opGetSuite, @@ -2018,7 +2524,7 @@ func (c *DeviceFarm) GetSuiteRequest(input *GetSuiteInput) (req *request.Request // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetSuite +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetSuite func (c *DeviceFarm) GetSuite(input *GetSuiteInput) (*GetSuiteOutput, error) { req, out := c.GetSuiteRequest(input) return out, req.Send() @@ -2044,19 +2550,18 @@ const opGetTest = "GetTest" // GetTestRequest generates a "aws/request.Request" representing the // client's request for the GetTest operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See GetTest for usage and error information. +// See GetTest for more information on using the GetTest +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the GetTest method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the GetTestRequest method. // req, resp := client.GetTestRequest(params) @@ -2066,7 +2571,7 @@ const opGetTest = "GetTest" // fmt.Println(resp) // } // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetTest +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetTest func (c *DeviceFarm) GetTestRequest(input *GetTestInput) (req *request.Request, output *GetTestOutput) { op := &request.Operation{ Name: opGetTest, @@ -2107,7 +2612,7 @@ func (c *DeviceFarm) GetTestRequest(input *GetTestInput) (req *request.Request, // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetTest +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetTest func (c *DeviceFarm) GetTest(input *GetTestInput) (*GetTestOutput, error) { req, out := c.GetTestRequest(input) return out, req.Send() @@ -2133,19 +2638,18 @@ const opGetUpload = "GetUpload" // GetUploadRequest generates a "aws/request.Request" representing the // client's request for the GetUpload operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. // -// See GetUpload for usage and error information. +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the GetUpload method directly -// instead. +// See GetUpload for more information on using the GetUpload +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the GetUploadRequest method. // req, resp := client.GetUploadRequest(params) @@ -2155,7 +2659,7 @@ const opGetUpload = "GetUpload" // fmt.Println(resp) // } // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetUpload +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetUpload func (c *DeviceFarm) GetUploadRequest(input *GetUploadInput) (req *request.Request, output *GetUploadOutput) { op := &request.Operation{ Name: opGetUpload, @@ -2196,7 +2700,7 @@ func (c *DeviceFarm) GetUploadRequest(input *GetUploadInput) (req *request.Reque // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetUpload +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetUpload func (c *DeviceFarm) GetUpload(input *GetUploadInput) (*GetUploadOutput, error) { req, out := c.GetUploadRequest(input) return out, req.Send() @@ -2218,23 +2722,108 @@ func (c *DeviceFarm) GetUploadWithContext(ctx aws.Context, input *GetUploadInput return out, req.Send() } +const opGetVPCEConfiguration = "GetVPCEConfiguration" + +// GetVPCEConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the GetVPCEConfiguration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetVPCEConfiguration for more information on using the GetVPCEConfiguration +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetVPCEConfigurationRequest method. +// req, resp := client.GetVPCEConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetVPCEConfiguration +func (c *DeviceFarm) GetVPCEConfigurationRequest(input *GetVPCEConfigurationInput) (req *request.Request, output *GetVPCEConfigurationOutput) { + op := &request.Operation{ + Name: opGetVPCEConfiguration, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetVPCEConfigurationInput{} + } + + output = &GetVPCEConfigurationOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetVPCEConfiguration API operation for AWS Device Farm. +// +// Returns information about the configuration settings for your Amazon Virtual +// Private Cloud (VPC) endpoint. +// +// 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 +// the error. +// +// See the AWS API reference guide for AWS Device Farm's +// API operation GetVPCEConfiguration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeArgumentException "ArgumentException" +// An invalid argument was specified. +// +// * ErrCodeNotFoundException "NotFoundException" +// The specified entity was not found. +// +// * ErrCodeServiceAccountException "ServiceAccountException" +// There was a problem with the service account. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetVPCEConfiguration +func (c *DeviceFarm) GetVPCEConfiguration(input *GetVPCEConfigurationInput) (*GetVPCEConfigurationOutput, error) { + req, out := c.GetVPCEConfigurationRequest(input) + return out, req.Send() +} + +// GetVPCEConfigurationWithContext is the same as GetVPCEConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See GetVPCEConfiguration for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DeviceFarm) GetVPCEConfigurationWithContext(ctx aws.Context, input *GetVPCEConfigurationInput, opts ...request.Option) (*GetVPCEConfigurationOutput, error) { + req, out := c.GetVPCEConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opInstallToRemoteAccessSession = "InstallToRemoteAccessSession" // InstallToRemoteAccessSessionRequest generates a "aws/request.Request" representing the // client's request for the InstallToRemoteAccessSession operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. // -// See InstallToRemoteAccessSession for usage and error information. +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the InstallToRemoteAccessSession method directly -// instead. +// See InstallToRemoteAccessSession for more information on using the InstallToRemoteAccessSession +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the InstallToRemoteAccessSessionRequest method. // req, resp := client.InstallToRemoteAccessSessionRequest(params) @@ -2244,7 +2833,7 @@ const opInstallToRemoteAccessSession = "InstallToRemoteAccessSession" // fmt.Println(resp) // } // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/InstallToRemoteAccessSession +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/InstallToRemoteAccessSession func (c *DeviceFarm) InstallToRemoteAccessSessionRequest(input *InstallToRemoteAccessSessionInput) (req *request.Request, output *InstallToRemoteAccessSessionOutput) { op := &request.Operation{ Name: opInstallToRemoteAccessSession, @@ -2287,7 +2876,7 @@ func (c *DeviceFarm) InstallToRemoteAccessSessionRequest(input *InstallToRemoteA // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/InstallToRemoteAccessSession +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/InstallToRemoteAccessSession func (c *DeviceFarm) InstallToRemoteAccessSession(input *InstallToRemoteAccessSessionInput) (*InstallToRemoteAccessSessionOutput, error) { req, out := c.InstallToRemoteAccessSessionRequest(input) return out, req.Send() @@ -2313,19 +2902,18 @@ const opListArtifacts = "ListArtifacts" // ListArtifactsRequest generates a "aws/request.Request" representing the // client's request for the ListArtifacts operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See ListArtifacts for usage and error information. +// See ListArtifacts for more information on using the ListArtifacts +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the ListArtifacts method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the ListArtifactsRequest method. // req, resp := client.ListArtifactsRequest(params) @@ -2335,7 +2923,7 @@ const opListArtifacts = "ListArtifacts" // fmt.Println(resp) // } // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListArtifacts +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListArtifacts func (c *DeviceFarm) ListArtifactsRequest(input *ListArtifactsInput) (req *request.Request, output *ListArtifactsOutput) { op := &request.Operation{ Name: opListArtifacts, @@ -2382,7 +2970,7 @@ func (c *DeviceFarm) ListArtifactsRequest(input *ListArtifactsInput) (req *reque // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListArtifacts +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListArtifacts func (c *DeviceFarm) ListArtifacts(input *ListArtifactsInput) (*ListArtifactsOutput, error) { req, out := c.ListArtifactsRequest(input) return out, req.Send() @@ -2454,65 +3042,59 @@ func (c *DeviceFarm) ListArtifactsPagesWithContext(ctx aws.Context, input *ListA return p.Err() } -const opListDevicePools = "ListDevicePools" +const opListDeviceInstances = "ListDeviceInstances" -// ListDevicePoolsRequest generates a "aws/request.Request" representing the -// client's request for the ListDevicePools operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// ListDeviceInstancesRequest generates a "aws/request.Request" representing the +// client's request for the ListDeviceInstances operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. // -// See ListDevicePools for usage and error information. +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the ListDevicePools method directly -// instead. +// See ListDeviceInstances for more information on using the ListDeviceInstances +// API call, and error handling. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the ListDevicePoolsRequest method. -// req, resp := client.ListDevicePoolsRequest(params) +// +// // Example sending a request using the ListDeviceInstancesRequest method. +// req, resp := client.ListDeviceInstancesRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListDevicePools -func (c *DeviceFarm) ListDevicePoolsRequest(input *ListDevicePoolsInput) (req *request.Request, output *ListDevicePoolsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListDeviceInstances +func (c *DeviceFarm) ListDeviceInstancesRequest(input *ListDeviceInstancesInput) (req *request.Request, output *ListDeviceInstancesOutput) { op := &request.Operation{ - Name: opListDevicePools, + Name: opListDeviceInstances, HTTPMethod: "POST", HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "", - TruncationToken: "", - }, } if input == nil { - input = &ListDevicePoolsInput{} + input = &ListDeviceInstancesInput{} } - output = &ListDevicePoolsOutput{} + output = &ListDeviceInstancesOutput{} req = c.newRequest(op, input, output) return } -// ListDevicePools API operation for AWS Device Farm. +// ListDeviceInstances API operation for AWS Device Farm. // -// Gets information about device pools. +// Returns information about the private device instances associated with one +// or more AWS accounts. // // 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 // the error. // // See the AWS API reference guide for AWS Device Farm's -// API operation ListDevicePools for usage and error information. +// API operation ListDeviceInstances for usage and error information. // // Returned Error Codes: // * ErrCodeArgumentException "ArgumentException" @@ -2527,64 +3109,158 @@ func (c *DeviceFarm) ListDevicePoolsRequest(input *ListDevicePoolsInput) (req *r // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListDevicePools -func (c *DeviceFarm) ListDevicePools(input *ListDevicePoolsInput) (*ListDevicePoolsOutput, error) { - req, out := c.ListDevicePoolsRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListDeviceInstances +func (c *DeviceFarm) ListDeviceInstances(input *ListDeviceInstancesInput) (*ListDeviceInstancesOutput, error) { + req, out := c.ListDeviceInstancesRequest(input) return out, req.Send() } -// ListDevicePoolsWithContext is the same as ListDevicePools with the addition of +// ListDeviceInstancesWithContext is the same as ListDeviceInstances with the addition of // the ability to pass a context and additional request options. // -// See ListDevicePools for details on how to use this API operation. +// See ListDeviceInstances for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *DeviceFarm) ListDevicePoolsWithContext(ctx aws.Context, input *ListDevicePoolsInput, opts ...request.Option) (*ListDevicePoolsOutput, error) { - req, out := c.ListDevicePoolsRequest(input) +func (c *DeviceFarm) ListDeviceInstancesWithContext(ctx aws.Context, input *ListDeviceInstancesInput, opts ...request.Option) (*ListDeviceInstancesOutput, error) { + req, out := c.ListDeviceInstancesRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -// ListDevicePoolsPages iterates over the pages of a ListDevicePools operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. +const opListDevicePools = "ListDevicePools" + +// ListDevicePoolsRequest generates a "aws/request.Request" representing the +// client's request for the ListDevicePools operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. // -// See ListDevicePools method for more information on how to use this operation. +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// Note: This operation can generate multiple requests to a service. +// See ListDevicePools for more information on using the ListDevicePools +// API call, and error handling. // -// // Example iterating over at most 3 pages of a ListDevicePools operation. -// pageNum := 0 -// err := client.ListDevicePoolsPages(params, -// func(page *ListDevicePoolsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -func (c *DeviceFarm) ListDevicePoolsPages(input *ListDevicePoolsInput, fn func(*ListDevicePoolsOutput, bool) bool) error { - return c.ListDevicePoolsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListDevicePoolsPagesWithContext same as ListDevicePoolsPages except -// it takes a Context and allows setting request options on the pages. // -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) ListDevicePoolsPagesWithContext(ctx aws.Context, input *ListDevicePoolsInput, fn func(*ListDevicePoolsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListDevicePoolsInput - if input != nil { - tmp := *input - inCpy = &tmp - } +// // Example sending a request using the ListDevicePoolsRequest method. +// req, resp := client.ListDevicePoolsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListDevicePools +func (c *DeviceFarm) ListDevicePoolsRequest(input *ListDevicePoolsInput) (req *request.Request, output *ListDevicePoolsOutput) { + op := &request.Operation{ + Name: opListDevicePools, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"nextToken"}, + OutputTokens: []string{"nextToken"}, + LimitToken: "", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListDevicePoolsInput{} + } + + output = &ListDevicePoolsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListDevicePools API operation for AWS Device Farm. +// +// Gets information about device pools. +// +// 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 +// the error. +// +// See the AWS API reference guide for AWS Device Farm's +// API operation ListDevicePools for usage and error information. +// +// Returned Error Codes: +// * ErrCodeArgumentException "ArgumentException" +// An invalid argument was specified. +// +// * ErrCodeNotFoundException "NotFoundException" +// The specified entity was not found. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// A limit was exceeded. +// +// * ErrCodeServiceAccountException "ServiceAccountException" +// There was a problem with the service account. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListDevicePools +func (c *DeviceFarm) ListDevicePools(input *ListDevicePoolsInput) (*ListDevicePoolsOutput, error) { + req, out := c.ListDevicePoolsRequest(input) + return out, req.Send() +} + +// ListDevicePoolsWithContext is the same as ListDevicePools with the addition of +// the ability to pass a context and additional request options. +// +// See ListDevicePools for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DeviceFarm) ListDevicePoolsWithContext(ctx aws.Context, input *ListDevicePoolsInput, opts ...request.Option) (*ListDevicePoolsOutput, error) { + req, out := c.ListDevicePoolsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListDevicePoolsPages iterates over the pages of a ListDevicePools operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListDevicePools method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListDevicePools operation. +// pageNum := 0 +// err := client.ListDevicePoolsPages(params, +// func(page *ListDevicePoolsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *DeviceFarm) ListDevicePoolsPages(input *ListDevicePoolsInput, fn func(*ListDevicePoolsOutput, bool) bool) error { + return c.ListDevicePoolsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListDevicePoolsPagesWithContext same as ListDevicePoolsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DeviceFarm) ListDevicePoolsPagesWithContext(ctx aws.Context, input *ListDevicePoolsInput, fn func(*ListDevicePoolsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListDevicePoolsInput + if input != nil { + tmp := *input + inCpy = &tmp + } req, _ := c.ListDevicePoolsRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) @@ -2603,19 +3279,18 @@ const opListDevices = "ListDevices" // ListDevicesRequest generates a "aws/request.Request" representing the // client's request for the ListDevices operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See ListDevices for usage and error information. +// See ListDevices for more information on using the ListDevices +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the ListDevices method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the ListDevicesRequest method. // req, resp := client.ListDevicesRequest(params) @@ -2625,7 +3300,7 @@ const opListDevices = "ListDevices" // fmt.Println(resp) // } // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListDevices +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListDevices func (c *DeviceFarm) ListDevicesRequest(input *ListDevicesInput) (req *request.Request, output *ListDevicesOutput) { op := &request.Operation{ Name: opListDevices, @@ -2672,7 +3347,7 @@ func (c *DeviceFarm) ListDevicesRequest(input *ListDevicesInput) (req *request.R // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListDevices +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListDevices func (c *DeviceFarm) ListDevices(input *ListDevicesInput) (*ListDevicesOutput, error) { req, out := c.ListDevicesRequest(input) return out, req.Send() @@ -2744,23 +3419,110 @@ func (c *DeviceFarm) ListDevicesPagesWithContext(ctx aws.Context, input *ListDev return p.Err() } +const opListInstanceProfiles = "ListInstanceProfiles" + +// ListInstanceProfilesRequest generates a "aws/request.Request" representing the +// client's request for the ListInstanceProfiles operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListInstanceProfiles for more information on using the ListInstanceProfiles +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListInstanceProfilesRequest method. +// req, resp := client.ListInstanceProfilesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListInstanceProfiles +func (c *DeviceFarm) ListInstanceProfilesRequest(input *ListInstanceProfilesInput) (req *request.Request, output *ListInstanceProfilesOutput) { + op := &request.Operation{ + Name: opListInstanceProfiles, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListInstanceProfilesInput{} + } + + output = &ListInstanceProfilesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListInstanceProfiles API operation for AWS Device Farm. +// +// Returns information about all the instance profiles in an AWS account. +// +// 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 +// the error. +// +// See the AWS API reference guide for AWS Device Farm's +// API operation ListInstanceProfiles for usage and error information. +// +// Returned Error Codes: +// * ErrCodeArgumentException "ArgumentException" +// An invalid argument was specified. +// +// * ErrCodeNotFoundException "NotFoundException" +// The specified entity was not found. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// A limit was exceeded. +// +// * ErrCodeServiceAccountException "ServiceAccountException" +// There was a problem with the service account. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListInstanceProfiles +func (c *DeviceFarm) ListInstanceProfiles(input *ListInstanceProfilesInput) (*ListInstanceProfilesOutput, error) { + req, out := c.ListInstanceProfilesRequest(input) + return out, req.Send() +} + +// ListInstanceProfilesWithContext is the same as ListInstanceProfiles with the addition of +// the ability to pass a context and additional request options. +// +// See ListInstanceProfiles for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DeviceFarm) ListInstanceProfilesWithContext(ctx aws.Context, input *ListInstanceProfilesInput, opts ...request.Option) (*ListInstanceProfilesOutput, error) { + req, out := c.ListInstanceProfilesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opListJobs = "ListJobs" // ListJobsRequest generates a "aws/request.Request" representing the // client's request for the ListJobs operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. // -// See ListJobs for usage and error information. +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the ListJobs method directly -// instead. +// See ListJobs for more information on using the ListJobs +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the ListJobsRequest method. // req, resp := client.ListJobsRequest(params) @@ -2770,7 +3532,7 @@ const opListJobs = "ListJobs" // fmt.Println(resp) // } // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListJobs +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListJobs func (c *DeviceFarm) ListJobsRequest(input *ListJobsInput) (req *request.Request, output *ListJobsOutput) { op := &request.Operation{ Name: opListJobs, @@ -2795,7 +3557,7 @@ func (c *DeviceFarm) ListJobsRequest(input *ListJobsInput) (req *request.Request // ListJobs API operation for AWS Device Farm. // -// Gets information about jobs. +// Gets information about jobs for a given test run. // // 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 @@ -2817,7 +3579,7 @@ func (c *DeviceFarm) ListJobsRequest(input *ListJobsInput) (req *request.Request // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListJobs +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListJobs func (c *DeviceFarm) ListJobs(input *ListJobsInput) (*ListJobsOutput, error) { req, out := c.ListJobsRequest(input) return out, req.Send() @@ -2893,19 +3655,18 @@ const opListNetworkProfiles = "ListNetworkProfiles" // ListNetworkProfilesRequest generates a "aws/request.Request" representing the // client's request for the ListNetworkProfiles operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See ListNetworkProfiles for usage and error information. +// See ListNetworkProfiles for more information on using the ListNetworkProfiles +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the ListNetworkProfiles method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the ListNetworkProfilesRequest method. // req, resp := client.ListNetworkProfilesRequest(params) @@ -2915,7 +3676,7 @@ const opListNetworkProfiles = "ListNetworkProfiles" // fmt.Println(resp) // } // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListNetworkProfiles +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListNetworkProfiles func (c *DeviceFarm) ListNetworkProfilesRequest(input *ListNetworkProfilesInput) (req *request.Request, output *ListNetworkProfilesOutput) { op := &request.Operation{ Name: opListNetworkProfiles, @@ -2956,7 +3717,7 @@ func (c *DeviceFarm) ListNetworkProfilesRequest(input *ListNetworkProfilesInput) // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListNetworkProfiles +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListNetworkProfiles func (c *DeviceFarm) ListNetworkProfiles(input *ListNetworkProfilesInput) (*ListNetworkProfilesOutput, error) { req, out := c.ListNetworkProfilesRequest(input) return out, req.Send() @@ -2982,19 +3743,18 @@ const opListOfferingPromotions = "ListOfferingPromotions" // ListOfferingPromotionsRequest generates a "aws/request.Request" representing the // client's request for the ListOfferingPromotions operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. // -// See ListOfferingPromotions for usage and error information. +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the ListOfferingPromotions method directly -// instead. +// See ListOfferingPromotions for more information on using the ListOfferingPromotions +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the ListOfferingPromotionsRequest method. // req, resp := client.ListOfferingPromotionsRequest(params) @@ -3004,7 +3764,7 @@ const opListOfferingPromotions = "ListOfferingPromotions" // fmt.Println(resp) // } // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListOfferingPromotions +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListOfferingPromotions func (c *DeviceFarm) ListOfferingPromotionsRequest(input *ListOfferingPromotionsInput) (req *request.Request, output *ListOfferingPromotionsOutput) { op := &request.Operation{ Name: opListOfferingPromotions, @@ -3053,7 +3813,7 @@ func (c *DeviceFarm) ListOfferingPromotionsRequest(input *ListOfferingPromotions // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListOfferingPromotions +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListOfferingPromotions func (c *DeviceFarm) ListOfferingPromotions(input *ListOfferingPromotionsInput) (*ListOfferingPromotionsOutput, error) { req, out := c.ListOfferingPromotionsRequest(input) return out, req.Send() @@ -3079,19 +3839,18 @@ const opListOfferingTransactions = "ListOfferingTransactions" // ListOfferingTransactionsRequest generates a "aws/request.Request" representing the // client's request for the ListOfferingTransactions operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See ListOfferingTransactions for usage and error information. +// See ListOfferingTransactions for more information on using the ListOfferingTransactions +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the ListOfferingTransactions method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the ListOfferingTransactionsRequest method. // req, resp := client.ListOfferingTransactionsRequest(params) @@ -3101,7 +3860,7 @@ const opListOfferingTransactions = "ListOfferingTransactions" // fmt.Println(resp) // } // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListOfferingTransactions +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListOfferingTransactions func (c *DeviceFarm) ListOfferingTransactionsRequest(input *ListOfferingTransactionsInput) (req *request.Request, output *ListOfferingTransactionsOutput) { op := &request.Operation{ Name: opListOfferingTransactions, @@ -3157,7 +3916,7 @@ func (c *DeviceFarm) ListOfferingTransactionsRequest(input *ListOfferingTransact // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListOfferingTransactions +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListOfferingTransactions func (c *DeviceFarm) ListOfferingTransactions(input *ListOfferingTransactionsInput) (*ListOfferingTransactionsOutput, error) { req, out := c.ListOfferingTransactionsRequest(input) return out, req.Send() @@ -3233,19 +3992,18 @@ const opListOfferings = "ListOfferings" // ListOfferingsRequest generates a "aws/request.Request" representing the // client's request for the ListOfferings operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. // -// See ListOfferings for usage and error information. +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the ListOfferings method directly -// instead. +// See ListOfferings for more information on using the ListOfferings +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the ListOfferingsRequest method. // req, resp := client.ListOfferingsRequest(params) @@ -3255,7 +4013,7 @@ const opListOfferings = "ListOfferings" // fmt.Println(resp) // } // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListOfferings +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListOfferings func (c *DeviceFarm) ListOfferingsRequest(input *ListOfferingsInput) (req *request.Request, output *ListOfferingsOutput) { op := &request.Operation{ Name: opListOfferings, @@ -3311,7 +4069,7 @@ func (c *DeviceFarm) ListOfferingsRequest(input *ListOfferingsInput) (req *reque // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListOfferings +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListOfferings func (c *DeviceFarm) ListOfferings(input *ListOfferingsInput) (*ListOfferingsOutput, error) { req, out := c.ListOfferingsRequest(input) return out, req.Send() @@ -3387,19 +4145,18 @@ const opListProjects = "ListProjects" // ListProjectsRequest generates a "aws/request.Request" representing the // client's request for the ListProjects operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See ListProjects for usage and error information. +// See ListProjects for more information on using the ListProjects +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the ListProjects method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the ListProjectsRequest method. // req, resp := client.ListProjectsRequest(params) @@ -3409,7 +4166,7 @@ const opListProjects = "ListProjects" // fmt.Println(resp) // } // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListProjects +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListProjects func (c *DeviceFarm) ListProjectsRequest(input *ListProjectsInput) (req *request.Request, output *ListProjectsOutput) { op := &request.Operation{ Name: opListProjects, @@ -3456,7 +4213,7 @@ func (c *DeviceFarm) ListProjectsRequest(input *ListProjectsInput) (req *request // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListProjects +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListProjects func (c *DeviceFarm) ListProjects(input *ListProjectsInput) (*ListProjectsOutput, error) { req, out := c.ListProjectsRequest(input) return out, req.Send() @@ -3532,19 +4289,18 @@ const opListRemoteAccessSessions = "ListRemoteAccessSessions" // ListRemoteAccessSessionsRequest generates a "aws/request.Request" representing the // client's request for the ListRemoteAccessSessions operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. // -// See ListRemoteAccessSessions for usage and error information. +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the ListRemoteAccessSessions method directly -// instead. +// See ListRemoteAccessSessions for more information on using the ListRemoteAccessSessions +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the ListRemoteAccessSessionsRequest method. // req, resp := client.ListRemoteAccessSessionsRequest(params) @@ -3554,7 +4310,7 @@ const opListRemoteAccessSessions = "ListRemoteAccessSessions" // fmt.Println(resp) // } // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListRemoteAccessSessions +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListRemoteAccessSessions func (c *DeviceFarm) ListRemoteAccessSessionsRequest(input *ListRemoteAccessSessionsInput) (req *request.Request, output *ListRemoteAccessSessionsOutput) { op := &request.Operation{ Name: opListRemoteAccessSessions, @@ -3595,7 +4351,7 @@ func (c *DeviceFarm) ListRemoteAccessSessionsRequest(input *ListRemoteAccessSess // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListRemoteAccessSessions +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListRemoteAccessSessions func (c *DeviceFarm) ListRemoteAccessSessions(input *ListRemoteAccessSessionsInput) (*ListRemoteAccessSessionsOutput, error) { req, out := c.ListRemoteAccessSessionsRequest(input) return out, req.Send() @@ -3621,19 +4377,18 @@ const opListRuns = "ListRuns" // ListRunsRequest generates a "aws/request.Request" representing the // client's request for the ListRuns operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See ListRuns for usage and error information. +// See ListRuns for more information on using the ListRuns +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the ListRuns method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the ListRunsRequest method. // req, resp := client.ListRunsRequest(params) @@ -3643,7 +4398,7 @@ const opListRuns = "ListRuns" // fmt.Println(resp) // } // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListRuns +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListRuns func (c *DeviceFarm) ListRunsRequest(input *ListRunsInput) (req *request.Request, output *ListRunsOutput) { op := &request.Operation{ Name: opListRuns, @@ -3690,7 +4445,7 @@ func (c *DeviceFarm) ListRunsRequest(input *ListRunsInput) (req *request.Request // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListRuns +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListRuns func (c *DeviceFarm) ListRuns(input *ListRunsInput) (*ListRunsOutput, error) { req, out := c.ListRunsRequest(input) return out, req.Send() @@ -3766,19 +4521,18 @@ const opListSamples = "ListSamples" // ListSamplesRequest generates a "aws/request.Request" representing the // client's request for the ListSamples operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. // -// See ListSamples for usage and error information. +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the ListSamples method directly -// instead. +// See ListSamples for more information on using the ListSamples +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the ListSamplesRequest method. // req, resp := client.ListSamplesRequest(params) @@ -3788,7 +4542,7 @@ const opListSamples = "ListSamples" // fmt.Println(resp) // } // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListSamples +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListSamples func (c *DeviceFarm) ListSamplesRequest(input *ListSamplesInput) (req *request.Request, output *ListSamplesOutput) { op := &request.Operation{ Name: opListSamples, @@ -3835,7 +4589,7 @@ func (c *DeviceFarm) ListSamplesRequest(input *ListSamplesInput) (req *request.R // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListSamples +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListSamples func (c *DeviceFarm) ListSamples(input *ListSamplesInput) (*ListSamplesOutput, error) { req, out := c.ListSamplesRequest(input) return out, req.Send() @@ -3911,19 +4665,18 @@ const opListSuites = "ListSuites" // ListSuitesRequest generates a "aws/request.Request" representing the // client's request for the ListSuites operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See ListSuites for usage and error information. +// See ListSuites for more information on using the ListSuites +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the ListSuites method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the ListSuitesRequest method. // req, resp := client.ListSuitesRequest(params) @@ -3933,7 +4686,7 @@ const opListSuites = "ListSuites" // fmt.Println(resp) // } // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListSuites +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListSuites func (c *DeviceFarm) ListSuitesRequest(input *ListSuitesInput) (req *request.Request, output *ListSuitesOutput) { op := &request.Operation{ Name: opListSuites, @@ -3958,7 +4711,7 @@ func (c *DeviceFarm) ListSuitesRequest(input *ListSuitesInput) (req *request.Req // ListSuites API operation for AWS Device Farm. // -// Gets information about suites. +// Gets information about test suites for a given job. // // 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 @@ -3980,7 +4733,7 @@ func (c *DeviceFarm) ListSuitesRequest(input *ListSuitesInput) (req *request.Req // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListSuites +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListSuites func (c *DeviceFarm) ListSuites(input *ListSuitesInput) (*ListSuitesOutput, error) { req, out := c.ListSuitesRequest(input) return out, req.Send() @@ -4056,19 +4809,18 @@ const opListTests = "ListTests" // ListTestsRequest generates a "aws/request.Request" representing the // client's request for the ListTests operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. // -// See ListTests for usage and error information. +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the ListTests method directly -// instead. +// See ListTests for more information on using the ListTests +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the ListTestsRequest method. // req, resp := client.ListTestsRequest(params) @@ -4078,7 +4830,7 @@ const opListTests = "ListTests" // fmt.Println(resp) // } // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListTests +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListTests func (c *DeviceFarm) ListTestsRequest(input *ListTestsInput) (req *request.Request, output *ListTestsOutput) { op := &request.Operation{ Name: opListTests, @@ -4103,7 +4855,7 @@ func (c *DeviceFarm) ListTestsRequest(input *ListTestsInput) (req *request.Reque // ListTests API operation for AWS Device Farm. // -// Gets information about tests. +// Gets information about tests in a given test suite. // // 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 @@ -4125,7 +4877,7 @@ func (c *DeviceFarm) ListTestsRequest(input *ListTestsInput) (req *request.Reque // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListTests +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListTests func (c *DeviceFarm) ListTests(input *ListTestsInput) (*ListTestsOutput, error) { req, out := c.ListTestsRequest(input) return out, req.Send() @@ -4201,19 +4953,18 @@ const opListUniqueProblems = "ListUniqueProblems" // ListUniqueProblemsRequest generates a "aws/request.Request" representing the // client's request for the ListUniqueProblems operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See ListUniqueProblems for usage and error information. +// See ListUniqueProblems for more information on using the ListUniqueProblems +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the ListUniqueProblems method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the ListUniqueProblemsRequest method. // req, resp := client.ListUniqueProblemsRequest(params) @@ -4223,7 +4974,7 @@ const opListUniqueProblems = "ListUniqueProblems" // fmt.Println(resp) // } // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListUniqueProblems +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListUniqueProblems func (c *DeviceFarm) ListUniqueProblemsRequest(input *ListUniqueProblemsInput) (req *request.Request, output *ListUniqueProblemsOutput) { op := &request.Operation{ Name: opListUniqueProblems, @@ -4270,7 +5021,7 @@ func (c *DeviceFarm) ListUniqueProblemsRequest(input *ListUniqueProblemsInput) ( // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListUniqueProblems +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListUniqueProblems func (c *DeviceFarm) ListUniqueProblems(input *ListUniqueProblemsInput) (*ListUniqueProblemsOutput, error) { req, out := c.ListUniqueProblemsRequest(input) return out, req.Send() @@ -4346,19 +5097,18 @@ const opListUploads = "ListUploads" // ListUploadsRequest generates a "aws/request.Request" representing the // client's request for the ListUploads operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. // -// See ListUploads for usage and error information. +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the ListUploads method directly -// instead. +// See ListUploads for more information on using the ListUploads +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the ListUploadsRequest method. // req, resp := client.ListUploadsRequest(params) @@ -4368,7 +5118,7 @@ const opListUploads = "ListUploads" // fmt.Println(resp) // } // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListUploads +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListUploads func (c *DeviceFarm) ListUploadsRequest(input *ListUploadsInput) (req *request.Request, output *ListUploadsOutput) { op := &request.Operation{ Name: opListUploads, @@ -4415,7 +5165,7 @@ func (c *DeviceFarm) ListUploadsRequest(input *ListUploadsInput) (req *request.R // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListUploads +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListUploads func (c *DeviceFarm) ListUploads(input *ListUploadsInput) (*ListUploadsOutput, error) { req, out := c.ListUploadsRequest(input) return out, req.Send() @@ -4487,23 +5237,105 @@ func (c *DeviceFarm) ListUploadsPagesWithContext(ctx aws.Context, input *ListUpl return p.Err() } +const opListVPCEConfigurations = "ListVPCEConfigurations" + +// ListVPCEConfigurationsRequest generates a "aws/request.Request" representing the +// client's request for the ListVPCEConfigurations operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListVPCEConfigurations for more information on using the ListVPCEConfigurations +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListVPCEConfigurationsRequest method. +// req, resp := client.ListVPCEConfigurationsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListVPCEConfigurations +func (c *DeviceFarm) ListVPCEConfigurationsRequest(input *ListVPCEConfigurationsInput) (req *request.Request, output *ListVPCEConfigurationsOutput) { + op := &request.Operation{ + Name: opListVPCEConfigurations, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListVPCEConfigurationsInput{} + } + + output = &ListVPCEConfigurationsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListVPCEConfigurations API operation for AWS Device Farm. +// +// Returns information about all Amazon Virtual Private Cloud (VPC) endpoint +// configurations in the AWS account. +// +// 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 +// the error. +// +// See the AWS API reference guide for AWS Device Farm's +// API operation ListVPCEConfigurations for usage and error information. +// +// Returned Error Codes: +// * ErrCodeArgumentException "ArgumentException" +// An invalid argument was specified. +// +// * ErrCodeServiceAccountException "ServiceAccountException" +// There was a problem with the service account. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListVPCEConfigurations +func (c *DeviceFarm) ListVPCEConfigurations(input *ListVPCEConfigurationsInput) (*ListVPCEConfigurationsOutput, error) { + req, out := c.ListVPCEConfigurationsRequest(input) + return out, req.Send() +} + +// ListVPCEConfigurationsWithContext is the same as ListVPCEConfigurations with the addition of +// the ability to pass a context and additional request options. +// +// See ListVPCEConfigurations for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DeviceFarm) ListVPCEConfigurationsWithContext(ctx aws.Context, input *ListVPCEConfigurationsInput, opts ...request.Option) (*ListVPCEConfigurationsOutput, error) { + req, out := c.ListVPCEConfigurationsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opPurchaseOffering = "PurchaseOffering" // PurchaseOfferingRequest generates a "aws/request.Request" representing the // client's request for the PurchaseOffering operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See PurchaseOffering for usage and error information. +// See PurchaseOffering for more information on using the PurchaseOffering +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the PurchaseOffering method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the PurchaseOfferingRequest method. // req, resp := client.PurchaseOfferingRequest(params) @@ -4513,7 +5345,7 @@ const opPurchaseOffering = "PurchaseOffering" // fmt.Println(resp) // } // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/PurchaseOffering +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/PurchaseOffering func (c *DeviceFarm) PurchaseOfferingRequest(input *PurchaseOfferingInput) (req *request.Request, output *PurchaseOfferingOutput) { op := &request.Operation{ Name: opPurchaseOffering, @@ -4563,7 +5395,7 @@ func (c *DeviceFarm) PurchaseOfferingRequest(input *PurchaseOfferingInput) (req // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/PurchaseOffering +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/PurchaseOffering func (c *DeviceFarm) PurchaseOffering(input *PurchaseOfferingInput) (*PurchaseOfferingOutput, error) { req, out := c.PurchaseOfferingRequest(input) return out, req.Send() @@ -4589,19 +5421,18 @@ const opRenewOffering = "RenewOffering" // RenewOfferingRequest generates a "aws/request.Request" representing the // client's request for the RenewOffering operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. // -// See RenewOffering for usage and error information. +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the RenewOffering method directly -// instead. +// See RenewOffering for more information on using the RenewOffering +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the RenewOfferingRequest method. // req, resp := client.RenewOfferingRequest(params) @@ -4611,7 +5442,7 @@ const opRenewOffering = "RenewOffering" // fmt.Println(resp) // } // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/RenewOffering +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/RenewOffering func (c *DeviceFarm) RenewOfferingRequest(input *RenewOfferingInput) (req *request.Request, output *RenewOfferingOutput) { op := &request.Operation{ Name: opRenewOffering, @@ -4660,7 +5491,7 @@ func (c *DeviceFarm) RenewOfferingRequest(input *RenewOfferingInput) (req *reque // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/RenewOffering +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/RenewOffering func (c *DeviceFarm) RenewOffering(input *RenewOfferingInput) (*RenewOfferingOutput, error) { req, out := c.RenewOfferingRequest(input) return out, req.Send() @@ -4686,19 +5517,18 @@ const opScheduleRun = "ScheduleRun" // ScheduleRunRequest generates a "aws/request.Request" representing the // client's request for the ScheduleRun operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See ScheduleRun for usage and error information. +// See ScheduleRun for more information on using the ScheduleRun +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the ScheduleRun method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the ScheduleRunRequest method. // req, resp := client.ScheduleRunRequest(params) @@ -4708,7 +5538,7 @@ const opScheduleRun = "ScheduleRun" // fmt.Println(resp) // } // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ScheduleRun +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ScheduleRun func (c *DeviceFarm) ScheduleRunRequest(input *ScheduleRunInput) (req *request.Request, output *ScheduleRunOutput) { op := &request.Operation{ Name: opScheduleRun, @@ -4752,7 +5582,7 @@ func (c *DeviceFarm) ScheduleRunRequest(input *ScheduleRunInput) (req *request.R // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ScheduleRun +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ScheduleRun func (c *DeviceFarm) ScheduleRun(input *ScheduleRunInput) (*ScheduleRunOutput, error) { req, out := c.ScheduleRunRequest(input) return out, req.Send() @@ -4778,19 +5608,18 @@ const opStopRemoteAccessSession = "StopRemoteAccessSession" // StopRemoteAccessSessionRequest generates a "aws/request.Request" representing the // client's request for the StopRemoteAccessSession operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. // -// See StopRemoteAccessSession for usage and error information. +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the StopRemoteAccessSession method directly -// instead. +// See StopRemoteAccessSession for more information on using the StopRemoteAccessSession +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the StopRemoteAccessSessionRequest method. // req, resp := client.StopRemoteAccessSessionRequest(params) @@ -4800,7 +5629,7 @@ const opStopRemoteAccessSession = "StopRemoteAccessSession" // fmt.Println(resp) // } // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/StopRemoteAccessSession +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/StopRemoteAccessSession func (c *DeviceFarm) StopRemoteAccessSessionRequest(input *StopRemoteAccessSessionInput) (req *request.Request, output *StopRemoteAccessSessionOutput) { op := &request.Operation{ Name: opStopRemoteAccessSession, @@ -4841,7 +5670,7 @@ func (c *DeviceFarm) StopRemoteAccessSessionRequest(input *StopRemoteAccessSessi // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/StopRemoteAccessSession +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/StopRemoteAccessSession func (c *DeviceFarm) StopRemoteAccessSession(input *StopRemoteAccessSessionInput) (*StopRemoteAccessSessionOutput, error) { req, out := c.StopRemoteAccessSessionRequest(input) return out, req.Send() @@ -4867,19 +5696,18 @@ const opStopRun = "StopRun" // StopRunRequest generates a "aws/request.Request" representing the // client's request for the StopRun operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See StopRun for usage and error information. +// See StopRun for more information on using the StopRun +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the StopRun method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the StopRunRequest method. // req, resp := client.StopRunRequest(params) @@ -4889,7 +5717,7 @@ const opStopRun = "StopRun" // fmt.Println(resp) // } // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/StopRun +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/StopRun func (c *DeviceFarm) StopRunRequest(input *StopRunInput) (req *request.Request, output *StopRunOutput) { op := &request.Operation{ Name: opStopRun, @@ -4935,7 +5763,7 @@ func (c *DeviceFarm) StopRunRequest(input *StopRunInput) (req *request.Request, // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/StopRun +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/StopRun func (c *DeviceFarm) StopRun(input *StopRunInput) (*StopRunOutput, error) { req, out := c.StopRunRequest(input) return out, req.Send() @@ -4957,52 +5785,139 @@ func (c *DeviceFarm) StopRunWithContext(ctx aws.Context, input *StopRunInput, op return out, req.Send() } -const opUpdateDevicePool = "UpdateDevicePool" +const opUpdateDeviceInstance = "UpdateDeviceInstance" -// UpdateDevicePoolRequest generates a "aws/request.Request" representing the -// client's request for the UpdateDevicePool operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// UpdateDeviceInstanceRequest generates a "aws/request.Request" representing the +// client's request for the UpdateDeviceInstance operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. // -// See UpdateDevicePool for usage and error information. +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the UpdateDevicePool method directly -// instead. +// See UpdateDeviceInstance for more information on using the UpdateDeviceInstance +// API call, and error handling. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the UpdateDevicePoolRequest method. -// req, resp := client.UpdateDevicePoolRequest(params) +// +// // Example sending a request using the UpdateDeviceInstanceRequest method. +// req, resp := client.UpdateDeviceInstanceRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateDevicePool -func (c *DeviceFarm) UpdateDevicePoolRequest(input *UpdateDevicePoolInput) (req *request.Request, output *UpdateDevicePoolOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateDeviceInstance +func (c *DeviceFarm) UpdateDeviceInstanceRequest(input *UpdateDeviceInstanceInput) (req *request.Request, output *UpdateDeviceInstanceOutput) { op := &request.Operation{ - Name: opUpdateDevicePool, + Name: opUpdateDeviceInstance, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &UpdateDevicePoolInput{} + input = &UpdateDeviceInstanceInput{} } - output = &UpdateDevicePoolOutput{} + output = &UpdateDeviceInstanceOutput{} req = c.newRequest(op, input, output) return } -// UpdateDevicePool API operation for AWS Device Farm. +// UpdateDeviceInstance API operation for AWS Device Farm. // -// Modifies the name, description, and rules in a device pool given the attributes +// Updates information about an existing private device instance. +// +// 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 +// the error. +// +// See the AWS API reference guide for AWS Device Farm's +// API operation UpdateDeviceInstance for usage and error information. +// +// Returned Error Codes: +// * ErrCodeArgumentException "ArgumentException" +// An invalid argument was specified. +// +// * ErrCodeNotFoundException "NotFoundException" +// The specified entity was not found. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// A limit was exceeded. +// +// * ErrCodeServiceAccountException "ServiceAccountException" +// There was a problem with the service account. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateDeviceInstance +func (c *DeviceFarm) UpdateDeviceInstance(input *UpdateDeviceInstanceInput) (*UpdateDeviceInstanceOutput, error) { + req, out := c.UpdateDeviceInstanceRequest(input) + return out, req.Send() +} + +// UpdateDeviceInstanceWithContext is the same as UpdateDeviceInstance with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateDeviceInstance for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DeviceFarm) UpdateDeviceInstanceWithContext(ctx aws.Context, input *UpdateDeviceInstanceInput, opts ...request.Option) (*UpdateDeviceInstanceOutput, error) { + req, out := c.UpdateDeviceInstanceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateDevicePool = "UpdateDevicePool" + +// UpdateDevicePoolRequest generates a "aws/request.Request" representing the +// client's request for the UpdateDevicePool operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateDevicePool for more information on using the UpdateDevicePool +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateDevicePoolRequest method. +// req, resp := client.UpdateDevicePoolRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateDevicePool +func (c *DeviceFarm) UpdateDevicePoolRequest(input *UpdateDevicePoolInput) (req *request.Request, output *UpdateDevicePoolOutput) { + op := &request.Operation{ + Name: opUpdateDevicePool, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateDevicePoolInput{} + } + + output = &UpdateDevicePoolOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateDevicePool API operation for AWS Device Farm. +// +// Modifies the name, description, and rules in a device pool given the attributes // and the pool ARN. Rule updates are all-or-nothing, meaning they can only // be updated as a whole (or not at all). // @@ -5026,7 +5941,7 @@ func (c *DeviceFarm) UpdateDevicePoolRequest(input *UpdateDevicePoolInput) (req // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateDevicePool +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateDevicePool func (c *DeviceFarm) UpdateDevicePool(input *UpdateDevicePoolInput) (*UpdateDevicePoolOutput, error) { req, out := c.UpdateDevicePoolRequest(input) return out, req.Send() @@ -5048,23 +5963,110 @@ func (c *DeviceFarm) UpdateDevicePoolWithContext(ctx aws.Context, input *UpdateD return out, req.Send() } +const opUpdateInstanceProfile = "UpdateInstanceProfile" + +// UpdateInstanceProfileRequest generates a "aws/request.Request" representing the +// client's request for the UpdateInstanceProfile operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateInstanceProfile for more information on using the UpdateInstanceProfile +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateInstanceProfileRequest method. +// req, resp := client.UpdateInstanceProfileRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateInstanceProfile +func (c *DeviceFarm) UpdateInstanceProfileRequest(input *UpdateInstanceProfileInput) (req *request.Request, output *UpdateInstanceProfileOutput) { + op := &request.Operation{ + Name: opUpdateInstanceProfile, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateInstanceProfileInput{} + } + + output = &UpdateInstanceProfileOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateInstanceProfile API operation for AWS Device Farm. +// +// Updates information about an existing private device instance profile. +// +// 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 +// the error. +// +// See the AWS API reference guide for AWS Device Farm's +// API operation UpdateInstanceProfile for usage and error information. +// +// Returned Error Codes: +// * ErrCodeArgumentException "ArgumentException" +// An invalid argument was specified. +// +// * ErrCodeNotFoundException "NotFoundException" +// The specified entity was not found. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// A limit was exceeded. +// +// * ErrCodeServiceAccountException "ServiceAccountException" +// There was a problem with the service account. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateInstanceProfile +func (c *DeviceFarm) UpdateInstanceProfile(input *UpdateInstanceProfileInput) (*UpdateInstanceProfileOutput, error) { + req, out := c.UpdateInstanceProfileRequest(input) + return out, req.Send() +} + +// UpdateInstanceProfileWithContext is the same as UpdateInstanceProfile with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateInstanceProfile for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DeviceFarm) UpdateInstanceProfileWithContext(ctx aws.Context, input *UpdateInstanceProfileInput, opts ...request.Option) (*UpdateInstanceProfileOutput, error) { + req, out := c.UpdateInstanceProfileRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opUpdateNetworkProfile = "UpdateNetworkProfile" // UpdateNetworkProfileRequest generates a "aws/request.Request" representing the // client's request for the UpdateNetworkProfile operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. // -// See UpdateNetworkProfile for usage and error information. +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the UpdateNetworkProfile method directly -// instead. +// See UpdateNetworkProfile for more information on using the UpdateNetworkProfile +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the UpdateNetworkProfileRequest method. // req, resp := client.UpdateNetworkProfileRequest(params) @@ -5074,7 +6076,7 @@ const opUpdateNetworkProfile = "UpdateNetworkProfile" // fmt.Println(resp) // } // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateNetworkProfile +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateNetworkProfile func (c *DeviceFarm) UpdateNetworkProfileRequest(input *UpdateNetworkProfileInput) (req *request.Request, output *UpdateNetworkProfileOutput) { op := &request.Operation{ Name: opUpdateNetworkProfile, @@ -5115,7 +6117,7 @@ func (c *DeviceFarm) UpdateNetworkProfileRequest(input *UpdateNetworkProfileInpu // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateNetworkProfile +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateNetworkProfile func (c *DeviceFarm) UpdateNetworkProfile(input *UpdateNetworkProfileInput) (*UpdateNetworkProfileOutput, error) { req, out := c.UpdateNetworkProfileRequest(input) return out, req.Send() @@ -5141,19 +6143,18 @@ const opUpdateProject = "UpdateProject" // UpdateProjectRequest generates a "aws/request.Request" representing the // client's request for the UpdateProject operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See UpdateProject for usage and error information. +// See UpdateProject for more information on using the UpdateProject +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the UpdateProject method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the UpdateProjectRequest method. // req, resp := client.UpdateProjectRequest(params) @@ -5163,7 +6164,7 @@ const opUpdateProject = "UpdateProject" // fmt.Println(resp) // } // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateProject +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateProject func (c *DeviceFarm) UpdateProjectRequest(input *UpdateProjectInput) (req *request.Request, output *UpdateProjectOutput) { op := &request.Operation{ Name: opUpdateProject, @@ -5204,7 +6205,7 @@ func (c *DeviceFarm) UpdateProjectRequest(input *UpdateProjectInput) (req *reque // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateProject +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateProject func (c *DeviceFarm) UpdateProject(input *UpdateProjectInput) (*UpdateProjectOutput, error) { req, out := c.UpdateProjectRequest(input) return out, req.Send() @@ -5226,8 +6227,97 @@ func (c *DeviceFarm) UpdateProjectWithContext(ctx aws.Context, input *UpdateProj return out, req.Send() } +const opUpdateVPCEConfiguration = "UpdateVPCEConfiguration" + +// UpdateVPCEConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the UpdateVPCEConfiguration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateVPCEConfiguration for more information on using the UpdateVPCEConfiguration +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateVPCEConfigurationRequest method. +// req, resp := client.UpdateVPCEConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateVPCEConfiguration +func (c *DeviceFarm) UpdateVPCEConfigurationRequest(input *UpdateVPCEConfigurationInput) (req *request.Request, output *UpdateVPCEConfigurationOutput) { + op := &request.Operation{ + Name: opUpdateVPCEConfiguration, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateVPCEConfigurationInput{} + } + + output = &UpdateVPCEConfigurationOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateVPCEConfiguration API operation for AWS Device Farm. +// +// Updates information about an existing Amazon Virtual Private Cloud (VPC) +// endpoint configuration. +// +// 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 +// the error. +// +// See the AWS API reference guide for AWS Device Farm's +// API operation UpdateVPCEConfiguration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeArgumentException "ArgumentException" +// An invalid argument was specified. +// +// * ErrCodeNotFoundException "NotFoundException" +// The specified entity was not found. +// +// * ErrCodeServiceAccountException "ServiceAccountException" +// There was a problem with the service account. +// +// * ErrCodeInvalidOperationException "InvalidOperationException" +// There was an error with the update request, or you do not have sufficient +// permissions to update this VPC endpoint configuration. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateVPCEConfiguration +func (c *DeviceFarm) UpdateVPCEConfiguration(input *UpdateVPCEConfigurationInput) (*UpdateVPCEConfigurationOutput, error) { + req, out := c.UpdateVPCEConfigurationRequest(input) + return out, req.Send() +} + +// UpdateVPCEConfigurationWithContext is the same as UpdateVPCEConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateVPCEConfiguration for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DeviceFarm) UpdateVPCEConfigurationWithContext(ctx aws.Context, input *UpdateVPCEConfigurationInput, opts ...request.Option) (*UpdateVPCEConfigurationOutput, error) { + req, out := c.UpdateVPCEConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + // A container for account-level settings within AWS Device Farm. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/AccountSettings type AccountSettings struct { _ struct{} `type:"structure"` @@ -5246,6 +6336,15 @@ type AccountSettings struct { // represents one of the IDs returned by the ListOfferings command. MaxSlots map[string]*int64 `locationName:"maxSlots" type:"map"` + // When set to true, for private devices, Device Farm will not sign your app + // again. For public devices, Device Farm always signs your apps again and this + // parameter has no effect. + // + // For more information about how Device Farm re-signs your app(s), see Do you + // modify my app? (https://aws.amazon.com/device-farm/faq/) in the AWS Device + // Farm FAQs. + SkipAppResign *bool `locationName:"skipAppResign" type:"boolean"` + // Information about an AWS account's usage of free trial device minutes. TrialMinutes *TrialMinutes `locationName:"trialMinutes" type:"structure"` @@ -5291,6 +6390,12 @@ func (s *AccountSettings) SetMaxSlots(v map[string]*int64) *AccountSettings { return s } +// SetSkipAppResign sets the SkipAppResign field's value. +func (s *AccountSettings) SetSkipAppResign(v bool) *AccountSettings { + s.SkipAppResign = &v + return s +} + // SetTrialMinutes sets the TrialMinutes field's value. func (s *AccountSettings) SetTrialMinutes(v *TrialMinutes) *AccountSettings { s.TrialMinutes = v @@ -5310,7 +6415,6 @@ func (s *AccountSettings) SetUnmeteredRemoteAccessDevices(v map[string]*int64) * } // Represents the output of a test. Examples of artifacts include logs and screenshots. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/Artifact type Artifact struct { _ struct{} `type:"structure"` @@ -5423,7 +6527,6 @@ func (s *Artifact) SetUrl(v string) *Artifact { // Represents the amount of CPU that an app is using on a physical device. // // Note that this does not represent system-wide CPU usage. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CPU type CPU struct { _ struct{} `type:"structure"` @@ -5467,7 +6570,6 @@ func (s *CPU) SetFrequency(v string) *CPU { } // Represents entity counters. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/Counters type Counters struct { _ struct{} `type:"structure"` @@ -5546,7 +6648,6 @@ func (s *Counters) SetWarned(v int64) *Counters { } // Represents a request to the create device pool operation. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateDevicePoolRequest type CreateDevicePoolInput struct { _ struct{} `type:"structure"` @@ -5626,7 +6727,6 @@ func (s *CreateDevicePoolInput) SetRules(v []*Rule) *CreateDevicePoolInput { } // Represents the result of a create device pool request. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateDevicePoolResult type CreateDevicePoolOutput struct { _ struct{} `type:"structure"` @@ -5650,7 +6750,108 @@ func (s *CreateDevicePoolOutput) SetDevicePool(v *DevicePool) *CreateDevicePoolO return s } -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateNetworkProfileRequest +type CreateInstanceProfileInput struct { + _ struct{} `type:"structure"` + + // The description of your instance profile. + Description *string `locationName:"description" type:"string"` + + // An array of strings specifying the list of app packages that should not be + // cleaned up from the device after a test run is over. + // + // The list of packages is only considered if you set packageCleanup to true. + ExcludeAppPackagesFromCleanup []*string `locationName:"excludeAppPackagesFromCleanup" type:"list"` + + // The name of your instance profile. + // + // Name is a required field + Name *string `locationName:"name" type:"string" required:"true"` + + // When set to true, Device Farm will remove app packages after a test run. + // The default value is false for private devices. + PackageCleanup *bool `locationName:"packageCleanup" type:"boolean"` + + // When set to true, Device Farm will reboot the instance after a test run. + // The default value is true. + RebootAfterUse *bool `locationName:"rebootAfterUse" type:"boolean"` +} + +// String returns the string representation +func (s CreateInstanceProfileInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateInstanceProfileInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateInstanceProfileInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateInstanceProfileInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDescription sets the Description field's value. +func (s *CreateInstanceProfileInput) SetDescription(v string) *CreateInstanceProfileInput { + s.Description = &v + return s +} + +// SetExcludeAppPackagesFromCleanup sets the ExcludeAppPackagesFromCleanup field's value. +func (s *CreateInstanceProfileInput) SetExcludeAppPackagesFromCleanup(v []*string) *CreateInstanceProfileInput { + s.ExcludeAppPackagesFromCleanup = v + return s +} + +// SetName sets the Name field's value. +func (s *CreateInstanceProfileInput) SetName(v string) *CreateInstanceProfileInput { + s.Name = &v + return s +} + +// SetPackageCleanup sets the PackageCleanup field's value. +func (s *CreateInstanceProfileInput) SetPackageCleanup(v bool) *CreateInstanceProfileInput { + s.PackageCleanup = &v + return s +} + +// SetRebootAfterUse sets the RebootAfterUse field's value. +func (s *CreateInstanceProfileInput) SetRebootAfterUse(v bool) *CreateInstanceProfileInput { + s.RebootAfterUse = &v + return s +} + +type CreateInstanceProfileOutput struct { + _ struct{} `type:"structure"` + + // An object containing information about your instance profile. + InstanceProfile *InstanceProfile `locationName:"instanceProfile" type:"structure"` +} + +// String returns the string representation +func (s CreateInstanceProfileOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateInstanceProfileOutput) GoString() string { + return s.String() +} + +// SetInstanceProfile sets the InstanceProfile field's value. +func (s *CreateInstanceProfileOutput) SetInstanceProfile(v *InstanceProfile) *CreateInstanceProfileOutput { + s.InstanceProfile = v + return s +} + type CreateNetworkProfileInput struct { _ struct{} `type:"structure"` @@ -5801,7 +7002,6 @@ func (s *CreateNetworkProfileInput) SetUplinkLossPercent(v int64) *CreateNetwork return s } -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateNetworkProfileResult type CreateNetworkProfileOutput struct { _ struct{} `type:"structure"` @@ -5826,7 +7026,6 @@ func (s *CreateNetworkProfileOutput) SetNetworkProfile(v *NetworkProfile) *Creat } // Represents a request to the create project operation. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateProjectRequest type CreateProjectInput struct { _ struct{} `type:"structure"` @@ -5877,7 +7076,6 @@ func (s *CreateProjectInput) SetName(v string) *CreateProjectInput { } // Represents the result of a create project request. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateProjectResult type CreateProjectOutput struct { _ struct{} `type:"structure"` @@ -5901,13 +7099,11 @@ func (s *CreateProjectOutput) SetProject(v *Project) *CreateProjectOutput { return s } -// Creates the configuration settings for a remote access session, including -// the device model and type. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateRemoteAccessSessionConfiguration +// Configuration settings for a remote access session, including billing method. type CreateRemoteAccessSessionConfiguration struct { _ struct{} `type:"structure"` - // Returns the billing method for purposes of configuring a remote access session. + // The billing method for the remote access session. BillingMethod *string `locationName:"billingMethod" type:"string" enum:"BillingMethod"` } @@ -5928,10 +7124,15 @@ func (s *CreateRemoteAccessSessionConfiguration) SetBillingMethod(v string) *Cre } // Creates and submits a request to start a remote access session. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateRemoteAccessSessionRequest type CreateRemoteAccessSessionInput struct { _ struct{} `type:"structure"` + // Unique identifier for the client. If you want access to multiple devices + // on the same client, you should pass the same clientId value in each call + // to CreateRemoteAccessSession. This is required only if remoteDebugEnabled + // is set to true. + ClientId *string `locationName:"clientId" type:"string"` + // The configuration information for the remote access session request. Configuration *CreateRemoteAccessSessionConfiguration `locationName:"configuration" type:"structure"` @@ -5941,6 +7142,24 @@ type CreateRemoteAccessSessionInput struct { // DeviceArn is a required field DeviceArn *string `locationName:"deviceArn" min:"32" type:"string" required:"true"` + // The Amazon Resource Name (ARN) of the device instance for which you want + // to create a remote access session. + InstanceArn *string `locationName:"instanceArn" min:"32" type:"string"` + + // The interaction mode of the remote access session. Valid values are: + // + // * INTERACTIVE: You can interact with the iOS device by viewing, touching, + // and rotating the screen. You cannot run XCUITest framework-based tests + // in this mode. + // + // * NO_VIDEO: You are connected to the device but cannot interact with it + // or view the screen. This mode has the fastest test execution speed. You + // can run XCUITest framework-based tests in this mode. + // + // * VIDEO_ONLY: You can view the screen but cannot touch or rotate it. You + // can run XCUITest framework-based tests and watch the screen in this mode. + InteractionMode *string `locationName:"interactionMode" type:"string" enum:"InteractionMode"` + // The name of the remote access session that you wish to create. Name *string `locationName:"name" type:"string"` @@ -5949,6 +7168,31 @@ type CreateRemoteAccessSessionInput struct { // // ProjectArn is a required field ProjectArn *string `locationName:"projectArn" min:"32" type:"string" required:"true"` + + // Set to true if you want to access devices remotely for debugging in your + // remote access session. + RemoteDebugEnabled *bool `locationName:"remoteDebugEnabled" type:"boolean"` + + // The Amazon Resource Name (ARN) for the app to be recorded in the remote access + // session. + RemoteRecordAppArn *string `locationName:"remoteRecordAppArn" min:"32" type:"string"` + + // Set to true to enable remote recording for the remote access session. + RemoteRecordEnabled *bool `locationName:"remoteRecordEnabled" type:"boolean"` + + // When set to true, for private devices, Device Farm will not sign your app + // again. For public devices, Device Farm always signs your apps again and this + // parameter has no effect. + // + // For more information about how Device Farm re-signs your app(s), see Do you + // modify my app? (https://aws.amazon.com/device-farm/faq/) in the AWS Device + // Farm FAQs. + SkipAppResign *bool `locationName:"skipAppResign" type:"boolean"` + + // The public key of the ssh key pair you want to use for connecting to remote + // devices in your remote debugging session. This is only required if remoteDebugEnabled + // is set to true. + SshPublicKey *string `locationName:"sshPublicKey" type:"string"` } // String returns the string representation @@ -5970,12 +7214,18 @@ func (s *CreateRemoteAccessSessionInput) Validate() error { if s.DeviceArn != nil && len(*s.DeviceArn) < 32 { invalidParams.Add(request.NewErrParamMinLen("DeviceArn", 32)) } + if s.InstanceArn != nil && len(*s.InstanceArn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("InstanceArn", 32)) + } if s.ProjectArn == nil { invalidParams.Add(request.NewErrParamRequired("ProjectArn")) } if s.ProjectArn != nil && len(*s.ProjectArn) < 32 { invalidParams.Add(request.NewErrParamMinLen("ProjectArn", 32)) } + if s.RemoteRecordAppArn != nil && len(*s.RemoteRecordAppArn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("RemoteRecordAppArn", 32)) + } if invalidParams.Len() > 0 { return invalidParams @@ -5983,6 +7233,12 @@ func (s *CreateRemoteAccessSessionInput) Validate() error { return nil } +// SetClientId sets the ClientId field's value. +func (s *CreateRemoteAccessSessionInput) SetClientId(v string) *CreateRemoteAccessSessionInput { + s.ClientId = &v + return s +} + // SetConfiguration sets the Configuration field's value. func (s *CreateRemoteAccessSessionInput) SetConfiguration(v *CreateRemoteAccessSessionConfiguration) *CreateRemoteAccessSessionInput { s.Configuration = v @@ -5995,6 +7251,18 @@ func (s *CreateRemoteAccessSessionInput) SetDeviceArn(v string) *CreateRemoteAcc return s } +// SetInstanceArn sets the InstanceArn field's value. +func (s *CreateRemoteAccessSessionInput) SetInstanceArn(v string) *CreateRemoteAccessSessionInput { + s.InstanceArn = &v + return s +} + +// SetInteractionMode sets the InteractionMode field's value. +func (s *CreateRemoteAccessSessionInput) SetInteractionMode(v string) *CreateRemoteAccessSessionInput { + s.InteractionMode = &v + return s +} + // SetName sets the Name field's value. func (s *CreateRemoteAccessSessionInput) SetName(v string) *CreateRemoteAccessSessionInput { s.Name = &v @@ -6007,8 +7275,37 @@ func (s *CreateRemoteAccessSessionInput) SetProjectArn(v string) *CreateRemoteAc return s } +// SetRemoteDebugEnabled sets the RemoteDebugEnabled field's value. +func (s *CreateRemoteAccessSessionInput) SetRemoteDebugEnabled(v bool) *CreateRemoteAccessSessionInput { + s.RemoteDebugEnabled = &v + return s +} + +// SetRemoteRecordAppArn sets the RemoteRecordAppArn field's value. +func (s *CreateRemoteAccessSessionInput) SetRemoteRecordAppArn(v string) *CreateRemoteAccessSessionInput { + s.RemoteRecordAppArn = &v + return s +} + +// SetRemoteRecordEnabled sets the RemoteRecordEnabled field's value. +func (s *CreateRemoteAccessSessionInput) SetRemoteRecordEnabled(v bool) *CreateRemoteAccessSessionInput { + s.RemoteRecordEnabled = &v + return s +} + +// SetSkipAppResign sets the SkipAppResign field's value. +func (s *CreateRemoteAccessSessionInput) SetSkipAppResign(v bool) *CreateRemoteAccessSessionInput { + s.SkipAppResign = &v + return s +} + +// SetSshPublicKey sets the SshPublicKey field's value. +func (s *CreateRemoteAccessSessionInput) SetSshPublicKey(v string) *CreateRemoteAccessSessionInput { + s.SshPublicKey = &v + return s +} + // Represents the server response from a request to create a remote access session. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateRemoteAccessSessionResult type CreateRemoteAccessSessionOutput struct { _ struct{} `type:"structure"` @@ -6034,7 +7331,6 @@ func (s *CreateRemoteAccessSessionOutput) SetRemoteAccessSession(v *RemoteAccess } // Represents a request to the create upload operation. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateUploadRequest type CreateUploadInput struct { _ struct{} `type:"structure"` @@ -6157,7 +7453,6 @@ func (s *CreateUploadInput) SetType(v string) *CreateUploadInput { } // Represents the result of a create upload request. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateUploadResult type CreateUploadOutput struct { _ struct{} `type:"structure"` @@ -6175,37 +7470,244 @@ func (s CreateUploadOutput) GoString() string { return s.String() } -// SetUpload sets the Upload field's value. -func (s *CreateUploadOutput) SetUpload(v *Upload) *CreateUploadOutput { - s.Upload = v - return s +// SetUpload sets the Upload field's value. +func (s *CreateUploadOutput) SetUpload(v *Upload) *CreateUploadOutput { + s.Upload = v + return s +} + +type CreateVPCEConfigurationInput struct { + _ struct{} `type:"structure"` + + // The DNS name of the service running in your VPC that you want Device Farm + // to test. + // + // ServiceDnsName is a required field + ServiceDnsName *string `locationName:"serviceDnsName" type:"string" required:"true"` + + // An optional description, providing more details about your VPC endpoint configuration. + VpceConfigurationDescription *string `locationName:"vpceConfigurationDescription" type:"string"` + + // The friendly name you give to your VPC endpoint configuration, to manage + // your configurations more easily. + // + // VpceConfigurationName is a required field + VpceConfigurationName *string `locationName:"vpceConfigurationName" type:"string" required:"true"` + + // The name of the VPC endpoint service running inside your AWS account that + // you want Device Farm to test. + // + // VpceServiceName is a required field + VpceServiceName *string `locationName:"vpceServiceName" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateVPCEConfigurationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateVPCEConfigurationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateVPCEConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateVPCEConfigurationInput"} + if s.ServiceDnsName == nil { + invalidParams.Add(request.NewErrParamRequired("ServiceDnsName")) + } + if s.VpceConfigurationName == nil { + invalidParams.Add(request.NewErrParamRequired("VpceConfigurationName")) + } + if s.VpceServiceName == nil { + invalidParams.Add(request.NewErrParamRequired("VpceServiceName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetServiceDnsName sets the ServiceDnsName field's value. +func (s *CreateVPCEConfigurationInput) SetServiceDnsName(v string) *CreateVPCEConfigurationInput { + s.ServiceDnsName = &v + return s +} + +// SetVpceConfigurationDescription sets the VpceConfigurationDescription field's value. +func (s *CreateVPCEConfigurationInput) SetVpceConfigurationDescription(v string) *CreateVPCEConfigurationInput { + s.VpceConfigurationDescription = &v + return s +} + +// SetVpceConfigurationName sets the VpceConfigurationName field's value. +func (s *CreateVPCEConfigurationInput) SetVpceConfigurationName(v string) *CreateVPCEConfigurationInput { + s.VpceConfigurationName = &v + return s +} + +// SetVpceServiceName sets the VpceServiceName field's value. +func (s *CreateVPCEConfigurationInput) SetVpceServiceName(v string) *CreateVPCEConfigurationInput { + s.VpceServiceName = &v + return s +} + +type CreateVPCEConfigurationOutput struct { + _ struct{} `type:"structure"` + + // An object containing information about your VPC endpoint configuration. + VpceConfiguration *VPCEConfiguration `locationName:"vpceConfiguration" type:"structure"` +} + +// String returns the string representation +func (s CreateVPCEConfigurationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateVPCEConfigurationOutput) GoString() string { + return s.String() +} + +// SetVpceConfiguration sets the VpceConfiguration field's value. +func (s *CreateVPCEConfigurationOutput) SetVpceConfiguration(v *VPCEConfiguration) *CreateVPCEConfigurationOutput { + s.VpceConfiguration = v + return s +} + +// A JSON object specifying the paths where the artifacts generated by the customer's +// tests, on the device or in the test environment, will be pulled from. +// +// Specify deviceHostPaths and optionally specify either iosPaths or androidPaths. +// +// For web app tests, you can specify both iosPaths and androidPaths. +type CustomerArtifactPaths struct { + _ struct{} `type:"structure"` + + // Comma-separated list of paths on the Android device where the artifacts generated + // by the customer's tests will be pulled from. + AndroidPaths []*string `locationName:"androidPaths" type:"list"` + + // Comma-separated list of paths in the test execution environment where the + // artifacts generated by the customer's tests will be pulled from. + DeviceHostPaths []*string `locationName:"deviceHostPaths" type:"list"` + + // Comma-separated list of paths on the iOS device where the artifacts generated + // by the customer's tests will be pulled from. + IosPaths []*string `locationName:"iosPaths" type:"list"` +} + +// String returns the string representation +func (s CustomerArtifactPaths) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CustomerArtifactPaths) GoString() string { + return s.String() +} + +// SetAndroidPaths sets the AndroidPaths field's value. +func (s *CustomerArtifactPaths) SetAndroidPaths(v []*string) *CustomerArtifactPaths { + s.AndroidPaths = v + return s +} + +// SetDeviceHostPaths sets the DeviceHostPaths field's value. +func (s *CustomerArtifactPaths) SetDeviceHostPaths(v []*string) *CustomerArtifactPaths { + s.DeviceHostPaths = v + return s +} + +// SetIosPaths sets the IosPaths field's value. +func (s *CustomerArtifactPaths) SetIosPaths(v []*string) *CustomerArtifactPaths { + s.IosPaths = v + return s +} + +// Represents a request to the delete device pool operation. +type DeleteDevicePoolInput struct { + _ struct{} `type:"structure"` + + // Represents the Amazon Resource Name (ARN) of the Device Farm device pool + // you wish to delete. + // + // Arn is a required field + Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteDevicePoolInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDevicePoolInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteDevicePoolInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDevicePoolInput"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } + if s.Arn != nil && len(*s.Arn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetArn sets the Arn field's value. +func (s *DeleteDevicePoolInput) SetArn(v string) *DeleteDevicePoolInput { + s.Arn = &v + return s +} + +// Represents the result of a delete device pool request. +type DeleteDevicePoolOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteDevicePoolOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDevicePoolOutput) GoString() string { + return s.String() } -// Represents a request to the delete device pool operation. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteDevicePoolRequest -type DeleteDevicePoolInput struct { +type DeleteInstanceProfileInput struct { _ struct{} `type:"structure"` - // Represents the Amazon Resource Name (ARN) of the Device Farm device pool - // you wish to delete. + // The Amazon Resource Name (ARN) of the instance profile you are requesting + // to delete. // // Arn is a required field Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` } // String returns the string representation -func (s DeleteDevicePoolInput) String() string { +func (s DeleteInstanceProfileInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteDevicePoolInput) GoString() string { +func (s DeleteInstanceProfileInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDevicePoolInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDevicePoolInput"} +func (s *DeleteInstanceProfileInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteInstanceProfileInput"} if s.Arn == nil { invalidParams.Add(request.NewErrParamRequired("Arn")) } @@ -6220,28 +7722,25 @@ func (s *DeleteDevicePoolInput) Validate() error { } // SetArn sets the Arn field's value. -func (s *DeleteDevicePoolInput) SetArn(v string) *DeleteDevicePoolInput { +func (s *DeleteInstanceProfileInput) SetArn(v string) *DeleteInstanceProfileInput { s.Arn = &v return s } -// Represents the result of a delete device pool request. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteDevicePoolResult -type DeleteDevicePoolOutput struct { +type DeleteInstanceProfileOutput struct { _ struct{} `type:"structure"` } // String returns the string representation -func (s DeleteDevicePoolOutput) String() string { +func (s DeleteInstanceProfileOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteDevicePoolOutput) GoString() string { +func (s DeleteInstanceProfileOutput) GoString() string { return s.String() } -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteNetworkProfileRequest type DeleteNetworkProfileInput struct { _ struct{} `type:"structure"` @@ -6283,7 +7782,6 @@ func (s *DeleteNetworkProfileInput) SetArn(v string) *DeleteNetworkProfileInput return s } -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteNetworkProfileResult type DeleteNetworkProfileOutput struct { _ struct{} `type:"structure"` } @@ -6299,7 +7797,6 @@ func (s DeleteNetworkProfileOutput) GoString() string { } // Represents a request to the delete project operation. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteProjectRequest type DeleteProjectInput struct { _ struct{} `type:"structure"` @@ -6343,7 +7840,6 @@ func (s *DeleteProjectInput) SetArn(v string) *DeleteProjectInput { } // Represents the result of a delete project request. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteProjectResult type DeleteProjectOutput struct { _ struct{} `type:"structure"` } @@ -6359,7 +7855,6 @@ func (s DeleteProjectOutput) GoString() string { } // Represents the request to delete the specified remote access session. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteRemoteAccessSessionRequest type DeleteRemoteAccessSessionInput struct { _ struct{} `type:"structure"` @@ -6404,7 +7899,6 @@ func (s *DeleteRemoteAccessSessionInput) SetArn(v string) *DeleteRemoteAccessSes // The response from the server when a request is made to delete the remote // access session. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteRemoteAccessSessionResult type DeleteRemoteAccessSessionOutput struct { _ struct{} `type:"structure"` } @@ -6420,7 +7914,6 @@ func (s DeleteRemoteAccessSessionOutput) GoString() string { } // Represents a request to the delete run operation. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteRunRequest type DeleteRunInput struct { _ struct{} `type:"structure"` @@ -6463,7 +7956,6 @@ func (s *DeleteRunInput) SetArn(v string) *DeleteRunInput { } // Represents the result of a delete run request. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteRunResult type DeleteRunOutput struct { _ struct{} `type:"structure"` } @@ -6479,7 +7971,6 @@ func (s DeleteRunOutput) GoString() string { } // Represents a request to the delete upload operation. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteUploadRequest type DeleteUploadInput struct { _ struct{} `type:"structure"` @@ -6523,7 +8014,6 @@ func (s *DeleteUploadInput) SetArn(v string) *DeleteUploadInput { } // Represents the result of a delete upload request. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteUploadResult type DeleteUploadOutput struct { _ struct{} `type:"structure"` } @@ -6538,8 +8028,63 @@ func (s DeleteUploadOutput) GoString() string { return s.String() } +type DeleteVPCEConfigurationInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the VPC endpoint configuration you want + // to delete. + // + // Arn is a required field + Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteVPCEConfigurationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteVPCEConfigurationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteVPCEConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteVPCEConfigurationInput"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } + if s.Arn != nil && len(*s.Arn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetArn sets the Arn field's value. +func (s *DeleteVPCEConfigurationInput) SetArn(v string) *DeleteVPCEConfigurationInput { + s.Arn = &v + return s +} + +type DeleteVPCEConfigurationOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteVPCEConfigurationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteVPCEConfigurationOutput) GoString() string { + return s.String() +} + // Represents a device type that an app is tested against. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/Device type Device struct { _ struct{} `type:"structure"` @@ -6574,6 +8119,9 @@ type Device struct { // The device's image name. Image *string `locationName:"image" type:"string"` + // The instances belonging to this device. + Instances []*DeviceInstance `locationName:"instances" type:"list"` + // The device's manufacturer name. Manufacturer *string `locationName:"manufacturer" type:"string"` @@ -6583,6 +8131,9 @@ type Device struct { // The device's model name. Model *string `locationName:"model" type:"string"` + // The device's model ID. + ModelId *string `locationName:"modelId" type:"string"` + // The device's display name. Name *string `locationName:"name" type:"string"` @@ -6604,6 +8155,9 @@ type Device struct { // Specifies whether remote access has been enabled for the specified device. RemoteAccessEnabled *bool `locationName:"remoteAccessEnabled" type:"boolean"` + // This flag is set to true if remote debugging is enabled for the device. + RemoteDebugEnabled *bool `locationName:"remoteDebugEnabled" type:"boolean"` + // The resolution of the device. Resolution *Resolution `locationName:"resolution" type:"structure"` } @@ -6666,6 +8220,12 @@ func (s *Device) SetImage(v string) *Device { return s } +// SetInstances sets the Instances field's value. +func (s *Device) SetInstances(v []*DeviceInstance) *Device { + s.Instances = v + return s +} + // SetManufacturer sets the Manufacturer field's value. func (s *Device) SetManufacturer(v string) *Device { s.Manufacturer = &v @@ -6684,6 +8244,12 @@ func (s *Device) SetModel(v string) *Device { return s } +// SetModelId sets the ModelId field's value. +func (s *Device) SetModelId(v string) *Device { + s.ModelId = &v + return s +} + // SetName sets the Name field's value. func (s *Device) SetName(v string) *Device { s.Name = &v @@ -6714,15 +8280,89 @@ func (s *Device) SetRemoteAccessEnabled(v bool) *Device { return s } +// SetRemoteDebugEnabled sets the RemoteDebugEnabled field's value. +func (s *Device) SetRemoteDebugEnabled(v bool) *Device { + s.RemoteDebugEnabled = &v + return s +} + // SetResolution sets the Resolution field's value. func (s *Device) SetResolution(v *Resolution) *Device { s.Resolution = v return s } +// Represents the device instance. +type DeviceInstance struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the device instance. + Arn *string `locationName:"arn" min:"32" type:"string"` + + // The Amazon Resource Name (ARN) of the device. + DeviceArn *string `locationName:"deviceArn" min:"32" type:"string"` + + // A object containing information about the instance profile. + InstanceProfile *InstanceProfile `locationName:"instanceProfile" type:"structure"` + + // An array of strings describing the device instance. + Labels []*string `locationName:"labels" type:"list"` + + // The status of the device instance. Valid values are listed below. + Status *string `locationName:"status" type:"string" enum:"InstanceStatus"` + + // Unique device identifier for the device instance. + Udid *string `locationName:"udid" type:"string"` +} + +// String returns the string representation +func (s DeviceInstance) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeviceInstance) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *DeviceInstance) SetArn(v string) *DeviceInstance { + s.Arn = &v + return s +} + +// SetDeviceArn sets the DeviceArn field's value. +func (s *DeviceInstance) SetDeviceArn(v string) *DeviceInstance { + s.DeviceArn = &v + return s +} + +// SetInstanceProfile sets the InstanceProfile field's value. +func (s *DeviceInstance) SetInstanceProfile(v *InstanceProfile) *DeviceInstance { + s.InstanceProfile = v + return s +} + +// SetLabels sets the Labels field's value. +func (s *DeviceInstance) SetLabels(v []*string) *DeviceInstance { + s.Labels = v + return s +} + +// SetStatus sets the Status field's value. +func (s *DeviceInstance) SetStatus(v string) *DeviceInstance { + s.Status = &v + return s +} + +// SetUdid sets the Udid field's value. +func (s *DeviceInstance) SetUdid(v string) *DeviceInstance { + s.Udid = &v + return s +} + // Represents the total (metered or unmetered) minutes used by the resource // to run tests. Contains the sum of minutes consumed by all children. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeviceMinutes type DeviceMinutes struct { _ struct{} `type:"structure"` @@ -6768,7 +8408,6 @@ func (s *DeviceMinutes) SetUnmetered(v float64) *DeviceMinutes { } // Represents a collection of device types. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DevicePool type DevicePool struct { _ struct{} `type:"structure"` @@ -6836,7 +8475,6 @@ func (s *DevicePool) SetType(v string) *DevicePool { } // Represents a device pool compatibility result. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DevicePoolCompatibilityResult type DevicePoolCompatibilityResult struct { _ struct{} `type:"structure"` @@ -6880,7 +8518,6 @@ func (s *DevicePoolCompatibilityResult) SetIncompatibilityMessages(v []*Incompat // Represents configuration information about a test run, such as the execution // timeout (in minutes). -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ExecutionConfiguration type ExecutionConfiguration struct { _ struct{} `type:"structure"` @@ -6894,6 +8531,15 @@ type ExecutionConfiguration struct { // The number of minutes a test run will execute before it times out. JobTimeoutMinutes *int64 `locationName:"jobTimeoutMinutes" type:"integer"` + + // When set to true, for private devices, Device Farm will not sign your app + // again. For public devices, Device Farm always signs your apps again and this + // parameter has no effect. + // + // For more information about how Device Farm re-signs your app(s), see Do you + // modify my app? (https://aws.amazon.com/device-farm/faq/) in the AWS Device + // Farm FAQs. + SkipAppResign *bool `locationName:"skipAppResign" type:"boolean"` } // String returns the string representation @@ -6924,8 +8570,13 @@ func (s *ExecutionConfiguration) SetJobTimeoutMinutes(v int64) *ExecutionConfigu return s } +// SetSkipAppResign sets the SkipAppResign field's value. +func (s *ExecutionConfiguration) SetSkipAppResign(v bool) *ExecutionConfiguration { + s.SkipAppResign = &v + return s +} + // Represents the request sent to retrieve the account settings. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetAccountSettingsRequest type GetAccountSettingsInput struct { _ struct{} `type:"structure"` } @@ -6942,7 +8593,6 @@ func (s GetAccountSettingsInput) GoString() string { // Represents the account settings return values from the GetAccountSettings // request. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetAccountSettingsResult type GetAccountSettingsOutput struct { _ struct{} `type:"structure"` @@ -6967,7 +8617,6 @@ func (s *GetAccountSettingsOutput) SetAccountSettings(v *AccountSettings) *GetAc } // Represents a request to the get device request. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetDeviceRequest type GetDeviceInput struct { _ struct{} `type:"structure"` @@ -7009,8 +8658,72 @@ func (s *GetDeviceInput) SetArn(v string) *GetDeviceInput { return s } +type GetDeviceInstanceInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the instance you're requesting information + // about. + // + // Arn is a required field + Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetDeviceInstanceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetDeviceInstanceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetDeviceInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetDeviceInstanceInput"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } + if s.Arn != nil && len(*s.Arn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetArn sets the Arn field's value. +func (s *GetDeviceInstanceInput) SetArn(v string) *GetDeviceInstanceInput { + s.Arn = &v + return s +} + +type GetDeviceInstanceOutput struct { + _ struct{} `type:"structure"` + + // An object containing information about your device instance. + DeviceInstance *DeviceInstance `locationName:"deviceInstance" type:"structure"` +} + +// String returns the string representation +func (s GetDeviceInstanceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetDeviceInstanceOutput) GoString() string { + return s.String() +} + +// SetDeviceInstance sets the DeviceInstance field's value. +func (s *GetDeviceInstanceOutput) SetDeviceInstance(v *DeviceInstance) *GetDeviceInstanceOutput { + s.DeviceInstance = v + return s +} + // Represents the result of a get device request. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetDeviceResult type GetDeviceOutput struct { _ struct{} `type:"structure"` @@ -7035,13 +8748,15 @@ func (s *GetDeviceOutput) SetDevice(v *Device) *GetDeviceOutput { } // Represents a request to the get device pool compatibility operation. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetDevicePoolCompatibilityRequest type GetDevicePoolCompatibilityInput struct { _ struct{} `type:"structure"` // The ARN of the app that is associated with the specified device pool. AppArn *string `locationName:"appArn" min:"32" type:"string"` + // An object containing information about the settings for a run. + Configuration *ScheduleRunConfiguration `locationName:"configuration" type:"structure"` + // The device pool's ARN. // // DevicePoolArn is a required field @@ -7108,6 +8823,11 @@ func (s *GetDevicePoolCompatibilityInput) Validate() error { if s.DevicePoolArn != nil && len(*s.DevicePoolArn) < 32 { invalidParams.Add(request.NewErrParamMinLen("DevicePoolArn", 32)) } + if s.Configuration != nil { + if err := s.Configuration.Validate(); err != nil { + invalidParams.AddNested("Configuration", err.(request.ErrInvalidParams)) + } + } if s.Test != nil { if err := s.Test.Validate(); err != nil { invalidParams.AddNested("Test", err.(request.ErrInvalidParams)) @@ -7126,6 +8846,12 @@ func (s *GetDevicePoolCompatibilityInput) SetAppArn(v string) *GetDevicePoolComp return s } +// SetConfiguration sets the Configuration field's value. +func (s *GetDevicePoolCompatibilityInput) SetConfiguration(v *ScheduleRunConfiguration) *GetDevicePoolCompatibilityInput { + s.Configuration = v + return s +} + // SetDevicePoolArn sets the DevicePoolArn field's value. func (s *GetDevicePoolCompatibilityInput) SetDevicePoolArn(v string) *GetDevicePoolCompatibilityInput { s.DevicePoolArn = &v @@ -7145,7 +8871,6 @@ func (s *GetDevicePoolCompatibilityInput) SetTestType(v string) *GetDevicePoolCo } // Represents the result of describe device pool compatibility request. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetDevicePoolCompatibilityResult type GetDevicePoolCompatibilityOutput struct { _ struct{} `type:"structure"` @@ -7157,51 +8882,115 @@ type GetDevicePoolCompatibilityOutput struct { } // String returns the string representation -func (s GetDevicePoolCompatibilityOutput) String() string { +func (s GetDevicePoolCompatibilityOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetDevicePoolCompatibilityOutput) GoString() string { + return s.String() +} + +// SetCompatibleDevices sets the CompatibleDevices field's value. +func (s *GetDevicePoolCompatibilityOutput) SetCompatibleDevices(v []*DevicePoolCompatibilityResult) *GetDevicePoolCompatibilityOutput { + s.CompatibleDevices = v + return s +} + +// SetIncompatibleDevices sets the IncompatibleDevices field's value. +func (s *GetDevicePoolCompatibilityOutput) SetIncompatibleDevices(v []*DevicePoolCompatibilityResult) *GetDevicePoolCompatibilityOutput { + s.IncompatibleDevices = v + return s +} + +// Represents a request to the get device pool operation. +type GetDevicePoolInput struct { + _ struct{} `type:"structure"` + + // The device pool's ARN. + // + // Arn is a required field + Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetDevicePoolInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetDevicePoolInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetDevicePoolInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetDevicePoolInput"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } + if s.Arn != nil && len(*s.Arn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetArn sets the Arn field's value. +func (s *GetDevicePoolInput) SetArn(v string) *GetDevicePoolInput { + s.Arn = &v + return s +} + +// Represents the result of a get device pool request. +type GetDevicePoolOutput struct { + _ struct{} `type:"structure"` + + // An object containing information about the requested device pool. + DevicePool *DevicePool `locationName:"devicePool" type:"structure"` +} + +// String returns the string representation +func (s GetDevicePoolOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetDevicePoolCompatibilityOutput) GoString() string { +func (s GetDevicePoolOutput) GoString() string { return s.String() } -// SetCompatibleDevices sets the CompatibleDevices field's value. -func (s *GetDevicePoolCompatibilityOutput) SetCompatibleDevices(v []*DevicePoolCompatibilityResult) *GetDevicePoolCompatibilityOutput { - s.CompatibleDevices = v - return s -} - -// SetIncompatibleDevices sets the IncompatibleDevices field's value. -func (s *GetDevicePoolCompatibilityOutput) SetIncompatibleDevices(v []*DevicePoolCompatibilityResult) *GetDevicePoolCompatibilityOutput { - s.IncompatibleDevices = v +// SetDevicePool sets the DevicePool field's value. +func (s *GetDevicePoolOutput) SetDevicePool(v *DevicePool) *GetDevicePoolOutput { + s.DevicePool = v return s } -// Represents a request to the get device pool operation. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetDevicePoolRequest -type GetDevicePoolInput struct { +type GetInstanceProfileInput struct { _ struct{} `type:"structure"` - // The device pool's ARN. + // The Amazon Resource Name (ARN) of your instance profile. // // Arn is a required field Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` } // String returns the string representation -func (s GetDevicePoolInput) String() string { +func (s GetInstanceProfileInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetDevicePoolInput) GoString() string { +func (s GetInstanceProfileInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *GetDevicePoolInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetDevicePoolInput"} +func (s *GetInstanceProfileInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetInstanceProfileInput"} if s.Arn == nil { invalidParams.Add(request.NewErrParamRequired("Arn")) } @@ -7216,38 +9005,35 @@ func (s *GetDevicePoolInput) Validate() error { } // SetArn sets the Arn field's value. -func (s *GetDevicePoolInput) SetArn(v string) *GetDevicePoolInput { +func (s *GetInstanceProfileInput) SetArn(v string) *GetInstanceProfileInput { s.Arn = &v return s } -// Represents the result of a get device pool request. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetDevicePoolResult -type GetDevicePoolOutput struct { +type GetInstanceProfileOutput struct { _ struct{} `type:"structure"` - // An object containing information about the requested device pool. - DevicePool *DevicePool `locationName:"devicePool" type:"structure"` + // An object containing information about your instance profile. + InstanceProfile *InstanceProfile `locationName:"instanceProfile" type:"structure"` } // String returns the string representation -func (s GetDevicePoolOutput) String() string { +func (s GetInstanceProfileOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetDevicePoolOutput) GoString() string { +func (s GetInstanceProfileOutput) GoString() string { return s.String() } -// SetDevicePool sets the DevicePool field's value. -func (s *GetDevicePoolOutput) SetDevicePool(v *DevicePool) *GetDevicePoolOutput { - s.DevicePool = v +// SetInstanceProfile sets the InstanceProfile field's value. +func (s *GetInstanceProfileOutput) SetInstanceProfile(v *InstanceProfile) *GetInstanceProfileOutput { + s.InstanceProfile = v return s } // Represents a request to the get job operation. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetJobRequest type GetJobInput struct { _ struct{} `type:"structure"` @@ -7290,7 +9076,6 @@ func (s *GetJobInput) SetArn(v string) *GetJobInput { } // Represents the result of a get job request. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetJobResult type GetJobOutput struct { _ struct{} `type:"structure"` @@ -7314,7 +9099,6 @@ func (s *GetJobOutput) SetJob(v *Job) *GetJobOutput { return s } -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetNetworkProfileRequest type GetNetworkProfileInput struct { _ struct{} `type:"structure"` @@ -7357,7 +9141,6 @@ func (s *GetNetworkProfileInput) SetArn(v string) *GetNetworkProfileInput { return s } -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetNetworkProfileResult type GetNetworkProfileOutput struct { _ struct{} `type:"structure"` @@ -7383,7 +9166,6 @@ func (s *GetNetworkProfileOutput) SetNetworkProfile(v *NetworkProfile) *GetNetwo // Represents the request to retrieve the offering status for the specified // customer or account. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetOfferingStatusRequest type GetOfferingStatusInput struct { _ struct{} `type:"structure"` @@ -7422,7 +9204,6 @@ func (s *GetOfferingStatusInput) SetNextToken(v string) *GetOfferingStatusInput } // Returns the status result for a device offering. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetOfferingStatusResult type GetOfferingStatusOutput struct { _ struct{} `type:"structure"` @@ -7466,7 +9247,6 @@ func (s *GetOfferingStatusOutput) SetNextToken(v string) *GetOfferingStatusOutpu } // Represents a request to the get project operation. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetProjectRequest type GetProjectInput struct { _ struct{} `type:"structure"` @@ -7509,7 +9289,6 @@ func (s *GetProjectInput) SetArn(v string) *GetProjectInput { } // Represents the result of a get project request. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetProjectResult type GetProjectOutput struct { _ struct{} `type:"structure"` @@ -7535,7 +9314,6 @@ func (s *GetProjectOutput) SetProject(v *Project) *GetProjectOutput { // Represents the request to get information about the specified remote access // session. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetRemoteAccessSessionRequest type GetRemoteAccessSessionInput struct { _ struct{} `type:"structure"` @@ -7580,7 +9358,6 @@ func (s *GetRemoteAccessSessionInput) SetArn(v string) *GetRemoteAccessSessionIn // Represents the response from the server that lists detailed information about // the remote access session. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetRemoteAccessSessionResult type GetRemoteAccessSessionOutput struct { _ struct{} `type:"structure"` @@ -7605,7 +9382,6 @@ func (s *GetRemoteAccessSessionOutput) SetRemoteAccessSession(v *RemoteAccessSes } // Represents a request to the get run operation. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetRunRequest type GetRunInput struct { _ struct{} `type:"structure"` @@ -7648,7 +9424,6 @@ func (s *GetRunInput) SetArn(v string) *GetRunInput { } // Represents the result of a get run request. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetRunResult type GetRunOutput struct { _ struct{} `type:"structure"` @@ -7673,7 +9448,6 @@ func (s *GetRunOutput) SetRun(v *Run) *GetRunOutput { } // Represents a request to the get suite operation. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetSuiteRequest type GetSuiteInput struct { _ struct{} `type:"structure"` @@ -7716,7 +9490,6 @@ func (s *GetSuiteInput) SetArn(v string) *GetSuiteInput { } // Represents the result of a get suite request. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetSuiteResult type GetSuiteOutput struct { _ struct{} `type:"structure"` @@ -7741,7 +9514,6 @@ func (s *GetSuiteOutput) SetSuite(v *Suite) *GetSuiteOutput { } // Represents a request to the get test operation. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetTestRequest type GetTestInput struct { _ struct{} `type:"structure"` @@ -7784,7 +9556,6 @@ func (s *GetTestInput) SetArn(v string) *GetTestInput { } // Represents the result of a get test request. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetTestResult type GetTestOutput struct { _ struct{} `type:"structure"` @@ -7809,7 +9580,6 @@ func (s *GetTestOutput) SetTest(v *Test) *GetTestOutput { } // Represents a request to the get upload operation. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetUploadRequest type GetUploadInput struct { _ struct{} `type:"structure"` @@ -7852,7 +9622,6 @@ func (s *GetUploadInput) SetArn(v string) *GetUploadInput { } // Represents the result of a get upload request. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetUploadResult type GetUploadOutput struct { _ struct{} `type:"structure"` @@ -7876,8 +9645,72 @@ func (s *GetUploadOutput) SetUpload(v *Upload) *GetUploadOutput { return s } +type GetVPCEConfigurationInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the VPC endpoint configuration you want + // to describe. + // + // Arn is a required field + Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetVPCEConfigurationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetVPCEConfigurationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetVPCEConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetVPCEConfigurationInput"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } + if s.Arn != nil && len(*s.Arn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetArn sets the Arn field's value. +func (s *GetVPCEConfigurationInput) SetArn(v string) *GetVPCEConfigurationInput { + s.Arn = &v + return s +} + +type GetVPCEConfigurationOutput struct { + _ struct{} `type:"structure"` + + // An object containing information about your VPC endpoint configuration. + VpceConfiguration *VPCEConfiguration `locationName:"vpceConfiguration" type:"structure"` +} + +// String returns the string representation +func (s GetVPCEConfigurationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetVPCEConfigurationOutput) GoString() string { + return s.String() +} + +// SetVpceConfiguration sets the VpceConfiguration field's value. +func (s *GetVPCEConfigurationOutput) SetVpceConfiguration(v *VPCEConfiguration) *GetVPCEConfigurationOutput { + s.VpceConfiguration = v + return s +} + // Represents information about incompatibility. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/IncompatibilityMessage type IncompatibilityMessage struct { _ struct{} `type:"structure"` @@ -7926,7 +9759,6 @@ func (s *IncompatibilityMessage) SetType(v string) *IncompatibilityMessage { // Represents the request to install an Android application (in .apk format) // or an iOS application (in .ipa format) as part of a remote access session. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/InstallToRemoteAccessSessionRequest type InstallToRemoteAccessSessionInput struct { _ struct{} `type:"structure"` @@ -7989,7 +9821,6 @@ func (s *InstallToRemoteAccessSessionInput) SetRemoteAccessSessionArn(v string) // Represents the response from the server after AWS Device Farm makes a request // to install to a remote access session. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/InstallToRemoteAccessSessionResult type InstallToRemoteAccessSessionOutput struct { _ struct{} `type:"structure"` @@ -8013,8 +9844,81 @@ func (s *InstallToRemoteAccessSessionOutput) SetAppUpload(v *Upload) *InstallToR return s } +// Represents the instance profile. +type InstanceProfile struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the instance profile. + Arn *string `locationName:"arn" min:"32" type:"string"` + + // The description of the instance profile. + Description *string `locationName:"description" type:"string"` + + // An array of strings specifying the list of app packages that should not be + // cleaned up from the device after a test run is over. + // + // The list of packages is only considered if you set packageCleanup to true. + ExcludeAppPackagesFromCleanup []*string `locationName:"excludeAppPackagesFromCleanup" type:"list"` + + // The name of the instance profile. + Name *string `locationName:"name" type:"string"` + + // When set to true, Device Farm will remove app packages after a test run. + // The default value is false for private devices. + PackageCleanup *bool `locationName:"packageCleanup" type:"boolean"` + + // When set to true, Device Farm will reboot the instance after a test run. + // The default value is true. + RebootAfterUse *bool `locationName:"rebootAfterUse" type:"boolean"` +} + +// String returns the string representation +func (s InstanceProfile) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InstanceProfile) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *InstanceProfile) SetArn(v string) *InstanceProfile { + s.Arn = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *InstanceProfile) SetDescription(v string) *InstanceProfile { + s.Description = &v + return s +} + +// SetExcludeAppPackagesFromCleanup sets the ExcludeAppPackagesFromCleanup field's value. +func (s *InstanceProfile) SetExcludeAppPackagesFromCleanup(v []*string) *InstanceProfile { + s.ExcludeAppPackagesFromCleanup = v + return s +} + +// SetName sets the Name field's value. +func (s *InstanceProfile) SetName(v string) *InstanceProfile { + s.Name = &v + return s +} + +// SetPackageCleanup sets the PackageCleanup field's value. +func (s *InstanceProfile) SetPackageCleanup(v bool) *InstanceProfile { + s.PackageCleanup = &v + return s +} + +// SetRebootAfterUse sets the RebootAfterUse field's value. +func (s *InstanceProfile) SetRebootAfterUse(v bool) *InstanceProfile { + s.RebootAfterUse = &v + return s +} + // Represents a device. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/Job type Job struct { _ struct{} `type:"structure"` @@ -8033,6 +9937,9 @@ type Job struct { // Represents the total (metered or unmetered) minutes used by the job. DeviceMinutes *DeviceMinutes `locationName:"deviceMinutes" type:"structure"` + // The Amazon Resource Name (ARN) of the instance. + InstanceArn *string `locationName:"instanceArn" min:"32" type:"string"` + // A message about the job's result. Message *string `locationName:"message" type:"string"` @@ -8163,6 +10070,12 @@ func (s *Job) SetDeviceMinutes(v *DeviceMinutes) *Job { return s } +// SetInstanceArn sets the InstanceArn field's value. +func (s *Job) SetInstanceArn(v string) *Job { + s.InstanceArn = &v + return s +} + // SetMessage sets the Message field's value. func (s *Job) SetMessage(v string) *Job { s.Message = &v @@ -8206,7 +10119,6 @@ func (s *Job) SetType(v string) *Job { } // Represents a request to the list artifacts operation. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListArtifactsRequest type ListArtifactsInput struct { _ struct{} `type:"structure"` @@ -8284,7 +10196,6 @@ func (s *ListArtifactsInput) SetType(v string) *ListArtifactsInput { } // Represents the result of a list artifacts operation. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListArtifactsResult type ListArtifactsOutput struct { _ struct{} `type:"structure"` @@ -8319,8 +10230,87 @@ func (s *ListArtifactsOutput) SetNextToken(v string) *ListArtifactsOutput { return s } +type ListDeviceInstancesInput struct { + _ struct{} `type:"structure"` + + // An integer specifying the maximum number of items you want to return in the + // API response. + MaxResults *int64 `locationName:"maxResults" type:"integer"` + + // An identifier that was returned from the previous call to this operation, + // which can be used to return the next set of items in the list. + NextToken *string `locationName:"nextToken" min:"4" type:"string"` +} + +// String returns the string representation +func (s ListDeviceInstancesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListDeviceInstancesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListDeviceInstancesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListDeviceInstancesInput"} + if s.NextToken != nil && len(*s.NextToken) < 4 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListDeviceInstancesInput) SetMaxResults(v int64) *ListDeviceInstancesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListDeviceInstancesInput) SetNextToken(v string) *ListDeviceInstancesInput { + s.NextToken = &v + return s +} + +type ListDeviceInstancesOutput struct { + _ struct{} `type:"structure"` + + // An object containing information about your device instances. + DeviceInstances []*DeviceInstance `locationName:"deviceInstances" type:"list"` + + // An identifier that can be used in the next call to this operation to return + // the next set of items in the list. + NextToken *string `locationName:"nextToken" min:"4" type:"string"` +} + +// String returns the string representation +func (s ListDeviceInstancesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListDeviceInstancesOutput) GoString() string { + return s.String() +} + +// SetDeviceInstances sets the DeviceInstances field's value. +func (s *ListDeviceInstancesOutput) SetDeviceInstances(v []*DeviceInstance) *ListDeviceInstancesOutput { + s.DeviceInstances = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListDeviceInstancesOutput) SetNextToken(v string) *ListDeviceInstancesOutput { + s.NextToken = &v + return s +} + // Represents the result of a list device pools request. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListDevicePoolsRequest type ListDevicePoolsInput struct { _ struct{} `type:"structure"` @@ -8392,7 +10382,6 @@ func (s *ListDevicePoolsInput) SetType(v string) *ListDevicePoolsInput { } // Represents the result of a list device pools request. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListDevicePoolsResult type ListDevicePoolsOutput struct { _ struct{} `type:"structure"` @@ -8428,7 +10417,6 @@ func (s *ListDevicePoolsOutput) SetNextToken(v string) *ListDevicePoolsOutput { } // Represents the result of a list devices request. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListDevicesRequest type ListDevicesInput struct { _ struct{} `type:"structure"` @@ -8479,47 +10467,125 @@ func (s *ListDevicesInput) SetNextToken(v string) *ListDevicesInput { } // Represents the result of a list devices operation. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListDevicesResult type ListDevicesOutput struct { _ struct{} `type:"structure"` // Information about the devices. Devices []*Device `locationName:"devices" type:"list"` - // If the number of items that are returned is significantly large, this is - // an identifier that is also returned, which can be used in a subsequent call - // to this operation to return the next set of items in the list. + // If the number of items that are returned is significantly large, this is + // an identifier that is also returned, which can be used in a subsequent call + // to this operation to return the next set of items in the list. + NextToken *string `locationName:"nextToken" min:"4" type:"string"` +} + +// String returns the string representation +func (s ListDevicesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListDevicesOutput) GoString() string { + return s.String() +} + +// SetDevices sets the Devices field's value. +func (s *ListDevicesOutput) SetDevices(v []*Device) *ListDevicesOutput { + s.Devices = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListDevicesOutput) SetNextToken(v string) *ListDevicesOutput { + s.NextToken = &v + return s +} + +type ListInstanceProfilesInput struct { + _ struct{} `type:"structure"` + + // An integer specifying the maximum number of items you want to return in the + // API response. + MaxResults *int64 `locationName:"maxResults" type:"integer"` + + // An identifier that was returned from the previous call to this operation, + // which can be used to return the next set of items in the list. + NextToken *string `locationName:"nextToken" min:"4" type:"string"` +} + +// String returns the string representation +func (s ListInstanceProfilesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListInstanceProfilesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListInstanceProfilesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListInstanceProfilesInput"} + if s.NextToken != nil && len(*s.NextToken) < 4 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListInstanceProfilesInput) SetMaxResults(v int64) *ListInstanceProfilesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListInstanceProfilesInput) SetNextToken(v string) *ListInstanceProfilesInput { + s.NextToken = &v + return s +} + +type ListInstanceProfilesOutput struct { + _ struct{} `type:"structure"` + + // An object containing information about your instance profiles. + InstanceProfiles []*InstanceProfile `locationName:"instanceProfiles" type:"list"` + + // An identifier that can be used in the next call to this operation to return + // the next set of items in the list. NextToken *string `locationName:"nextToken" min:"4" type:"string"` } // String returns the string representation -func (s ListDevicesOutput) String() string { +func (s ListInstanceProfilesOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListDevicesOutput) GoString() string { +func (s ListInstanceProfilesOutput) GoString() string { return s.String() } -// SetDevices sets the Devices field's value. -func (s *ListDevicesOutput) SetDevices(v []*Device) *ListDevicesOutput { - s.Devices = v +// SetInstanceProfiles sets the InstanceProfiles field's value. +func (s *ListInstanceProfilesOutput) SetInstanceProfiles(v []*InstanceProfile) *ListInstanceProfilesOutput { + s.InstanceProfiles = v return s } // SetNextToken sets the NextToken field's value. -func (s *ListDevicesOutput) SetNextToken(v string) *ListDevicesOutput { +func (s *ListInstanceProfilesOutput) SetNextToken(v string) *ListInstanceProfilesOutput { s.NextToken = &v return s } // Represents a request to the list jobs operation. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListJobsRequest type ListJobsInput struct { _ struct{} `type:"structure"` - // The jobs' ARNs. + // The run's Amazon Resource Name (ARN). // // Arn is a required field Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` @@ -8571,7 +10637,6 @@ func (s *ListJobsInput) SetNextToken(v string) *ListJobsInput { } // Represents the result of a list jobs request. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListJobsResult type ListJobsOutput struct { _ struct{} `type:"structure"` @@ -8606,7 +10671,6 @@ func (s *ListJobsOutput) SetNextToken(v string) *ListJobsOutput { return s } -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListNetworkProfilesRequest type ListNetworkProfilesInput struct { _ struct{} `type:"structure"` @@ -8672,7 +10736,6 @@ func (s *ListNetworkProfilesInput) SetType(v string) *ListNetworkProfilesInput { return s } -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListNetworkProfilesResult type ListNetworkProfilesOutput struct { _ struct{} `type:"structure"` @@ -8706,7 +10769,6 @@ func (s *ListNetworkProfilesOutput) SetNextToken(v string) *ListNetworkProfilesO return s } -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListOfferingPromotionsRequest type ListOfferingPromotionsInput struct { _ struct{} `type:"structure"` @@ -8744,7 +10806,6 @@ func (s *ListOfferingPromotionsInput) SetNextToken(v string) *ListOfferingPromot return s } -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListOfferingPromotionsResult type ListOfferingPromotionsOutput struct { _ struct{} `type:"structure"` @@ -8779,7 +10840,6 @@ func (s *ListOfferingPromotionsOutput) SetOfferingPromotions(v []*OfferingPromot } // Represents the request to list the offering transaction history. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListOfferingTransactionsRequest type ListOfferingTransactionsInput struct { _ struct{} `type:"structure"` @@ -8818,7 +10878,6 @@ func (s *ListOfferingTransactionsInput) SetNextToken(v string) *ListOfferingTran } // Returns the transaction log of the specified offerings. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListOfferingTransactionsResult type ListOfferingTransactionsOutput struct { _ struct{} `type:"structure"` @@ -8854,7 +10913,6 @@ func (s *ListOfferingTransactionsOutput) SetOfferingTransactions(v []*OfferingTr } // Represents the request to list all offerings. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListOfferingsRequest type ListOfferingsInput struct { _ struct{} `type:"structure"` @@ -8893,7 +10951,6 @@ func (s *ListOfferingsInput) SetNextToken(v string) *ListOfferingsInput { } // Represents the return values of the list of offerings. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListOfferingsResult type ListOfferingsOutput struct { _ struct{} `type:"structure"` @@ -8928,7 +10985,6 @@ func (s *ListOfferingsOutput) SetOfferings(v []*Offering) *ListOfferingsOutput { } // Represents a request to the list projects operation. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListProjectsRequest type ListProjectsInput struct { _ struct{} `type:"structure"` @@ -8981,7 +11037,6 @@ func (s *ListProjectsInput) SetNextToken(v string) *ListProjectsInput { } // Represents the result of a list projects request. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListProjectsResult type ListProjectsOutput struct { _ struct{} `type:"structure"` @@ -9017,7 +11072,6 @@ func (s *ListProjectsOutput) SetProjects(v []*Project) *ListProjectsOutput { } // Represents the request to return information about the remote access session. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListRemoteAccessSessionsRequest type ListRemoteAccessSessionsInput struct { _ struct{} `type:"structure"` @@ -9075,7 +11129,6 @@ func (s *ListRemoteAccessSessionsInput) SetNextToken(v string) *ListRemoteAccess // Represents the response from the server after AWS Device Farm makes a request // to return information about the remote access session. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListRemoteAccessSessionsResult type ListRemoteAccessSessionsOutput struct { _ struct{} `type:"structure"` @@ -9111,7 +11164,6 @@ func (s *ListRemoteAccessSessionsOutput) SetRemoteAccessSessions(v []*RemoteAcce } // Represents a request to the list runs operation. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListRunsRequest type ListRunsInput struct { _ struct{} `type:"structure"` @@ -9168,7 +11220,6 @@ func (s *ListRunsInput) SetNextToken(v string) *ListRunsInput { } // Represents the result of a list runs request. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListRunsResult type ListRunsOutput struct { _ struct{} `type:"structure"` @@ -9204,7 +11255,6 @@ func (s *ListRunsOutput) SetRuns(v []*Run) *ListRunsOutput { } // Represents a request to the list samples operation. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListSamplesRequest type ListSamplesInput struct { _ struct{} `type:"structure"` @@ -9261,7 +11311,6 @@ func (s *ListSamplesInput) SetNextToken(v string) *ListSamplesInput { } // Represents the result of a list samples request. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListSamplesResult type ListSamplesOutput struct { _ struct{} `type:"structure"` @@ -9297,11 +11346,10 @@ func (s *ListSamplesOutput) SetSamples(v []*Sample) *ListSamplesOutput { } // Represents a request to the list suites operation. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListSuitesRequest type ListSuitesInput struct { _ struct{} `type:"structure"` - // The suites' ARNs. + // The job's Amazon Resource Name (ARN). // // Arn is a required field Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` @@ -9353,7 +11401,6 @@ func (s *ListSuitesInput) SetNextToken(v string) *ListSuitesInput { } // Represents the result of a list suites request. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListSuitesResult type ListSuitesOutput struct { _ struct{} `type:"structure"` @@ -9389,11 +11436,10 @@ func (s *ListSuitesOutput) SetSuites(v []*Suite) *ListSuitesOutput { } // Represents a request to the list tests operation. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListTestsRequest type ListTestsInput struct { _ struct{} `type:"structure"` - // The tests' ARNs. + // The test suite's Amazon Resource Name (ARN). // // Arn is a required field Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` @@ -9445,7 +11491,6 @@ func (s *ListTestsInput) SetNextToken(v string) *ListTestsInput { } // Represents the result of a list tests request. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListTestsResult type ListTestsOutput struct { _ struct{} `type:"structure"` @@ -9481,7 +11526,6 @@ func (s *ListTestsOutput) SetTests(v []*Test) *ListTestsOutput { } // Represents a request to the list unique problems operation. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListUniqueProblemsRequest type ListUniqueProblemsInput struct { _ struct{} `type:"structure"` @@ -9537,7 +11581,6 @@ func (s *ListUniqueProblemsInput) SetNextToken(v string) *ListUniqueProblemsInpu } // Represents the result of a list unique problems request. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListUniqueProblemsResult type ListUniqueProblemsOutput struct { _ struct{} `type:"structure"` @@ -9589,7 +11632,6 @@ func (s *ListUniqueProblemsOutput) SetUniqueProblems(v map[string][]*UniqueProbl } // Represents a request to the list uploads operation. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListUploadsRequest type ListUploadsInput struct { _ struct{} `type:"structure"` @@ -9646,7 +11688,6 @@ func (s *ListUploadsInput) SetNextToken(v string) *ListUploadsInput { } // Represents the result of a list uploads request. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListUploadsResult type ListUploadsOutput struct { _ struct{} `type:"structure"` @@ -9681,11 +11722,91 @@ func (s *ListUploadsOutput) SetUploads(v []*Upload) *ListUploadsOutput { return s } +type ListVPCEConfigurationsInput struct { + _ struct{} `type:"structure"` + + // An integer specifying the maximum number of items you want to return in the + // API response. + MaxResults *int64 `locationName:"maxResults" type:"integer"` + + // An identifier that was returned from the previous call to this operation, + // which can be used to return the next set of items in the list. + NextToken *string `locationName:"nextToken" min:"4" type:"string"` +} + +// String returns the string representation +func (s ListVPCEConfigurationsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListVPCEConfigurationsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListVPCEConfigurationsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListVPCEConfigurationsInput"} + if s.NextToken != nil && len(*s.NextToken) < 4 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListVPCEConfigurationsInput) SetMaxResults(v int64) *ListVPCEConfigurationsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListVPCEConfigurationsInput) SetNextToken(v string) *ListVPCEConfigurationsInput { + s.NextToken = &v + return s +} + +type ListVPCEConfigurationsOutput struct { + _ struct{} `type:"structure"` + + // An identifier that was returned from the previous call to this operation, + // which can be used to return the next set of items in the list. + NextToken *string `locationName:"nextToken" min:"4" type:"string"` + + // An array of VPCEConfiguration objects containing information about your VPC + // endpoint configuration. + VpceConfigurations []*VPCEConfiguration `locationName:"vpceConfigurations" type:"list"` +} + +// String returns the string representation +func (s ListVPCEConfigurationsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListVPCEConfigurationsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListVPCEConfigurationsOutput) SetNextToken(v string) *ListVPCEConfigurationsOutput { + s.NextToken = &v + return s +} + +// SetVpceConfigurations sets the VpceConfigurations field's value. +func (s *ListVPCEConfigurationsOutput) SetVpceConfigurations(v []*VPCEConfiguration) *ListVPCEConfigurationsOutput { + s.VpceConfigurations = v + return s +} + // Represents a latitude and longitude pair, expressed in geographic coordinate // system degrees (for example 47.6204, -122.3491). // // Elevation is currently not supported. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/Location type Location struct { _ struct{} `type:"structure"` @@ -9739,7 +11860,6 @@ func (s *Location) SetLongitude(v float64) *Location { } // A number representing the monetary amount for an offering or transaction. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/MonetaryAmount type MonetaryAmount struct { _ struct{} `type:"structure"` @@ -9773,7 +11893,6 @@ func (s *MonetaryAmount) SetCurrencyCode(v string) *MonetaryAmount { } // An array of settings that describes characteristics of a network profile. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/NetworkProfile type NetworkProfile struct { _ struct{} `type:"structure"` @@ -9901,7 +12020,6 @@ func (s *NetworkProfile) SetUplinkLossPercent(v int64) *NetworkProfile { } // Represents the metadata of a device offering. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/Offering type Offering struct { _ struct{} `type:"structure"` @@ -9962,7 +12080,6 @@ func (s *Offering) SetType(v string) *Offering { } // Represents information about an offering promotion. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/OfferingPromotion type OfferingPromotion struct { _ struct{} `type:"structure"` @@ -9996,7 +12113,6 @@ func (s *OfferingPromotion) SetId(v string) *OfferingPromotion { } // The status of the offering. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/OfferingStatus type OfferingStatus struct { _ struct{} `type:"structure"` @@ -10048,7 +12164,6 @@ func (s *OfferingStatus) SetType(v string) *OfferingStatus { } // Represents the metadata of an offering transaction. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/OfferingTransaction type OfferingTransaction struct { _ struct{} `type:"structure"` @@ -10109,7 +12224,6 @@ func (s *OfferingTransaction) SetTransactionId(v string) *OfferingTransaction { } // Represents a specific warning or failure. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/Problem type Problem struct { _ struct{} `type:"structure"` @@ -10204,7 +12318,6 @@ func (s *Problem) SetTest(v *ProblemDetail) *Problem { } // Information about a problem detail. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ProblemDetail type ProblemDetail struct { _ struct{} `type:"structure"` @@ -10239,7 +12352,6 @@ func (s *ProblemDetail) SetName(v string) *ProblemDetail { // Represents an operating-system neutral workspace for running and managing // tests. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/Project type Project struct { _ struct{} `type:"structure"` @@ -10292,7 +12404,6 @@ func (s *Project) SetName(v string) *Project { } // Represents a request for a purchase offering. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/PurchaseOfferingRequest type PurchaseOfferingInput struct { _ struct{} `type:"structure"` @@ -10351,7 +12462,6 @@ func (s *PurchaseOfferingInput) SetQuantity(v int64) *PurchaseOfferingInput { } // The result of the purchase offering (e.g., success or failure). -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/PurchaseOfferingResult type PurchaseOfferingOutput struct { _ struct{} `type:"structure"` @@ -10377,7 +12487,6 @@ func (s *PurchaseOfferingOutput) SetOfferingTransaction(v *OfferingTransaction) // Represents the set of radios and their states on a device. Examples of radios // include Wi-Fi, GPS, Bluetooth, and NFC. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/Radios type Radios struct { _ struct{} `type:"structure"` @@ -10429,7 +12538,6 @@ func (s *Radios) SetWifi(v bool) *Radios { } // Specifies whether charges for devices will be recurring. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/RecurringCharge type RecurringCharge struct { _ struct{} `type:"structure"` @@ -10463,7 +12571,6 @@ func (s *RecurringCharge) SetFrequency(v string) *RecurringCharge { } // Represents information about the remote access session. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/RemoteAccessSession type RemoteAccessSession struct { _ struct{} `type:"structure"` @@ -10475,6 +12582,10 @@ type RemoteAccessSession struct { // Device Farm terminology (http://docs.aws.amazon.com/devicefarm/latest/developerguide/welcome.html#welcome-terminology)." BillingMethod *string `locationName:"billingMethod" type:"string" enum:"BillingMethod"` + // Unique identifier of your client for the remote access session. Only returned + // if remote debugging is enabled for the remote access session. + ClientId *string `locationName:"clientId" type:"string"` + // The date and time the remote access session was created. Created *time.Time `locationName:"created" type:"timestamp" timestampFormat:"unix"` @@ -10485,15 +12596,52 @@ type RemoteAccessSession struct { // setup and teardown minutes). DeviceMinutes *DeviceMinutes `locationName:"deviceMinutes" type:"structure"` + // Unique device identifier for the remote device. Only returned if remote debugging + // is enabled for the remote access session. + DeviceUdid *string `locationName:"deviceUdid" type:"string"` + // The endpoint for the remote access sesssion. Endpoint *string `locationName:"endpoint" type:"string"` + // IP address of the EC2 host where you need to connect to remotely debug devices. + // Only returned if remote debugging is enabled for the remote access session. + HostAddress *string `locationName:"hostAddress" type:"string"` + + // The Amazon Resource Name (ARN) of the instance. + InstanceArn *string `locationName:"instanceArn" min:"32" type:"string"` + + // The interaction mode of the remote access session. Valid values are: + // + // * INTERACTIVE: You can interact with the iOS device by viewing, touching, + // and rotating the screen. You cannot run XCUITest framework-based tests + // in this mode. + // + // * NO_VIDEO: You are connected to the device but cannot interact with it + // or view the screen. This mode has the fastest test execution speed. You + // can run XCUITest framework-based tests in this mode. + // + // * VIDEO_ONLY: You can view the screen but cannot touch or rotate it. You + // can run XCUITest framework-based tests and watch the screen in this mode. + InteractionMode *string `locationName:"interactionMode" type:"string" enum:"InteractionMode"` + // A message about the remote access session. Message *string `locationName:"message" type:"string"` // The name of the remote access session. Name *string `locationName:"name" type:"string"` + // This flag is set to true if remote debugging is enabled for the remote access + // session. + RemoteDebugEnabled *bool `locationName:"remoteDebugEnabled" type:"boolean"` + + // The Amazon Resource Name (ARN) for the app to be recorded in the remote access + // session. + RemoteRecordAppArn *string `locationName:"remoteRecordAppArn" min:"32" type:"string"` + + // This flag is set to true if remote recording is enabled for the remote access + // session. + RemoteRecordEnabled *bool `locationName:"remoteRecordEnabled" type:"boolean"` + // The result of the remote access session. Can be any of the following: // // * PENDING: A pending condition. @@ -10511,6 +12659,15 @@ type RemoteAccessSession struct { // * STOPPED: A stopped condition. Result *string `locationName:"result" type:"string" enum:"ExecutionResult"` + // When set to true, for private devices, Device Farm will not sign your app + // again. For public devices, Device Farm always signs your apps again and this + // parameter has no effect. + // + // For more information about how Device Farm re-signs your app(s), see Do you + // modify my app? (https://aws.amazon.com/device-farm/faq/) in the AWS Device + // Farm FAQs. + SkipAppResign *bool `locationName:"skipAppResign" type:"boolean"` + // The date and time the remote access session was started. Started *time.Time `locationName:"started" type:"timestamp" timestampFormat:"unix"` @@ -10561,6 +12718,12 @@ func (s *RemoteAccessSession) SetBillingMethod(v string) *RemoteAccessSession { return s } +// SetClientId sets the ClientId field's value. +func (s *RemoteAccessSession) SetClientId(v string) *RemoteAccessSession { + s.ClientId = &v + return s +} + // SetCreated sets the Created field's value. func (s *RemoteAccessSession) SetCreated(v time.Time) *RemoteAccessSession { s.Created = &v @@ -10579,12 +12742,36 @@ func (s *RemoteAccessSession) SetDeviceMinutes(v *DeviceMinutes) *RemoteAccessSe return s } +// SetDeviceUdid sets the DeviceUdid field's value. +func (s *RemoteAccessSession) SetDeviceUdid(v string) *RemoteAccessSession { + s.DeviceUdid = &v + return s +} + // SetEndpoint sets the Endpoint field's value. func (s *RemoteAccessSession) SetEndpoint(v string) *RemoteAccessSession { s.Endpoint = &v return s } +// SetHostAddress sets the HostAddress field's value. +func (s *RemoteAccessSession) SetHostAddress(v string) *RemoteAccessSession { + s.HostAddress = &v + return s +} + +// SetInstanceArn sets the InstanceArn field's value. +func (s *RemoteAccessSession) SetInstanceArn(v string) *RemoteAccessSession { + s.InstanceArn = &v + return s +} + +// SetInteractionMode sets the InteractionMode field's value. +func (s *RemoteAccessSession) SetInteractionMode(v string) *RemoteAccessSession { + s.InteractionMode = &v + return s +} + // SetMessage sets the Message field's value. func (s *RemoteAccessSession) SetMessage(v string) *RemoteAccessSession { s.Message = &v @@ -10597,12 +12784,36 @@ func (s *RemoteAccessSession) SetName(v string) *RemoteAccessSession { return s } +// SetRemoteDebugEnabled sets the RemoteDebugEnabled field's value. +func (s *RemoteAccessSession) SetRemoteDebugEnabled(v bool) *RemoteAccessSession { + s.RemoteDebugEnabled = &v + return s +} + +// SetRemoteRecordAppArn sets the RemoteRecordAppArn field's value. +func (s *RemoteAccessSession) SetRemoteRecordAppArn(v string) *RemoteAccessSession { + s.RemoteRecordAppArn = &v + return s +} + +// SetRemoteRecordEnabled sets the RemoteRecordEnabled field's value. +func (s *RemoteAccessSession) SetRemoteRecordEnabled(v bool) *RemoteAccessSession { + s.RemoteRecordEnabled = &v + return s +} + // SetResult sets the Result field's value. func (s *RemoteAccessSession) SetResult(v string) *RemoteAccessSession { s.Result = &v return s } +// SetSkipAppResign sets the SkipAppResign field's value. +func (s *RemoteAccessSession) SetSkipAppResign(v bool) *RemoteAccessSession { + s.SkipAppResign = &v + return s +} + // SetStarted sets the Started field's value. func (s *RemoteAccessSession) SetStarted(v time.Time) *RemoteAccessSession { s.Started = &v @@ -10622,7 +12833,6 @@ func (s *RemoteAccessSession) SetStopped(v time.Time) *RemoteAccessSession { } // A request representing an offering renewal. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/RenewOfferingRequest type RenewOfferingInput struct { _ struct{} `type:"structure"` @@ -10669,7 +12879,6 @@ func (s *RenewOfferingInput) SetQuantity(v int64) *RenewOfferingInput { } // The result of a renewal offering. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/RenewOfferingResult type RenewOfferingOutput struct { _ struct{} `type:"structure"` @@ -10695,7 +12904,6 @@ func (s *RenewOfferingOutput) SetOfferingTransaction(v *OfferingTransaction) *Re // Represents the screen resolution of a device in height and width, expressed // in pixels. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/Resolution type Resolution struct { _ struct{} `type:"structure"` @@ -10729,7 +12937,6 @@ func (s *Resolution) SetWidth(v int64) *Resolution { } // Represents a condition for a device pool. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/Rule type Rule struct { _ struct{} `type:"structure"` @@ -10748,6 +12955,10 @@ type Rule struct { // * REMOTE_ACCESS_ENABLED: Whether the device is enabled for remote access. // // * APPIUM_VERSION: The Appium version for the test. + // + // * INSTANCE_ARN: The Amazon Resource Name (ARN) of the device instance. + // + // * INSTANCE_LABELS: The label of the device instance. Attribute *string `locationName:"attribute" type:"string" enum:"DeviceAttribute"` // The rule's operator. @@ -10797,11 +13008,14 @@ func (s *Rule) SetValue(v string) *Rule { return s } -// Represents an app on a set of devices with a specific test and configuration. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/Run +// Represents a test run on a set of devices with a given app package, test +// parameters, etc. type Run struct { _ struct{} `type:"structure"` + // An app to upload or that has been uploaded. + AppUpload *string `locationName:"appUpload" min:"32" type:"string"` + // The run's ARN. Arn *string `locationName:"arn" min:"32" type:"string"` @@ -10818,9 +13032,28 @@ type Run struct { // When the run was created. Created *time.Time `locationName:"created" type:"timestamp" timestampFormat:"unix"` + // Output CustomerArtifactPaths object for the test run. + CustomerArtifactPaths *CustomerArtifactPaths `locationName:"customerArtifactPaths" type:"structure"` + // Represents the total (metered or unmetered) minutes used by the test run. DeviceMinutes *DeviceMinutes `locationName:"deviceMinutes" type:"structure"` + // The ARN of the device pool for the run. + DevicePoolArn *string `locationName:"devicePoolArn" min:"32" type:"string"` + + // For fuzz tests, this is the number of events, between 1 and 10000, that the + // UI fuzz test should perform. + EventCount *int64 `locationName:"eventCount" type:"integer"` + + // The number of minutes the job will execute before it times out. + JobTimeoutMinutes *int64 `locationName:"jobTimeoutMinutes" type:"integer"` + + // Information about the locale that is used for the run. + Locale *string `locationName:"locale" type:"string"` + + // Information about the location that is used for the run. + Location *Location `locationName:"location" type:"structure"` + // A message about the run's result. Message *string `locationName:"message" type:"string"` @@ -10830,6 +13063,11 @@ type Run struct { // The network profile being used for a test run. NetworkProfile *NetworkProfile `locationName:"networkProfile" type:"structure"` + // Read-only URL for an object in S3 bucket where you can get the parsing results + // of the test package. If the test package doesn't parse, the reason why it + // doesn't parse appears in the file that this URL points to. + ParsingResultUrl *string `locationName:"parsingResultUrl" type:"string"` + // The run's platform. // // Allowed values include: @@ -10839,6 +13077,9 @@ type Run struct { // * IOS: The iOS platform. Platform *string `locationName:"platform" type:"string" enum:"DevicePlatform"` + // Information about the radio states for the run. + Radios *Radios `locationName:"radios" type:"structure"` + // The run's result. // // Allowed values include: @@ -10858,6 +13099,23 @@ type Run struct { // * STOPPED: A stopped condition. Result *string `locationName:"result" type:"string" enum:"ExecutionResult"` + // Supporting field for the result field. Set only if result is SKIPPED. PARSING_FAILED + // if the result is skipped because of test package parsing failure. + ResultCode *string `locationName:"resultCode" type:"string" enum:"ExecutionResultCode"` + + // For fuzz tests, this is a seed to use for randomizing the UI fuzz test. Using + // the same seed value between tests ensures identical event sequences. + Seed *int64 `locationName:"seed" type:"integer"` + + // When set to true, for private devices, Device Farm will not sign your app + // again. For public devices, Device Farm always signs your apps again and this + // parameter has no effect. + // + // For more information about how Device Farm re-signs your app(s), see Do you + // modify my app? (https://aws.amazon.com/device-farm/faq/) in the AWS Device + // Farm FAQs. + SkipAppResign *bool `locationName:"skipAppResign" type:"boolean"` + // The run's start time. Started *time.Time `locationName:"started" type:"timestamp" timestampFormat:"unix"` @@ -10924,6 +13182,9 @@ type Run struct { // // * XCTEST_UI: The XCode UI test type. Type *string `locationName:"type" type:"string" enum:"TestType"` + + // The Device Farm console URL for the recording of the run. + WebUrl *string `locationName:"webUrl" type:"string"` } // String returns the string representation @@ -10936,6 +13197,12 @@ func (s Run) GoString() string { return s.String() } +// SetAppUpload sets the AppUpload field's value. +func (s *Run) SetAppUpload(v string) *Run { + s.AppUpload = &v + return s +} + // SetArn sets the Arn field's value. func (s *Run) SetArn(v string) *Run { s.Arn = &v @@ -10966,12 +13233,48 @@ func (s *Run) SetCreated(v time.Time) *Run { return s } +// SetCustomerArtifactPaths sets the CustomerArtifactPaths field's value. +func (s *Run) SetCustomerArtifactPaths(v *CustomerArtifactPaths) *Run { + s.CustomerArtifactPaths = v + return s +} + // SetDeviceMinutes sets the DeviceMinutes field's value. func (s *Run) SetDeviceMinutes(v *DeviceMinutes) *Run { s.DeviceMinutes = v return s } +// SetDevicePoolArn sets the DevicePoolArn field's value. +func (s *Run) SetDevicePoolArn(v string) *Run { + s.DevicePoolArn = &v + return s +} + +// SetEventCount sets the EventCount field's value. +func (s *Run) SetEventCount(v int64) *Run { + s.EventCount = &v + return s +} + +// SetJobTimeoutMinutes sets the JobTimeoutMinutes field's value. +func (s *Run) SetJobTimeoutMinutes(v int64) *Run { + s.JobTimeoutMinutes = &v + return s +} + +// SetLocale sets the Locale field's value. +func (s *Run) SetLocale(v string) *Run { + s.Locale = &v + return s +} + +// SetLocation sets the Location field's value. +func (s *Run) SetLocation(v *Location) *Run { + s.Location = v + return s +} + // SetMessage sets the Message field's value. func (s *Run) SetMessage(v string) *Run { s.Message = &v @@ -10990,18 +13293,48 @@ func (s *Run) SetNetworkProfile(v *NetworkProfile) *Run { return s } +// SetParsingResultUrl sets the ParsingResultUrl field's value. +func (s *Run) SetParsingResultUrl(v string) *Run { + s.ParsingResultUrl = &v + return s +} + // SetPlatform sets the Platform field's value. func (s *Run) SetPlatform(v string) *Run { s.Platform = &v return s } +// SetRadios sets the Radios field's value. +func (s *Run) SetRadios(v *Radios) *Run { + s.Radios = v + return s +} + // SetResult sets the Result field's value. func (s *Run) SetResult(v string) *Run { s.Result = &v return s } +// SetResultCode sets the ResultCode field's value. +func (s *Run) SetResultCode(v string) *Run { + s.ResultCode = &v + return s +} + +// SetSeed sets the Seed field's value. +func (s *Run) SetSeed(v int64) *Run { + s.Seed = &v + return s +} + +// SetSkipAppResign sets the SkipAppResign field's value. +func (s *Run) SetSkipAppResign(v bool) *Run { + s.SkipAppResign = &v + return s +} + // SetStarted sets the Started field's value. func (s *Run) SetStarted(v time.Time) *Run { s.Started = &v @@ -11032,8 +13365,13 @@ func (s *Run) SetType(v string) *Run { return s } +// SetWebUrl sets the WebUrl field's value. +func (s *Run) SetWebUrl(v string) *Run { + s.WebUrl = &v + return s +} + // Represents a sample of performance data. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/Sample type Sample struct { _ struct{} `type:"structure"` @@ -11119,7 +13457,6 @@ func (s *Sample) SetUrl(v string) *Sample { // Represents the settings for a run. Includes things like location, radio states, // auxiliary apps, and network profiles. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ScheduleRunConfiguration type ScheduleRunConfiguration struct { _ struct{} `type:"structure"` @@ -11130,6 +13467,9 @@ type ScheduleRunConfiguration struct { // parameter is not specified, the default value is metered. BillingMethod *string `locationName:"billingMethod" type:"string" enum:"BillingMethod"` + // Input CustomerArtifactPaths object for the scheduled run configuration. + CustomerArtifactPaths *CustomerArtifactPaths `locationName:"customerArtifactPaths" type:"structure"` + // The ARN of the extra data for the run. The extra data is a .zip file that // AWS Device Farm will extract to external data for Android or the app's sandbox // for iOS. @@ -11146,6 +13486,9 @@ type ScheduleRunConfiguration struct { // Information about the radio states for the run. Radios *Radios `locationName:"radios" type:"structure"` + + // An array of Amazon Resource Names (ARNs) for your VPC endpoint configurations. + VpceConfigurationArns []*string `locationName:"vpceConfigurationArns" type:"list"` } // String returns the string representation @@ -11191,6 +13534,12 @@ func (s *ScheduleRunConfiguration) SetBillingMethod(v string) *ScheduleRunConfig return s } +// SetCustomerArtifactPaths sets the CustomerArtifactPaths field's value. +func (s *ScheduleRunConfiguration) SetCustomerArtifactPaths(v *CustomerArtifactPaths) *ScheduleRunConfiguration { + s.CustomerArtifactPaths = v + return s +} + // SetExtraDataPackageArn sets the ExtraDataPackageArn field's value. func (s *ScheduleRunConfiguration) SetExtraDataPackageArn(v string) *ScheduleRunConfiguration { s.ExtraDataPackageArn = &v @@ -11221,8 +13570,13 @@ func (s *ScheduleRunConfiguration) SetRadios(v *Radios) *ScheduleRunConfiguratio return s } +// SetVpceConfigurationArns sets the VpceConfigurationArns field's value. +func (s *ScheduleRunConfiguration) SetVpceConfigurationArns(v []*string) *ScheduleRunConfiguration { + s.VpceConfigurationArns = v + return s +} + // Represents a request to the schedule run operation. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ScheduleRunRequest type ScheduleRunInput struct { _ struct{} `type:"structure"` @@ -11346,7 +13700,6 @@ func (s *ScheduleRunInput) SetTest(v *ScheduleRunTest) *ScheduleRunInput { } // Represents the result of a schedule run request. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ScheduleRunResult type ScheduleRunOutput struct { _ struct{} `type:"structure"` @@ -11371,7 +13724,6 @@ func (s *ScheduleRunOutput) SetRun(v *Run) *ScheduleRunOutput { } // Represents additional test settings. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ScheduleRunTest type ScheduleRunTest struct { _ struct{} `type:"structure"` @@ -11545,7 +13897,6 @@ func (s *ScheduleRunTest) SetType(v string) *ScheduleRunTest { } // Represents the request to stop the remote access session. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/StopRemoteAccessSessionRequest type StopRemoteAccessSessionInput struct { _ struct{} `type:"structure"` @@ -11589,7 +13940,6 @@ func (s *StopRemoteAccessSessionInput) SetArn(v string) *StopRemoteAccessSession // Represents the response from the server that describes the remote access // session when AWS Device Farm stops the session. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/StopRemoteAccessSessionResult type StopRemoteAccessSessionOutput struct { _ struct{} `type:"structure"` @@ -11615,7 +13965,6 @@ func (s *StopRemoteAccessSessionOutput) SetRemoteAccessSession(v *RemoteAccessSe } // Represents the request to stop a specific run. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/StopRunRequest type StopRunInput struct { _ struct{} `type:"structure"` @@ -11659,7 +14008,6 @@ func (s *StopRunInput) SetArn(v string) *StopRunInput { } // Represents the results of your stop run attempt. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/StopRunResult type StopRunOutput struct { _ struct{} `type:"structure"` @@ -11684,7 +14032,6 @@ func (s *StopRunOutput) SetRun(v *Run) *StopRunOutput { } // Represents a collection of one or more tests. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/Suite type Suite struct { _ struct{} `type:"structure"` @@ -11867,7 +14214,6 @@ func (s *Suite) SetType(v string) *Suite { } // Represents a condition that is evaluated. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/Test type Test struct { _ struct{} `type:"structure"` @@ -12049,76 +14395,159 @@ func (s *Test) SetType(v string) *Test { return s } -// Represents information about free trial device minutes for an AWS account. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/TrialMinutes -type TrialMinutes struct { +// Represents information about free trial device minutes for an AWS account. +type TrialMinutes struct { + _ struct{} `type:"structure"` + + // The number of free trial minutes remaining in the account. + Remaining *float64 `locationName:"remaining" type:"double"` + + // The total number of free trial minutes that the account started with. + Total *float64 `locationName:"total" type:"double"` +} + +// String returns the string representation +func (s TrialMinutes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TrialMinutes) GoString() string { + return s.String() +} + +// SetRemaining sets the Remaining field's value. +func (s *TrialMinutes) SetRemaining(v float64) *TrialMinutes { + s.Remaining = &v + return s +} + +// SetTotal sets the Total field's value. +func (s *TrialMinutes) SetTotal(v float64) *TrialMinutes { + s.Total = &v + return s +} + +// A collection of one or more problems, grouped by their result. +type UniqueProblem struct { + _ struct{} `type:"structure"` + + // A message about the unique problems' result. + Message *string `locationName:"message" type:"string"` + + // Information about the problems. + Problems []*Problem `locationName:"problems" type:"list"` +} + +// String returns the string representation +func (s UniqueProblem) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UniqueProblem) GoString() string { + return s.String() +} + +// SetMessage sets the Message field's value. +func (s *UniqueProblem) SetMessage(v string) *UniqueProblem { + s.Message = &v + return s +} + +// SetProblems sets the Problems field's value. +func (s *UniqueProblem) SetProblems(v []*Problem) *UniqueProblem { + s.Problems = v + return s +} + +type UpdateDeviceInstanceInput struct { _ struct{} `type:"structure"` - // The number of free trial minutes remaining in the account. - Remaining *float64 `locationName:"remaining" type:"double"` + // The Amazon Resource Name (ARN) of the device instance. + // + // Arn is a required field + Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` - // The total number of free trial minutes that the account started with. - Total *float64 `locationName:"total" type:"double"` + // An array of strings that you want to associate with the device instance. + Labels []*string `locationName:"labels" type:"list"` + + // The Amazon Resource Name (ARN) of the profile that you want to associate + // with the device instance. + ProfileArn *string `locationName:"profileArn" min:"32" type:"string"` } // String returns the string representation -func (s TrialMinutes) String() string { +func (s UpdateDeviceInstanceInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s TrialMinutes) GoString() string { +func (s UpdateDeviceInstanceInput) GoString() string { return s.String() } -// SetRemaining sets the Remaining field's value. -func (s *TrialMinutes) SetRemaining(v float64) *TrialMinutes { - s.Remaining = &v +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateDeviceInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateDeviceInstanceInput"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } + if s.Arn != nil && len(*s.Arn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) + } + if s.ProfileArn != nil && len(*s.ProfileArn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("ProfileArn", 32)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetArn sets the Arn field's value. +func (s *UpdateDeviceInstanceInput) SetArn(v string) *UpdateDeviceInstanceInput { + s.Arn = &v return s } -// SetTotal sets the Total field's value. -func (s *TrialMinutes) SetTotal(v float64) *TrialMinutes { - s.Total = &v +// SetLabels sets the Labels field's value. +func (s *UpdateDeviceInstanceInput) SetLabels(v []*string) *UpdateDeviceInstanceInput { + s.Labels = v return s } -// A collection of one or more problems, grouped by their result. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UniqueProblem -type UniqueProblem struct { - _ struct{} `type:"structure"` +// SetProfileArn sets the ProfileArn field's value. +func (s *UpdateDeviceInstanceInput) SetProfileArn(v string) *UpdateDeviceInstanceInput { + s.ProfileArn = &v + return s +} - // A message about the unique problems' result. - Message *string `locationName:"message" type:"string"` +type UpdateDeviceInstanceOutput struct { + _ struct{} `type:"structure"` - // Information about the problems. - Problems []*Problem `locationName:"problems" type:"list"` + // An object containing information about your device instance. + DeviceInstance *DeviceInstance `locationName:"deviceInstance" type:"structure"` } // String returns the string representation -func (s UniqueProblem) String() string { +func (s UpdateDeviceInstanceOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s UniqueProblem) GoString() string { +func (s UpdateDeviceInstanceOutput) GoString() string { return s.String() } -// SetMessage sets the Message field's value. -func (s *UniqueProblem) SetMessage(v string) *UniqueProblem { - s.Message = &v - return s -} - -// SetProblems sets the Problems field's value. -func (s *UniqueProblem) SetProblems(v []*Problem) *UniqueProblem { - s.Problems = v +// SetDeviceInstance sets the DeviceInstance field's value. +func (s *UpdateDeviceInstanceOutput) SetDeviceInstance(v *DeviceInstance) *UpdateDeviceInstanceOutput { + s.DeviceInstance = v return s } // Represents a request to the update device pool operation. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateDevicePoolRequest type UpdateDevicePoolInput struct { _ struct{} `type:"structure"` @@ -12191,7 +14620,6 @@ func (s *UpdateDevicePoolInput) SetRules(v []*Rule) *UpdateDevicePoolInput { } // Represents the result of an update device pool request. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateDevicePoolResult type UpdateDevicePoolOutput struct { _ struct{} `type:"structure"` @@ -12215,12 +14643,125 @@ func (s *UpdateDevicePoolOutput) SetDevicePool(v *DevicePool) *UpdateDevicePoolO return s } -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateNetworkProfileRequest +type UpdateInstanceProfileInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the instance profile. + // + // Arn is a required field + Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` + + // The updated description for your instance profile. + Description *string `locationName:"description" type:"string"` + + // An array of strings specifying the list of app packages that should not be + // cleaned up from the device after a test run is over. + // + // The list of packages is only considered if you set packageCleanup to true. + ExcludeAppPackagesFromCleanup []*string `locationName:"excludeAppPackagesFromCleanup" type:"list"` + + // The updated name for your instance profile. + Name *string `locationName:"name" type:"string"` + + // The updated choice for whether you want to specify package cleanup. The default + // value is false for private devices. + PackageCleanup *bool `locationName:"packageCleanup" type:"boolean"` + + // The updated choice for whether you want to reboot the device after use. The + // default value is true. + RebootAfterUse *bool `locationName:"rebootAfterUse" type:"boolean"` +} + +// String returns the string representation +func (s UpdateInstanceProfileInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateInstanceProfileInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateInstanceProfileInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateInstanceProfileInput"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } + if s.Arn != nil && len(*s.Arn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetArn sets the Arn field's value. +func (s *UpdateInstanceProfileInput) SetArn(v string) *UpdateInstanceProfileInput { + s.Arn = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *UpdateInstanceProfileInput) SetDescription(v string) *UpdateInstanceProfileInput { + s.Description = &v + return s +} + +// SetExcludeAppPackagesFromCleanup sets the ExcludeAppPackagesFromCleanup field's value. +func (s *UpdateInstanceProfileInput) SetExcludeAppPackagesFromCleanup(v []*string) *UpdateInstanceProfileInput { + s.ExcludeAppPackagesFromCleanup = v + return s +} + +// SetName sets the Name field's value. +func (s *UpdateInstanceProfileInput) SetName(v string) *UpdateInstanceProfileInput { + s.Name = &v + return s +} + +// SetPackageCleanup sets the PackageCleanup field's value. +func (s *UpdateInstanceProfileInput) SetPackageCleanup(v bool) *UpdateInstanceProfileInput { + s.PackageCleanup = &v + return s +} + +// SetRebootAfterUse sets the RebootAfterUse field's value. +func (s *UpdateInstanceProfileInput) SetRebootAfterUse(v bool) *UpdateInstanceProfileInput { + s.RebootAfterUse = &v + return s +} + +type UpdateInstanceProfileOutput struct { + _ struct{} `type:"structure"` + + // An object containing information about your instance profile. + InstanceProfile *InstanceProfile `locationName:"instanceProfile" type:"structure"` +} + +// String returns the string representation +func (s UpdateInstanceProfileOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateInstanceProfileOutput) GoString() string { + return s.String() +} + +// SetInstanceProfile sets the InstanceProfile field's value. +func (s *UpdateInstanceProfileOutput) SetInstanceProfile(v *InstanceProfile) *UpdateInstanceProfileOutput { + s.InstanceProfile = v + return s +} + type UpdateNetworkProfileInput struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the project that you wish to update network - // profile settings. + // The Amazon Resource Name (ARN) of the project for which you want to update + // network profile settings. // // Arn is a required field Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` @@ -12362,7 +14903,6 @@ func (s *UpdateNetworkProfileInput) SetUplinkLossPercent(v int64) *UpdateNetwork return s } -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateNetworkProfileResult type UpdateNetworkProfileOutput struct { _ struct{} `type:"structure"` @@ -12387,7 +14927,6 @@ func (s *UpdateNetworkProfileOutput) SetNetworkProfile(v *NetworkProfile) *Updat } // Represents a request to the update project operation. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateProjectRequest type UpdateProjectInput struct { _ struct{} `type:"structure"` @@ -12449,7 +14988,6 @@ func (s *UpdateProjectInput) SetName(v string) *UpdateProjectInput { } // Represents the result of an update project request. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateProjectResult type UpdateProjectOutput struct { _ struct{} `type:"structure"` @@ -12473,8 +15011,111 @@ func (s *UpdateProjectOutput) SetProject(v *Project) *UpdateProjectOutput { return s } +type UpdateVPCEConfigurationInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the VPC endpoint configuration you want + // to update. + // + // Arn is a required field + Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` + + // The DNS (domain) name used to connect to your private service in your Amazon + // VPC. The DNS name must not already be in use on the Internet. + ServiceDnsName *string `locationName:"serviceDnsName" type:"string"` + + // An optional description, providing more details about your VPC endpoint configuration. + VpceConfigurationDescription *string `locationName:"vpceConfigurationDescription" type:"string"` + + // The friendly name you give to your VPC endpoint configuration, to manage + // your configurations more easily. + VpceConfigurationName *string `locationName:"vpceConfigurationName" type:"string"` + + // The name of the VPC endpoint service running inside your AWS account that + // you want Device Farm to test. + VpceServiceName *string `locationName:"vpceServiceName" type:"string"` +} + +// String returns the string representation +func (s UpdateVPCEConfigurationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateVPCEConfigurationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateVPCEConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateVPCEConfigurationInput"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } + if s.Arn != nil && len(*s.Arn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetArn sets the Arn field's value. +func (s *UpdateVPCEConfigurationInput) SetArn(v string) *UpdateVPCEConfigurationInput { + s.Arn = &v + return s +} + +// SetServiceDnsName sets the ServiceDnsName field's value. +func (s *UpdateVPCEConfigurationInput) SetServiceDnsName(v string) *UpdateVPCEConfigurationInput { + s.ServiceDnsName = &v + return s +} + +// SetVpceConfigurationDescription sets the VpceConfigurationDescription field's value. +func (s *UpdateVPCEConfigurationInput) SetVpceConfigurationDescription(v string) *UpdateVPCEConfigurationInput { + s.VpceConfigurationDescription = &v + return s +} + +// SetVpceConfigurationName sets the VpceConfigurationName field's value. +func (s *UpdateVPCEConfigurationInput) SetVpceConfigurationName(v string) *UpdateVPCEConfigurationInput { + s.VpceConfigurationName = &v + return s +} + +// SetVpceServiceName sets the VpceServiceName field's value. +func (s *UpdateVPCEConfigurationInput) SetVpceServiceName(v string) *UpdateVPCEConfigurationInput { + s.VpceServiceName = &v + return s +} + +type UpdateVPCEConfigurationOutput struct { + _ struct{} `type:"structure"` + + // An object containing information about your VPC endpoint configuration. + VpceConfiguration *VPCEConfiguration `locationName:"vpceConfiguration" type:"structure"` +} + +// String returns the string representation +func (s UpdateVPCEConfigurationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateVPCEConfigurationOutput) GoString() string { + return s.String() +} + +// SetVpceConfiguration sets the VpceConfiguration field's value. +func (s *UpdateVPCEConfigurationOutput) SetVpceConfiguration(v *VPCEConfiguration) *UpdateVPCEConfigurationOutput { + s.VpceConfiguration = v + return s +} + // An app or a set of one or more tests to upload or that have been uploaded. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/Upload type Upload struct { _ struct{} `type:"structure"` @@ -12620,6 +15261,69 @@ func (s *Upload) SetUrl(v string) *Upload { return s } +// Represents an Amazon Virtual Private Cloud (VPC) endpoint configuration. +type VPCEConfiguration struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the VPC endpoint configuration. + Arn *string `locationName:"arn" min:"32" type:"string"` + + // The DNS name that maps to the private IP address of the service you want + // to access. + ServiceDnsName *string `locationName:"serviceDnsName" type:"string"` + + // An optional description, providing more details about your VPC endpoint configuration. + VpceConfigurationDescription *string `locationName:"vpceConfigurationDescription" type:"string"` + + // The friendly name you give to your VPC endpoint configuration, to manage + // your configurations more easily. + VpceConfigurationName *string `locationName:"vpceConfigurationName" type:"string"` + + // The name of the VPC endpoint service running inside your AWS account that + // you want Device Farm to test. + VpceServiceName *string `locationName:"vpceServiceName" type:"string"` +} + +// String returns the string representation +func (s VPCEConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VPCEConfiguration) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *VPCEConfiguration) SetArn(v string) *VPCEConfiguration { + s.Arn = &v + return s +} + +// SetServiceDnsName sets the ServiceDnsName field's value. +func (s *VPCEConfiguration) SetServiceDnsName(v string) *VPCEConfiguration { + s.ServiceDnsName = &v + return s +} + +// SetVpceConfigurationDescription sets the VpceConfigurationDescription field's value. +func (s *VPCEConfiguration) SetVpceConfigurationDescription(v string) *VPCEConfiguration { + s.VpceConfigurationDescription = &v + return s +} + +// SetVpceConfigurationName sets the VpceConfigurationName field's value. +func (s *VPCEConfiguration) SetVpceConfigurationName(v string) *VPCEConfiguration { + s.VpceConfigurationName = &v + return s +} + +// SetVpceServiceName sets the VpceServiceName field's value. +func (s *VPCEConfiguration) SetVpceServiceName(v string) *VPCEConfiguration { + s.VpceServiceName = &v + return s +} + const ( // ArtifactCategoryScreenshot is a ArtifactCategory enum value ArtifactCategoryScreenshot = "SCREENSHOT" @@ -12706,6 +15410,12 @@ const ( // ArtifactTypeVideo is a ArtifactType enum value ArtifactTypeVideo = "VIDEO" + + // ArtifactTypeCustomerArtifact is a ArtifactType enum value + ArtifactTypeCustomerArtifact = "CUSTOMER_ARTIFACT" + + // ArtifactTypeCustomerArtifactLog is a ArtifactType enum value + ArtifactTypeCustomerArtifactLog = "CUSTOMER_ARTIFACT_LOG" ) const ( @@ -12737,8 +15447,20 @@ const ( // DeviceAttributeRemoteAccessEnabled is a DeviceAttribute enum value DeviceAttributeRemoteAccessEnabled = "REMOTE_ACCESS_ENABLED" + // DeviceAttributeRemoteDebugEnabled is a DeviceAttribute enum value + DeviceAttributeRemoteDebugEnabled = "REMOTE_DEBUG_ENABLED" + // DeviceAttributeAppiumVersion is a DeviceAttribute enum value DeviceAttributeAppiumVersion = "APPIUM_VERSION" + + // DeviceAttributeInstanceArn is a DeviceAttribute enum value + DeviceAttributeInstanceArn = "INSTANCE_ARN" + + // DeviceAttributeInstanceLabels is a DeviceAttribute enum value + DeviceAttributeInstanceLabels = "INSTANCE_LABELS" + + // DeviceAttributeFleetType is a DeviceAttribute enum value + DeviceAttributeFleetType = "FLEET_TYPE" ) const ( @@ -12788,6 +15510,14 @@ const ( ExecutionResultStopped = "STOPPED" ) +const ( + // ExecutionResultCodeParsingFailed is a ExecutionResultCode enum value + ExecutionResultCodeParsingFailed = "PARSING_FAILED" + + // ExecutionResultCodeVpcEndpointSetupFailed is a ExecutionResultCode enum value + ExecutionResultCodeVpcEndpointSetupFailed = "VPC_ENDPOINT_SETUP_FAILED" +) + const ( // ExecutionStatusPending is a ExecutionStatus enum value ExecutionStatusPending = "PENDING" @@ -12817,6 +15547,31 @@ const ( ExecutionStatusStopping = "STOPPING" ) +const ( + // InstanceStatusInUse is a InstanceStatus enum value + InstanceStatusInUse = "IN_USE" + + // InstanceStatusPreparing is a InstanceStatus enum value + InstanceStatusPreparing = "PREPARING" + + // InstanceStatusAvailable is a InstanceStatus enum value + InstanceStatusAvailable = "AVAILABLE" + + // InstanceStatusNotAvailable is a InstanceStatus enum value + InstanceStatusNotAvailable = "NOT_AVAILABLE" +) + +const ( + // InteractionModeInteractive is a InteractionMode enum value + InteractionModeInteractive = "INTERACTIVE" + + // InteractionModeNoVideo is a InteractionMode enum value + InteractionModeNoVideo = "NO_VIDEO" + + // InteractionModeVideoOnly is a InteractionMode enum value + InteractionModeVideoOnly = "VIDEO_ONLY" +) + const ( // NetworkProfileTypeCurated is a NetworkProfileType enum value NetworkProfileTypeCurated = "CURATED" @@ -12926,6 +15681,9 @@ const ( // TestTypeBuiltinExplorer is a TestType enum value TestTypeBuiltinExplorer = "BUILTIN_EXPLORER" + // TestTypeWebPerformanceProfile is a TestType enum value + TestTypeWebPerformanceProfile = "WEB_PERFORMANCE_PROFILE" + // TestTypeAppiumJavaJunit is a TestType enum value TestTypeAppiumJavaJunit = "APPIUM_JAVA_JUNIT" @@ -12961,6 +15719,12 @@ const ( // TestTypeXctestUi is a TestType enum value TestTypeXctestUi = "XCTEST_UI" + + // TestTypeRemoteAccessRecord is a TestType enum value + TestTypeRemoteAccessRecord = "REMOTE_ACCESS_RECORD" + + // TestTypeRemoteAccessReplay is a TestType enum value + TestTypeRemoteAccessReplay = "REMOTE_ACCESS_REPLAY" ) const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/devicefarm/devicefarmiface/interface.go b/vendor/github.com/aws/aws-sdk-go/service/devicefarm/devicefarmiface/interface.go index 4718896..bb515d4 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/devicefarm/devicefarmiface/interface.go +++ b/vendor/github.com/aws/aws-sdk-go/service/devicefarm/devicefarmiface/interface.go @@ -21,7 +21,7 @@ import ( // // The best way to use this interface is so the SDK's service client's calls // can be stubbed out for unit testing your code with the SDK without needing -// to inject custom request handlers into the the SDK's request pipeline. +// to inject custom request handlers into the SDK's request pipeline. // // // myFunc uses an SDK service client to make a request to // // AWS Device Farm. @@ -64,6 +64,10 @@ type DeviceFarmAPI interface { CreateDevicePoolWithContext(aws.Context, *devicefarm.CreateDevicePoolInput, ...request.Option) (*devicefarm.CreateDevicePoolOutput, error) CreateDevicePoolRequest(*devicefarm.CreateDevicePoolInput) (*request.Request, *devicefarm.CreateDevicePoolOutput) + CreateInstanceProfile(*devicefarm.CreateInstanceProfileInput) (*devicefarm.CreateInstanceProfileOutput, error) + CreateInstanceProfileWithContext(aws.Context, *devicefarm.CreateInstanceProfileInput, ...request.Option) (*devicefarm.CreateInstanceProfileOutput, error) + CreateInstanceProfileRequest(*devicefarm.CreateInstanceProfileInput) (*request.Request, *devicefarm.CreateInstanceProfileOutput) + CreateNetworkProfile(*devicefarm.CreateNetworkProfileInput) (*devicefarm.CreateNetworkProfileOutput, error) CreateNetworkProfileWithContext(aws.Context, *devicefarm.CreateNetworkProfileInput, ...request.Option) (*devicefarm.CreateNetworkProfileOutput, error) CreateNetworkProfileRequest(*devicefarm.CreateNetworkProfileInput) (*request.Request, *devicefarm.CreateNetworkProfileOutput) @@ -80,10 +84,18 @@ type DeviceFarmAPI interface { CreateUploadWithContext(aws.Context, *devicefarm.CreateUploadInput, ...request.Option) (*devicefarm.CreateUploadOutput, error) CreateUploadRequest(*devicefarm.CreateUploadInput) (*request.Request, *devicefarm.CreateUploadOutput) + CreateVPCEConfiguration(*devicefarm.CreateVPCEConfigurationInput) (*devicefarm.CreateVPCEConfigurationOutput, error) + CreateVPCEConfigurationWithContext(aws.Context, *devicefarm.CreateVPCEConfigurationInput, ...request.Option) (*devicefarm.CreateVPCEConfigurationOutput, error) + CreateVPCEConfigurationRequest(*devicefarm.CreateVPCEConfigurationInput) (*request.Request, *devicefarm.CreateVPCEConfigurationOutput) + DeleteDevicePool(*devicefarm.DeleteDevicePoolInput) (*devicefarm.DeleteDevicePoolOutput, error) DeleteDevicePoolWithContext(aws.Context, *devicefarm.DeleteDevicePoolInput, ...request.Option) (*devicefarm.DeleteDevicePoolOutput, error) DeleteDevicePoolRequest(*devicefarm.DeleteDevicePoolInput) (*request.Request, *devicefarm.DeleteDevicePoolOutput) + DeleteInstanceProfile(*devicefarm.DeleteInstanceProfileInput) (*devicefarm.DeleteInstanceProfileOutput, error) + DeleteInstanceProfileWithContext(aws.Context, *devicefarm.DeleteInstanceProfileInput, ...request.Option) (*devicefarm.DeleteInstanceProfileOutput, error) + DeleteInstanceProfileRequest(*devicefarm.DeleteInstanceProfileInput) (*request.Request, *devicefarm.DeleteInstanceProfileOutput) + DeleteNetworkProfile(*devicefarm.DeleteNetworkProfileInput) (*devicefarm.DeleteNetworkProfileOutput, error) DeleteNetworkProfileWithContext(aws.Context, *devicefarm.DeleteNetworkProfileInput, ...request.Option) (*devicefarm.DeleteNetworkProfileOutput, error) DeleteNetworkProfileRequest(*devicefarm.DeleteNetworkProfileInput) (*request.Request, *devicefarm.DeleteNetworkProfileOutput) @@ -104,6 +116,10 @@ type DeviceFarmAPI interface { DeleteUploadWithContext(aws.Context, *devicefarm.DeleteUploadInput, ...request.Option) (*devicefarm.DeleteUploadOutput, error) DeleteUploadRequest(*devicefarm.DeleteUploadInput) (*request.Request, *devicefarm.DeleteUploadOutput) + DeleteVPCEConfiguration(*devicefarm.DeleteVPCEConfigurationInput) (*devicefarm.DeleteVPCEConfigurationOutput, error) + DeleteVPCEConfigurationWithContext(aws.Context, *devicefarm.DeleteVPCEConfigurationInput, ...request.Option) (*devicefarm.DeleteVPCEConfigurationOutput, error) + DeleteVPCEConfigurationRequest(*devicefarm.DeleteVPCEConfigurationInput) (*request.Request, *devicefarm.DeleteVPCEConfigurationOutput) + GetAccountSettings(*devicefarm.GetAccountSettingsInput) (*devicefarm.GetAccountSettingsOutput, error) GetAccountSettingsWithContext(aws.Context, *devicefarm.GetAccountSettingsInput, ...request.Option) (*devicefarm.GetAccountSettingsOutput, error) GetAccountSettingsRequest(*devicefarm.GetAccountSettingsInput) (*request.Request, *devicefarm.GetAccountSettingsOutput) @@ -112,6 +128,10 @@ type DeviceFarmAPI interface { GetDeviceWithContext(aws.Context, *devicefarm.GetDeviceInput, ...request.Option) (*devicefarm.GetDeviceOutput, error) GetDeviceRequest(*devicefarm.GetDeviceInput) (*request.Request, *devicefarm.GetDeviceOutput) + GetDeviceInstance(*devicefarm.GetDeviceInstanceInput) (*devicefarm.GetDeviceInstanceOutput, error) + GetDeviceInstanceWithContext(aws.Context, *devicefarm.GetDeviceInstanceInput, ...request.Option) (*devicefarm.GetDeviceInstanceOutput, error) + GetDeviceInstanceRequest(*devicefarm.GetDeviceInstanceInput) (*request.Request, *devicefarm.GetDeviceInstanceOutput) + GetDevicePool(*devicefarm.GetDevicePoolInput) (*devicefarm.GetDevicePoolOutput, error) GetDevicePoolWithContext(aws.Context, *devicefarm.GetDevicePoolInput, ...request.Option) (*devicefarm.GetDevicePoolOutput, error) GetDevicePoolRequest(*devicefarm.GetDevicePoolInput) (*request.Request, *devicefarm.GetDevicePoolOutput) @@ -120,6 +140,10 @@ type DeviceFarmAPI interface { GetDevicePoolCompatibilityWithContext(aws.Context, *devicefarm.GetDevicePoolCompatibilityInput, ...request.Option) (*devicefarm.GetDevicePoolCompatibilityOutput, error) GetDevicePoolCompatibilityRequest(*devicefarm.GetDevicePoolCompatibilityInput) (*request.Request, *devicefarm.GetDevicePoolCompatibilityOutput) + GetInstanceProfile(*devicefarm.GetInstanceProfileInput) (*devicefarm.GetInstanceProfileOutput, error) + GetInstanceProfileWithContext(aws.Context, *devicefarm.GetInstanceProfileInput, ...request.Option) (*devicefarm.GetInstanceProfileOutput, error) + GetInstanceProfileRequest(*devicefarm.GetInstanceProfileInput) (*request.Request, *devicefarm.GetInstanceProfileOutput) + GetJob(*devicefarm.GetJobInput) (*devicefarm.GetJobOutput, error) GetJobWithContext(aws.Context, *devicefarm.GetJobInput, ...request.Option) (*devicefarm.GetJobOutput, error) GetJobRequest(*devicefarm.GetJobInput) (*request.Request, *devicefarm.GetJobOutput) @@ -159,6 +183,10 @@ type DeviceFarmAPI interface { GetUploadWithContext(aws.Context, *devicefarm.GetUploadInput, ...request.Option) (*devicefarm.GetUploadOutput, error) GetUploadRequest(*devicefarm.GetUploadInput) (*request.Request, *devicefarm.GetUploadOutput) + GetVPCEConfiguration(*devicefarm.GetVPCEConfigurationInput) (*devicefarm.GetVPCEConfigurationOutput, error) + GetVPCEConfigurationWithContext(aws.Context, *devicefarm.GetVPCEConfigurationInput, ...request.Option) (*devicefarm.GetVPCEConfigurationOutput, error) + GetVPCEConfigurationRequest(*devicefarm.GetVPCEConfigurationInput) (*request.Request, *devicefarm.GetVPCEConfigurationOutput) + InstallToRemoteAccessSession(*devicefarm.InstallToRemoteAccessSessionInput) (*devicefarm.InstallToRemoteAccessSessionOutput, error) InstallToRemoteAccessSessionWithContext(aws.Context, *devicefarm.InstallToRemoteAccessSessionInput, ...request.Option) (*devicefarm.InstallToRemoteAccessSessionOutput, error) InstallToRemoteAccessSessionRequest(*devicefarm.InstallToRemoteAccessSessionInput) (*request.Request, *devicefarm.InstallToRemoteAccessSessionOutput) @@ -170,6 +198,10 @@ type DeviceFarmAPI interface { ListArtifactsPages(*devicefarm.ListArtifactsInput, func(*devicefarm.ListArtifactsOutput, bool) bool) error ListArtifactsPagesWithContext(aws.Context, *devicefarm.ListArtifactsInput, func(*devicefarm.ListArtifactsOutput, bool) bool, ...request.Option) error + ListDeviceInstances(*devicefarm.ListDeviceInstancesInput) (*devicefarm.ListDeviceInstancesOutput, error) + ListDeviceInstancesWithContext(aws.Context, *devicefarm.ListDeviceInstancesInput, ...request.Option) (*devicefarm.ListDeviceInstancesOutput, error) + ListDeviceInstancesRequest(*devicefarm.ListDeviceInstancesInput) (*request.Request, *devicefarm.ListDeviceInstancesOutput) + ListDevicePools(*devicefarm.ListDevicePoolsInput) (*devicefarm.ListDevicePoolsOutput, error) ListDevicePoolsWithContext(aws.Context, *devicefarm.ListDevicePoolsInput, ...request.Option) (*devicefarm.ListDevicePoolsOutput, error) ListDevicePoolsRequest(*devicefarm.ListDevicePoolsInput) (*request.Request, *devicefarm.ListDevicePoolsOutput) @@ -184,6 +216,10 @@ type DeviceFarmAPI interface { ListDevicesPages(*devicefarm.ListDevicesInput, func(*devicefarm.ListDevicesOutput, bool) bool) error ListDevicesPagesWithContext(aws.Context, *devicefarm.ListDevicesInput, func(*devicefarm.ListDevicesOutput, bool) bool, ...request.Option) error + ListInstanceProfiles(*devicefarm.ListInstanceProfilesInput) (*devicefarm.ListInstanceProfilesOutput, error) + ListInstanceProfilesWithContext(aws.Context, *devicefarm.ListInstanceProfilesInput, ...request.Option) (*devicefarm.ListInstanceProfilesOutput, error) + ListInstanceProfilesRequest(*devicefarm.ListInstanceProfilesInput) (*request.Request, *devicefarm.ListInstanceProfilesOutput) + ListJobs(*devicefarm.ListJobsInput) (*devicefarm.ListJobsOutput, error) ListJobsWithContext(aws.Context, *devicefarm.ListJobsInput, ...request.Option) (*devicefarm.ListJobsOutput, error) ListJobsRequest(*devicefarm.ListJobsInput) (*request.Request, *devicefarm.ListJobsOutput) @@ -266,6 +302,10 @@ type DeviceFarmAPI interface { ListUploadsPages(*devicefarm.ListUploadsInput, func(*devicefarm.ListUploadsOutput, bool) bool) error ListUploadsPagesWithContext(aws.Context, *devicefarm.ListUploadsInput, func(*devicefarm.ListUploadsOutput, bool) bool, ...request.Option) error + ListVPCEConfigurations(*devicefarm.ListVPCEConfigurationsInput) (*devicefarm.ListVPCEConfigurationsOutput, error) + ListVPCEConfigurationsWithContext(aws.Context, *devicefarm.ListVPCEConfigurationsInput, ...request.Option) (*devicefarm.ListVPCEConfigurationsOutput, error) + ListVPCEConfigurationsRequest(*devicefarm.ListVPCEConfigurationsInput) (*request.Request, *devicefarm.ListVPCEConfigurationsOutput) + PurchaseOffering(*devicefarm.PurchaseOfferingInput) (*devicefarm.PurchaseOfferingOutput, error) PurchaseOfferingWithContext(aws.Context, *devicefarm.PurchaseOfferingInput, ...request.Option) (*devicefarm.PurchaseOfferingOutput, error) PurchaseOfferingRequest(*devicefarm.PurchaseOfferingInput) (*request.Request, *devicefarm.PurchaseOfferingOutput) @@ -286,10 +326,18 @@ type DeviceFarmAPI interface { StopRunWithContext(aws.Context, *devicefarm.StopRunInput, ...request.Option) (*devicefarm.StopRunOutput, error) StopRunRequest(*devicefarm.StopRunInput) (*request.Request, *devicefarm.StopRunOutput) + UpdateDeviceInstance(*devicefarm.UpdateDeviceInstanceInput) (*devicefarm.UpdateDeviceInstanceOutput, error) + UpdateDeviceInstanceWithContext(aws.Context, *devicefarm.UpdateDeviceInstanceInput, ...request.Option) (*devicefarm.UpdateDeviceInstanceOutput, error) + UpdateDeviceInstanceRequest(*devicefarm.UpdateDeviceInstanceInput) (*request.Request, *devicefarm.UpdateDeviceInstanceOutput) + UpdateDevicePool(*devicefarm.UpdateDevicePoolInput) (*devicefarm.UpdateDevicePoolOutput, error) UpdateDevicePoolWithContext(aws.Context, *devicefarm.UpdateDevicePoolInput, ...request.Option) (*devicefarm.UpdateDevicePoolOutput, error) UpdateDevicePoolRequest(*devicefarm.UpdateDevicePoolInput) (*request.Request, *devicefarm.UpdateDevicePoolOutput) + UpdateInstanceProfile(*devicefarm.UpdateInstanceProfileInput) (*devicefarm.UpdateInstanceProfileOutput, error) + UpdateInstanceProfileWithContext(aws.Context, *devicefarm.UpdateInstanceProfileInput, ...request.Option) (*devicefarm.UpdateInstanceProfileOutput, error) + UpdateInstanceProfileRequest(*devicefarm.UpdateInstanceProfileInput) (*request.Request, *devicefarm.UpdateInstanceProfileOutput) + UpdateNetworkProfile(*devicefarm.UpdateNetworkProfileInput) (*devicefarm.UpdateNetworkProfileOutput, error) UpdateNetworkProfileWithContext(aws.Context, *devicefarm.UpdateNetworkProfileInput, ...request.Option) (*devicefarm.UpdateNetworkProfileOutput, error) UpdateNetworkProfileRequest(*devicefarm.UpdateNetworkProfileInput) (*request.Request, *devicefarm.UpdateNetworkProfileOutput) @@ -297,6 +345,10 @@ type DeviceFarmAPI interface { UpdateProject(*devicefarm.UpdateProjectInput) (*devicefarm.UpdateProjectOutput, error) UpdateProjectWithContext(aws.Context, *devicefarm.UpdateProjectInput, ...request.Option) (*devicefarm.UpdateProjectOutput, error) UpdateProjectRequest(*devicefarm.UpdateProjectInput) (*request.Request, *devicefarm.UpdateProjectOutput) + + UpdateVPCEConfiguration(*devicefarm.UpdateVPCEConfigurationInput) (*devicefarm.UpdateVPCEConfigurationOutput, error) + UpdateVPCEConfigurationWithContext(aws.Context, *devicefarm.UpdateVPCEConfigurationInput, ...request.Option) (*devicefarm.UpdateVPCEConfigurationOutput, error) + UpdateVPCEConfigurationRequest(*devicefarm.UpdateVPCEConfigurationInput) (*request.Request, *devicefarm.UpdateVPCEConfigurationOutput) } var _ DeviceFarmAPI = (*devicefarm.DeviceFarm)(nil) diff --git a/vendor/github.com/aws/aws-sdk-go/service/devicefarm/doc.go b/vendor/github.com/aws/aws-sdk-go/service/devicefarm/doc.go new file mode 100644 index 0000000..35e8d6e --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/devicefarm/doc.go @@ -0,0 +1,30 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package devicefarm provides the client and types for making API +// requests to AWS Device Farm. +// +// AWS Device Farm is a service that enables mobile app developers to test Android, +// iOS, and Fire OS apps on physical phones, tablets, and other devices in the +// cloud. +// +// See https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23 for more information on this service. +// +// See devicefarm package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/devicefarm/ +// +// Using the Client +// +// To contact AWS Device Farm with the SDK use the New function to create +// a new service client. With that client you can make API requests to the service. +// These clients are safe to use concurrently. +// +// See the SDK's documentation for more information on how to use the SDK. +// https://docs.aws.amazon.com/sdk-for-go/api/ +// +// See aws.Config documentation for more information on configuring SDK clients. +// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config +// +// See the AWS Device Farm client DeviceFarm for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/devicefarm/#New +package devicefarm diff --git a/vendor/github.com/aws/aws-sdk-go/service/devicefarm/errors.go b/vendor/github.com/aws/aws-sdk-go/service/devicefarm/errors.go index bcb0d46..2d9e5ab 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/devicefarm/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/devicefarm/errors.go @@ -16,6 +16,13 @@ const ( // An entity with the same name already exists. ErrCodeIdempotencyException = "IdempotencyException" + // ErrCodeInvalidOperationException for service response error code + // "InvalidOperationException". + // + // There was an error with the update request, or you do not have sufficient + // permissions to update this VPC endpoint configuration. + ErrCodeInvalidOperationException = "InvalidOperationException" + // ErrCodeLimitExceededException for service response error code // "LimitExceededException". // diff --git a/vendor/github.com/aws/aws-sdk-go/service/devicefarm/examples_test.go b/vendor/github.com/aws/aws-sdk-go/service/devicefarm/examples_test.go index 0480ba4..ca4d530 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/devicefarm/examples_test.go +++ b/vendor/github.com/aws/aws-sdk-go/service/devicefarm/examples_test.go @@ -3,1162 +3,1559 @@ package devicefarm_test import ( - "bytes" "fmt" + "strings" "time" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/devicefarm" ) var _ time.Duration -var _ bytes.Buffer - -func ExampleDeviceFarm_CreateDevicePool() { - sess := session.Must(session.NewSession()) - - svc := devicefarm.New(sess) - - params := &devicefarm.CreateDevicePoolInput{ - Name: aws.String("Name"), // Required - ProjectArn: aws.String("AmazonResourceName"), // Required - Rules: []*devicefarm.Rule{ // Required - { // Required - Attribute: aws.String("DeviceAttribute"), - Operator: aws.String("RuleOperator"), - Value: aws.String("String"), - }, - // More values... - }, - Description: aws.String("Message"), - } - resp, err := svc.CreateDevicePool(params) +var _ strings.Reader +var _ aws.Config +func parseTime(layout, value string) *time.Time { + t, err := time.Parse(layout, value) if err != nil { - // Print the error, cast err to awserr.Error to get the Code and - // Message from an error. - fmt.Println(err.Error()) - return + panic(err) } - - // Pretty-print the response data. - fmt.Println(resp) + return &t } -func ExampleDeviceFarm_CreateNetworkProfile() { - sess := session.Must(session.NewSession()) - - svc := devicefarm.New(sess) - - params := &devicefarm.CreateNetworkProfileInput{ - Name: aws.String("Name"), // Required - ProjectArn: aws.String("AmazonResourceName"), // Required - Description: aws.String("Message"), - DownlinkBandwidthBits: aws.Int64(1), - DownlinkDelayMs: aws.Int64(1), - DownlinkJitterMs: aws.Int64(1), - DownlinkLossPercent: aws.Int64(1), - Type: aws.String("NetworkProfileType"), - UplinkBandwidthBits: aws.Int64(1), - UplinkDelayMs: aws.Int64(1), - UplinkJitterMs: aws.Int64(1), - UplinkLossPercent: aws.Int64(1), +// To create a new device pool +// +// The following example creates a new device pool named MyDevicePool inside an existing +// project. +func ExampleDeviceFarm_CreateDevicePool_shared00() { + svc := devicefarm.New(session.New()) + input := &devicefarm.CreateDevicePoolInput{ + Description: aws.String("My Android devices"), + Name: aws.String("MyDevicePool"), + ProjectArn: aws.String("arn:aws:devicefarm:us-west-2:123456789101:project:EXAMPLE-GUID-123-456"), } - resp, err := svc.CreateNetworkProfile(params) + result, err := svc.CreateDevicePool(input) if err != nil { - // Print the error, cast err to awserr.Error to get the Code and - // Message from an error. - fmt.Println(err.Error()) + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case devicefarm.ErrCodeArgumentException: + fmt.Println(devicefarm.ErrCodeArgumentException, aerr.Error()) + case devicefarm.ErrCodeNotFoundException: + fmt.Println(devicefarm.ErrCodeNotFoundException, aerr.Error()) + case devicefarm.ErrCodeLimitExceededException: + fmt.Println(devicefarm.ErrCodeLimitExceededException, aerr.Error()) + case devicefarm.ErrCodeServiceAccountException: + fmt.Println(devicefarm.ErrCodeServiceAccountException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } return } - // Pretty-print the response data. - fmt.Println(resp) + fmt.Println(result) } -func ExampleDeviceFarm_CreateProject() { - sess := session.Must(session.NewSession()) - - svc := devicefarm.New(sess) - - params := &devicefarm.CreateProjectInput{ - Name: aws.String("Name"), // Required - DefaultJobTimeoutMinutes: aws.Int64(1), +// To create a new project +// +// The following example creates a new project named MyProject. +func ExampleDeviceFarm_CreateProject_shared00() { + svc := devicefarm.New(session.New()) + input := &devicefarm.CreateProjectInput{ + Name: aws.String("MyProject"), } - resp, err := svc.CreateProject(params) + result, err := svc.CreateProject(input) if err != nil { - // Print the error, cast err to awserr.Error to get the Code and - // Message from an error. - fmt.Println(err.Error()) + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case devicefarm.ErrCodeArgumentException: + fmt.Println(devicefarm.ErrCodeArgumentException, aerr.Error()) + case devicefarm.ErrCodeNotFoundException: + fmt.Println(devicefarm.ErrCodeNotFoundException, aerr.Error()) + case devicefarm.ErrCodeLimitExceededException: + fmt.Println(devicefarm.ErrCodeLimitExceededException, aerr.Error()) + case devicefarm.ErrCodeServiceAccountException: + fmt.Println(devicefarm.ErrCodeServiceAccountException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } return } - // Pretty-print the response data. - fmt.Println(resp) + fmt.Println(result) } -func ExampleDeviceFarm_CreateRemoteAccessSession() { - sess := session.Must(session.NewSession()) - - svc := devicefarm.New(sess) - - params := &devicefarm.CreateRemoteAccessSessionInput{ - DeviceArn: aws.String("AmazonResourceName"), // Required - ProjectArn: aws.String("AmazonResourceName"), // Required +// To create a remote access session +// +// The following example creates a remote access session named MySession. +func ExampleDeviceFarm_CreateRemoteAccessSession_shared00() { + svc := devicefarm.New(session.New()) + input := &devicefarm.CreateRemoteAccessSessionInput{ Configuration: &devicefarm.CreateRemoteAccessSessionConfiguration{ - BillingMethod: aws.String("BillingMethod"), + BillingMethod: aws.String("METERED"), }, - Name: aws.String("Name"), + DeviceArn: aws.String("arn:aws:devicefarm:us-west-2::device:123EXAMPLE"), + Name: aws.String("MySession"), + ProjectArn: aws.String("arn:aws:devicefarm:us-west-2:123456789101:project:EXAMPLE-GUID-123-456"), } - resp, err := svc.CreateRemoteAccessSession(params) + result, err := svc.CreateRemoteAccessSession(input) if err != nil { - // Print the error, cast err to awserr.Error to get the Code and - // Message from an error. - fmt.Println(err.Error()) + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case devicefarm.ErrCodeArgumentException: + fmt.Println(devicefarm.ErrCodeArgumentException, aerr.Error()) + case devicefarm.ErrCodeNotFoundException: + fmt.Println(devicefarm.ErrCodeNotFoundException, aerr.Error()) + case devicefarm.ErrCodeLimitExceededException: + fmt.Println(devicefarm.ErrCodeLimitExceededException, aerr.Error()) + case devicefarm.ErrCodeServiceAccountException: + fmt.Println(devicefarm.ErrCodeServiceAccountException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } return } - // Pretty-print the response data. - fmt.Println(resp) + fmt.Println(result) } -func ExampleDeviceFarm_CreateUpload() { - sess := session.Must(session.NewSession()) - - svc := devicefarm.New(sess) - - params := &devicefarm.CreateUploadInput{ - Name: aws.String("Name"), // Required - ProjectArn: aws.String("AmazonResourceName"), // Required - Type: aws.String("UploadType"), // Required - ContentType: aws.String("ContentType"), +// To create a new test package upload +// +// The following example creates a new Appium Python test package upload inside an existing +// project. +func ExampleDeviceFarm_CreateUpload_shared00() { + svc := devicefarm.New(session.New()) + input := &devicefarm.CreateUploadInput{ + Name: aws.String("MyAppiumPythonUpload"), + ProjectArn: aws.String("arn:aws:devicefarm:us-west-2:123456789101:project:EXAMPLE-GUID-123-456"), + Type: aws.String("APPIUM_PYTHON_TEST_PACKAGE"), } - resp, err := svc.CreateUpload(params) + result, err := svc.CreateUpload(input) if err != nil { - // Print the error, cast err to awserr.Error to get the Code and - // Message from an error. - fmt.Println(err.Error()) + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case devicefarm.ErrCodeArgumentException: + fmt.Println(devicefarm.ErrCodeArgumentException, aerr.Error()) + case devicefarm.ErrCodeNotFoundException: + fmt.Println(devicefarm.ErrCodeNotFoundException, aerr.Error()) + case devicefarm.ErrCodeLimitExceededException: + fmt.Println(devicefarm.ErrCodeLimitExceededException, aerr.Error()) + case devicefarm.ErrCodeServiceAccountException: + fmt.Println(devicefarm.ErrCodeServiceAccountException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } return } - // Pretty-print the response data. - fmt.Println(resp) + fmt.Println(result) } -func ExampleDeviceFarm_DeleteDevicePool() { - sess := session.Must(session.NewSession()) - - svc := devicefarm.New(sess) - - params := &devicefarm.DeleteDevicePoolInput{ - Arn: aws.String("AmazonResourceName"), // Required +// To delete a device pool +// +// The following example deletes a specific device pool. +func ExampleDeviceFarm_DeleteDevicePool_shared00() { + svc := devicefarm.New(session.New()) + input := &devicefarm.DeleteDevicePoolInput{ + Arn: aws.String("arn:aws:devicefarm:us-west-2::devicepool:123-456-EXAMPLE-GUID"), } - resp, err := svc.DeleteDevicePool(params) + result, err := svc.DeleteDevicePool(input) if err != nil { - // Print the error, cast err to awserr.Error to get the Code and - // Message from an error. - fmt.Println(err.Error()) + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case devicefarm.ErrCodeArgumentException: + fmt.Println(devicefarm.ErrCodeArgumentException, aerr.Error()) + case devicefarm.ErrCodeNotFoundException: + fmt.Println(devicefarm.ErrCodeNotFoundException, aerr.Error()) + case devicefarm.ErrCodeLimitExceededException: + fmt.Println(devicefarm.ErrCodeLimitExceededException, aerr.Error()) + case devicefarm.ErrCodeServiceAccountException: + fmt.Println(devicefarm.ErrCodeServiceAccountException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } return } - // Pretty-print the response data. - fmt.Println(resp) + fmt.Println(result) } -func ExampleDeviceFarm_DeleteNetworkProfile() { - sess := session.Must(session.NewSession()) - - svc := devicefarm.New(sess) - - params := &devicefarm.DeleteNetworkProfileInput{ - Arn: aws.String("AmazonResourceName"), // Required +// To delete a project +// +// The following example deletes a specific project. +func ExampleDeviceFarm_DeleteProject_shared00() { + svc := devicefarm.New(session.New()) + input := &devicefarm.DeleteProjectInput{ + Arn: aws.String("arn:aws:devicefarm:us-west-2:123456789101:project:EXAMPLE-GUID-123-456"), } - resp, err := svc.DeleteNetworkProfile(params) + result, err := svc.DeleteProject(input) if err != nil { - // Print the error, cast err to awserr.Error to get the Code and - // Message from an error. - fmt.Println(err.Error()) + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case devicefarm.ErrCodeArgumentException: + fmt.Println(devicefarm.ErrCodeArgumentException, aerr.Error()) + case devicefarm.ErrCodeNotFoundException: + fmt.Println(devicefarm.ErrCodeNotFoundException, aerr.Error()) + case devicefarm.ErrCodeLimitExceededException: + fmt.Println(devicefarm.ErrCodeLimitExceededException, aerr.Error()) + case devicefarm.ErrCodeServiceAccountException: + fmt.Println(devicefarm.ErrCodeServiceAccountException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } return } - // Pretty-print the response data. - fmt.Println(resp) + fmt.Println(result) } -func ExampleDeviceFarm_DeleteProject() { - sess := session.Must(session.NewSession()) - - svc := devicefarm.New(sess) - - params := &devicefarm.DeleteProjectInput{ - Arn: aws.String("AmazonResourceName"), // Required - } - resp, err := svc.DeleteProject(params) - - if err != nil { - // Print the error, cast err to awserr.Error to get the Code and - // Message from an error. - fmt.Println(err.Error()) - return - } - - // Pretty-print the response data. - fmt.Println(resp) -} - -func ExampleDeviceFarm_DeleteRemoteAccessSession() { - sess := session.Must(session.NewSession()) - - svc := devicefarm.New(sess) - - params := &devicefarm.DeleteRemoteAccessSessionInput{ - Arn: aws.String("AmazonResourceName"), // Required +// To delete a specific remote access session +// +// The following example deletes a specific remote access session. +func ExampleDeviceFarm_DeleteRemoteAccessSession_shared00() { + svc := devicefarm.New(session.New()) + input := &devicefarm.DeleteRemoteAccessSessionInput{ + Arn: aws.String("arn:aws:devicefarm:us-west-2:123456789101:session:EXAMPLE-GUID-123-456"), } - resp, err := svc.DeleteRemoteAccessSession(params) + result, err := svc.DeleteRemoteAccessSession(input) if err != nil { - // Print the error, cast err to awserr.Error to get the Code and - // Message from an error. - fmt.Println(err.Error()) + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case devicefarm.ErrCodeArgumentException: + fmt.Println(devicefarm.ErrCodeArgumentException, aerr.Error()) + case devicefarm.ErrCodeNotFoundException: + fmt.Println(devicefarm.ErrCodeNotFoundException, aerr.Error()) + case devicefarm.ErrCodeLimitExceededException: + fmt.Println(devicefarm.ErrCodeLimitExceededException, aerr.Error()) + case devicefarm.ErrCodeServiceAccountException: + fmt.Println(devicefarm.ErrCodeServiceAccountException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } return } - // Pretty-print the response data. - fmt.Println(resp) + fmt.Println(result) } -func ExampleDeviceFarm_DeleteRun() { - sess := session.Must(session.NewSession()) - - svc := devicefarm.New(sess) - - params := &devicefarm.DeleteRunInput{ - Arn: aws.String("AmazonResourceName"), // Required +// To delete a run +// +// The following example deletes a specific test run. +func ExampleDeviceFarm_DeleteRun_shared00() { + svc := devicefarm.New(session.New()) + input := &devicefarm.DeleteRunInput{ + Arn: aws.String("arn:aws:devicefarm:us-west-2:123456789101:run:EXAMPLE-GUID-123-456"), } - resp, err := svc.DeleteRun(params) + result, err := svc.DeleteRun(input) if err != nil { - // Print the error, cast err to awserr.Error to get the Code and - // Message from an error. - fmt.Println(err.Error()) + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case devicefarm.ErrCodeArgumentException: + fmt.Println(devicefarm.ErrCodeArgumentException, aerr.Error()) + case devicefarm.ErrCodeNotFoundException: + fmt.Println(devicefarm.ErrCodeNotFoundException, aerr.Error()) + case devicefarm.ErrCodeLimitExceededException: + fmt.Println(devicefarm.ErrCodeLimitExceededException, aerr.Error()) + case devicefarm.ErrCodeServiceAccountException: + fmt.Println(devicefarm.ErrCodeServiceAccountException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } return } - // Pretty-print the response data. - fmt.Println(resp) + fmt.Println(result) } -func ExampleDeviceFarm_DeleteUpload() { - sess := session.Must(session.NewSession()) - - svc := devicefarm.New(sess) - - params := &devicefarm.DeleteUploadInput{ - Arn: aws.String("AmazonResourceName"), // Required +// To delete a specific upload +// +// The following example deletes a specific upload. +func ExampleDeviceFarm_DeleteUpload_shared00() { + svc := devicefarm.New(session.New()) + input := &devicefarm.DeleteUploadInput{ + Arn: aws.String("arn:aws:devicefarm:us-west-2:123456789101:upload:EXAMPLE-GUID-123-456"), } - resp, err := svc.DeleteUpload(params) + result, err := svc.DeleteUpload(input) if err != nil { - // Print the error, cast err to awserr.Error to get the Code and - // Message from an error. - fmt.Println(err.Error()) + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case devicefarm.ErrCodeArgumentException: + fmt.Println(devicefarm.ErrCodeArgumentException, aerr.Error()) + case devicefarm.ErrCodeNotFoundException: + fmt.Println(devicefarm.ErrCodeNotFoundException, aerr.Error()) + case devicefarm.ErrCodeLimitExceededException: + fmt.Println(devicefarm.ErrCodeLimitExceededException, aerr.Error()) + case devicefarm.ErrCodeServiceAccountException: + fmt.Println(devicefarm.ErrCodeServiceAccountException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } return } - // Pretty-print the response data. - fmt.Println(resp) + fmt.Println(result) } -func ExampleDeviceFarm_GetAccountSettings() { - sess := session.Must(session.NewSession()) - - svc := devicefarm.New(sess) - - var params *devicefarm.GetAccountSettingsInput - resp, err := svc.GetAccountSettings(params) +// To get information about account settings +// +// The following example returns information about your Device Farm account settings. +func ExampleDeviceFarm_GetAccountSettings_shared00() { + svc := devicefarm.New(session.New()) + input := &devicefarm.GetAccountSettingsInput{} + result, err := svc.GetAccountSettings(input) if err != nil { - // Print the error, cast err to awserr.Error to get the Code and - // Message from an error. - fmt.Println(err.Error()) + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case devicefarm.ErrCodeArgumentException: + fmt.Println(devicefarm.ErrCodeArgumentException, aerr.Error()) + case devicefarm.ErrCodeNotFoundException: + fmt.Println(devicefarm.ErrCodeNotFoundException, aerr.Error()) + case devicefarm.ErrCodeLimitExceededException: + fmt.Println(devicefarm.ErrCodeLimitExceededException, aerr.Error()) + case devicefarm.ErrCodeServiceAccountException: + fmt.Println(devicefarm.ErrCodeServiceAccountException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } return } - // Pretty-print the response data. - fmt.Println(resp) + fmt.Println(result) } -func ExampleDeviceFarm_GetDevice() { - sess := session.Must(session.NewSession()) - - svc := devicefarm.New(sess) - - params := &devicefarm.GetDeviceInput{ - Arn: aws.String("AmazonResourceName"), // Required +// To get information about a device +// +// The following example returns information about a specific device. +func ExampleDeviceFarm_GetDevice_shared00() { + svc := devicefarm.New(session.New()) + input := &devicefarm.GetDeviceInput{ + Arn: aws.String("arn:aws:devicefarm:us-west-2::device:123EXAMPLE"), } - resp, err := svc.GetDevice(params) + result, err := svc.GetDevice(input) if err != nil { - // Print the error, cast err to awserr.Error to get the Code and - // Message from an error. - fmt.Println(err.Error()) + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case devicefarm.ErrCodeArgumentException: + fmt.Println(devicefarm.ErrCodeArgumentException, aerr.Error()) + case devicefarm.ErrCodeNotFoundException: + fmt.Println(devicefarm.ErrCodeNotFoundException, aerr.Error()) + case devicefarm.ErrCodeLimitExceededException: + fmt.Println(devicefarm.ErrCodeLimitExceededException, aerr.Error()) + case devicefarm.ErrCodeServiceAccountException: + fmt.Println(devicefarm.ErrCodeServiceAccountException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } return } - // Pretty-print the response data. - fmt.Println(resp) + fmt.Println(result) } -func ExampleDeviceFarm_GetDevicePool() { - sess := session.Must(session.NewSession()) - - svc := devicefarm.New(sess) - - params := &devicefarm.GetDevicePoolInput{ - Arn: aws.String("AmazonResourceName"), // Required +// To get information about a device pool +// +// The following example returns information about a specific device pool, given a project +// ARN. +func ExampleDeviceFarm_GetDevicePool_shared00() { + svc := devicefarm.New(session.New()) + input := &devicefarm.GetDevicePoolInput{ + Arn: aws.String("arn:aws:devicefarm:us-west-2:123456789101:project:EXAMPLE-GUID-123-456"), } - resp, err := svc.GetDevicePool(params) + result, err := svc.GetDevicePool(input) if err != nil { - // Print the error, cast err to awserr.Error to get the Code and - // Message from an error. - fmt.Println(err.Error()) + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case devicefarm.ErrCodeArgumentException: + fmt.Println(devicefarm.ErrCodeArgumentException, aerr.Error()) + case devicefarm.ErrCodeNotFoundException: + fmt.Println(devicefarm.ErrCodeNotFoundException, aerr.Error()) + case devicefarm.ErrCodeLimitExceededException: + fmt.Println(devicefarm.ErrCodeLimitExceededException, aerr.Error()) + case devicefarm.ErrCodeServiceAccountException: + fmt.Println(devicefarm.ErrCodeServiceAccountException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } return } - // Pretty-print the response data. - fmt.Println(resp) + fmt.Println(result) } -func ExampleDeviceFarm_GetDevicePoolCompatibility() { - sess := session.Must(session.NewSession()) - - svc := devicefarm.New(sess) - - params := &devicefarm.GetDevicePoolCompatibilityInput{ - DevicePoolArn: aws.String("AmazonResourceName"), // Required - AppArn: aws.String("AmazonResourceName"), - Test: &devicefarm.ScheduleRunTest{ - Type: aws.String("TestType"), // Required - Filter: aws.String("Filter"), - Parameters: map[string]*string{ - "Key": aws.String("String"), // Required - // More values... - }, - TestPackageArn: aws.String("AmazonResourceName"), - }, - TestType: aws.String("TestType"), +// To get information about the compatibility of a device pool +// +// The following example returns information about the compatibility of a specific device +// pool, given its ARN. +func ExampleDeviceFarm_GetDevicePoolCompatibility_shared00() { + svc := devicefarm.New(session.New()) + input := &devicefarm.GetDevicePoolCompatibilityInput{ + AppArn: aws.String("arn:aws:devicefarm:us-west-2::app:123-456-EXAMPLE-GUID"), + DevicePoolArn: aws.String("arn:aws:devicefarm:us-west-2::devicepool:123-456-EXAMPLE-GUID"), + TestType: aws.String("APPIUM_PYTHON"), } - resp, err := svc.GetDevicePoolCompatibility(params) + result, err := svc.GetDevicePoolCompatibility(input) if err != nil { - // Print the error, cast err to awserr.Error to get the Code and - // Message from an error. - fmt.Println(err.Error()) + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case devicefarm.ErrCodeArgumentException: + fmt.Println(devicefarm.ErrCodeArgumentException, aerr.Error()) + case devicefarm.ErrCodeNotFoundException: + fmt.Println(devicefarm.ErrCodeNotFoundException, aerr.Error()) + case devicefarm.ErrCodeLimitExceededException: + fmt.Println(devicefarm.ErrCodeLimitExceededException, aerr.Error()) + case devicefarm.ErrCodeServiceAccountException: + fmt.Println(devicefarm.ErrCodeServiceAccountException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } return } - // Pretty-print the response data. - fmt.Println(resp) + fmt.Println(result) } -func ExampleDeviceFarm_GetJob() { - sess := session.Must(session.NewSession()) - - svc := devicefarm.New(sess) - - params := &devicefarm.GetJobInput{ - Arn: aws.String("AmazonResourceName"), // Required +// To get information about a job +// +// The following example returns information about a specific job. +func ExampleDeviceFarm_GetJob_shared00() { + svc := devicefarm.New(session.New()) + input := &devicefarm.GetJobInput{ + Arn: aws.String("arn:aws:devicefarm:us-west-2::job:123-456-EXAMPLE-GUID"), } - resp, err := svc.GetJob(params) + result, err := svc.GetJob(input) if err != nil { - // Print the error, cast err to awserr.Error to get the Code and - // Message from an error. - fmt.Println(err.Error()) + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case devicefarm.ErrCodeArgumentException: + fmt.Println(devicefarm.ErrCodeArgumentException, aerr.Error()) + case devicefarm.ErrCodeNotFoundException: + fmt.Println(devicefarm.ErrCodeNotFoundException, aerr.Error()) + case devicefarm.ErrCodeLimitExceededException: + fmt.Println(devicefarm.ErrCodeLimitExceededException, aerr.Error()) + case devicefarm.ErrCodeServiceAccountException: + fmt.Println(devicefarm.ErrCodeServiceAccountException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } return } - // Pretty-print the response data. - fmt.Println(resp) + fmt.Println(result) } -func ExampleDeviceFarm_GetNetworkProfile() { - sess := session.Must(session.NewSession()) - - svc := devicefarm.New(sess) - - params := &devicefarm.GetNetworkProfileInput{ - Arn: aws.String("AmazonResourceName"), // Required +// To get status information about device offerings +// +// The following example returns information about Device Farm offerings available to +// your account. +func ExampleDeviceFarm_GetOfferingStatus_shared00() { + svc := devicefarm.New(session.New()) + input := &devicefarm.GetOfferingStatusInput{ + NextToken: aws.String("RW5DdDJkMWYwZjM2MzM2VHVpOHJIUXlDUXlhc2QzRGViYnc9SEXAMPLE="), } - resp, err := svc.GetNetworkProfile(params) + result, err := svc.GetOfferingStatus(input) if err != nil { - // Print the error, cast err to awserr.Error to get the Code and - // Message from an error. - fmt.Println(err.Error()) + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case devicefarm.ErrCodeArgumentException: + fmt.Println(devicefarm.ErrCodeArgumentException, aerr.Error()) + case devicefarm.ErrCodeNotFoundException: + fmt.Println(devicefarm.ErrCodeNotFoundException, aerr.Error()) + case devicefarm.ErrCodeNotEligibleException: + fmt.Println(devicefarm.ErrCodeNotEligibleException, aerr.Error()) + case devicefarm.ErrCodeLimitExceededException: + fmt.Println(devicefarm.ErrCodeLimitExceededException, aerr.Error()) + case devicefarm.ErrCodeServiceAccountException: + fmt.Println(devicefarm.ErrCodeServiceAccountException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } return } - // Pretty-print the response data. - fmt.Println(resp) + fmt.Println(result) } -func ExampleDeviceFarm_GetOfferingStatus() { - sess := session.Must(session.NewSession()) - - svc := devicefarm.New(sess) - - params := &devicefarm.GetOfferingStatusInput{ - NextToken: aws.String("PaginationToken"), +// To get information about a project +// +// The following example gets information about a specific project. +func ExampleDeviceFarm_GetProject_shared00() { + svc := devicefarm.New(session.New()) + input := &devicefarm.GetProjectInput{ + Arn: aws.String("arn:aws:devicefarm:us-west-2:123456789101:project:5e01a8c7-c861-4c0a-b1d5-12345EXAMPLE"), } - resp, err := svc.GetOfferingStatus(params) + result, err := svc.GetProject(input) if err != nil { - // Print the error, cast err to awserr.Error to get the Code and - // Message from an error. - fmt.Println(err.Error()) + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case devicefarm.ErrCodeArgumentException: + fmt.Println(devicefarm.ErrCodeArgumentException, aerr.Error()) + case devicefarm.ErrCodeNotFoundException: + fmt.Println(devicefarm.ErrCodeNotFoundException, aerr.Error()) + case devicefarm.ErrCodeLimitExceededException: + fmt.Println(devicefarm.ErrCodeLimitExceededException, aerr.Error()) + case devicefarm.ErrCodeServiceAccountException: + fmt.Println(devicefarm.ErrCodeServiceAccountException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } return } - // Pretty-print the response data. - fmt.Println(resp) + fmt.Println(result) } -func ExampleDeviceFarm_GetProject() { - sess := session.Must(session.NewSession()) - - svc := devicefarm.New(sess) - - params := &devicefarm.GetProjectInput{ - Arn: aws.String("AmazonResourceName"), // Required +// To get a remote access session +// +// The following example gets a specific remote access session. +func ExampleDeviceFarm_GetRemoteAccessSession_shared00() { + svc := devicefarm.New(session.New()) + input := &devicefarm.GetRemoteAccessSessionInput{ + Arn: aws.String("arn:aws:devicefarm:us-west-2:123456789101:session:EXAMPLE-GUID-123-456"), } - resp, err := svc.GetProject(params) + result, err := svc.GetRemoteAccessSession(input) if err != nil { - // Print the error, cast err to awserr.Error to get the Code and - // Message from an error. - fmt.Println(err.Error()) + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case devicefarm.ErrCodeArgumentException: + fmt.Println(devicefarm.ErrCodeArgumentException, aerr.Error()) + case devicefarm.ErrCodeNotFoundException: + fmt.Println(devicefarm.ErrCodeNotFoundException, aerr.Error()) + case devicefarm.ErrCodeLimitExceededException: + fmt.Println(devicefarm.ErrCodeLimitExceededException, aerr.Error()) + case devicefarm.ErrCodeServiceAccountException: + fmt.Println(devicefarm.ErrCodeServiceAccountException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } return } - // Pretty-print the response data. - fmt.Println(resp) + fmt.Println(result) } -func ExampleDeviceFarm_GetRemoteAccessSession() { - sess := session.Must(session.NewSession()) - - svc := devicefarm.New(sess) - - params := &devicefarm.GetRemoteAccessSessionInput{ - Arn: aws.String("AmazonResourceName"), // Required +// To get information about a test run +// +// The following example gets information about a specific test run. +func ExampleDeviceFarm_GetRun_shared00() { + svc := devicefarm.New(session.New()) + input := &devicefarm.GetRunInput{ + Arn: aws.String("arn:aws:devicefarm:us-west-2:123456789101:run:5e01a8c7-c861-4c0a-b1d5-5ec6e6c6dd23/0fcac17b-6122-44d7-ae5a-12345EXAMPLE"), } - resp, err := svc.GetRemoteAccessSession(params) + result, err := svc.GetRun(input) if err != nil { - // Print the error, cast err to awserr.Error to get the Code and - // Message from an error. - fmt.Println(err.Error()) + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case devicefarm.ErrCodeArgumentException: + fmt.Println(devicefarm.ErrCodeArgumentException, aerr.Error()) + case devicefarm.ErrCodeNotFoundException: + fmt.Println(devicefarm.ErrCodeNotFoundException, aerr.Error()) + case devicefarm.ErrCodeLimitExceededException: + fmt.Println(devicefarm.ErrCodeLimitExceededException, aerr.Error()) + case devicefarm.ErrCodeServiceAccountException: + fmt.Println(devicefarm.ErrCodeServiceAccountException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } return } - // Pretty-print the response data. - fmt.Println(resp) + fmt.Println(result) } -func ExampleDeviceFarm_GetRun() { - sess := session.Must(session.NewSession()) - - svc := devicefarm.New(sess) - - params := &devicefarm.GetRunInput{ - Arn: aws.String("AmazonResourceName"), // Required +// To get information about a test suite +// +// The following example gets information about a specific test suite. +func ExampleDeviceFarm_GetSuite_shared00() { + svc := devicefarm.New(session.New()) + input := &devicefarm.GetSuiteInput{ + Arn: aws.String("arn:aws:devicefarm:us-west-2:123456789101:suite:EXAMPLE-GUID-123-456"), } - resp, err := svc.GetRun(params) + result, err := svc.GetSuite(input) if err != nil { - // Print the error, cast err to awserr.Error to get the Code and - // Message from an error. - fmt.Println(err.Error()) + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case devicefarm.ErrCodeArgumentException: + fmt.Println(devicefarm.ErrCodeArgumentException, aerr.Error()) + case devicefarm.ErrCodeNotFoundException: + fmt.Println(devicefarm.ErrCodeNotFoundException, aerr.Error()) + case devicefarm.ErrCodeLimitExceededException: + fmt.Println(devicefarm.ErrCodeLimitExceededException, aerr.Error()) + case devicefarm.ErrCodeServiceAccountException: + fmt.Println(devicefarm.ErrCodeServiceAccountException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } return } - // Pretty-print the response data. - fmt.Println(resp) + fmt.Println(result) } -func ExampleDeviceFarm_GetSuite() { - sess := session.Must(session.NewSession()) - - svc := devicefarm.New(sess) - - params := &devicefarm.GetSuiteInput{ - Arn: aws.String("AmazonResourceName"), // Required +// To get information about a specific test +// +// The following example gets information about a specific test. +func ExampleDeviceFarm_GetTest_shared00() { + svc := devicefarm.New(session.New()) + input := &devicefarm.GetTestInput{ + Arn: aws.String("arn:aws:devicefarm:us-west-2:123456789101:test:EXAMPLE-GUID-123-456"), } - resp, err := svc.GetSuite(params) + result, err := svc.GetTest(input) if err != nil { - // Print the error, cast err to awserr.Error to get the Code and - // Message from an error. - fmt.Println(err.Error()) + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case devicefarm.ErrCodeArgumentException: + fmt.Println(devicefarm.ErrCodeArgumentException, aerr.Error()) + case devicefarm.ErrCodeNotFoundException: + fmt.Println(devicefarm.ErrCodeNotFoundException, aerr.Error()) + case devicefarm.ErrCodeLimitExceededException: + fmt.Println(devicefarm.ErrCodeLimitExceededException, aerr.Error()) + case devicefarm.ErrCodeServiceAccountException: + fmt.Println(devicefarm.ErrCodeServiceAccountException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } return } - // Pretty-print the response data. - fmt.Println(resp) + fmt.Println(result) } -func ExampleDeviceFarm_GetTest() { - sess := session.Must(session.NewSession()) - - svc := devicefarm.New(sess) - - params := &devicefarm.GetTestInput{ - Arn: aws.String("AmazonResourceName"), // Required +// To get information about a specific upload +// +// The following example gets information about a specific upload. +func ExampleDeviceFarm_GetUpload_shared00() { + svc := devicefarm.New(session.New()) + input := &devicefarm.GetUploadInput{ + Arn: aws.String("arn:aws:devicefarm:us-west-2:123456789101:upload:EXAMPLE-GUID-123-456"), } - resp, err := svc.GetTest(params) + result, err := svc.GetUpload(input) if err != nil { - // Print the error, cast err to awserr.Error to get the Code and - // Message from an error. - fmt.Println(err.Error()) + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case devicefarm.ErrCodeArgumentException: + fmt.Println(devicefarm.ErrCodeArgumentException, aerr.Error()) + case devicefarm.ErrCodeNotFoundException: + fmt.Println(devicefarm.ErrCodeNotFoundException, aerr.Error()) + case devicefarm.ErrCodeLimitExceededException: + fmt.Println(devicefarm.ErrCodeLimitExceededException, aerr.Error()) + case devicefarm.ErrCodeServiceAccountException: + fmt.Println(devicefarm.ErrCodeServiceAccountException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } return } - // Pretty-print the response data. - fmt.Println(resp) + fmt.Println(result) } -func ExampleDeviceFarm_GetUpload() { - sess := session.Must(session.NewSession()) - - svc := devicefarm.New(sess) - - params := &devicefarm.GetUploadInput{ - Arn: aws.String("AmazonResourceName"), // Required +// To install to a remote access session +// +// The following example installs a specific app to a device in a specific remote access +// session. +func ExampleDeviceFarm_InstallToRemoteAccessSession_shared00() { + svc := devicefarm.New(session.New()) + input := &devicefarm.InstallToRemoteAccessSessionInput{ + AppArn: aws.String("arn:aws:devicefarm:us-west-2:123456789101:app:EXAMPLE-GUID-123-456"), + RemoteAccessSessionArn: aws.String("arn:aws:devicefarm:us-west-2:123456789101:session:EXAMPLE-GUID-123-456"), } - resp, err := svc.GetUpload(params) + result, err := svc.InstallToRemoteAccessSession(input) if err != nil { - // Print the error, cast err to awserr.Error to get the Code and - // Message from an error. - fmt.Println(err.Error()) + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case devicefarm.ErrCodeArgumentException: + fmt.Println(devicefarm.ErrCodeArgumentException, aerr.Error()) + case devicefarm.ErrCodeNotFoundException: + fmt.Println(devicefarm.ErrCodeNotFoundException, aerr.Error()) + case devicefarm.ErrCodeLimitExceededException: + fmt.Println(devicefarm.ErrCodeLimitExceededException, aerr.Error()) + case devicefarm.ErrCodeServiceAccountException: + fmt.Println(devicefarm.ErrCodeServiceAccountException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } return } - // Pretty-print the response data. - fmt.Println(resp) + fmt.Println(result) } -func ExampleDeviceFarm_InstallToRemoteAccessSession() { - sess := session.Must(session.NewSession()) - - svc := devicefarm.New(sess) - - params := &devicefarm.InstallToRemoteAccessSessionInput{ - AppArn: aws.String("AmazonResourceName"), // Required - RemoteAccessSessionArn: aws.String("AmazonResourceName"), // Required +// To list artifacts for a resource +// +// The following example lists screenshot artifacts for a specific run. +func ExampleDeviceFarm_ListArtifacts_shared00() { + svc := devicefarm.New(session.New()) + input := &devicefarm.ListArtifactsInput{ + Arn: aws.String("arn:aws:devicefarm:us-west-2:123456789101:run:EXAMPLE-GUID-123-456"), + Type: aws.String("SCREENSHOT"), } - resp, err := svc.InstallToRemoteAccessSession(params) + result, err := svc.ListArtifacts(input) if err != nil { - // Print the error, cast err to awserr.Error to get the Code and - // Message from an error. - fmt.Println(err.Error()) + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case devicefarm.ErrCodeArgumentException: + fmt.Println(devicefarm.ErrCodeArgumentException, aerr.Error()) + case devicefarm.ErrCodeNotFoundException: + fmt.Println(devicefarm.ErrCodeNotFoundException, aerr.Error()) + case devicefarm.ErrCodeLimitExceededException: + fmt.Println(devicefarm.ErrCodeLimitExceededException, aerr.Error()) + case devicefarm.ErrCodeServiceAccountException: + fmt.Println(devicefarm.ErrCodeServiceAccountException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } return } - // Pretty-print the response data. - fmt.Println(resp) + fmt.Println(result) } -func ExampleDeviceFarm_ListArtifacts() { - sess := session.Must(session.NewSession()) - - svc := devicefarm.New(sess) - - params := &devicefarm.ListArtifactsInput{ - Arn: aws.String("AmazonResourceName"), // Required - Type: aws.String("ArtifactCategory"), // Required - NextToken: aws.String("PaginationToken"), +// To get information about device pools +// +// The following example returns information about the private device pools in a specific +// project. +func ExampleDeviceFarm_ListDevicePools_shared00() { + svc := devicefarm.New(session.New()) + input := &devicefarm.ListDevicePoolsInput{ + Arn: aws.String("arn:aws:devicefarm:us-west-2:123456789101:project:EXAMPLE-GUID-123-456"), + Type: aws.String("PRIVATE"), } - resp, err := svc.ListArtifacts(params) + result, err := svc.ListDevicePools(input) if err != nil { - // Print the error, cast err to awserr.Error to get the Code and - // Message from an error. - fmt.Println(err.Error()) + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case devicefarm.ErrCodeArgumentException: + fmt.Println(devicefarm.ErrCodeArgumentException, aerr.Error()) + case devicefarm.ErrCodeNotFoundException: + fmt.Println(devicefarm.ErrCodeNotFoundException, aerr.Error()) + case devicefarm.ErrCodeLimitExceededException: + fmt.Println(devicefarm.ErrCodeLimitExceededException, aerr.Error()) + case devicefarm.ErrCodeServiceAccountException: + fmt.Println(devicefarm.ErrCodeServiceAccountException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } return } - // Pretty-print the response data. - fmt.Println(resp) + fmt.Println(result) } -func ExampleDeviceFarm_ListDevicePools() { - sess := session.Must(session.NewSession()) - - svc := devicefarm.New(sess) - - params := &devicefarm.ListDevicePoolsInput{ - Arn: aws.String("AmazonResourceName"), // Required - NextToken: aws.String("PaginationToken"), - Type: aws.String("DevicePoolType"), +// To get information about devices +// +// The following example returns information about the available devices in a specific +// project. +func ExampleDeviceFarm_ListDevices_shared00() { + svc := devicefarm.New(session.New()) + input := &devicefarm.ListDevicesInput{ + Arn: aws.String("arn:aws:devicefarm:us-west-2:123456789101:project:EXAMPLE-GUID-123-456"), } - resp, err := svc.ListDevicePools(params) + result, err := svc.ListDevices(input) if err != nil { - // Print the error, cast err to awserr.Error to get the Code and - // Message from an error. - fmt.Println(err.Error()) + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case devicefarm.ErrCodeArgumentException: + fmt.Println(devicefarm.ErrCodeArgumentException, aerr.Error()) + case devicefarm.ErrCodeNotFoundException: + fmt.Println(devicefarm.ErrCodeNotFoundException, aerr.Error()) + case devicefarm.ErrCodeLimitExceededException: + fmt.Println(devicefarm.ErrCodeLimitExceededException, aerr.Error()) + case devicefarm.ErrCodeServiceAccountException: + fmt.Println(devicefarm.ErrCodeServiceAccountException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } return } - // Pretty-print the response data. - fmt.Println(resp) + fmt.Println(result) } -func ExampleDeviceFarm_ListDevices() { - sess := session.Must(session.NewSession()) - - svc := devicefarm.New(sess) - - params := &devicefarm.ListDevicesInput{ - Arn: aws.String("AmazonResourceName"), - NextToken: aws.String("PaginationToken"), +// To get information about jobs +// +// The following example returns information about jobs in a specific project. +func ExampleDeviceFarm_ListJobs_shared00() { + svc := devicefarm.New(session.New()) + input := &devicefarm.ListJobsInput{ + Arn: aws.String("arn:aws:devicefarm:us-west-2:123456789101:project:EXAMPLE-GUID-123-456"), } - resp, err := svc.ListDevices(params) + result, err := svc.ListJobs(input) if err != nil { - // Print the error, cast err to awserr.Error to get the Code and - // Message from an error. - fmt.Println(err.Error()) + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case devicefarm.ErrCodeArgumentException: + fmt.Println(devicefarm.ErrCodeArgumentException, aerr.Error()) + case devicefarm.ErrCodeNotFoundException: + fmt.Println(devicefarm.ErrCodeNotFoundException, aerr.Error()) + case devicefarm.ErrCodeLimitExceededException: + fmt.Println(devicefarm.ErrCodeLimitExceededException, aerr.Error()) + case devicefarm.ErrCodeServiceAccountException: + fmt.Println(devicefarm.ErrCodeServiceAccountException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } return } - // Pretty-print the response data. - fmt.Println(resp) + fmt.Println(result) } -func ExampleDeviceFarm_ListJobs() { - sess := session.Must(session.NewSession()) - - svc := devicefarm.New(sess) - - params := &devicefarm.ListJobsInput{ - Arn: aws.String("AmazonResourceName"), // Required - NextToken: aws.String("PaginationToken"), +// To get information about device offering transactions +// +// The following example returns information about Device Farm offering transactions. +func ExampleDeviceFarm_ListOfferingTransactions_shared00() { + svc := devicefarm.New(session.New()) + input := &devicefarm.ListOfferingTransactionsInput{ + NextToken: aws.String("RW5DdDJkMWYwZjM2MzM2VHVpOHJIUXlDUXlhc2QzRGViYnc9SEXAMPLE="), } - resp, err := svc.ListJobs(params) + result, err := svc.ListOfferingTransactions(input) if err != nil { - // Print the error, cast err to awserr.Error to get the Code and - // Message from an error. - fmt.Println(err.Error()) + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case devicefarm.ErrCodeArgumentException: + fmt.Println(devicefarm.ErrCodeArgumentException, aerr.Error()) + case devicefarm.ErrCodeNotFoundException: + fmt.Println(devicefarm.ErrCodeNotFoundException, aerr.Error()) + case devicefarm.ErrCodeNotEligibleException: + fmt.Println(devicefarm.ErrCodeNotEligibleException, aerr.Error()) + case devicefarm.ErrCodeLimitExceededException: + fmt.Println(devicefarm.ErrCodeLimitExceededException, aerr.Error()) + case devicefarm.ErrCodeServiceAccountException: + fmt.Println(devicefarm.ErrCodeServiceAccountException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } return } - // Pretty-print the response data. - fmt.Println(resp) + fmt.Println(result) } -func ExampleDeviceFarm_ListNetworkProfiles() { - sess := session.Must(session.NewSession()) - - svc := devicefarm.New(sess) - - params := &devicefarm.ListNetworkProfilesInput{ - Arn: aws.String("AmazonResourceName"), // Required - NextToken: aws.String("PaginationToken"), - Type: aws.String("NetworkProfileType"), +// To get information about device offerings +// +// The following example returns information about available device offerings. +func ExampleDeviceFarm_ListOfferings_shared00() { + svc := devicefarm.New(session.New()) + input := &devicefarm.ListOfferingsInput{ + NextToken: aws.String("RW5DdDJkMWYwZjM2MzM2VHVpOHJIUXlDUXlhc2QzRGViYnc9SEXAMPLE="), } - resp, err := svc.ListNetworkProfiles(params) + result, err := svc.ListOfferings(input) if err != nil { - // Print the error, cast err to awserr.Error to get the Code and - // Message from an error. - fmt.Println(err.Error()) + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case devicefarm.ErrCodeArgumentException: + fmt.Println(devicefarm.ErrCodeArgumentException, aerr.Error()) + case devicefarm.ErrCodeNotFoundException: + fmt.Println(devicefarm.ErrCodeNotFoundException, aerr.Error()) + case devicefarm.ErrCodeNotEligibleException: + fmt.Println(devicefarm.ErrCodeNotEligibleException, aerr.Error()) + case devicefarm.ErrCodeLimitExceededException: + fmt.Println(devicefarm.ErrCodeLimitExceededException, aerr.Error()) + case devicefarm.ErrCodeServiceAccountException: + fmt.Println(devicefarm.ErrCodeServiceAccountException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } return } - // Pretty-print the response data. - fmt.Println(resp) + fmt.Println(result) } -func ExampleDeviceFarm_ListOfferingPromotions() { - sess := session.Must(session.NewSession()) - - svc := devicefarm.New(sess) - - params := &devicefarm.ListOfferingPromotionsInput{ - NextToken: aws.String("PaginationToken"), +// To get information about a Device Farm project +// +// The following example returns information about the specified project in Device Farm. +func ExampleDeviceFarm_ListProjects_shared00() { + svc := devicefarm.New(session.New()) + input := &devicefarm.ListProjectsInput{ + Arn: aws.String("arn:aws:devicefarm:us-west-2:123456789101:project:7ad300ed-8183-41a7-bf94-12345EXAMPLE"), + NextToken: aws.String("RW5DdDJkMWYwZjM2MzM2VHVpOHJIUXlDUXlhc2QzRGViYnc9SEXAMPLE"), } - resp, err := svc.ListOfferingPromotions(params) + result, err := svc.ListProjects(input) if err != nil { - // Print the error, cast err to awserr.Error to get the Code and - // Message from an error. - fmt.Println(err.Error()) + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case devicefarm.ErrCodeArgumentException: + fmt.Println(devicefarm.ErrCodeArgumentException, aerr.Error()) + case devicefarm.ErrCodeNotFoundException: + fmt.Println(devicefarm.ErrCodeNotFoundException, aerr.Error()) + case devicefarm.ErrCodeLimitExceededException: + fmt.Println(devicefarm.ErrCodeLimitExceededException, aerr.Error()) + case devicefarm.ErrCodeServiceAccountException: + fmt.Println(devicefarm.ErrCodeServiceAccountException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } return } - // Pretty-print the response data. - fmt.Println(resp) + fmt.Println(result) } -func ExampleDeviceFarm_ListOfferingTransactions() { - sess := session.Must(session.NewSession()) - - svc := devicefarm.New(sess) - - params := &devicefarm.ListOfferingTransactionsInput{ - NextToken: aws.String("PaginationToken"), +// To get information about a remote access session +// +// The following example returns information about a specific Device Farm remote access +// session. +func ExampleDeviceFarm_ListRemoteAccessSessions_shared00() { + svc := devicefarm.New(session.New()) + input := &devicefarm.ListRemoteAccessSessionsInput{ + Arn: aws.String("arn:aws:devicefarm:us-west-2:123456789101:session:EXAMPLE-GUID-123-456"), + NextToken: aws.String("RW5DdDJkMWYwZjM2MzM2VHVpOHJIUXlDUXlhc2QzRGViYnc9SEXAMPLE="), } - resp, err := svc.ListOfferingTransactions(params) + result, err := svc.ListRemoteAccessSessions(input) if err != nil { - // Print the error, cast err to awserr.Error to get the Code and - // Message from an error. - fmt.Println(err.Error()) + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case devicefarm.ErrCodeArgumentException: + fmt.Println(devicefarm.ErrCodeArgumentException, aerr.Error()) + case devicefarm.ErrCodeNotFoundException: + fmt.Println(devicefarm.ErrCodeNotFoundException, aerr.Error()) + case devicefarm.ErrCodeLimitExceededException: + fmt.Println(devicefarm.ErrCodeLimitExceededException, aerr.Error()) + case devicefarm.ErrCodeServiceAccountException: + fmt.Println(devicefarm.ErrCodeServiceAccountException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } return } - // Pretty-print the response data. - fmt.Println(resp) + fmt.Println(result) } -func ExampleDeviceFarm_ListOfferings() { - sess := session.Must(session.NewSession()) - - svc := devicefarm.New(sess) - - params := &devicefarm.ListOfferingsInput{ - NextToken: aws.String("PaginationToken"), +// To get information about a test run +// +// The following example returns information about a specific test run. +func ExampleDeviceFarm_ListRuns_shared00() { + svc := devicefarm.New(session.New()) + input := &devicefarm.ListRunsInput{ + Arn: aws.String("arn:aws:devicefarm:us-west-2:123456789101:run:5e01a8c7-c861-4c0a-b1d5-5ec6e6c6dd23/0fcac17b-6122-44d7-ae5a-12345EXAMPLE"), + NextToken: aws.String("RW5DdDJkMWYwZjM2MzM2VHVpOHJIUXlDUXlhc2QzRGViYnc9SEXAMPLE"), } - resp, err := svc.ListOfferings(params) + result, err := svc.ListRuns(input) if err != nil { - // Print the error, cast err to awserr.Error to get the Code and - // Message from an error. - fmt.Println(err.Error()) + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case devicefarm.ErrCodeArgumentException: + fmt.Println(devicefarm.ErrCodeArgumentException, aerr.Error()) + case devicefarm.ErrCodeNotFoundException: + fmt.Println(devicefarm.ErrCodeNotFoundException, aerr.Error()) + case devicefarm.ErrCodeLimitExceededException: + fmt.Println(devicefarm.ErrCodeLimitExceededException, aerr.Error()) + case devicefarm.ErrCodeServiceAccountException: + fmt.Println(devicefarm.ErrCodeServiceAccountException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } return } - // Pretty-print the response data. - fmt.Println(resp) + fmt.Println(result) } -func ExampleDeviceFarm_ListProjects() { - sess := session.Must(session.NewSession()) - - svc := devicefarm.New(sess) - - params := &devicefarm.ListProjectsInput{ - Arn: aws.String("AmazonResourceName"), - NextToken: aws.String("PaginationToken"), +// To get information about samples +// +// The following example returns information about samples, given a specific Device +// Farm project. +func ExampleDeviceFarm_ListSamples_shared00() { + svc := devicefarm.New(session.New()) + input := &devicefarm.ListSamplesInput{ + Arn: aws.String("arn:aws:devicefarm:us-west-2:123456789101:project:EXAMPLE-GUID-123-456"), + NextToken: aws.String("RW5DdDJkMWYwZjM2MzM2VHVpOHJIUXlDUXlhc2QzRGViYnc9SEXAMPLE"), } - resp, err := svc.ListProjects(params) + result, err := svc.ListSamples(input) if err != nil { - // Print the error, cast err to awserr.Error to get the Code and - // Message from an error. - fmt.Println(err.Error()) + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case devicefarm.ErrCodeArgumentException: + fmt.Println(devicefarm.ErrCodeArgumentException, aerr.Error()) + case devicefarm.ErrCodeNotFoundException: + fmt.Println(devicefarm.ErrCodeNotFoundException, aerr.Error()) + case devicefarm.ErrCodeLimitExceededException: + fmt.Println(devicefarm.ErrCodeLimitExceededException, aerr.Error()) + case devicefarm.ErrCodeServiceAccountException: + fmt.Println(devicefarm.ErrCodeServiceAccountException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } return } - // Pretty-print the response data. - fmt.Println(resp) + fmt.Println(result) } -func ExampleDeviceFarm_ListRemoteAccessSessions() { - sess := session.Must(session.NewSession()) - - svc := devicefarm.New(sess) - - params := &devicefarm.ListRemoteAccessSessionsInput{ - Arn: aws.String("AmazonResourceName"), // Required - NextToken: aws.String("PaginationToken"), +// To get information about suites +// +// The following example returns information about suites, given a specific Device Farm +// project. +func ExampleDeviceFarm_ListSuites_shared00() { + svc := devicefarm.New(session.New()) + input := &devicefarm.ListSuitesInput{ + Arn: aws.String("arn:aws:devicefarm:us-west-2:123456789101:project:EXAMPLE-GUID-123-456"), + NextToken: aws.String("RW5DdDJkMWYwZjM2MzM2VHVpOHJIUXlDUXlhc2QzRGViYnc9SEXAMPLE"), } - resp, err := svc.ListRemoteAccessSessions(params) + result, err := svc.ListSuites(input) if err != nil { - // Print the error, cast err to awserr.Error to get the Code and - // Message from an error. - fmt.Println(err.Error()) + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case devicefarm.ErrCodeArgumentException: + fmt.Println(devicefarm.ErrCodeArgumentException, aerr.Error()) + case devicefarm.ErrCodeNotFoundException: + fmt.Println(devicefarm.ErrCodeNotFoundException, aerr.Error()) + case devicefarm.ErrCodeLimitExceededException: + fmt.Println(devicefarm.ErrCodeLimitExceededException, aerr.Error()) + case devicefarm.ErrCodeServiceAccountException: + fmt.Println(devicefarm.ErrCodeServiceAccountException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } return } - // Pretty-print the response data. - fmt.Println(resp) + fmt.Println(result) } -func ExampleDeviceFarm_ListRuns() { - sess := session.Must(session.NewSession()) - - svc := devicefarm.New(sess) - - params := &devicefarm.ListRunsInput{ - Arn: aws.String("AmazonResourceName"), // Required - NextToken: aws.String("PaginationToken"), +// To get information about tests +// +// The following example returns information about tests, given a specific Device Farm +// project. +func ExampleDeviceFarm_ListTests_shared00() { + svc := devicefarm.New(session.New()) + input := &devicefarm.ListTestsInput{ + Arn: aws.String("arn:aws:devicefarm:us-west-2:123456789101:project:EXAMPLE-GUID-123-456"), + NextToken: aws.String("RW5DdDJkMWYwZjM2MzM2VHVpOHJIUXlDUXlhc2QzRGViYnc9SEXAMPLE"), } - resp, err := svc.ListRuns(params) + result, err := svc.ListTests(input) if err != nil { - // Print the error, cast err to awserr.Error to get the Code and - // Message from an error. - fmt.Println(err.Error()) + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case devicefarm.ErrCodeArgumentException: + fmt.Println(devicefarm.ErrCodeArgumentException, aerr.Error()) + case devicefarm.ErrCodeNotFoundException: + fmt.Println(devicefarm.ErrCodeNotFoundException, aerr.Error()) + case devicefarm.ErrCodeLimitExceededException: + fmt.Println(devicefarm.ErrCodeLimitExceededException, aerr.Error()) + case devicefarm.ErrCodeServiceAccountException: + fmt.Println(devicefarm.ErrCodeServiceAccountException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } return } - // Pretty-print the response data. - fmt.Println(resp) + fmt.Println(result) } -func ExampleDeviceFarm_ListSamples() { - sess := session.Must(session.NewSession()) - - svc := devicefarm.New(sess) - - params := &devicefarm.ListSamplesInput{ - Arn: aws.String("AmazonResourceName"), // Required - NextToken: aws.String("PaginationToken"), +// To get information about unique problems +// +// The following example returns information about unique problems, given a specific +// Device Farm project. +func ExampleDeviceFarm_ListUniqueProblems_shared00() { + svc := devicefarm.New(session.New()) + input := &devicefarm.ListUniqueProblemsInput{ + Arn: aws.String("arn:aws:devicefarm:us-west-2:123456789101:project:EXAMPLE-GUID-123-456"), + NextToken: aws.String("RW5DdDJkMWYwZjM2MzM2VHVpOHJIUXlDUXlhc2QzRGViYnc9SEXAMPLE"), } - resp, err := svc.ListSamples(params) + result, err := svc.ListUniqueProblems(input) if err != nil { - // Print the error, cast err to awserr.Error to get the Code and - // Message from an error. - fmt.Println(err.Error()) + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case devicefarm.ErrCodeArgumentException: + fmt.Println(devicefarm.ErrCodeArgumentException, aerr.Error()) + case devicefarm.ErrCodeNotFoundException: + fmt.Println(devicefarm.ErrCodeNotFoundException, aerr.Error()) + case devicefarm.ErrCodeLimitExceededException: + fmt.Println(devicefarm.ErrCodeLimitExceededException, aerr.Error()) + case devicefarm.ErrCodeServiceAccountException: + fmt.Println(devicefarm.ErrCodeServiceAccountException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } return } - // Pretty-print the response data. - fmt.Println(resp) + fmt.Println(result) } -func ExampleDeviceFarm_ListSuites() { - sess := session.Must(session.NewSession()) - - svc := devicefarm.New(sess) - - params := &devicefarm.ListSuitesInput{ - Arn: aws.String("AmazonResourceName"), // Required - NextToken: aws.String("PaginationToken"), - } - resp, err := svc.ListSuites(params) - - if err != nil { - // Print the error, cast err to awserr.Error to get the Code and - // Message from an error. - fmt.Println(err.Error()) - return - } - - // Pretty-print the response data. - fmt.Println(resp) -} - -func ExampleDeviceFarm_ListTests() { - sess := session.Must(session.NewSession()) - - svc := devicefarm.New(sess) - - params := &devicefarm.ListTestsInput{ - Arn: aws.String("AmazonResourceName"), // Required - NextToken: aws.String("PaginationToken"), - } - resp, err := svc.ListTests(params) - - if err != nil { - // Print the error, cast err to awserr.Error to get the Code and - // Message from an error. - fmt.Println(err.Error()) - return - } - - // Pretty-print the response data. - fmt.Println(resp) -} - -func ExampleDeviceFarm_ListUniqueProblems() { - sess := session.Must(session.NewSession()) - - svc := devicefarm.New(sess) - - params := &devicefarm.ListUniqueProblemsInput{ - Arn: aws.String("AmazonResourceName"), // Required - NextToken: aws.String("PaginationToken"), - } - resp, err := svc.ListUniqueProblems(params) - - if err != nil { - // Print the error, cast err to awserr.Error to get the Code and - // Message from an error. - fmt.Println(err.Error()) - return - } - - // Pretty-print the response data. - fmt.Println(resp) -} - -func ExampleDeviceFarm_ListUploads() { - sess := session.Must(session.NewSession()) - - svc := devicefarm.New(sess) - - params := &devicefarm.ListUploadsInput{ - Arn: aws.String("AmazonResourceName"), // Required - NextToken: aws.String("PaginationToken"), +// To get information about uploads +// +// The following example returns information about uploads, given a specific Device +// Farm project. +func ExampleDeviceFarm_ListUploads_shared00() { + svc := devicefarm.New(session.New()) + input := &devicefarm.ListUploadsInput{ + Arn: aws.String("arn:aws:devicefarm:us-west-2:123456789101:project:EXAMPLE-GUID-123-456"), + NextToken: aws.String("RW5DdDJkMWYwZjM2MzM2VHVpOHJIUXlDUXlhc2QzRGViYnc9SEXAMPLE"), } - resp, err := svc.ListUploads(params) + result, err := svc.ListUploads(input) if err != nil { - // Print the error, cast err to awserr.Error to get the Code and - // Message from an error. - fmt.Println(err.Error()) + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case devicefarm.ErrCodeArgumentException: + fmt.Println(devicefarm.ErrCodeArgumentException, aerr.Error()) + case devicefarm.ErrCodeNotFoundException: + fmt.Println(devicefarm.ErrCodeNotFoundException, aerr.Error()) + case devicefarm.ErrCodeLimitExceededException: + fmt.Println(devicefarm.ErrCodeLimitExceededException, aerr.Error()) + case devicefarm.ErrCodeServiceAccountException: + fmt.Println(devicefarm.ErrCodeServiceAccountException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } return } - // Pretty-print the response data. - fmt.Println(resp) + fmt.Println(result) } -func ExampleDeviceFarm_PurchaseOffering() { - sess := session.Must(session.NewSession()) - - svc := devicefarm.New(sess) - - params := &devicefarm.PurchaseOfferingInput{ - OfferingId: aws.String("OfferingIdentifier"), - OfferingPromotionId: aws.String("OfferingPromotionIdentifier"), - Quantity: aws.Int64(1), +// To purchase a device slot offering +// +// The following example purchases a specific device slot offering. +func ExampleDeviceFarm_PurchaseOffering_shared00() { + svc := devicefarm.New(session.New()) + input := &devicefarm.PurchaseOfferingInput{ + OfferingId: aws.String("D68B3C05-1BA6-4360-BC69-12345EXAMPLE"), + Quantity: aws.Int64(1), } - resp, err := svc.PurchaseOffering(params) + result, err := svc.PurchaseOffering(input) if err != nil { - // Print the error, cast err to awserr.Error to get the Code and - // Message from an error. - fmt.Println(err.Error()) + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case devicefarm.ErrCodeArgumentException: + fmt.Println(devicefarm.ErrCodeArgumentException, aerr.Error()) + case devicefarm.ErrCodeNotFoundException: + fmt.Println(devicefarm.ErrCodeNotFoundException, aerr.Error()) + case devicefarm.ErrCodeNotEligibleException: + fmt.Println(devicefarm.ErrCodeNotEligibleException, aerr.Error()) + case devicefarm.ErrCodeLimitExceededException: + fmt.Println(devicefarm.ErrCodeLimitExceededException, aerr.Error()) + case devicefarm.ErrCodeServiceAccountException: + fmt.Println(devicefarm.ErrCodeServiceAccountException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } return } - // Pretty-print the response data. - fmt.Println(resp) + fmt.Println(result) } -func ExampleDeviceFarm_RenewOffering() { - sess := session.Must(session.NewSession()) - - svc := devicefarm.New(sess) - - params := &devicefarm.RenewOfferingInput{ - OfferingId: aws.String("OfferingIdentifier"), +// To renew a device slot offering +// +// The following example renews a specific device slot offering. +func ExampleDeviceFarm_RenewOffering_shared00() { + svc := devicefarm.New(session.New()) + input := &devicefarm.RenewOfferingInput{ + OfferingId: aws.String("D68B3C05-1BA6-4360-BC69-12345EXAMPLE"), Quantity: aws.Int64(1), } - resp, err := svc.RenewOffering(params) + result, err := svc.RenewOffering(input) if err != nil { - // Print the error, cast err to awserr.Error to get the Code and - // Message from an error. - fmt.Println(err.Error()) + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case devicefarm.ErrCodeArgumentException: + fmt.Println(devicefarm.ErrCodeArgumentException, aerr.Error()) + case devicefarm.ErrCodeNotFoundException: + fmt.Println(devicefarm.ErrCodeNotFoundException, aerr.Error()) + case devicefarm.ErrCodeNotEligibleException: + fmt.Println(devicefarm.ErrCodeNotEligibleException, aerr.Error()) + case devicefarm.ErrCodeLimitExceededException: + fmt.Println(devicefarm.ErrCodeLimitExceededException, aerr.Error()) + case devicefarm.ErrCodeServiceAccountException: + fmt.Println(devicefarm.ErrCodeServiceAccountException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } return } - // Pretty-print the response data. - fmt.Println(resp) + fmt.Println(result) } -func ExampleDeviceFarm_ScheduleRun() { - sess := session.Must(session.NewSession()) - - svc := devicefarm.New(sess) - - params := &devicefarm.ScheduleRunInput{ - DevicePoolArn: aws.String("AmazonResourceName"), // Required - ProjectArn: aws.String("AmazonResourceName"), // Required - Test: &devicefarm.ScheduleRunTest{ // Required - Type: aws.String("TestType"), // Required - Filter: aws.String("Filter"), - Parameters: map[string]*string{ - "Key": aws.String("String"), // Required - // More values... - }, - TestPackageArn: aws.String("AmazonResourceName"), - }, - AppArn: aws.String("AmazonResourceName"), - Configuration: &devicefarm.ScheduleRunConfiguration{ - AuxiliaryApps: []*string{ - aws.String("AmazonResourceName"), // Required - // More values... - }, - BillingMethod: aws.String("BillingMethod"), - ExtraDataPackageArn: aws.String("AmazonResourceName"), - Locale: aws.String("String"), - Location: &devicefarm.Location{ - Latitude: aws.Float64(1.0), // Required - Longitude: aws.Float64(1.0), // Required - }, - NetworkProfileArn: aws.String("AmazonResourceName"), - Radios: &devicefarm.Radios{ - Bluetooth: aws.Bool(true), - Gps: aws.Bool(true), - Nfc: aws.Bool(true), - Wifi: aws.Bool(true), - }, - }, - ExecutionConfiguration: &devicefarm.ExecutionConfiguration{ - AccountsCleanup: aws.Bool(true), - AppPackagesCleanup: aws.Bool(true), - JobTimeoutMinutes: aws.Int64(1), +// To schedule a test run +// +// The following example schedules a test run named MyRun. +func ExampleDeviceFarm_ScheduleRun_shared00() { + svc := devicefarm.New(session.New()) + input := &devicefarm.ScheduleRunInput{ + DevicePoolArn: aws.String("arn:aws:devicefarm:us-west-2:123456789101:pool:EXAMPLE-GUID-123-456"), + Name: aws.String("MyRun"), + ProjectArn: aws.String("arn:aws:devicefarm:us-west-2:123456789101:project:EXAMPLE-GUID-123-456"), + Test: &devicefarm.ScheduleRunTest{ + TestPackageArn: aws.String("arn:aws:devicefarm:us-west-2:123456789101:test:EXAMPLE-GUID-123-456"), + Type: aws.String("APPIUM_JAVA_JUNIT"), }, - Name: aws.String("Name"), - } - resp, err := svc.ScheduleRun(params) - - if err != nil { - // Print the error, cast err to awserr.Error to get the Code and - // Message from an error. - fmt.Println(err.Error()) - return - } - - // Pretty-print the response data. - fmt.Println(resp) -} - -func ExampleDeviceFarm_StopRemoteAccessSession() { - sess := session.Must(session.NewSession()) - - svc := devicefarm.New(sess) - - params := &devicefarm.StopRemoteAccessSessionInput{ - Arn: aws.String("AmazonResourceName"), // Required } - resp, err := svc.StopRemoteAccessSession(params) + result, err := svc.ScheduleRun(input) if err != nil { - // Print the error, cast err to awserr.Error to get the Code and - // Message from an error. - fmt.Println(err.Error()) + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case devicefarm.ErrCodeArgumentException: + fmt.Println(devicefarm.ErrCodeArgumentException, aerr.Error()) + case devicefarm.ErrCodeNotFoundException: + fmt.Println(devicefarm.ErrCodeNotFoundException, aerr.Error()) + case devicefarm.ErrCodeLimitExceededException: + fmt.Println(devicefarm.ErrCodeLimitExceededException, aerr.Error()) + case devicefarm.ErrCodeIdempotencyException: + fmt.Println(devicefarm.ErrCodeIdempotencyException, aerr.Error()) + case devicefarm.ErrCodeServiceAccountException: + fmt.Println(devicefarm.ErrCodeServiceAccountException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } return } - // Pretty-print the response data. - fmt.Println(resp) + fmt.Println(result) } -func ExampleDeviceFarm_StopRun() { - sess := session.Must(session.NewSession()) - - svc := devicefarm.New(sess) - - params := &devicefarm.StopRunInput{ - Arn: aws.String("AmazonResourceName"), // Required +// To stop a test run +// +// The following example stops a specific test run. +func ExampleDeviceFarm_StopRun_shared00() { + svc := devicefarm.New(session.New()) + input := &devicefarm.StopRunInput{ + Arn: aws.String("arn:aws:devicefarm:us-west-2:123456789101:run:EXAMPLE-GUID-123-456"), } - resp, err := svc.StopRun(params) + result, err := svc.StopRun(input) if err != nil { - // Print the error, cast err to awserr.Error to get the Code and - // Message from an error. - fmt.Println(err.Error()) + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case devicefarm.ErrCodeArgumentException: + fmt.Println(devicefarm.ErrCodeArgumentException, aerr.Error()) + case devicefarm.ErrCodeNotFoundException: + fmt.Println(devicefarm.ErrCodeNotFoundException, aerr.Error()) + case devicefarm.ErrCodeLimitExceededException: + fmt.Println(devicefarm.ErrCodeLimitExceededException, aerr.Error()) + case devicefarm.ErrCodeServiceAccountException: + fmt.Println(devicefarm.ErrCodeServiceAccountException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } return } - // Pretty-print the response data. - fmt.Println(resp) + fmt.Println(result) } -func ExampleDeviceFarm_UpdateDevicePool() { - sess := session.Must(session.NewSession()) - - svc := devicefarm.New(sess) - - params := &devicefarm.UpdateDevicePoolInput{ - Arn: aws.String("AmazonResourceName"), // Required - Description: aws.String("Message"), - Name: aws.String("Name"), +// To update a device pool +// +// The following example updates the specified device pool with a new name and description. +// It also enables remote access of devices in the device pool. +func ExampleDeviceFarm_UpdateDevicePool_shared00() { + svc := devicefarm.New(session.New()) + input := &devicefarm.UpdateDevicePoolInput{ + Arn: aws.String("arn:aws:devicefarm:us-west-2::devicepool:082d10e5-d7d7-48a5-ba5c-12345EXAMPLE"), + Description: aws.String("NewDescription"), + Name: aws.String("NewName"), Rules: []*devicefarm.Rule{ - { // Required - Attribute: aws.String("DeviceAttribute"), - Operator: aws.String("RuleOperator"), - Value: aws.String("String"), + { + Attribute: aws.String("REMOTE_ACCESS_ENABLED"), + Operator: aws.String("EQUALS"), + Value: aws.String("True"), }, - // More values... }, } - resp, err := svc.UpdateDevicePool(params) - - if err != nil { - // Print the error, cast err to awserr.Error to get the Code and - // Message from an error. - fmt.Println(err.Error()) - return - } - - // Pretty-print the response data. - fmt.Println(resp) -} - -func ExampleDeviceFarm_UpdateNetworkProfile() { - sess := session.Must(session.NewSession()) - - svc := devicefarm.New(sess) - - params := &devicefarm.UpdateNetworkProfileInput{ - Arn: aws.String("AmazonResourceName"), // Required - Description: aws.String("Message"), - DownlinkBandwidthBits: aws.Int64(1), - DownlinkDelayMs: aws.Int64(1), - DownlinkJitterMs: aws.Int64(1), - DownlinkLossPercent: aws.Int64(1), - Name: aws.String("Name"), - Type: aws.String("NetworkProfileType"), - UplinkBandwidthBits: aws.Int64(1), - UplinkDelayMs: aws.Int64(1), - UplinkJitterMs: aws.Int64(1), - UplinkLossPercent: aws.Int64(1), - } - resp, err := svc.UpdateNetworkProfile(params) + result, err := svc.UpdateDevicePool(input) if err != nil { - // Print the error, cast err to awserr.Error to get the Code and - // Message from an error. - fmt.Println(err.Error()) + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case devicefarm.ErrCodeArgumentException: + fmt.Println(devicefarm.ErrCodeArgumentException, aerr.Error()) + case devicefarm.ErrCodeNotFoundException: + fmt.Println(devicefarm.ErrCodeNotFoundException, aerr.Error()) + case devicefarm.ErrCodeLimitExceededException: + fmt.Println(devicefarm.ErrCodeLimitExceededException, aerr.Error()) + case devicefarm.ErrCodeServiceAccountException: + fmt.Println(devicefarm.ErrCodeServiceAccountException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } return } - // Pretty-print the response data. - fmt.Println(resp) + fmt.Println(result) } -func ExampleDeviceFarm_UpdateProject() { - sess := session.Must(session.NewSession()) - - svc := devicefarm.New(sess) - - params := &devicefarm.UpdateProjectInput{ - Arn: aws.String("AmazonResourceName"), // Required - DefaultJobTimeoutMinutes: aws.Int64(1), - Name: aws.String("Name"), +// To update a device pool +// +// The following example updates the specified project with a new name. +func ExampleDeviceFarm_UpdateProject_shared00() { + svc := devicefarm.New(session.New()) + input := &devicefarm.UpdateProjectInput{ + Arn: aws.String("arn:aws:devicefarm:us-west-2:123456789101:project:8f75187d-101e-4625-accc-12345EXAMPLE"), + Name: aws.String("NewName"), } - resp, err := svc.UpdateProject(params) + result, err := svc.UpdateProject(input) if err != nil { - // Print the error, cast err to awserr.Error to get the Code and - // Message from an error. - fmt.Println(err.Error()) + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case devicefarm.ErrCodeArgumentException: + fmt.Println(devicefarm.ErrCodeArgumentException, aerr.Error()) + case devicefarm.ErrCodeNotFoundException: + fmt.Println(devicefarm.ErrCodeNotFoundException, aerr.Error()) + case devicefarm.ErrCodeLimitExceededException: + fmt.Println(devicefarm.ErrCodeLimitExceededException, aerr.Error()) + case devicefarm.ErrCodeServiceAccountException: + fmt.Println(devicefarm.ErrCodeServiceAccountException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } return } - // Pretty-print the response data. - fmt.Println(resp) + fmt.Println(result) } diff --git a/vendor/github.com/aws/aws-sdk-go/service/devicefarm/service.go b/vendor/github.com/aws/aws-sdk-go/service/devicefarm/service.go index 7b5f192..7e2418b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/devicefarm/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/devicefarm/service.go @@ -11,12 +11,12 @@ import ( "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" ) -// AWS Device Farm is a service that enables mobile app developers to test Android, -// iOS, and Fire OS apps on physical phones, tablets, and other devices in the -// cloud. -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23 +// DeviceFarm provides the API operation methods for making requests to +// AWS Device Farm. See this package's package overview docs +// for details on the service. +// +// DeviceFarm methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. type DeviceFarm struct { *client.Client } @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "devicefarm" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "devicefarm" // Service endpoint prefix API calls made to. + EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceID = "Device Farm" // ServiceID is a unique identifer of a specific service ) // New creates a new instance of the DeviceFarm 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, diff --git a/vendor/github.com/aws/aws-sdk-go/service/sts/api.go b/vendor/github.com/aws/aws-sdk-go/service/sts/api.go index 19dd0bf..b46da12 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sts/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sts/api.go @@ -1,6 +1,5 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// Package sts provides a client for AWS Security Token Service. package sts import ( @@ -15,19 +14,18 @@ const opAssumeRole = "AssumeRole" // AssumeRoleRequest generates a "aws/request.Request" representing the // client's request for the AssumeRole operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. // -// See AssumeRole for usage and error information. +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the AssumeRole method directly -// instead. +// See AssumeRole for more information on using the AssumeRole +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the AssumeRoleRequest method. // req, resp := client.AssumeRoleRequest(params) @@ -37,7 +35,7 @@ const opAssumeRole = "AssumeRole" // fmt.Println(resp) // } // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRole +// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRole func (c *STS) AssumeRoleRequest(input *AssumeRoleInput) (req *request.Request, output *AssumeRoleOutput) { op := &request.Operation{ Name: opAssumeRole, @@ -90,9 +88,18 @@ func (c *STS) AssumeRoleRequest(input *AssumeRoleInput) (req *request.Request, o // Scenarios for Temporary Credentials (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html#sts-introduction) // in the IAM User Guide. // -// The temporary security credentials are valid for the duration that you specified -// when calling AssumeRole, which can be from 900 seconds (15 minutes) to a -// maximum of 3600 seconds (1 hour). The default is 1 hour. +// By default, the temporary security credentials created by AssumeRole last +// for one hour. However, you can use the optional DurationSeconds parameter +// to specify the duration of your session. You can provide a value from 900 +// seconds (15 minutes) up to the maximum session duration setting for the role. +// This setting can have a value from 1 hour to 12 hours. To learn how to view +// the maximum value for your role, see View the Maximum Session Duration Setting +// for a Role (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session) +// in the IAM User Guide. The maximum session duration limit applies when you +// use the AssumeRole* API operations or the assume-role* CLI operations but +// does not apply when you use those operations to create a console URL. For +// more information, see Using IAM Roles (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html) +// in the IAM User Guide. // // The temporary security credentials created by AssumeRole can be used to make // API calls to any AWS service with the following exception: you cannot call @@ -123,7 +130,12 @@ func (c *STS) AssumeRoleRequest(input *AssumeRoleInput) (req *request.Request, o // the user to call AssumeRole on the ARN of the role in the other account. // If the user is in the same account as the role, then you can either attach // a policy to the user (identical to the previous different account user), -// or you can add the user as a principal directly in the role's trust policy +// or you can add the user as a principal directly in the role's trust policy. +// In this case, the trust policy acts as the only resource-based policy in +// IAM, and users in the same account as the role do not need explicit permission +// to assume the role. For more information about trust policies and resource-based +// policies, see IAM Policies (http://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html) +// in the IAM User Guide. // // Using MFA with AssumeRole // @@ -170,7 +182,7 @@ func (c *STS) AssumeRoleRequest(input *AssumeRoleInput) (req *request.Request, o // and Deactivating AWS STS in an AWS Region (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html) // in the IAM User Guide. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRole +// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRole func (c *STS) AssumeRole(input *AssumeRoleInput) (*AssumeRoleOutput, error) { req, out := c.AssumeRoleRequest(input) return out, req.Send() @@ -196,19 +208,18 @@ const opAssumeRoleWithSAML = "AssumeRoleWithSAML" // AssumeRoleWithSAMLRequest generates a "aws/request.Request" representing the // client's request for the AssumeRoleWithSAML operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. // -// See AssumeRoleWithSAML for usage and error information. +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the AssumeRoleWithSAML method directly -// instead. +// See AssumeRoleWithSAML for more information on using the AssumeRoleWithSAML +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the AssumeRoleWithSAMLRequest method. // req, resp := client.AssumeRoleWithSAMLRequest(params) @@ -218,7 +229,7 @@ const opAssumeRoleWithSAML = "AssumeRoleWithSAML" // fmt.Println(resp) // } // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithSAML +// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithSAML func (c *STS) AssumeRoleWithSAMLRequest(input *AssumeRoleWithSAMLInput) (req *request.Request, output *AssumeRoleWithSAMLOutput) { op := &request.Operation{ Name: opAssumeRoleWithSAML, @@ -250,11 +261,20 @@ func (c *STS) AssumeRoleWithSAMLRequest(input *AssumeRoleWithSAMLInput) (req *re // an access key ID, a secret access key, and a security token. Applications // can use these temporary security credentials to sign calls to AWS services. // -// The temporary security credentials are valid for the duration that you specified -// when calling AssumeRole, or until the time specified in the SAML authentication -// response's SessionNotOnOrAfter value, whichever is shorter. The duration -// can be from 900 seconds (15 minutes) to a maximum of 3600 seconds (1 hour). -// The default is 1 hour. +// By default, the temporary security credentials created by AssumeRoleWithSAML +// last for one hour. However, you can use the optional DurationSeconds parameter +// to specify the duration of your session. Your role session lasts for the +// duration that you specify, or until the time specified in the SAML authentication +// response's SessionNotOnOrAfter value, whichever is shorter. You can provide +// a DurationSeconds value from 900 seconds (15 minutes) up to the maximum session +// duration setting for the role. This setting can have a value from 1 hour +// to 12 hours. To learn how to view the maximum value for your role, see View +// the Maximum Session Duration Setting for a Role (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session) +// in the IAM User Guide. The maximum session duration limit applies when you +// use the AssumeRole* API operations or the assume-role* CLI operations but +// does not apply when you use those operations to create a console URL. For +// more information, see Using IAM Roles (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html) +// in the IAM User Guide. // // The temporary security credentials created by AssumeRoleWithSAML can be used // to make API calls to any AWS service with the following exception: you cannot @@ -344,7 +364,7 @@ func (c *STS) AssumeRoleWithSAMLRequest(input *AssumeRoleWithSAMLInput) (req *re // and Deactivating AWS STS in an AWS Region (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html) // in the IAM User Guide. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithSAML +// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithSAML func (c *STS) AssumeRoleWithSAML(input *AssumeRoleWithSAMLInput) (*AssumeRoleWithSAMLOutput, error) { req, out := c.AssumeRoleWithSAMLRequest(input) return out, req.Send() @@ -370,19 +390,18 @@ const opAssumeRoleWithWebIdentity = "AssumeRoleWithWebIdentity" // AssumeRoleWithWebIdentityRequest generates a "aws/request.Request" representing the // client's request for the AssumeRoleWithWebIdentity operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See AssumeRoleWithWebIdentity for usage and error information. +// See AssumeRoleWithWebIdentity for more information on using the AssumeRoleWithWebIdentity +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the AssumeRoleWithWebIdentity method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the AssumeRoleWithWebIdentityRequest method. // req, resp := client.AssumeRoleWithWebIdentityRequest(params) @@ -392,7 +411,7 @@ const opAssumeRoleWithWebIdentity = "AssumeRoleWithWebIdentity" // fmt.Println(resp) // } // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithWebIdentity +// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithWebIdentity func (c *STS) AssumeRoleWithWebIdentityRequest(input *AssumeRoleWithWebIdentityInput) (req *request.Request, output *AssumeRoleWithWebIdentityOutput) { op := &request.Operation{ Name: opAssumeRoleWithWebIdentity, @@ -442,9 +461,18 @@ func (c *STS) AssumeRoleWithWebIdentityRequest(input *AssumeRoleWithWebIdentityI // key ID, a secret access key, and a security token. Applications can use these // temporary security credentials to sign calls to AWS service APIs. // -// The credentials are valid for the duration that you specified when calling -// AssumeRoleWithWebIdentity, which can be from 900 seconds (15 minutes) to -// a maximum of 3600 seconds (1 hour). The default is 1 hour. +// By default, the temporary security credentials created by AssumeRoleWithWebIdentity +// last for one hour. However, you can use the optional DurationSeconds parameter +// to specify the duration of your session. You can provide a value from 900 +// seconds (15 minutes) up to the maximum session duration setting for the role. +// This setting can have a value from 1 hour to 12 hours. To learn how to view +// the maximum value for your role, see View the Maximum Session Duration Setting +// for a Role (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session) +// in the IAM User Guide. The maximum session duration limit applies when you +// use the AssumeRole* API operations or the assume-role* CLI operations but +// does not apply when you use those operations to create a console URL. For +// more information, see Using IAM Roles (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html) +// in the IAM User Guide. // // The temporary security credentials created by AssumeRoleWithWebIdentity can // be used to make API calls to any AWS service with the following exception: @@ -496,7 +524,7 @@ func (c *STS) AssumeRoleWithWebIdentityRequest(input *AssumeRoleWithWebIdentityI // the information from these providers to get and use temporary security // credentials. // -// * Web Identity Federation with Mobile Applications (http://aws.amazon.com/articles/4617974389850313). +// * Web Identity Federation with Mobile Applications (http://aws.amazon.com/articles/web-identity-federation-with-mobile-applications). // This article discusses web identity federation and shows an example of // how to use web identity federation to get access to content in Amazon // S3. @@ -547,7 +575,7 @@ func (c *STS) AssumeRoleWithWebIdentityRequest(input *AssumeRoleWithWebIdentityI // and Deactivating AWS STS in an AWS Region (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html) // in the IAM User Guide. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithWebIdentity +// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithWebIdentity func (c *STS) AssumeRoleWithWebIdentity(input *AssumeRoleWithWebIdentityInput) (*AssumeRoleWithWebIdentityOutput, error) { req, out := c.AssumeRoleWithWebIdentityRequest(input) return out, req.Send() @@ -573,19 +601,18 @@ const opDecodeAuthorizationMessage = "DecodeAuthorizationMessage" // DecodeAuthorizationMessageRequest generates a "aws/request.Request" representing the // client's request for the DecodeAuthorizationMessage operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See DecodeAuthorizationMessage for usage and error information. +// See DecodeAuthorizationMessage for more information on using the DecodeAuthorizationMessage +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the DecodeAuthorizationMessage method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the DecodeAuthorizationMessageRequest method. // req, resp := client.DecodeAuthorizationMessageRequest(params) @@ -595,7 +622,7 @@ const opDecodeAuthorizationMessage = "DecodeAuthorizationMessage" // fmt.Println(resp) // } // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/DecodeAuthorizationMessage +// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/DecodeAuthorizationMessage func (c *STS) DecodeAuthorizationMessageRequest(input *DecodeAuthorizationMessageInput) (req *request.Request, output *DecodeAuthorizationMessageOutput) { op := &request.Operation{ Name: opDecodeAuthorizationMessage, @@ -660,7 +687,7 @@ func (c *STS) DecodeAuthorizationMessageRequest(input *DecodeAuthorizationMessag // invalid. This can happen if the token contains invalid characters, such as // linebreaks. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/DecodeAuthorizationMessage +// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/DecodeAuthorizationMessage func (c *STS) DecodeAuthorizationMessage(input *DecodeAuthorizationMessageInput) (*DecodeAuthorizationMessageOutput, error) { req, out := c.DecodeAuthorizationMessageRequest(input) return out, req.Send() @@ -686,19 +713,18 @@ const opGetCallerIdentity = "GetCallerIdentity" // GetCallerIdentityRequest generates a "aws/request.Request" representing the // client's request for the GetCallerIdentity operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See GetCallerIdentity for usage and error information. +// See GetCallerIdentity for more information on using the GetCallerIdentity +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the GetCallerIdentity method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the GetCallerIdentityRequest method. // req, resp := client.GetCallerIdentityRequest(params) @@ -708,7 +734,7 @@ const opGetCallerIdentity = "GetCallerIdentity" // fmt.Println(resp) // } // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetCallerIdentity +// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetCallerIdentity func (c *STS) GetCallerIdentityRequest(input *GetCallerIdentityInput) (req *request.Request, output *GetCallerIdentityOutput) { op := &request.Operation{ Name: opGetCallerIdentity, @@ -736,7 +762,7 @@ func (c *STS) GetCallerIdentityRequest(input *GetCallerIdentityInput) (req *requ // // See the AWS API reference guide for AWS Security Token Service's // API operation GetCallerIdentity for usage and error information. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetCallerIdentity +// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetCallerIdentity func (c *STS) GetCallerIdentity(input *GetCallerIdentityInput) (*GetCallerIdentityOutput, error) { req, out := c.GetCallerIdentityRequest(input) return out, req.Send() @@ -762,19 +788,18 @@ const opGetFederationToken = "GetFederationToken" // GetFederationTokenRequest generates a "aws/request.Request" representing the // client's request for the GetFederationToken operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. // -// See GetFederationToken for usage and error information. +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the GetFederationToken method directly -// instead. +// See GetFederationToken for more information on using the GetFederationToken +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the GetFederationTokenRequest method. // req, resp := client.GetFederationTokenRequest(params) @@ -784,7 +809,7 @@ const opGetFederationToken = "GetFederationToken" // fmt.Println(resp) // } // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetFederationToken +// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetFederationToken func (c *STS) GetFederationTokenRequest(input *GetFederationTokenInput) (req *request.Request, output *GetFederationTokenOutput) { op := &request.Operation{ Name: opGetFederationToken, @@ -906,7 +931,7 @@ func (c *STS) GetFederationTokenRequest(input *GetFederationTokenInput) (req *re // and Deactivating AWS STS in an AWS Region (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html) // in the IAM User Guide. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetFederationToken +// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetFederationToken func (c *STS) GetFederationToken(input *GetFederationTokenInput) (*GetFederationTokenOutput, error) { req, out := c.GetFederationTokenRequest(input) return out, req.Send() @@ -932,19 +957,18 @@ const opGetSessionToken = "GetSessionToken" // GetSessionTokenRequest generates a "aws/request.Request" representing the // client's request for the GetSessionToken operation. The "output" return -// value can be used to capture response data after the request's "Send" method -// is called. +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// See GetSessionToken for usage and error information. +// See GetSessionToken for more information on using the GetSessionToken +// API call, and error handling. // -// Creating a request object using this method should be used when you want to inject -// custom logic into the request's lifecycle using a custom handler, or if you want to -// access properties on the request object before or after sending the request. If -// you just want the service response, call the GetSessionToken method directly -// instead. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Note: You must call the "Send" method on the returned request object in order -// to execute the request. // // // Example sending a request using the GetSessionTokenRequest method. // req, resp := client.GetSessionTokenRequest(params) @@ -954,7 +978,7 @@ const opGetSessionToken = "GetSessionToken" // fmt.Println(resp) // } // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetSessionToken +// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetSessionToken func (c *STS) GetSessionTokenRequest(input *GetSessionTokenInput) (req *request.Request, output *GetSessionTokenOutput) { op := &request.Operation{ Name: opGetSessionToken, @@ -1035,7 +1059,7 @@ func (c *STS) GetSessionTokenRequest(input *GetSessionTokenInput) (req *request. // and Deactivating AWS STS in an AWS Region (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html) // in the IAM User Guide. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetSessionToken +// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetSessionToken func (c *STS) GetSessionToken(input *GetSessionTokenInput) (*GetSessionTokenOutput, error) { req, out := c.GetSessionTokenRequest(input) return out, req.Send() @@ -1057,20 +1081,27 @@ func (c *STS) GetSessionTokenWithContext(ctx aws.Context, input *GetSessionToken return out, req.Send() } -// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleRequest type AssumeRoleInput struct { _ struct{} `type:"structure"` // The duration, in seconds, of the role session. The value can range from 900 - // seconds (15 minutes) to 3600 seconds (1 hour). By default, the value is set - // to 3600 seconds. + // seconds (15 minutes) up to the maximum session duration setting for the role. + // This setting can have a value from 1 hour to 12 hours. If you specify a value + // higher than this setting, the operation fails. For example, if you specify + // a session duration of 12 hours, but your administrator set the maximum session + // duration to 6 hours, your operation fails. To learn how to view the maximum + // value for your role, see View the Maximum Session Duration Setting for a + // Role (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session) + // in the IAM User Guide. + // + // By default, the value is set to 3600 seconds. // - // This is separate from the duration of a console session that you might request - // using the returned credentials. The request to the federation endpoint for - // a console sign-in token takes a SessionDuration parameter that specifies - // the maximum length of the console session, separately from the DurationSeconds - // parameter on this API. For more information, see Creating a URL that Enables - // Federated Users to Access the AWS Management Console (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html) + // The DurationSeconds parameter is separate from the duration of a console + // session that you might request using the returned credentials. The request + // to the federation endpoint for a console sign-in token takes a SessionDuration + // parameter that specifies the maximum length of the console session. For more + // information, see Creating a URL that Enables Federated Users to Access the + // AWS Management Console (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html) // in the IAM User Guide. DurationSeconds *int64 `min:"900" type:"integer"` @@ -1086,7 +1117,7 @@ type AssumeRoleInput struct { // // The regex used to validated this parameter is a string of characters consisting // of upper- and lower-case alphanumeric characters with no spaces. You can - // also include underscores or any of the following characters: =,.@:\/- + // also include underscores or any of the following characters: =,.@:/- ExternalId *string `min:"2" type:"string"` // An IAM policy in JSON format. @@ -1249,7 +1280,6 @@ func (s *AssumeRoleInput) SetTokenCode(v string) *AssumeRoleInput { // Contains the response to a successful AssumeRole request, including temporary // AWS credentials that can be used to make AWS requests. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleResponse type AssumeRoleOutput struct { _ struct{} `type:"structure"` @@ -1303,22 +1333,30 @@ func (s *AssumeRoleOutput) SetPackedPolicySize(v int64) *AssumeRoleOutput { return s } -// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithSAMLRequest type AssumeRoleWithSAMLInput struct { _ struct{} `type:"structure"` - // The duration, in seconds, of the role session. The value can range from 900 - // seconds (15 minutes) to 3600 seconds (1 hour). By default, the value is set - // to 3600 seconds. An expiration can also be specified in the SAML authentication - // response's SessionNotOnOrAfter value. The actual expiration time is whichever - // value is shorter. + // The duration, in seconds, of the role session. Your role session lasts for + // the duration that you specify for the DurationSeconds parameter, or until + // the time specified in the SAML authentication response's SessionNotOnOrAfter + // value, whichever is shorter. You can provide a DurationSeconds value from + // 900 seconds (15 minutes) up to the maximum session duration setting for the + // role. This setting can have a value from 1 hour to 12 hours. If you specify + // a value higher than this setting, the operation fails. For example, if you + // specify a session duration of 12 hours, but your administrator set the maximum + // session duration to 6 hours, your operation fails. To learn how to view the + // maximum value for your role, see View the Maximum Session Duration Setting + // for a Role (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session) + // in the IAM User Guide. + // + // By default, the value is set to 3600 seconds. // - // This is separate from the duration of a console session that you might request - // using the returned credentials. The request to the federation endpoint for - // a console sign-in token takes a SessionDuration parameter that specifies - // the maximum length of the console session, separately from the DurationSeconds - // parameter on this API. For more information, see Enabling SAML 2.0 Federated - // Users to Access the AWS Management Console (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-saml.html) + // The DurationSeconds parameter is separate from the duration of a console + // session that you might request using the returned credentials. The request + // to the federation endpoint for a console sign-in token takes a SessionDuration + // parameter that specifies the maximum length of the console session. For more + // information, see Creating a URL that Enables Federated Users to Access the + // AWS Management Console (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html) // in the IAM User Guide. DurationSeconds *int64 `min:"900" type:"integer"` @@ -1444,7 +1482,6 @@ func (s *AssumeRoleWithSAMLInput) SetSAMLAssertion(v string) *AssumeRoleWithSAML // Contains the response to a successful AssumeRoleWithSAML request, including // temporary AWS credentials that can be used to make AWS requests. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithSAMLResponse type AssumeRoleWithSAMLOutput struct { _ struct{} `type:"structure"` @@ -1556,20 +1593,27 @@ func (s *AssumeRoleWithSAMLOutput) SetSubjectType(v string) *AssumeRoleWithSAMLO return s } -// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithWebIdentityRequest type AssumeRoleWithWebIdentityInput struct { _ struct{} `type:"structure"` // The duration, in seconds, of the role session. The value can range from 900 - // seconds (15 minutes) to 3600 seconds (1 hour). By default, the value is set - // to 3600 seconds. + // seconds (15 minutes) up to the maximum session duration setting for the role. + // This setting can have a value from 1 hour to 12 hours. If you specify a value + // higher than this setting, the operation fails. For example, if you specify + // a session duration of 12 hours, but your administrator set the maximum session + // duration to 6 hours, your operation fails. To learn how to view the maximum + // value for your role, see View the Maximum Session Duration Setting for a + // Role (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session) + // in the IAM User Guide. + // + // By default, the value is set to 3600 seconds. // - // This is separate from the duration of a console session that you might request - // using the returned credentials. The request to the federation endpoint for - // a console sign-in token takes a SessionDuration parameter that specifies - // the maximum length of the console session, separately from the DurationSeconds - // parameter on this API. For more information, see Creating a URL that Enables - // Federated Users to Access the AWS Management Console (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html) + // The DurationSeconds parameter is separate from the duration of a console + // session that you might request using the returned credentials. The request + // to the federation endpoint for a console sign-in token takes a SessionDuration + // parameter that specifies the maximum length of the console session. For more + // information, see Creating a URL that Enables Federated Users to Access the + // AWS Management Console (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html) // in the IAM User Guide. DurationSeconds *int64 `min:"900" type:"integer"` @@ -1719,7 +1763,6 @@ func (s *AssumeRoleWithWebIdentityInput) SetWebIdentityToken(v string) *AssumeRo // Contains the response to a successful AssumeRoleWithWebIdentity request, // including temporary AWS credentials that can be used to make AWS requests. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithWebIdentityResponse type AssumeRoleWithWebIdentityOutput struct { _ struct{} `type:"structure"` @@ -1812,7 +1855,6 @@ func (s *AssumeRoleWithWebIdentityOutput) SetSubjectFromWebIdentityToken(v strin // The identifiers for the temporary security credentials that the operation // returns. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumedRoleUser type AssumedRoleUser struct { _ struct{} `type:"structure"` @@ -1855,7 +1897,6 @@ func (s *AssumedRoleUser) SetAssumedRoleId(v string) *AssumedRoleUser { } // AWS credentials for API authentication. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/Credentials type Credentials struct { _ struct{} `type:"structure"` @@ -1914,7 +1955,6 @@ func (s *Credentials) SetSessionToken(v string) *Credentials { return s } -// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/DecodeAuthorizationMessageRequest type DecodeAuthorizationMessageInput struct { _ struct{} `type:"structure"` @@ -1959,7 +1999,6 @@ func (s *DecodeAuthorizationMessageInput) SetEncodedMessage(v string) *DecodeAut // A document that contains additional information about the authorization status // of a request from an encoded message that is returned in response to an AWS // request. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/DecodeAuthorizationMessageResponse type DecodeAuthorizationMessageOutput struct { _ struct{} `type:"structure"` @@ -1984,7 +2023,6 @@ func (s *DecodeAuthorizationMessageOutput) SetDecodedMessage(v string) *DecodeAu } // Identifiers for the federated user that is associated with the credentials. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/FederatedUser type FederatedUser struct { _ struct{} `type:"structure"` @@ -2025,7 +2063,6 @@ func (s *FederatedUser) SetFederatedUserId(v string) *FederatedUser { return s } -// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetCallerIdentityRequest type GetCallerIdentityInput struct { _ struct{} `type:"structure"` } @@ -2042,7 +2079,6 @@ func (s GetCallerIdentityInput) GoString() string { // Contains the response to a successful GetCallerIdentity request, including // information about the entity making the request. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetCallerIdentityResponse type GetCallerIdentityOutput struct { _ struct{} `type:"structure"` @@ -2088,7 +2124,6 @@ func (s *GetCallerIdentityOutput) SetUserId(v string) *GetCallerIdentityOutput { return s } -// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetFederationTokenRequest type GetFederationTokenInput struct { _ struct{} `type:"structure"` @@ -2197,7 +2232,6 @@ func (s *GetFederationTokenInput) SetPolicy(v string) *GetFederationTokenInput { // Contains the response to a successful GetFederationToken request, including // temporary AWS credentials that can be used to make AWS requests. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetFederationTokenResponse type GetFederationTokenOutput struct { _ struct{} `type:"structure"` @@ -2250,7 +2284,6 @@ func (s *GetFederationTokenOutput) SetPackedPolicySize(v int64) *GetFederationTo return s } -// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetSessionTokenRequest type GetSessionTokenInput struct { _ struct{} `type:"structure"` @@ -2270,9 +2303,9 @@ type GetSessionTokenInput struct { // You can find the device for an IAM user by going to the AWS Management Console // and viewing the user's security credentials. // - // The regex used to validate this parameter is a string of characters consisting + // The regex used to validated this parameter is a string of characters consisting // of upper- and lower-case alphanumeric characters with no spaces. You can - // also include underscores or any of the following characters: =,.@- + // also include underscores or any of the following characters: =,.@:/- SerialNumber *string `min:"9" type:"string"` // The value provided by the MFA device, if MFA is required. If any policy requires @@ -2335,7 +2368,6 @@ func (s *GetSessionTokenInput) SetTokenCode(v string) *GetSessionTokenInput { // Contains the response to a successful GetSessionToken request, including // temporary AWS credentials that can be used to make AWS requests. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetSessionTokenResponse type GetSessionTokenOutput struct { _ struct{} `type:"structure"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/sts/customizations_test.go b/vendor/github.com/aws/aws-sdk-go/service/sts/customizations_test.go index 6f870d3..18972b1 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sts/customizations_test.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sts/customizations_test.go @@ -3,8 +3,6 @@ package sts_test import ( "testing" - "github.com/stretchr/testify/assert" - "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/awstesting/unit" "github.com/aws/aws-sdk-go/service/sts" @@ -22,8 +20,12 @@ func TestUnsignedRequest_AssumeRoleWithSAML(t *testing.T) { }) err := req.Sign() - assert.NoError(t, err) - assert.Equal(t, "", req.HTTPRequest.Header.Get("Authorization")) + if err != nil { + t.Errorf("expect no error, got %v", err) + } + if e, a := "", req.HTTPRequest.Header.Get("Authorization"); e != a { + t.Errorf("expect %v, got %v", e, a) + } } func TestUnsignedRequest_AssumeRoleWithWebIdentity(t *testing.T) { @@ -34,6 +36,10 @@ func TestUnsignedRequest_AssumeRoleWithWebIdentity(t *testing.T) { }) err := req.Sign() - assert.NoError(t, err) - assert.Equal(t, "", req.HTTPRequest.Header.Get("Authorization")) + if err != nil { + t.Errorf("expect no error, got %v", err) + } + if e, a := "", req.HTTPRequest.Header.Get("Authorization"); e != a { + t.Errorf("expect %v, got %v", e, a) + } } diff --git a/vendor/github.com/aws/aws-sdk-go/service/sts/doc.go b/vendor/github.com/aws/aws-sdk-go/service/sts/doc.go new file mode 100644 index 0000000..ef681ab --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/sts/doc.go @@ -0,0 +1,72 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package sts provides the client and types for making API +// requests to AWS Security Token Service. +// +// The AWS Security Token Service (STS) is a web service that enables you to +// request temporary, limited-privilege credentials for AWS Identity and Access +// Management (IAM) users or for users that you authenticate (federated users). +// This guide provides descriptions of the STS API. For more detailed information +// about using this service, go to Temporary Security Credentials (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html). +// +// As an alternative to using the API, you can use one of the AWS SDKs, which +// consist of libraries and sample code for various programming languages and +// platforms (Java, Ruby, .NET, iOS, Android, etc.). The SDKs provide a convenient +// way to create programmatic access to STS. For example, the SDKs take care +// of cryptographically signing requests, managing errors, and retrying requests +// automatically. For information about the AWS SDKs, including how to download +// and install them, see the Tools for Amazon Web Services page (http://aws.amazon.com/tools/). +// +// For information about setting up signatures and authorization through the +// API, go to Signing AWS API Requests (http://docs.aws.amazon.com/general/latest/gr/signing_aws_api_requests.html) +// in the AWS General Reference. For general information about the Query API, +// go to Making Query Requests (http://docs.aws.amazon.com/IAM/latest/UserGuide/IAM_UsingQueryAPI.html) +// in Using IAM. For information about using security tokens with other AWS +// products, go to AWS Services That Work with IAM (http://docs.aws.amazon.com/IAM/latest/UserGuide/reference_aws-services-that-work-with-iam.html) +// in the IAM User Guide. +// +// If you're new to AWS and need additional technical information about a specific +// AWS product, you can find the product's technical documentation at http://aws.amazon.com/documentation/ +// (http://aws.amazon.com/documentation/). +// +// Endpoints +// +// The AWS Security Token Service (STS) has a default endpoint of https://sts.amazonaws.com +// that maps to the US East (N. Virginia) region. Additional regions are available +// and are activated by default. For more information, see Activating and Deactivating +// AWS STS in an AWS Region (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html) +// in the IAM User Guide. +// +// For information about STS endpoints, see Regions and Endpoints (http://docs.aws.amazon.com/general/latest/gr/rande.html#sts_region) +// in the AWS General Reference. +// +// Recording API requests +// +// STS supports AWS CloudTrail, which is a service that records AWS calls for +// your AWS account and delivers log files to an Amazon S3 bucket. By using +// information collected by CloudTrail, you can determine what requests were +// successfully made to STS, who made the request, when it was made, and so +// on. To learn more about CloudTrail, including how to turn it on and find +// your log files, see the AWS CloudTrail User Guide (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/what_is_cloud_trail_top_level.html). +// +// See https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15 for more information on this service. +// +// See sts package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/sts/ +// +// Using the Client +// +// To contact AWS Security Token Service with the SDK use the New function to create +// a new service client. With that client you can make API requests to the service. +// These clients are safe to use concurrently. +// +// See the SDK's documentation for more information on how to use the SDK. +// https://docs.aws.amazon.com/sdk-for-go/api/ +// +// See aws.Config documentation for more information on configuring SDK clients. +// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config +// +// See the AWS Security Token Service client STS for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/sts/#New +package sts diff --git a/vendor/github.com/aws/aws-sdk-go/service/sts/examples_test.go b/vendor/github.com/aws/aws-sdk-go/service/sts/examples_test.go index 05df494..d61a993 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sts/examples_test.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sts/examples_test.go @@ -3,178 +3,280 @@ package sts_test import ( - "bytes" "fmt" + "strings" "time" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/sts" ) var _ time.Duration -var _ bytes.Buffer +var _ strings.Reader +var _ aws.Config -func ExampleSTS_AssumeRole() { - sess := session.Must(session.NewSession()) - - svc := sts.New(sess) +func parseTime(layout, value string) *time.Time { + t, err := time.Parse(layout, value) + if err != nil { + panic(err) + } + return &t +} - params := &sts.AssumeRoleInput{ - RoleArn: aws.String("arnType"), // Required - RoleSessionName: aws.String("roleSessionNameType"), // Required - DurationSeconds: aws.Int64(1), - ExternalId: aws.String("externalIdType"), - Policy: aws.String("sessionPolicyDocumentType"), - SerialNumber: aws.String("serialNumberType"), - TokenCode: aws.String("tokenCodeType"), +// To assume a role +// + +func ExampleSTS_AssumeRole_shared00() { + svc := sts.New(session.New()) + input := &sts.AssumeRoleInput{ + DurationSeconds: aws.Int64(3600), + ExternalId: aws.String("123ABC"), + Policy: aws.String("{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"Stmt1\",\"Effect\":\"Allow\",\"Action\":\"s3:*\",\"Resource\":\"*\"}]}"), + RoleArn: aws.String("arn:aws:iam::123456789012:role/demo"), + RoleSessionName: aws.String("Bob"), } - resp, err := svc.AssumeRole(params) + result, err := svc.AssumeRole(input) if err != nil { - // Print the error, cast err to awserr.Error to get the Code and - // Message from an error. - fmt.Println(err.Error()) + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case sts.ErrCodeMalformedPolicyDocumentException: + fmt.Println(sts.ErrCodeMalformedPolicyDocumentException, aerr.Error()) + case sts.ErrCodePackedPolicyTooLargeException: + fmt.Println(sts.ErrCodePackedPolicyTooLargeException, aerr.Error()) + case sts.ErrCodeRegionDisabledException: + fmt.Println(sts.ErrCodeRegionDisabledException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } return } - // Pretty-print the response data. - fmt.Println(resp) + fmt.Println(result) } -func ExampleSTS_AssumeRoleWithSAML() { - sess := session.Must(session.NewSession()) - - svc := sts.New(sess) - - params := &sts.AssumeRoleWithSAMLInput{ - PrincipalArn: aws.String("arnType"), // Required - RoleArn: aws.String("arnType"), // Required - SAMLAssertion: aws.String("SAMLAssertionType"), // Required - DurationSeconds: aws.Int64(1), - Policy: aws.String("sessionPolicyDocumentType"), +// To assume a role as an OpenID Connect-federated user +// + +func ExampleSTS_AssumeRoleWithWebIdentity_shared00() { + svc := sts.New(session.New()) + input := &sts.AssumeRoleWithWebIdentityInput{ + DurationSeconds: aws.Int64(3600), + ProviderId: aws.String("www.amazon.com"), + RoleArn: aws.String("arn:aws:iam::123456789012:role/FederatedWebIdentityRole"), + RoleSessionName: aws.String("app1"), + WebIdentityToken: aws.String("Atza%7CIQEBLjAsAhRFiXuWpUXuRvQ9PZL3GMFcYevydwIUFAHZwXZXXXXXXXXJnrulxKDHwy87oGKPznh0D6bEQZTSCzyoCtL_8S07pLpr0zMbn6w1lfVZKNTBdDansFBmtGnIsIapjI6xKR02Yc_2bQ8LZbUXSGm6Ry6_BG7PrtLZtj_dfCTj92xNGed-CrKqjG7nPBjNIL016GGvuS5gSvPRUxWES3VYfm1wl7WTI7jn-Pcb6M-buCgHhFOzTQxod27L9CqnOLio7N3gZAGpsp6n1-AJBOCJckcyXe2c6uD0srOJeZlKUm2eTDVMf8IehDVI0r1QOnTV6KzzAI3OY87Vd_cVMQ"), } - resp, err := svc.AssumeRoleWithSAML(params) + result, err := svc.AssumeRoleWithWebIdentity(input) if err != nil { - // Print the error, cast err to awserr.Error to get the Code and - // Message from an error. - fmt.Println(err.Error()) + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case sts.ErrCodeMalformedPolicyDocumentException: + fmt.Println(sts.ErrCodeMalformedPolicyDocumentException, aerr.Error()) + case sts.ErrCodePackedPolicyTooLargeException: + fmt.Println(sts.ErrCodePackedPolicyTooLargeException, aerr.Error()) + case sts.ErrCodeIDPRejectedClaimException: + fmt.Println(sts.ErrCodeIDPRejectedClaimException, aerr.Error()) + case sts.ErrCodeIDPCommunicationErrorException: + fmt.Println(sts.ErrCodeIDPCommunicationErrorException, aerr.Error()) + case sts.ErrCodeInvalidIdentityTokenException: + fmt.Println(sts.ErrCodeInvalidIdentityTokenException, aerr.Error()) + case sts.ErrCodeExpiredTokenException: + fmt.Println(sts.ErrCodeExpiredTokenException, aerr.Error()) + case sts.ErrCodeRegionDisabledException: + fmt.Println(sts.ErrCodeRegionDisabledException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } return } - // Pretty-print the response data. - fmt.Println(resp) + fmt.Println(result) } -func ExampleSTS_AssumeRoleWithWebIdentity() { - sess := session.Must(session.NewSession()) - - svc := sts.New(sess) +// To decode information about an authorization status of a request +// - params := &sts.AssumeRoleWithWebIdentityInput{ - RoleArn: aws.String("arnType"), // Required - RoleSessionName: aws.String("roleSessionNameType"), // Required - WebIdentityToken: aws.String("clientTokenType"), // Required - DurationSeconds: aws.Int64(1), - Policy: aws.String("sessionPolicyDocumentType"), - ProviderId: aws.String("urlType"), +func ExampleSTS_DecodeAuthorizationMessage_shared00() { + svc := sts.New(session.New()) + input := &sts.DecodeAuthorizationMessageInput{ + EncodedMessage: aws.String(""), } - resp, err := svc.AssumeRoleWithWebIdentity(params) + result, err := svc.DecodeAuthorizationMessage(input) if err != nil { - // Print the error, cast err to awserr.Error to get the Code and - // Message from an error. - fmt.Println(err.Error()) + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case sts.ErrCodeInvalidAuthorizationMessageException: + fmt.Println(sts.ErrCodeInvalidAuthorizationMessageException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } return } - // Pretty-print the response data. - fmt.Println(resp) + fmt.Println(result) } -func ExampleSTS_DecodeAuthorizationMessage() { - sess := session.Must(session.NewSession()) - - svc := sts.New(sess) - - params := &sts.DecodeAuthorizationMessageInput{ - EncodedMessage: aws.String("encodedMessageType"), // Required - } - resp, err := svc.DecodeAuthorizationMessage(params) +// To get details about a calling IAM user +// +// This example shows a request and response made with the credentials for a user named +// Alice in the AWS account 123456789012. +func ExampleSTS_GetCallerIdentity_shared00() { + svc := sts.New(session.New()) + input := &sts.GetCallerIdentityInput{} + result, err := svc.GetCallerIdentity(input) if err != nil { - // Print the error, cast err to awserr.Error to get the Code and - // Message from an error. - fmt.Println(err.Error()) + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } return } - // Pretty-print the response data. - fmt.Println(resp) + fmt.Println(result) } -func ExampleSTS_GetCallerIdentity() { - sess := session.Must(session.NewSession()) +// To get details about a calling user federated with AssumeRole +// +// This example shows a request and response made with temporary credentials created +// by AssumeRole. The name of the assumed role is my-role-name, and the RoleSessionName +// is set to my-role-session-name. +func ExampleSTS_GetCallerIdentity_shared01() { + svc := sts.New(session.New()) + input := &sts.GetCallerIdentityInput{} + + result, err := svc.GetCallerIdentity(input) + if err != nil { + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } + return + } - svc := sts.New(sess) + fmt.Println(result) +} - var params *sts.GetCallerIdentityInput - resp, err := svc.GetCallerIdentity(params) +// To get details about a calling user federated with GetFederationToken +// +// This example shows a request and response made with temporary credentials created +// by using GetFederationToken. The Name parameter is set to my-federated-user-name. +func ExampleSTS_GetCallerIdentity_shared02() { + svc := sts.New(session.New()) + input := &sts.GetCallerIdentityInput{} + result, err := svc.GetCallerIdentity(input) if err != nil { - // Print the error, cast err to awserr.Error to get the Code and - // Message from an error. - fmt.Println(err.Error()) + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } return } - // Pretty-print the response data. - fmt.Println(resp) + fmt.Println(result) } -func ExampleSTS_GetFederationToken() { - sess := session.Must(session.NewSession()) +// To get temporary credentials for a role by using GetFederationToken +// - svc := sts.New(sess) - - params := &sts.GetFederationTokenInput{ - Name: aws.String("userNameType"), // Required - DurationSeconds: aws.Int64(1), - Policy: aws.String("sessionPolicyDocumentType"), +func ExampleSTS_GetFederationToken_shared00() { + svc := sts.New(session.New()) + input := &sts.GetFederationTokenInput{ + DurationSeconds: aws.Int64(3600), + Name: aws.String("Bob"), + Policy: aws.String("{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"Stmt1\",\"Effect\":\"Allow\",\"Action\":\"s3:*\",\"Resource\":\"*\"}]}"), } - resp, err := svc.GetFederationToken(params) + result, err := svc.GetFederationToken(input) if err != nil { - // Print the error, cast err to awserr.Error to get the Code and - // Message from an error. - fmt.Println(err.Error()) + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case sts.ErrCodeMalformedPolicyDocumentException: + fmt.Println(sts.ErrCodeMalformedPolicyDocumentException, aerr.Error()) + case sts.ErrCodePackedPolicyTooLargeException: + fmt.Println(sts.ErrCodePackedPolicyTooLargeException, aerr.Error()) + case sts.ErrCodeRegionDisabledException: + fmt.Println(sts.ErrCodeRegionDisabledException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } return } - // Pretty-print the response data. - fmt.Println(resp) + fmt.Println(result) } -func ExampleSTS_GetSessionToken() { - sess := session.Must(session.NewSession()) - - svc := sts.New(sess) +// To get temporary credentials for an IAM user or an AWS account +// - params := &sts.GetSessionTokenInput{ - DurationSeconds: aws.Int64(1), - SerialNumber: aws.String("serialNumberType"), - TokenCode: aws.String("tokenCodeType"), +func ExampleSTS_GetSessionToken_shared00() { + svc := sts.New(session.New()) + input := &sts.GetSessionTokenInput{ + DurationSeconds: aws.Int64(3600), + SerialNumber: aws.String("YourMFASerialNumber"), + TokenCode: aws.String("123456"), } - resp, err := svc.GetSessionToken(params) + result, err := svc.GetSessionToken(input) if err != nil { - // Print the error, cast err to awserr.Error to get the Code and - // Message from an error. - fmt.Println(err.Error()) + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case sts.ErrCodeRegionDisabledException: + fmt.Println(sts.ErrCodeRegionDisabledException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } return } - // Pretty-print the response data. - fmt.Println(resp) + fmt.Println(result) } diff --git a/vendor/github.com/aws/aws-sdk-go/service/sts/service.go b/vendor/github.com/aws/aws-sdk-go/service/sts/service.go index be21838..15ab7b4 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sts/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sts/service.go @@ -11,54 +11,12 @@ import ( "github.com/aws/aws-sdk-go/private/protocol/query" ) -// The AWS Security Token Service (STS) is a web service that enables you to -// request temporary, limited-privilege credentials for AWS Identity and Access -// Management (IAM) users or for users that you authenticate (federated users). -// This guide provides descriptions of the STS API. For more detailed information -// about using this service, go to Temporary Security Credentials (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html). +// STS provides the API operation methods for making requests to +// AWS Security Token Service. See this package's package overview docs +// for details on the service. // -// As an alternative to using the API, you can use one of the AWS SDKs, which -// consist of libraries and sample code for various programming languages and -// platforms (Java, Ruby, .NET, iOS, Android, etc.). The SDKs provide a convenient -// way to create programmatic access to STS. For example, the SDKs take care -// of cryptographically signing requests, managing errors, and retrying requests -// automatically. For information about the AWS SDKs, including how to download -// and install them, see the Tools for Amazon Web Services page (http://aws.amazon.com/tools/). -// -// For information about setting up signatures and authorization through the -// API, go to Signing AWS API Requests (http://docs.aws.amazon.com/general/latest/gr/signing_aws_api_requests.html) -// in the AWS General Reference. For general information about the Query API, -// go to Making Query Requests (http://docs.aws.amazon.com/IAM/latest/UserGuide/IAM_UsingQueryAPI.html) -// in Using IAM. For information about using security tokens with other AWS -// products, go to AWS Services That Work with IAM (http://docs.aws.amazon.com/IAM/latest/UserGuide/reference_aws-services-that-work-with-iam.html) -// in the IAM User Guide. -// -// If you're new to AWS and need additional technical information about a specific -// AWS product, you can find the product's technical documentation at http://aws.amazon.com/documentation/ -// (http://aws.amazon.com/documentation/). -// -// Endpoints -// -// The AWS Security Token Service (STS) has a default endpoint of https://sts.amazonaws.com -// that maps to the US East (N. Virginia) region. Additional regions are available -// and are activated by default. For more information, see Activating and Deactivating -// AWS STS in an AWS Region (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html) -// in the IAM User Guide. -// -// For information about STS endpoints, see Regions and Endpoints (http://docs.aws.amazon.com/general/latest/gr/rande.html#sts_region) -// in the AWS General Reference. -// -// Recording API requests -// -// STS supports AWS CloudTrail, which is a service that records AWS calls for -// your AWS account and delivers log files to an Amazon S3 bucket. By using -// information collected by CloudTrail, you can determine what requests were -// successfully made to STS, who made the request, when it was made, and so -// on. To learn more about CloudTrail, including how to turn it on and find -// your log files, see the AWS CloudTrail User Guide (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/what_is_cloud_trail_top_level.html). -// The service client's operations are safe to be used concurrently. -// It is not safe to mutate any of the client's properties though. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15 +// STS methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. type STS struct { *client.Client } @@ -73,6 +31,7 @@ var initRequest func(*request.Request) const ( ServiceName = "sts" // Service endpoint prefix API calls made to. EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceID = "STS" // ServiceID is a unique identifer of a specific service ) // New creates a new instance of the STS client with a session. @@ -97,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, diff --git a/vendor/github.com/aws/aws-sdk-go/service/sts/stsiface/interface.go b/vendor/github.com/aws/aws-sdk-go/service/sts/stsiface/interface.go deleted file mode 100644 index 9953131..0000000 --- a/vendor/github.com/aws/aws-sdk-go/service/sts/stsiface/interface.go +++ /dev/null @@ -1,92 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package stsiface provides an interface to enable mocking the AWS Security Token Service service client -// for testing your code. -// -// It is important to note that this interface will have breaking changes -// when the service model is updated and adds new API operations, paginators, -// and waiters. -package stsiface - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/service/sts" -) - -// STSAPI provides an interface to enable mocking the -// sts.STS service client's API operation, -// paginators, and waiters. This make unit testing your code that calls out -// to the SDK's service client's calls easier. -// -// The best way to use this interface is so the SDK's service client's calls -// can be stubbed out for unit testing your code with the SDK without needing -// to inject custom request handlers into the the SDK's request pipeline. -// -// // myFunc uses an SDK service client to make a request to -// // AWS Security Token Service. -// func myFunc(svc stsiface.STSAPI) bool { -// // Make svc.AssumeRole request -// } -// -// func main() { -// sess := session.New() -// svc := sts.New(sess) -// -// myFunc(svc) -// } -// -// In your _test.go file: -// -// // Define a mock struct to be used in your unit tests of myFunc. -// type mockSTSClient struct { -// stsiface.STSAPI -// } -// func (m *mockSTSClient) AssumeRole(input *sts.AssumeRoleInput) (*sts.AssumeRoleOutput, error) { -// // mock response/functionality -// } -// -// func TestMyFunc(t *testing.T) { -// // Setup Test -// mockSvc := &mockSTSClient{} -// -// myfunc(mockSvc) -// -// // Verify myFunc's functionality -// } -// -// It is important to note that this interface will have breaking changes -// when the service model is updated and adds new API operations, paginators, -// and waiters. Its suggested to use the pattern above for testing, or using -// tooling to generate mocks to satisfy the interfaces. -type STSAPI interface { - AssumeRole(*sts.AssumeRoleInput) (*sts.AssumeRoleOutput, error) - AssumeRoleWithContext(aws.Context, *sts.AssumeRoleInput, ...request.Option) (*sts.AssumeRoleOutput, error) - AssumeRoleRequest(*sts.AssumeRoleInput) (*request.Request, *sts.AssumeRoleOutput) - - AssumeRoleWithSAML(*sts.AssumeRoleWithSAMLInput) (*sts.AssumeRoleWithSAMLOutput, error) - AssumeRoleWithSAMLWithContext(aws.Context, *sts.AssumeRoleWithSAMLInput, ...request.Option) (*sts.AssumeRoleWithSAMLOutput, error) - AssumeRoleWithSAMLRequest(*sts.AssumeRoleWithSAMLInput) (*request.Request, *sts.AssumeRoleWithSAMLOutput) - - AssumeRoleWithWebIdentity(*sts.AssumeRoleWithWebIdentityInput) (*sts.AssumeRoleWithWebIdentityOutput, error) - AssumeRoleWithWebIdentityWithContext(aws.Context, *sts.AssumeRoleWithWebIdentityInput, ...request.Option) (*sts.AssumeRoleWithWebIdentityOutput, error) - AssumeRoleWithWebIdentityRequest(*sts.AssumeRoleWithWebIdentityInput) (*request.Request, *sts.AssumeRoleWithWebIdentityOutput) - - DecodeAuthorizationMessage(*sts.DecodeAuthorizationMessageInput) (*sts.DecodeAuthorizationMessageOutput, error) - DecodeAuthorizationMessageWithContext(aws.Context, *sts.DecodeAuthorizationMessageInput, ...request.Option) (*sts.DecodeAuthorizationMessageOutput, error) - DecodeAuthorizationMessageRequest(*sts.DecodeAuthorizationMessageInput) (*request.Request, *sts.DecodeAuthorizationMessageOutput) - - GetCallerIdentity(*sts.GetCallerIdentityInput) (*sts.GetCallerIdentityOutput, error) - GetCallerIdentityWithContext(aws.Context, *sts.GetCallerIdentityInput, ...request.Option) (*sts.GetCallerIdentityOutput, error) - GetCallerIdentityRequest(*sts.GetCallerIdentityInput) (*request.Request, *sts.GetCallerIdentityOutput) - - GetFederationToken(*sts.GetFederationTokenInput) (*sts.GetFederationTokenOutput, error) - GetFederationTokenWithContext(aws.Context, *sts.GetFederationTokenInput, ...request.Option) (*sts.GetFederationTokenOutput, error) - GetFederationTokenRequest(*sts.GetFederationTokenInput) (*request.Request, *sts.GetFederationTokenOutput) - - GetSessionToken(*sts.GetSessionTokenInput) (*sts.GetSessionTokenOutput, error) - GetSessionTokenWithContext(aws.Context, *sts.GetSessionTokenInput, ...request.Option) (*sts.GetSessionTokenOutput, error) - GetSessionTokenRequest(*sts.GetSessionTokenInput) (*request.Request, *sts.GetSessionTokenOutput) -} - -var _ STSAPI = (*sts.STS)(nil) diff --git a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/.gitignore b/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/.gitignore deleted file mode 100644 index c5203bf..0000000 --- a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -testdata/conf_out.ini -ini.sublime-project -ini.sublime-workspace -testdata/conf_reflect.ini -.idea diff --git a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/.travis.yml b/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/.travis.yml deleted file mode 100644 index 65c872b..0000000 --- a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -sudo: false -language: go -go: - - 1.4.x - - 1.5.x - - 1.6.x - - 1.7.x - - master - -script: - - go get golang.org/x/tools/cmd/cover - - go get github.com/smartystreets/goconvey - - go test -v -cover -race - -notifications: - email: - - u@gogs.io diff --git a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/LICENSE b/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/LICENSE deleted file mode 100644 index 37ec93a..0000000 --- a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ -Apache License -Version 2.0, January 2004 -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and -distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright -owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities -that control, are controlled by, or are under common control with that entity. -For the purposes of this definition, "control" means (i) the power, direct or -indirect, to cause the direction or management of such entity, whether by -contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the -outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising -permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including -but not limited to software source code, documentation source, and configuration -files. - -"Object" form shall mean any form resulting from mechanical transformation or -translation of a Source form, including but not limited to compiled object code, -generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made -available under the License, as indicated by a copyright notice that is included -in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that -is based on (or derived from) the Work and for which the editorial revisions, -annotations, elaborations, or other modifications represent, as a whole, an -original work of authorship. For the purposes of this License, Derivative Works -shall not include works that remain separable from, or merely link (or bind by -name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version -of the Work and any modifications or additions to that Work or Derivative Works -thereof, that is intentionally submitted to Licensor for inclusion in the Work -by the copyright owner or by an individual or Legal Entity authorized to submit -on behalf of the copyright owner. For the purposes of this definition, -"submitted" means any form of electronic, verbal, or written communication sent -to the Licensor or its representatives, including but not limited to -communication on electronic mailing lists, source code control systems, and -issue tracking systems that are managed by, or on behalf of, the Licensor for -the purpose of discussing and improving the Work, but excluding communication -that is conspicuously marked or otherwise designated in writing by the copyright -owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf -of whom a Contribution has been received by Licensor and subsequently -incorporated within the Work. - -2. Grant of Copyright License. - -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable copyright license to reproduce, prepare Derivative Works of, -publicly display, publicly perform, sublicense, and distribute the Work and such -Derivative Works in Source or Object form. - -3. Grant of Patent License. - -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable (except as stated in this section) patent license to make, have -made, use, offer to sell, sell, import, and otherwise transfer the Work, where -such license applies only to those patent claims licensable by such Contributor -that are necessarily infringed by their Contribution(s) alone or by combination -of their Contribution(s) with the Work to which such Contribution(s) was -submitted. If You institute patent litigation against any entity (including a -cross-claim or counterclaim in a lawsuit) alleging that the Work or a -Contribution incorporated within the Work constitutes direct or contributory -patent infringement, then any patent licenses granted to You under this License -for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. - -You may reproduce and distribute copies of the Work or Derivative Works thereof -in any medium, with or without modifications, and in Source or Object form, -provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of -this License; and -You must cause any modified files to carry prominent notices stating that You -changed the files; and -You must retain, in the Source form of any Derivative Works that You distribute, -all copyright, patent, trademark, and attribution notices from the Source form -of the Work, excluding those notices that do not pertain to any part of the -Derivative Works; and -If the Work includes a "NOTICE" text file as part of its distribution, then any -Derivative Works that You distribute must include a readable copy of the -attribution notices contained within such NOTICE file, excluding those notices -that do not pertain to any part of the Derivative Works, in at least one of the -following places: within a NOTICE text file distributed as part of the -Derivative Works; within the Source form or documentation, if provided along -with the Derivative Works; or, within a display generated by the Derivative -Works, if and wherever such third-party notices normally appear. The contents of -the NOTICE file are for informational purposes only and do not modify the -License. You may add Your own attribution notices within Derivative Works that -You distribute, alongside or as an addendum to the NOTICE text from the Work, -provided that such additional attribution notices cannot be construed as -modifying the License. -You may add Your own copyright statement to Your modifications and may provide -additional or different license terms and conditions for use, reproduction, or -distribution of Your modifications, or for any such Derivative Works as a whole, -provided Your use, reproduction, and distribution of the Work otherwise complies -with the conditions stated in this License. - -5. Submission of Contributions. - -Unless You explicitly state otherwise, any Contribution intentionally submitted -for inclusion in the Work by You to the Licensor shall be under the terms and -conditions of this License, without any additional terms or conditions. -Notwithstanding the above, nothing herein shall supersede or modify the terms of -any separate license agreement you may have executed with Licensor regarding -such Contributions. - -6. Trademarks. - -This License does not grant permission to use the trade names, trademarks, -service marks, or product names of the Licensor, except as required for -reasonable and customary use in describing the origin of the Work and -reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. - -Unless required by applicable law or agreed to in writing, Licensor provides the -Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, -including, without limitation, any warranties or conditions of TITLE, -NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are -solely responsible for determining the appropriateness of using or -redistributing the Work and assume any risks associated with Your exercise of -permissions under this License. - -8. Limitation of Liability. - -In no event and under no legal theory, whether in tort (including negligence), -contract, or otherwise, unless required by applicable law (such as deliberate -and grossly negligent acts) or agreed to in writing, shall any Contributor be -liable to You for damages, including any direct, indirect, special, incidental, -or consequential damages of any character arising as a result of this License or -out of the use or inability to use the Work (including but not limited to -damages for loss of goodwill, work stoppage, computer failure or malfunction, or -any and all other commercial damages or losses), even if such Contributor has -been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. - -While redistributing the Work or Derivative Works thereof, You may choose to -offer, and charge a fee for, acceptance of support, warranty, indemnity, or -other liability obligations and/or rights consistent with this License. However, -in accepting such obligations, You may act only on Your own behalf and on Your -sole responsibility, not on behalf of any other Contributor, and only if You -agree to indemnify, defend, and hold each Contributor harmless for any liability -incurred by, or claims asserted against, such Contributor by reason of your -accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work - -To apply the Apache License to your work, attach the following boilerplate -notice, with the fields enclosed by brackets "[]" replaced with your own -identifying information. (Don't include the brackets!) The text should be -enclosed in the appropriate comment syntax for the file format. We also -recommend that a file or class name and description of purpose be included on -the same "printed page" as the copyright notice for easier identification within -third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/README.md b/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/README.md deleted file mode 100644 index 8594742..0000000 --- a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/README.md +++ /dev/null @@ -1,740 +0,0 @@ -INI [![Build Status](https://travis-ci.org/go-ini/ini.svg?branch=master)](https://travis-ci.org/go-ini/ini) [![Sourcegraph](https://sourcegraph.com/github.com/go-ini/ini/-/badge.svg)](https://sourcegraph.com/github.com/go-ini/ini?badge) -=== - -![](https://avatars0.githubusercontent.com/u/10216035?v=3&s=200) - -Package ini provides INI file read and write functionality in Go. - -[简体中文](README_ZH.md) - -## Feature - -- Load multiple data sources(`[]byte`, file and `io.ReadCloser`) with overwrites. -- Read with recursion values. -- Read with parent-child sections. -- Read with auto-increment key names. -- Read with multiple-line values. -- Read with tons of helper methods. -- Read and convert values to Go types. -- Read and **WRITE** comments of sections and keys. -- Manipulate sections, keys and comments with ease. -- Keep sections and keys in order as you parse and save. - -## Installation - -To use a tagged revision: - - go get gopkg.in/ini.v1 - -To use with latest changes: - - go get github.com/go-ini/ini - -Please add `-u` flag to update in the future. - -### Testing - -If you want to test on your machine, please apply `-t` flag: - - go get -t gopkg.in/ini.v1 - -Please add `-u` flag to update in the future. - -## Getting Started - -### Loading from data sources - -A **Data Source** is either raw data in type `[]byte`, a file name with type `string` or `io.ReadCloser`. You can load **as many data sources as you want**. Passing other types will simply return an error. - -```go -cfg, err := ini.Load([]byte("raw data"), "filename", ioutil.NopCloser(bytes.NewReader([]byte("some other data")))) -``` - -Or start with an empty object: - -```go -cfg := ini.Empty() -``` - -When you cannot decide how many data sources to load at the beginning, you will still be able to **Append()** them later. - -```go -err := cfg.Append("other file", []byte("other raw data")) -``` - -If you have a list of files with possibilities that some of them may not available at the time, and you don't know exactly which ones, you can use `LooseLoad` to ignore nonexistent files without returning error. - -```go -cfg, err := ini.LooseLoad("filename", "filename_404") -``` - -The cool thing is, whenever the file is available to load while you're calling `Reload` method, it will be counted as usual. - -#### Ignore cases of key name - -When you do not care about cases of section and key names, you can use `InsensitiveLoad` to force all names to be lowercased while parsing. - -```go -cfg, err := ini.InsensitiveLoad("filename") -//... - -// sec1 and sec2 are the exactly same section object -sec1, err := cfg.GetSection("Section") -sec2, err := cfg.GetSection("SecTIOn") - -// key1 and key2 are the exactly same key object -key1, err := cfg.GetKey("Key") -key2, err := cfg.GetKey("KeY") -``` - -#### MySQL-like boolean key - -MySQL's configuration allows a key without value as follows: - -```ini -[mysqld] -... -skip-host-cache -skip-name-resolve -``` - -By default, this is considered as missing value. But if you know you're going to deal with those cases, you can assign advanced load options: - -```go -cfg, err := LoadSources(LoadOptions{AllowBooleanKeys: true}, "my.cnf")) -``` - -The value of those keys are always `true`, and when you save to a file, it will keep in the same foramt as you read. - -To generate such keys in your program, you could use `NewBooleanKey`: - -```go -key, err := sec.NewBooleanKey("skip-host-cache") -``` - -#### Comment - -Take care that following format will be treated as comment: - -1. Line begins with `#` or `;` -2. Words after `#` or `;` -3. Words after section name (i.e words after `[some section name]`) - -If you want to save a value with `#` or `;`, please quote them with ``` ` ``` or ``` """ ```. - -### Working with sections - -To get a section, you would need to: - -```go -section, err := cfg.GetSection("section name") -``` - -For a shortcut for default section, just give an empty string as name: - -```go -section, err := cfg.GetSection("") -``` - -When you're pretty sure the section exists, following code could make your life easier: - -```go -section := cfg.Section("section name") -``` - -What happens when the section somehow does not exist? Don't panic, it automatically creates and returns a new section to you. - -To create a new section: - -```go -err := cfg.NewSection("new section") -``` - -To get a list of sections or section names: - -```go -sections := cfg.Sections() -names := cfg.SectionStrings() -``` - -### Working with keys - -To get a key under a section: - -```go -key, err := cfg.Section("").GetKey("key name") -``` - -Same rule applies to key operations: - -```go -key := cfg.Section("").Key("key name") -``` - -To check if a key exists: - -```go -yes := cfg.Section("").HasKey("key name") -``` - -To create a new key: - -```go -err := cfg.Section("").NewKey("name", "value") -``` - -To get a list of keys or key names: - -```go -keys := cfg.Section("").Keys() -names := cfg.Section("").KeyStrings() -``` - -To get a clone hash of keys and corresponding values: - -```go -hash := cfg.Section("").KeysHash() -``` - -### Working with values - -To get a string value: - -```go -val := cfg.Section("").Key("key name").String() -``` - -To validate key value on the fly: - -```go -val := cfg.Section("").Key("key name").Validate(func(in string) string { - if len(in) == 0 { - return "default" - } - return in -}) -``` - -If you do not want any auto-transformation (such as recursive read) for the values, you can get raw value directly (this way you get much better performance): - -```go -val := cfg.Section("").Key("key name").Value() -``` - -To check if raw value exists: - -```go -yes := cfg.Section("").HasValue("test value") -``` - -To get value with types: - -```go -// For boolean values: -// true when value is: 1, t, T, TRUE, true, True, YES, yes, Yes, y, ON, on, On -// false when value is: 0, f, F, FALSE, false, False, NO, no, No, n, OFF, off, Off -v, err = cfg.Section("").Key("BOOL").Bool() -v, err = cfg.Section("").Key("FLOAT64").Float64() -v, err = cfg.Section("").Key("INT").Int() -v, err = cfg.Section("").Key("INT64").Int64() -v, err = cfg.Section("").Key("UINT").Uint() -v, err = cfg.Section("").Key("UINT64").Uint64() -v, err = cfg.Section("").Key("TIME").TimeFormat(time.RFC3339) -v, err = cfg.Section("").Key("TIME").Time() // RFC3339 - -v = cfg.Section("").Key("BOOL").MustBool() -v = cfg.Section("").Key("FLOAT64").MustFloat64() -v = cfg.Section("").Key("INT").MustInt() -v = cfg.Section("").Key("INT64").MustInt64() -v = cfg.Section("").Key("UINT").MustUint() -v = cfg.Section("").Key("UINT64").MustUint64() -v = cfg.Section("").Key("TIME").MustTimeFormat(time.RFC3339) -v = cfg.Section("").Key("TIME").MustTime() // RFC3339 - -// Methods start with Must also accept one argument for default value -// when key not found or fail to parse value to given type. -// Except method MustString, which you have to pass a default value. - -v = cfg.Section("").Key("String").MustString("default") -v = cfg.Section("").Key("BOOL").MustBool(true) -v = cfg.Section("").Key("FLOAT64").MustFloat64(1.25) -v = cfg.Section("").Key("INT").MustInt(10) -v = cfg.Section("").Key("INT64").MustInt64(99) -v = cfg.Section("").Key("UINT").MustUint(3) -v = cfg.Section("").Key("UINT64").MustUint64(6) -v = cfg.Section("").Key("TIME").MustTimeFormat(time.RFC3339, time.Now()) -v = cfg.Section("").Key("TIME").MustTime(time.Now()) // RFC3339 -``` - -What if my value is three-line long? - -```ini -[advance] -ADDRESS = """404 road, -NotFound, State, 5000 -Earth""" -``` - -Not a problem! - -```go -cfg.Section("advance").Key("ADDRESS").String() - -/* --- start --- -404 road, -NotFound, State, 5000 -Earth ------- end --- */ -``` - -That's cool, how about continuation lines? - -```ini -[advance] -two_lines = how about \ - continuation lines? -lots_of_lines = 1 \ - 2 \ - 3 \ - 4 -``` - -Piece of cake! - -```go -cfg.Section("advance").Key("two_lines").String() // how about continuation lines? -cfg.Section("advance").Key("lots_of_lines").String() // 1 2 3 4 -``` - -Well, I hate continuation lines, how do I disable that? - -```go -cfg, err := ini.LoadSources(ini.LoadOptions{ - IgnoreContinuation: true, -}, "filename") -``` - -Holy crap! - -Note that single quotes around values will be stripped: - -```ini -foo = "some value" // foo: some value -bar = 'some value' // bar: some value -``` - -That's all? Hmm, no. - -#### Helper methods of working with values - -To get value with given candidates: - -```go -v = cfg.Section("").Key("STRING").In("default", []string{"str", "arr", "types"}) -v = cfg.Section("").Key("FLOAT64").InFloat64(1.1, []float64{1.25, 2.5, 3.75}) -v = cfg.Section("").Key("INT").InInt(5, []int{10, 20, 30}) -v = cfg.Section("").Key("INT64").InInt64(10, []int64{10, 20, 30}) -v = cfg.Section("").Key("UINT").InUint(4, []int{3, 6, 9}) -v = cfg.Section("").Key("UINT64").InUint64(8, []int64{3, 6, 9}) -v = cfg.Section("").Key("TIME").InTimeFormat(time.RFC3339, time.Now(), []time.Time{time1, time2, time3}) -v = cfg.Section("").Key("TIME").InTime(time.Now(), []time.Time{time1, time2, time3}) // RFC3339 -``` - -Default value will be presented if value of key is not in candidates you given, and default value does not need be one of candidates. - -To validate value in a given range: - -```go -vals = cfg.Section("").Key("FLOAT64").RangeFloat64(0.0, 1.1, 2.2) -vals = cfg.Section("").Key("INT").RangeInt(0, 10, 20) -vals = cfg.Section("").Key("INT64").RangeInt64(0, 10, 20) -vals = cfg.Section("").Key("UINT").RangeUint(0, 3, 9) -vals = cfg.Section("").Key("UINT64").RangeUint64(0, 3, 9) -vals = cfg.Section("").Key("TIME").RangeTimeFormat(time.RFC3339, time.Now(), minTime, maxTime) -vals = cfg.Section("").Key("TIME").RangeTime(time.Now(), minTime, maxTime) // RFC3339 -``` - -##### Auto-split values into a slice - -To use zero value of type for invalid inputs: - -```go -// Input: 1.1, 2.2, 3.3, 4.4 -> [1.1 2.2 3.3 4.4] -// Input: how, 2.2, are, you -> [0.0 2.2 0.0 0.0] -vals = cfg.Section("").Key("STRINGS").Strings(",") -vals = cfg.Section("").Key("FLOAT64S").Float64s(",") -vals = cfg.Section("").Key("INTS").Ints(",") -vals = cfg.Section("").Key("INT64S").Int64s(",") -vals = cfg.Section("").Key("UINTS").Uints(",") -vals = cfg.Section("").Key("UINT64S").Uint64s(",") -vals = cfg.Section("").Key("TIMES").Times(",") -``` - -To exclude invalid values out of result slice: - -```go -// Input: 1.1, 2.2, 3.3, 4.4 -> [1.1 2.2 3.3 4.4] -// Input: how, 2.2, are, you -> [2.2] -vals = cfg.Section("").Key("FLOAT64S").ValidFloat64s(",") -vals = cfg.Section("").Key("INTS").ValidInts(",") -vals = cfg.Section("").Key("INT64S").ValidInt64s(",") -vals = cfg.Section("").Key("UINTS").ValidUints(",") -vals = cfg.Section("").Key("UINT64S").ValidUint64s(",") -vals = cfg.Section("").Key("TIMES").ValidTimes(",") -``` - -Or to return nothing but error when have invalid inputs: - -```go -// Input: 1.1, 2.2, 3.3, 4.4 -> [1.1 2.2 3.3 4.4] -// Input: how, 2.2, are, you -> error -vals = cfg.Section("").Key("FLOAT64S").StrictFloat64s(",") -vals = cfg.Section("").Key("INTS").StrictInts(",") -vals = cfg.Section("").Key("INT64S").StrictInt64s(",") -vals = cfg.Section("").Key("UINTS").StrictUints(",") -vals = cfg.Section("").Key("UINT64S").StrictUint64s(",") -vals = cfg.Section("").Key("TIMES").StrictTimes(",") -``` - -### Save your configuration - -Finally, it's time to save your configuration to somewhere. - -A typical way to save configuration is writing it to a file: - -```go -// ... -err = cfg.SaveTo("my.ini") -err = cfg.SaveToIndent("my.ini", "\t") -``` - -Another way to save is writing to a `io.Writer` interface: - -```go -// ... -cfg.WriteTo(writer) -cfg.WriteToIndent(writer, "\t") -``` - -By default, spaces are used to align "=" sign between key and values, to disable that: - -```go -ini.PrettyFormat = false -``` - -## Advanced Usage - -### Recursive Values - -For all value of keys, there is a special syntax `%()s`, where `` is the key name in same section or default section, and `%()s` will be replaced by corresponding value(empty string if key not found). You can use this syntax at most 99 level of recursions. - -```ini -NAME = ini - -[author] -NAME = Unknwon -GITHUB = https://github.com/%(NAME)s - -[package] -FULL_NAME = github.com/go-ini/%(NAME)s -``` - -```go -cfg.Section("author").Key("GITHUB").String() // https://github.com/Unknwon -cfg.Section("package").Key("FULL_NAME").String() // github.com/go-ini/ini -``` - -### Parent-child Sections - -You can use `.` in section name to indicate parent-child relationship between two or more sections. If the key not found in the child section, library will try again on its parent section until there is no parent section. - -```ini -NAME = ini -VERSION = v1 -IMPORT_PATH = gopkg.in/%(NAME)s.%(VERSION)s - -[package] -CLONE_URL = https://%(IMPORT_PATH)s - -[package.sub] -``` - -```go -cfg.Section("package.sub").Key("CLONE_URL").String() // https://gopkg.in/ini.v1 -``` - -#### Retrieve parent keys available to a child section - -```go -cfg.Section("package.sub").ParentKeys() // ["CLONE_URL"] -``` - -### Unparseable Sections - -Sometimes, you have sections that do not contain key-value pairs but raw content, to handle such case, you can use `LoadOptions.UnparsableSections`: - -```go -cfg, err := LoadSources(LoadOptions{UnparseableSections: []string{"COMMENTS"}}, `[COMMENTS] -<1> This slide has the fuel listed in the wrong units `)) - -body := cfg.Section("COMMENTS").Body() - -/* --- start --- -<1> This slide has the fuel listed in the wrong units ------- end --- */ -``` - -### Auto-increment Key Names - -If key name is `-` in data source, then it would be seen as special syntax for auto-increment key name start from 1, and every section is independent on counter. - -```ini -[features] --: Support read/write comments of keys and sections --: Support auto-increment of key names --: Support load multiple files to overwrite key values -``` - -```go -cfg.Section("features").KeyStrings() // []{"#1", "#2", "#3"} -``` - -### Map To Struct - -Want more objective way to play with INI? Cool. - -```ini -Name = Unknwon -age = 21 -Male = true -Born = 1993-01-01T20:17:05Z - -[Note] -Content = Hi is a good man! -Cities = HangZhou, Boston -``` - -```go -type Note struct { - Content string - Cities []string -} - -type Person struct { - Name string - Age int `ini:"age"` - Male bool - Born time.Time - Note - Created time.Time `ini:"-"` -} - -func main() { - cfg, err := ini.Load("path/to/ini") - // ... - p := new(Person) - err = cfg.MapTo(p) - // ... - - // Things can be simpler. - err = ini.MapTo(p, "path/to/ini") - // ... - - // Just map a section? Fine. - n := new(Note) - err = cfg.Section("Note").MapTo(n) - // ... -} -``` - -Can I have default value for field? Absolutely. - -Assign it before you map to struct. It will keep the value as it is if the key is not presented or got wrong type. - -```go -// ... -p := &Person{ - Name: "Joe", -} -// ... -``` - -It's really cool, but what's the point if you can't give me my file back from struct? - -### Reflect From Struct - -Why not? - -```go -type Embeded struct { - Dates []time.Time `delim:"|"` - Places []string `ini:"places,omitempty"` - None []int `ini:",omitempty"` -} - -type Author struct { - Name string `ini:"NAME"` - Male bool - Age int - GPA float64 - NeverMind string `ini:"-"` - *Embeded -} - -func main() { - a := &Author{"Unknwon", true, 21, 2.8, "", - &Embeded{ - []time.Time{time.Now(), time.Now()}, - []string{"HangZhou", "Boston"}, - []int{}, - }} - cfg := ini.Empty() - err = ini.ReflectFrom(cfg, a) - // ... -} -``` - -So, what do I get? - -```ini -NAME = Unknwon -Male = true -Age = 21 -GPA = 2.8 - -[Embeded] -Dates = 2015-08-07T22:14:22+08:00|2015-08-07T22:14:22+08:00 -places = HangZhou,Boston -``` - -#### Name Mapper - -To save your time and make your code cleaner, this library supports [`NameMapper`](https://gowalker.org/gopkg.in/ini.v1#NameMapper) between struct field and actual section and key name. - -There are 2 built-in name mappers: - -- `AllCapsUnderscore`: it converts to format `ALL_CAPS_UNDERSCORE` then match section or key. -- `TitleUnderscore`: it converts to format `title_underscore` then match section or key. - -To use them: - -```go -type Info struct { - PackageName string -} - -func main() { - err = ini.MapToWithMapper(&Info{}, ini.TitleUnderscore, []byte("package_name=ini")) - // ... - - cfg, err := ini.Load([]byte("PACKAGE_NAME=ini")) - // ... - info := new(Info) - cfg.NameMapper = ini.AllCapsUnderscore - err = cfg.MapTo(info) - // ... -} -``` - -Same rules of name mapper apply to `ini.ReflectFromWithMapper` function. - -#### Value Mapper - -To expand values (e.g. from environment variables), you can use the `ValueMapper` to transform values: - -```go -type Env struct { - Foo string `ini:"foo"` -} - -func main() { - cfg, err := ini.Load([]byte("[env]\nfoo = ${MY_VAR}\n") - cfg.ValueMapper = os.ExpandEnv - // ... - env := &Env{} - err = cfg.Section("env").MapTo(env) -} -``` - -This would set the value of `env.Foo` to the value of the environment variable `MY_VAR`. - -#### Other Notes On Map/Reflect - -Any embedded struct is treated as a section by default, and there is no automatic parent-child relations in map/reflect feature: - -```go -type Child struct { - Age string -} - -type Parent struct { - Name string - Child -} - -type Config struct { - City string - Parent -} -``` - -Example configuration: - -```ini -City = Boston - -[Parent] -Name = Unknwon - -[Child] -Age = 21 -``` - -What if, yes, I'm paranoid, I want embedded struct to be in the same section. Well, all roads lead to Rome. - -```go -type Child struct { - Age string -} - -type Parent struct { - Name string - Child `ini:"Parent"` -} - -type Config struct { - City string - Parent -} -``` - -Example configuration: - -```ini -City = Boston - -[Parent] -Name = Unknwon -Age = 21 -``` - -## Getting Help - -- [API Documentation](https://gowalker.org/gopkg.in/ini.v1) -- [File An Issue](https://github.com/go-ini/ini/issues/new) - -## FAQs - -### What does `BlockMode` field do? - -By default, library lets you read and write values so we need a locker to make sure your data is safe. But in cases that you are very sure about only reading data through the library, you can set `cfg.BlockMode = false` to speed up read operations about **50-70%** faster. - -### Why another INI library? - -Many people are using my another INI library [goconfig](https://github.com/Unknwon/goconfig), so the reason for this one is I would like to make more Go style code. Also when you set `cfg.BlockMode = false`, this one is about **10-30%** faster. - -To make those changes I have to confirm API broken, so it's safer to keep it in another place and start using `gopkg.in` to version my package at this time.(PS: shorter import path) - -## License - -This project is under Apache v2 License. See the [LICENSE](LICENSE) file for the full license text. diff --git a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/README_ZH.md b/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/README_ZH.md deleted file mode 100644 index 163432d..0000000 --- a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/README_ZH.md +++ /dev/null @@ -1,727 +0,0 @@ -本包提供了 Go 语言中读写 INI 文件的功能。 - -## 功能特性 - -- 支持覆盖加载多个数据源(`[]byte`、文件和 `io.ReadCloser`) -- 支持递归读取键值 -- 支持读取父子分区 -- 支持读取自增键名 -- 支持读取多行的键值 -- 支持大量辅助方法 -- 支持在读取时直接转换为 Go 语言类型 -- 支持读取和 **写入** 分区和键的注释 -- 轻松操作分区、键值和注释 -- 在保存文件时分区和键值会保持原有的顺序 - -## 下载安装 - -使用一个特定版本: - - go get gopkg.in/ini.v1 - -使用最新版: - - go get github.com/go-ini/ini - -如需更新请添加 `-u` 选项。 - -### 测试安装 - -如果您想要在自己的机器上运行测试,请使用 `-t` 标记: - - go get -t gopkg.in/ini.v1 - -如需更新请添加 `-u` 选项。 - -## 开始使用 - -### 从数据源加载 - -一个 **数据源** 可以是 `[]byte` 类型的原始数据,`string` 类型的文件路径或 `io.ReadCloser`。您可以加载 **任意多个** 数据源。如果您传递其它类型的数据源,则会直接返回错误。 - -```go -cfg, err := ini.Load([]byte("raw data"), "filename", ioutil.NopCloser(bytes.NewReader([]byte("some other data")))) -``` - -或者从一个空白的文件开始: - -```go -cfg := ini.Empty() -``` - -当您在一开始无法决定需要加载哪些数据源时,仍可以使用 **Append()** 在需要的时候加载它们。 - -```go -err := cfg.Append("other file", []byte("other raw data")) -``` - -当您想要加载一系列文件,但是不能够确定其中哪些文件是不存在的,可以通过调用函数 `LooseLoad` 来忽略它们(`Load` 会因为文件不存在而返回错误): - -```go -cfg, err := ini.LooseLoad("filename", "filename_404") -``` - -更牛逼的是,当那些之前不存在的文件在重新调用 `Reload` 方法的时候突然出现了,那么它们会被正常加载。 - -#### 忽略键名的大小写 - -有时候分区和键的名称大小写混合非常烦人,这个时候就可以通过 `InsensitiveLoad` 将所有分区和键名在读取里强制转换为小写: - -```go -cfg, err := ini.InsensitiveLoad("filename") -//... - -// sec1 和 sec2 指向同一个分区对象 -sec1, err := cfg.GetSection("Section") -sec2, err := cfg.GetSection("SecTIOn") - -// key1 和 key2 指向同一个键对象 -key1, err := cfg.GetKey("Key") -key2, err := cfg.GetKey("KeY") -``` - -#### 类似 MySQL 配置中的布尔值键 - -MySQL 的配置文件中会出现没有具体值的布尔类型的键: - -```ini -[mysqld] -... -skip-host-cache -skip-name-resolve -``` - -默认情况下这被认为是缺失值而无法完成解析,但可以通过高级的加载选项对它们进行处理: - -```go -cfg, err := LoadSources(LoadOptions{AllowBooleanKeys: true}, "my.cnf")) -``` - -这些键的值永远为 `true`,且在保存到文件时也只会输出键名。 - -如果您想要通过程序来生成此类键,则可以使用 `NewBooleanKey`: - -```go -key, err := sec.NewBooleanKey("skip-host-cache") -``` - -#### 关于注释 - -下述几种情况的内容将被视为注释: - -1. 所有以 `#` 或 `;` 开头的行 -2. 所有在 `#` 或 `;` 之后的内容 -3. 分区标签后的文字 (即 `[分区名]` 之后的内容) - -如果你希望使用包含 `#` 或 `;` 的值,请使用 ``` ` ``` 或 ``` """ ``` 进行包覆。 - -### 操作分区(Section) - -获取指定分区: - -```go -section, err := cfg.GetSection("section name") -``` - -如果您想要获取默认分区,则可以用空字符串代替分区名: - -```go -section, err := cfg.GetSection("") -``` - -当您非常确定某个分区是存在的,可以使用以下简便方法: - -```go -section := cfg.Section("section name") -``` - -如果不小心判断错了,要获取的分区其实是不存在的,那会发生什么呢?没事的,它会自动创建并返回一个对应的分区对象给您。 - -创建一个分区: - -```go -err := cfg.NewSection("new section") -``` - -获取所有分区对象或名称: - -```go -sections := cfg.Sections() -names := cfg.SectionStrings() -``` - -### 操作键(Key) - -获取某个分区下的键: - -```go -key, err := cfg.Section("").GetKey("key name") -``` - -和分区一样,您也可以直接获取键而忽略错误处理: - -```go -key := cfg.Section("").Key("key name") -``` - -判断某个键是否存在: - -```go -yes := cfg.Section("").HasKey("key name") -``` - -创建一个新的键: - -```go -err := cfg.Section("").NewKey("name", "value") -``` - -获取分区下的所有键或键名: - -```go -keys := cfg.Section("").Keys() -names := cfg.Section("").KeyStrings() -``` - -获取分区下的所有键值对的克隆: - -```go -hash := cfg.Section("").KeysHash() -``` - -### 操作键值(Value) - -获取一个类型为字符串(string)的值: - -```go -val := cfg.Section("").Key("key name").String() -``` - -获取值的同时通过自定义函数进行处理验证: - -```go -val := cfg.Section("").Key("key name").Validate(func(in string) string { - if len(in) == 0 { - return "default" - } - return in -}) -``` - -如果您不需要任何对值的自动转变功能(例如递归读取),可以直接获取原值(这种方式性能最佳): - -```go -val := cfg.Section("").Key("key name").Value() -``` - -判断某个原值是否存在: - -```go -yes := cfg.Section("").HasValue("test value") -``` - -获取其它类型的值: - -```go -// 布尔值的规则: -// true 当值为:1, t, T, TRUE, true, True, YES, yes, Yes, y, ON, on, On -// false 当值为:0, f, F, FALSE, false, False, NO, no, No, n, OFF, off, Off -v, err = cfg.Section("").Key("BOOL").Bool() -v, err = cfg.Section("").Key("FLOAT64").Float64() -v, err = cfg.Section("").Key("INT").Int() -v, err = cfg.Section("").Key("INT64").Int64() -v, err = cfg.Section("").Key("UINT").Uint() -v, err = cfg.Section("").Key("UINT64").Uint64() -v, err = cfg.Section("").Key("TIME").TimeFormat(time.RFC3339) -v, err = cfg.Section("").Key("TIME").Time() // RFC3339 - -v = cfg.Section("").Key("BOOL").MustBool() -v = cfg.Section("").Key("FLOAT64").MustFloat64() -v = cfg.Section("").Key("INT").MustInt() -v = cfg.Section("").Key("INT64").MustInt64() -v = cfg.Section("").Key("UINT").MustUint() -v = cfg.Section("").Key("UINT64").MustUint64() -v = cfg.Section("").Key("TIME").MustTimeFormat(time.RFC3339) -v = cfg.Section("").Key("TIME").MustTime() // RFC3339 - -// 由 Must 开头的方法名允许接收一个相同类型的参数来作为默认值, -// 当键不存在或者转换失败时,则会直接返回该默认值。 -// 但是,MustString 方法必须传递一个默认值。 - -v = cfg.Seciont("").Key("String").MustString("default") -v = cfg.Section("").Key("BOOL").MustBool(true) -v = cfg.Section("").Key("FLOAT64").MustFloat64(1.25) -v = cfg.Section("").Key("INT").MustInt(10) -v = cfg.Section("").Key("INT64").MustInt64(99) -v = cfg.Section("").Key("UINT").MustUint(3) -v = cfg.Section("").Key("UINT64").MustUint64(6) -v = cfg.Section("").Key("TIME").MustTimeFormat(time.RFC3339, time.Now()) -v = cfg.Section("").Key("TIME").MustTime(time.Now()) // RFC3339 -``` - -如果我的值有好多行怎么办? - -```ini -[advance] -ADDRESS = """404 road, -NotFound, State, 5000 -Earth""" -``` - -嗯哼?小 case! - -```go -cfg.Section("advance").Key("ADDRESS").String() - -/* --- start --- -404 road, -NotFound, State, 5000 -Earth ------- end --- */ -``` - -赞爆了!那要是我属于一行的内容写不下想要写到第二行怎么办? - -```ini -[advance] -two_lines = how about \ - continuation lines? -lots_of_lines = 1 \ - 2 \ - 3 \ - 4 -``` - -简直是小菜一碟! - -```go -cfg.Section("advance").Key("two_lines").String() // how about continuation lines? -cfg.Section("advance").Key("lots_of_lines").String() // 1 2 3 4 -``` - -可是我有时候觉得两行连在一起特别没劲,怎么才能不自动连接两行呢? - -```go -cfg, err := ini.LoadSources(ini.LoadOptions{ - IgnoreContinuation: true, -}, "filename") -``` - -哇靠给力啊! - -需要注意的是,值两侧的单引号会被自动剔除: - -```ini -foo = "some value" // foo: some value -bar = 'some value' // bar: some value -``` - -这就是全部了?哈哈,当然不是。 - -#### 操作键值的辅助方法 - -获取键值时设定候选值: - -```go -v = cfg.Section("").Key("STRING").In("default", []string{"str", "arr", "types"}) -v = cfg.Section("").Key("FLOAT64").InFloat64(1.1, []float64{1.25, 2.5, 3.75}) -v = cfg.Section("").Key("INT").InInt(5, []int{10, 20, 30}) -v = cfg.Section("").Key("INT64").InInt64(10, []int64{10, 20, 30}) -v = cfg.Section("").Key("UINT").InUint(4, []int{3, 6, 9}) -v = cfg.Section("").Key("UINT64").InUint64(8, []int64{3, 6, 9}) -v = cfg.Section("").Key("TIME").InTimeFormat(time.RFC3339, time.Now(), []time.Time{time1, time2, time3}) -v = cfg.Section("").Key("TIME").InTime(time.Now(), []time.Time{time1, time2, time3}) // RFC3339 -``` - -如果获取到的值不是候选值的任意一个,则会返回默认值,而默认值不需要是候选值中的一员。 - -验证获取的值是否在指定范围内: - -```go -vals = cfg.Section("").Key("FLOAT64").RangeFloat64(0.0, 1.1, 2.2) -vals = cfg.Section("").Key("INT").RangeInt(0, 10, 20) -vals = cfg.Section("").Key("INT64").RangeInt64(0, 10, 20) -vals = cfg.Section("").Key("UINT").RangeUint(0, 3, 9) -vals = cfg.Section("").Key("UINT64").RangeUint64(0, 3, 9) -vals = cfg.Section("").Key("TIME").RangeTimeFormat(time.RFC3339, time.Now(), minTime, maxTime) -vals = cfg.Section("").Key("TIME").RangeTime(time.Now(), minTime, maxTime) // RFC3339 -``` - -##### 自动分割键值到切片(slice) - -当存在无效输入时,使用零值代替: - -```go -// Input: 1.1, 2.2, 3.3, 4.4 -> [1.1 2.2 3.3 4.4] -// Input: how, 2.2, are, you -> [0.0 2.2 0.0 0.0] -vals = cfg.Section("").Key("STRINGS").Strings(",") -vals = cfg.Section("").Key("FLOAT64S").Float64s(",") -vals = cfg.Section("").Key("INTS").Ints(",") -vals = cfg.Section("").Key("INT64S").Int64s(",") -vals = cfg.Section("").Key("UINTS").Uints(",") -vals = cfg.Section("").Key("UINT64S").Uint64s(",") -vals = cfg.Section("").Key("TIMES").Times(",") -``` - -从结果切片中剔除无效输入: - -```go -// Input: 1.1, 2.2, 3.3, 4.4 -> [1.1 2.2 3.3 4.4] -// Input: how, 2.2, are, you -> [2.2] -vals = cfg.Section("").Key("FLOAT64S").ValidFloat64s(",") -vals = cfg.Section("").Key("INTS").ValidInts(",") -vals = cfg.Section("").Key("INT64S").ValidInt64s(",") -vals = cfg.Section("").Key("UINTS").ValidUints(",") -vals = cfg.Section("").Key("UINT64S").ValidUint64s(",") -vals = cfg.Section("").Key("TIMES").ValidTimes(",") -``` - -当存在无效输入时,直接返回错误: - -```go -// Input: 1.1, 2.2, 3.3, 4.4 -> [1.1 2.2 3.3 4.4] -// Input: how, 2.2, are, you -> error -vals = cfg.Section("").Key("FLOAT64S").StrictFloat64s(",") -vals = cfg.Section("").Key("INTS").StrictInts(",") -vals = cfg.Section("").Key("INT64S").StrictInt64s(",") -vals = cfg.Section("").Key("UINTS").StrictUints(",") -vals = cfg.Section("").Key("UINT64S").StrictUint64s(",") -vals = cfg.Section("").Key("TIMES").StrictTimes(",") -``` - -### 保存配置 - -终于到了这个时刻,是时候保存一下配置了。 - -比较原始的做法是输出配置到某个文件: - -```go -// ... -err = cfg.SaveTo("my.ini") -err = cfg.SaveToIndent("my.ini", "\t") -``` - -另一个比较高级的做法是写入到任何实现 `io.Writer` 接口的对象中: - -```go -// ... -cfg.WriteTo(writer) -cfg.WriteToIndent(writer, "\t") -``` - -默认情况下,空格将被用于对齐键值之间的等号以美化输出结果,以下代码可以禁用该功能: - -```go -ini.PrettyFormat = false -``` - -## 高级用法 - -### 递归读取键值 - -在获取所有键值的过程中,特殊语法 `%()s` 会被应用,其中 `` 可以是相同分区或者默认分区下的键名。字符串 `%()s` 会被相应的键值所替代,如果指定的键不存在,则会用空字符串替代。您可以最多使用 99 层的递归嵌套。 - -```ini -NAME = ini - -[author] -NAME = Unknwon -GITHUB = https://github.com/%(NAME)s - -[package] -FULL_NAME = github.com/go-ini/%(NAME)s -``` - -```go -cfg.Section("author").Key("GITHUB").String() // https://github.com/Unknwon -cfg.Section("package").Key("FULL_NAME").String() // github.com/go-ini/ini -``` - -### 读取父子分区 - -您可以在分区名称中使用 `.` 来表示两个或多个分区之间的父子关系。如果某个键在子分区中不存在,则会去它的父分区中再次寻找,直到没有父分区为止。 - -```ini -NAME = ini -VERSION = v1 -IMPORT_PATH = gopkg.in/%(NAME)s.%(VERSION)s - -[package] -CLONE_URL = https://%(IMPORT_PATH)s - -[package.sub] -``` - -```go -cfg.Section("package.sub").Key("CLONE_URL").String() // https://gopkg.in/ini.v1 -``` - -#### 获取上级父分区下的所有键名 - -```go -cfg.Section("package.sub").ParentKeys() // ["CLONE_URL"] -``` - -### 无法解析的分区 - -如果遇到一些比较特殊的分区,它们不包含常见的键值对,而是没有固定格式的纯文本,则可以使用 `LoadOptions.UnparsableSections` 进行处理: - -```go -cfg, err := LoadSources(LoadOptions{UnparseableSections: []string{"COMMENTS"}}, `[COMMENTS] -<1> This slide has the fuel listed in the wrong units `)) - -body := cfg.Section("COMMENTS").Body() - -/* --- start --- -<1> This slide has the fuel listed in the wrong units ------- end --- */ -``` - -### 读取自增键名 - -如果数据源中的键名为 `-`,则认为该键使用了自增键名的特殊语法。计数器从 1 开始,并且分区之间是相互独立的。 - -```ini -[features] --: Support read/write comments of keys and sections --: Support auto-increment of key names --: Support load multiple files to overwrite key values -``` - -```go -cfg.Section("features").KeyStrings() // []{"#1", "#2", "#3"} -``` - -### 映射到结构 - -想要使用更加面向对象的方式玩转 INI 吗?好主意。 - -```ini -Name = Unknwon -age = 21 -Male = true -Born = 1993-01-01T20:17:05Z - -[Note] -Content = Hi is a good man! -Cities = HangZhou, Boston -``` - -```go -type Note struct { - Content string - Cities []string -} - -type Person struct { - Name string - Age int `ini:"age"` - Male bool - Born time.Time - Note - Created time.Time `ini:"-"` -} - -func main() { - cfg, err := ini.Load("path/to/ini") - // ... - p := new(Person) - err = cfg.MapTo(p) - // ... - - // 一切竟可以如此的简单。 - err = ini.MapTo(p, "path/to/ini") - // ... - - // 嗯哼?只需要映射一个分区吗? - n := new(Note) - err = cfg.Section("Note").MapTo(n) - // ... -} -``` - -结构的字段怎么设置默认值呢?很简单,只要在映射之前对指定字段进行赋值就可以了。如果键未找到或者类型错误,该值不会发生改变。 - -```go -// ... -p := &Person{ - Name: "Joe", -} -// ... -``` - -这样玩 INI 真的好酷啊!然而,如果不能还给我原来的配置文件,有什么卵用? - -### 从结构反射 - -可是,我有说不能吗? - -```go -type Embeded struct { - Dates []time.Time `delim:"|"` - Places []string `ini:"places,omitempty"` - None []int `ini:",omitempty"` -} - -type Author struct { - Name string `ini:"NAME"` - Male bool - Age int - GPA float64 - NeverMind string `ini:"-"` - *Embeded -} - -func main() { - a := &Author{"Unknwon", true, 21, 2.8, "", - &Embeded{ - []time.Time{time.Now(), time.Now()}, - []string{"HangZhou", "Boston"}, - []int{}, - }} - cfg := ini.Empty() - err = ini.ReflectFrom(cfg, a) - // ... -} -``` - -瞧瞧,奇迹发生了。 - -```ini -NAME = Unknwon -Male = true -Age = 21 -GPA = 2.8 - -[Embeded] -Dates = 2015-08-07T22:14:22+08:00|2015-08-07T22:14:22+08:00 -places = HangZhou,Boston -``` - -#### 名称映射器(Name Mapper) - -为了节省您的时间并简化代码,本库支持类型为 [`NameMapper`](https://gowalker.org/gopkg.in/ini.v1#NameMapper) 的名称映射器,该映射器负责结构字段名与分区名和键名之间的映射。 - -目前有 2 款内置的映射器: - -- `AllCapsUnderscore`:该映射器将字段名转换至格式 `ALL_CAPS_UNDERSCORE` 后再去匹配分区名和键名。 -- `TitleUnderscore`:该映射器将字段名转换至格式 `title_underscore` 后再去匹配分区名和键名。 - -使用方法: - -```go -type Info struct{ - PackageName string -} - -func main() { - err = ini.MapToWithMapper(&Info{}, ini.TitleUnderscore, []byte("package_name=ini")) - // ... - - cfg, err := ini.Load([]byte("PACKAGE_NAME=ini")) - // ... - info := new(Info) - cfg.NameMapper = ini.AllCapsUnderscore - err = cfg.MapTo(info) - // ... -} -``` - -使用函数 `ini.ReflectFromWithMapper` 时也可应用相同的规则。 - -#### 值映射器(Value Mapper) - -值映射器允许使用一个自定义函数自动展开值的具体内容,例如:运行时获取环境变量: - -```go -type Env struct { - Foo string `ini:"foo"` -} - -func main() { - cfg, err := ini.Load([]byte("[env]\nfoo = ${MY_VAR}\n") - cfg.ValueMapper = os.ExpandEnv - // ... - env := &Env{} - err = cfg.Section("env").MapTo(env) -} -``` - -本例中,`env.Foo` 将会是运行时所获取到环境变量 `MY_VAR` 的值。 - -#### 映射/反射的其它说明 - -任何嵌入的结构都会被默认认作一个不同的分区,并且不会自动产生所谓的父子分区关联: - -```go -type Child struct { - Age string -} - -type Parent struct { - Name string - Child -} - -type Config struct { - City string - Parent -} -``` - -示例配置文件: - -```ini -City = Boston - -[Parent] -Name = Unknwon - -[Child] -Age = 21 -``` - -很好,但是,我就是要嵌入结构也在同一个分区。好吧,你爹是李刚! - -```go -type Child struct { - Age string -} - -type Parent struct { - Name string - Child `ini:"Parent"` -} - -type Config struct { - City string - Parent -} -``` - -示例配置文件: - -```ini -City = Boston - -[Parent] -Name = Unknwon -Age = 21 -``` - -## 获取帮助 - -- [API 文档](https://gowalker.org/gopkg.in/ini.v1) -- [创建工单](https://github.com/go-ini/ini/issues/new) - -## 常见问题 - -### 字段 `BlockMode` 是什么? - -默认情况下,本库会在您进行读写操作时采用锁机制来确保数据时间。但在某些情况下,您非常确定只进行读操作。此时,您可以通过设置 `cfg.BlockMode = false` 来将读操作提升大约 **50-70%** 的性能。 - -### 为什么要写另一个 INI 解析库? - -许多人都在使用我的 [goconfig](https://github.com/Unknwon/goconfig) 来完成对 INI 文件的操作,但我希望使用更加 Go 风格的代码。并且当您设置 `cfg.BlockMode = false` 时,会有大约 **10-30%** 的性能提升。 - -为了做出这些改变,我必须对 API 进行破坏,所以新开一个仓库是最安全的做法。除此之外,本库直接使用 `gopkg.in` 来进行版本化发布。(其实真相是导入路径更短了) diff --git a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/ini_test.go b/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/ini_test.go deleted file mode 100644 index 00b1baa..0000000 --- a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/ini_test.go +++ /dev/null @@ -1,449 +0,0 @@ -// Copyright 2014 Unknwon -// -// Licensed under the Apache License, Version 2.0 (the "License"): you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations -// under the License. - -package ini - -import ( - "bytes" - "io/ioutil" - "strings" - "testing" - "time" - - . "github.com/smartystreets/goconvey/convey" -) - -func Test_Version(t *testing.T) { - Convey("Get version", t, func() { - So(Version(), ShouldEqual, _VERSION) - }) -} - -const _CONF_DATA = ` -; Package name -NAME = ini -; Package version -VERSION = v1 -; Package import path -IMPORT_PATH = gopkg.in/%(NAME)s.%(VERSION)s - -# Information about package author -# Bio can be written in multiple lines. -[author] -NAME = Unknwon ; Succeeding comment -E-MAIL = fake@localhost -GITHUB = https://github.com/%(NAME)s -BIO = """Gopher. -Coding addict. -Good man. -""" # Succeeding comment - -[package] -CLONE_URL = https://%(IMPORT_PATH)s - -[package.sub] -UNUSED_KEY = should be deleted - -[features] --: Support read/write comments of keys and sections --: Support auto-increment of key names --: Support load multiple files to overwrite key values - -[types] -STRING = str -BOOL = true -BOOL_FALSE = false -FLOAT64 = 1.25 -INT = 10 -TIME = 2015-01-01T20:17:05Z -DURATION = 2h45m -UINT = 3 - -[array] -STRINGS = en, zh, de -FLOAT64S = 1.1, 2.2, 3.3 -INTS = 1, 2, 3 -UINTS = 1, 2, 3 -TIMES = 2015-01-01T20:17:05Z,2015-01-01T20:17:05Z,2015-01-01T20:17:05Z - -[note] -empty_lines = next line is empty\ - -; Comment before the section -[comments] ; This is a comment for the section too -; Comment before key -key = "value" -key2 = "value2" ; This is a comment for key2 -key3 = "one", "two", "three" - -[advance] -value with quotes = "some value" -value quote2 again = 'some value' -includes comment sign = ` + "`" + "my#password" + "`" + ` -includes comment sign2 = ` + "`" + "my;password" + "`" + ` -true = 2+3=5 -"1+1=2" = true -"""6+1=7""" = true -"""` + "`" + `5+5` + "`" + `""" = 10 -` + "`" + `"6+6"` + "`" + ` = 12 -` + "`" + `7-2=4` + "`" + ` = false -ADDRESS = ` + "`" + `404 road, -NotFound, State, 50000` + "`" + ` - -two_lines = how about \ - continuation lines? -lots_of_lines = 1 \ - 2 \ - 3 \ - 4 \ -` - -func Test_Load(t *testing.T) { - Convey("Load from data sources", t, func() { - - Convey("Load with empty data", func() { - So(Empty(), ShouldNotBeNil) - }) - - Convey("Load with multiple data sources", func() { - cfg, err := Load([]byte(_CONF_DATA), "testdata/conf.ini", ioutil.NopCloser(bytes.NewReader([]byte(_CONF_DATA)))) - So(err, ShouldBeNil) - So(cfg, ShouldNotBeNil) - - f, err := Load([]byte(_CONF_DATA), "testdata/404.ini") - So(err, ShouldNotBeNil) - So(f, ShouldBeNil) - }) - - Convey("Load with io.ReadCloser", func() { - cfg, err := Load(ioutil.NopCloser(bytes.NewReader([]byte(_CONF_DATA)))) - So(err, ShouldBeNil) - So(cfg, ShouldNotBeNil) - - So(cfg.Section("").Key("NAME").String(), ShouldEqual, "ini") - }) - }) - - Convey("Bad load process", t, func() { - - Convey("Load from invalid data sources", func() { - _, err := Load(_CONF_DATA) - So(err, ShouldNotBeNil) - - f, err := Load("testdata/404.ini") - So(err, ShouldNotBeNil) - So(f, ShouldBeNil) - - _, err = Load(1) - So(err, ShouldNotBeNil) - - _, err = Load([]byte(""), 1) - So(err, ShouldNotBeNil) - }) - - Convey("Load with bad section name", func() { - _, err := Load([]byte("[]")) - So(err, ShouldNotBeNil) - - _, err = Load([]byte("[")) - So(err, ShouldNotBeNil) - }) - - Convey("Load with bad keys", func() { - _, err := Load([]byte(`"""name`)) - So(err, ShouldNotBeNil) - - _, err = Load([]byte(`"""name"""`)) - So(err, ShouldNotBeNil) - - _, err = Load([]byte(`""=1`)) - So(err, ShouldNotBeNil) - - _, err = Load([]byte(`=`)) - So(err, ShouldNotBeNil) - - _, err = Load([]byte(`name`)) - So(err, ShouldNotBeNil) - }) - - Convey("Load with bad values", func() { - _, err := Load([]byte(`name="""Unknwon`)) - So(err, ShouldNotBeNil) - }) - }) - - Convey("Get section and key insensitively", t, func() { - cfg, err := InsensitiveLoad([]byte(_CONF_DATA), "testdata/conf.ini") - So(err, ShouldBeNil) - So(cfg, ShouldNotBeNil) - - sec, err := cfg.GetSection("Author") - So(err, ShouldBeNil) - So(sec, ShouldNotBeNil) - - key, err := sec.GetKey("E-mail") - So(err, ShouldBeNil) - So(key, ShouldNotBeNil) - }) - - Convey("Load with ignoring continuation lines", t, func() { - cfg, err := LoadSources(LoadOptions{IgnoreContinuation: true}, []byte(`key1=a\b\ -key2=c\d\`)) - So(err, ShouldBeNil) - So(cfg, ShouldNotBeNil) - - So(cfg.Section("").Key("key1").String(), ShouldEqual, `a\b\`) - So(cfg.Section("").Key("key2").String(), ShouldEqual, `c\d\`) - }) - - Convey("Load with boolean type keys", t, func() { - cfg, err := LoadSources(LoadOptions{AllowBooleanKeys: true}, []byte(`key1=hello -key2 -#key3 -key4 -key5`)) - So(err, ShouldBeNil) - So(cfg, ShouldNotBeNil) - - So(strings.Join(cfg.Section("").KeyStrings(), ","), ShouldEqual, "key1,key2,key4,key5") - So(cfg.Section("").Key("key2").MustBool(false), ShouldBeTrue) - - var buf bytes.Buffer - cfg.WriteTo(&buf) - // there is always a trailing \n at the end of the section - So(buf.String(), ShouldEqual, `key1 = hello -key2 -#key3 -key4 -key5 -`) - }) -} - -func Test_LooseLoad(t *testing.T) { - Convey("Loose load from data sources", t, func() { - Convey("Loose load mixed with nonexistent file", func() { - cfg, err := LooseLoad("testdata/404.ini") - So(err, ShouldBeNil) - So(cfg, ShouldNotBeNil) - var fake struct { - Name string `ini:"name"` - } - So(cfg.MapTo(&fake), ShouldBeNil) - - cfg, err = LooseLoad([]byte("name=Unknwon"), "testdata/404.ini") - So(err, ShouldBeNil) - So(cfg.Section("").Key("name").String(), ShouldEqual, "Unknwon") - So(cfg.MapTo(&fake), ShouldBeNil) - So(fake.Name, ShouldEqual, "Unknwon") - }) - }) - -} - -func Test_File_Append(t *testing.T) { - Convey("Append data sources", t, func() { - cfg, err := Load([]byte("")) - So(err, ShouldBeNil) - So(cfg, ShouldNotBeNil) - - So(cfg.Append([]byte(""), []byte("")), ShouldBeNil) - - Convey("Append bad data sources", func() { - So(cfg.Append(1), ShouldNotBeNil) - So(cfg.Append([]byte(""), 1), ShouldNotBeNil) - }) - }) -} - -func Test_File_WriteTo(t *testing.T) { - Convey("Write to somewhere", t, func() { - var buf bytes.Buffer - cfg := Empty() - cfg.WriteTo(&buf) - }) -} - -func Test_File_SaveTo_WriteTo(t *testing.T) { - Convey("Save file", t, func() { - cfg, err := Load([]byte(_CONF_DATA), "testdata/conf.ini") - So(err, ShouldBeNil) - So(cfg, ShouldNotBeNil) - - cfg.Section("").Key("NAME").Comment = "Package name" - cfg.Section("author").Comment = `Information about package author -# Bio can be written in multiple lines.` - cfg.Section("advanced").Key("val w/ pound").SetValue("my#password") - cfg.Section("advanced").Key("longest key has a colon : yes/no").SetValue("yes") - So(cfg.SaveTo("testdata/conf_out.ini"), ShouldBeNil) - - cfg.Section("author").Key("NAME").Comment = "This is author name" - - So(cfg.SaveToIndent("testdata/conf_out.ini", "\t"), ShouldBeNil) - - var buf bytes.Buffer - _, err = cfg.WriteToIndent(&buf, "\t") - So(err, ShouldBeNil) - So(buf.String(), ShouldEqual, `; Package name -NAME = ini -; Package version -VERSION = v1 -; Package import path -IMPORT_PATH = gopkg.in/%(NAME)s.%(VERSION)s - -; Information about package author -# Bio can be written in multiple lines. -[author] - ; This is author name - NAME = Unknwon - E-MAIL = u@gogs.io - GITHUB = https://github.com/%(NAME)s - # Succeeding comment - BIO = """Gopher. -Coding addict. -Good man. -""" - -[package] - CLONE_URL = https://%(IMPORT_PATH)s - -[package.sub] - UNUSED_KEY = should be deleted - -[features] - - = Support read/write comments of keys and sections - - = Support auto-increment of key names - - = Support load multiple files to overwrite key values - -[types] - STRING = str - BOOL = true - BOOL_FALSE = false - FLOAT64 = 1.25 - INT = 10 - TIME = 2015-01-01T20:17:05Z - DURATION = 2h45m - UINT = 3 - -[array] - STRINGS = en, zh, de - FLOAT64S = 1.1, 2.2, 3.3 - INTS = 1, 2, 3 - UINTS = 1, 2, 3 - TIMES = 2015-01-01T20:17:05Z,2015-01-01T20:17:05Z,2015-01-01T20:17:05Z - -[note] - empty_lines = next line is empty - -; Comment before the section -; This is a comment for the section too -[comments] - ; Comment before key - key = value - ; This is a comment for key2 - key2 = value2 - key3 = "one", "two", "three" - -[advance] - value with quotes = some value - value quote2 again = some value - includes comment sign = `+"`"+"my#password"+"`"+` - includes comment sign2 = `+"`"+"my;password"+"`"+` - true = 2+3=5 - `+"`"+`1+1=2`+"`"+` = true - `+"`"+`6+1=7`+"`"+` = true - """`+"`"+`5+5`+"`"+`""" = 10 - `+"`"+`"6+6"`+"`"+` = 12 - `+"`"+`7-2=4`+"`"+` = false - ADDRESS = """404 road, -NotFound, State, 50000""" - two_lines = how about continuation lines? - lots_of_lines = 1 2 3 4 - -[advanced] - val w/ pound = `+"`"+`my#password`+"`"+` - `+"`"+`longest key has a colon : yes/no`+"`"+` = yes - -`) - }) -} - -func Test_File_WriteTo_SectionRaw(t *testing.T) { - Convey("Write a INI with a raw section", t, func() { - var buf bytes.Buffer - cfg, err := LoadSources( - LoadOptions{ - UnparseableSections: []string{"CORE_LESSON", "COMMENTS"}, - }, - "testdata/aicc.ini") - So(err, ShouldBeNil) - So(cfg, ShouldNotBeNil) - cfg.WriteToIndent(&buf, "\t") - So(buf.String(), ShouldEqual, `[Core] - Lesson_Location = 87 - Lesson_Status = C - Score = 3 - Time = 00:02:30 - -[CORE_LESSON] -my lesson state data – 1111111111111111111000000000000000001110000 -111111111111111111100000000000111000000000 – end my lesson state data -[COMMENTS] -<1> This slide has the fuel listed in the wrong units -`) - }) -} - -// Helpers for slice tests. -func float64sEqual(values []float64, expected ...float64) { - So(values, ShouldHaveLength, len(expected)) - for i, v := range expected { - So(values[i], ShouldEqual, v) - } -} - -func intsEqual(values []int, expected ...int) { - So(values, ShouldHaveLength, len(expected)) - for i, v := range expected { - So(values[i], ShouldEqual, v) - } -} - -func int64sEqual(values []int64, expected ...int64) { - So(values, ShouldHaveLength, len(expected)) - for i, v := range expected { - So(values[i], ShouldEqual, v) - } -} - -func uintsEqual(values []uint, expected ...uint) { - So(values, ShouldHaveLength, len(expected)) - for i, v := range expected { - So(values[i], ShouldEqual, v) - } -} - -func uint64sEqual(values []uint64, expected ...uint64) { - So(values, ShouldHaveLength, len(expected)) - for i, v := range expected { - So(values[i], ShouldEqual, v) - } -} - -func timesEqual(values []time.Time, expected ...time.Time) { - So(values, ShouldHaveLength, len(expected)) - for i, v := range expected { - So(values[i].String(), ShouldEqual, v.String()) - } -} diff --git a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/parser.go b/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/parser.go deleted file mode 100644 index 673ef80..0000000 --- a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/parser.go +++ /dev/null @@ -1,358 +0,0 @@ -// Copyright 2015 Unknwon -// -// Licensed under the Apache License, Version 2.0 (the "License"): you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations -// under the License. - -package ini - -import ( - "bufio" - "bytes" - "fmt" - "io" - "strconv" - "strings" - "unicode" -) - -type tokenType int - -const ( - _TOKEN_INVALID tokenType = iota - _TOKEN_COMMENT - _TOKEN_SECTION - _TOKEN_KEY -) - -type parser struct { - buf *bufio.Reader - isEOF bool - count int - comment *bytes.Buffer -} - -func newParser(r io.Reader) *parser { - return &parser{ - buf: bufio.NewReader(r), - count: 1, - comment: &bytes.Buffer{}, - } -} - -// BOM handles header of UTF-8, UTF-16 LE and UTF-16 BE's BOM format. -// http://en.wikipedia.org/wiki/Byte_order_mark#Representations_of_byte_order_marks_by_encoding -func (p *parser) BOM() error { - mask, err := p.buf.Peek(2) - if err != nil && err != io.EOF { - return err - } else if len(mask) < 2 { - return nil - } - - switch { - case mask[0] == 254 && mask[1] == 255: - fallthrough - case mask[0] == 255 && mask[1] == 254: - p.buf.Read(mask) - case mask[0] == 239 && mask[1] == 187: - mask, err := p.buf.Peek(3) - if err != nil && err != io.EOF { - return err - } else if len(mask) < 3 { - return nil - } - if mask[2] == 191 { - p.buf.Read(mask) - } - } - return nil -} - -func (p *parser) readUntil(delim byte) ([]byte, error) { - data, err := p.buf.ReadBytes(delim) - if err != nil { - if err == io.EOF { - p.isEOF = true - } else { - return nil, err - } - } - return data, nil -} - -func cleanComment(in []byte) ([]byte, bool) { - i := bytes.IndexAny(in, "#;") - if i == -1 { - return nil, false - } - return in[i:], true -} - -func readKeyName(in []byte) (string, int, error) { - line := string(in) - - // Check if key name surrounded by quotes. - var keyQuote string - if line[0] == '"' { - if len(line) > 6 && string(line[0:3]) == `"""` { - keyQuote = `"""` - } else { - keyQuote = `"` - } - } else if line[0] == '`' { - keyQuote = "`" - } - - // Get out key name - endIdx := -1 - if len(keyQuote) > 0 { - startIdx := len(keyQuote) - // FIXME: fail case -> """"""name"""=value - pos := strings.Index(line[startIdx:], keyQuote) - if pos == -1 { - return "", -1, fmt.Errorf("missing closing key quote: %s", line) - } - pos += startIdx - - // Find key-value delimiter - i := strings.IndexAny(line[pos+startIdx:], "=:") - if i < 0 { - return "", -1, ErrDelimiterNotFound{line} - } - endIdx = pos + i - return strings.TrimSpace(line[startIdx:pos]), endIdx + startIdx + 1, nil - } - - endIdx = strings.IndexAny(line, "=:") - if endIdx < 0 { - return "", -1, ErrDelimiterNotFound{line} - } - return strings.TrimSpace(line[0:endIdx]), endIdx + 1, nil -} - -func (p *parser) readMultilines(line, val, valQuote string) (string, error) { - for { - data, err := p.readUntil('\n') - if err != nil { - return "", err - } - next := string(data) - - pos := strings.LastIndex(next, valQuote) - if pos > -1 { - val += next[:pos] - - comment, has := cleanComment([]byte(next[pos:])) - if has { - p.comment.Write(bytes.TrimSpace(comment)) - } - break - } - val += next - if p.isEOF { - return "", fmt.Errorf("missing closing key quote from '%s' to '%s'", line, next) - } - } - return val, nil -} - -func (p *parser) readContinuationLines(val string) (string, error) { - for { - data, err := p.readUntil('\n') - if err != nil { - return "", err - } - next := strings.TrimSpace(string(data)) - - if len(next) == 0 { - break - } - val += next - if val[len(val)-1] != '\\' { - break - } - val = val[:len(val)-1] - } - return val, nil -} - -// hasSurroundedQuote check if and only if the first and last characters -// are quotes \" or \'. -// It returns false if any other parts also contain same kind of quotes. -func hasSurroundedQuote(in string, quote byte) bool { - return len(in) > 2 && in[0] == quote && in[len(in)-1] == quote && - strings.IndexByte(in[1:], quote) == len(in)-2 -} - -func (p *parser) readValue(in []byte, ignoreContinuation bool) (string, error) { - line := strings.TrimLeftFunc(string(in), unicode.IsSpace) - if len(line) == 0 { - return "", nil - } - - var valQuote string - if len(line) > 3 && string(line[0:3]) == `"""` { - valQuote = `"""` - } else if line[0] == '`' { - valQuote = "`" - } - - if len(valQuote) > 0 { - startIdx := len(valQuote) - pos := strings.LastIndex(line[startIdx:], valQuote) - // Check for multi-line value - if pos == -1 { - return p.readMultilines(line, line[startIdx:], valQuote) - } - - return line[startIdx : pos+startIdx], nil - } - - // Won't be able to reach here if value only contains whitespace. - line = strings.TrimSpace(line) - - // Check continuation lines when desired. - if !ignoreContinuation && line[len(line)-1] == '\\' { - return p.readContinuationLines(line[:len(line)-1]) - } - - i := strings.IndexAny(line, "#;") - if i > -1 { - p.comment.WriteString(line[i:]) - line = strings.TrimSpace(line[:i]) - } - - // Trim single quotes - if hasSurroundedQuote(line, '\'') || - hasSurroundedQuote(line, '"') { - line = line[1 : len(line)-1] - } - return line, nil -} - -// parse parses data through an io.Reader. -func (f *File) parse(reader io.Reader) (err error) { - p := newParser(reader) - if err = p.BOM(); err != nil { - return fmt.Errorf("BOM: %v", err) - } - - // Ignore error because default section name is never empty string. - section, _ := f.NewSection(DEFAULT_SECTION) - - var line []byte - var inUnparseableSection bool - for !p.isEOF { - line, err = p.readUntil('\n') - if err != nil { - return err - } - - line = bytes.TrimLeftFunc(line, unicode.IsSpace) - if len(line) == 0 { - continue - } - - // Comments - if line[0] == '#' || line[0] == ';' { - // Note: we do not care ending line break, - // it is needed for adding second line, - // so just clean it once at the end when set to value. - p.comment.Write(line) - continue - } - - // Section - if line[0] == '[' { - // Read to the next ']' (TODO: support quoted strings) - // TODO(unknwon): use LastIndexByte when stop supporting Go1.4 - closeIdx := bytes.LastIndex(line, []byte("]")) - if closeIdx == -1 { - return fmt.Errorf("unclosed section: %s", line) - } - - name := string(line[1:closeIdx]) - section, err = f.NewSection(name) - if err != nil { - return err - } - - comment, has := cleanComment(line[closeIdx+1:]) - if has { - p.comment.Write(comment) - } - - section.Comment = strings.TrimSpace(p.comment.String()) - - // Reset aotu-counter and comments - p.comment.Reset() - p.count = 1 - - inUnparseableSection = false - for i := range f.options.UnparseableSections { - if f.options.UnparseableSections[i] == name || - (f.options.Insensitive && strings.ToLower(f.options.UnparseableSections[i]) == strings.ToLower(name)) { - inUnparseableSection = true - continue - } - } - continue - } - - if inUnparseableSection { - section.isRawSection = true - section.rawBody += string(line) - continue - } - - kname, offset, err := readKeyName(line) - if err != nil { - // Treat as boolean key when desired, and whole line is key name. - if IsErrDelimiterNotFound(err) && f.options.AllowBooleanKeys { - kname, err := p.readValue(line, f.options.IgnoreContinuation) - if err != nil { - return err - } - key, err := section.NewBooleanKey(kname) - if err != nil { - return err - } - key.Comment = strings.TrimSpace(p.comment.String()) - p.comment.Reset() - continue - } - return err - } - - // Auto increment. - isAutoIncr := false - if kname == "-" { - isAutoIncr = true - kname = "#" + strconv.Itoa(p.count) - p.count++ - } - - value, err := p.readValue(line[offset:], f.options.IgnoreContinuation) - if err != nil { - return err - } - - key, err := section.NewKey(kname, value) - if err != nil { - return err - } - key.isAutoIncrement = isAutoIncr - key.Comment = strings.TrimSpace(p.comment.String()) - p.comment.Reset() - } - return nil -} diff --git a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/section_test.go b/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/section_test.go deleted file mode 100644 index 80282c1..0000000 --- a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/section_test.go +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright 2014 Unknwon -// -// Licensed under the Apache License, Version 2.0 (the "License"): you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations -// under the License. - -package ini - -import ( - "strings" - "testing" - - . "github.com/smartystreets/goconvey/convey" -) - -func Test_Section(t *testing.T) { - Convey("Test CRD sections", t, func() { - cfg, err := Load([]byte(_CONF_DATA), "testdata/conf.ini") - So(err, ShouldBeNil) - So(cfg, ShouldNotBeNil) - - Convey("Get section strings", func() { - So(strings.Join(cfg.SectionStrings(), ","), ShouldEqual, "DEFAULT,author,package,package.sub,features,types,array,note,comments,advance") - }) - - Convey("Delete a section", func() { - cfg.DeleteSection("") - So(cfg.SectionStrings()[0], ShouldNotEqual, DEFAULT_SECTION) - }) - - Convey("Create new sections", func() { - cfg.NewSections("test", "test2") - _, err := cfg.GetSection("test") - So(err, ShouldBeNil) - _, err = cfg.GetSection("test2") - So(err, ShouldBeNil) - }) - }) -} - -func Test_SectionRaw(t *testing.T) { - Convey("Test section raw string", t, func() { - cfg, err := LoadSources( - LoadOptions{ - Insensitive: true, - UnparseableSections: []string{"core_lesson", "comments"}, - }, - "testdata/aicc.ini") - So(err, ShouldBeNil) - So(cfg, ShouldNotBeNil) - - Convey("Get section strings", func() { - So(strings.Join(cfg.SectionStrings(), ","), ShouldEqual, "DEFAULT,core,core_lesson,comments") - }) - - Convey("Validate non-raw section", func() { - val, err := cfg.Section("core").GetKey("lesson_status") - So(err, ShouldBeNil) - So(val.String(), ShouldEqual, "C") - }) - - Convey("Validate raw section", func() { - So(cfg.Section("core_lesson").Body(), ShouldEqual, `my lesson state data – 1111111111111111111000000000000000001110000 -111111111111111111100000000000111000000000 – end my lesson state data`) - }) - }) -} \ No newline at end of file diff --git a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/struct.go b/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/struct.go deleted file mode 100644 index 509c682..0000000 --- a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/struct.go +++ /dev/null @@ -1,450 +0,0 @@ -// Copyright 2014 Unknwon -// -// Licensed under the Apache License, Version 2.0 (the "License"): you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations -// under the License. - -package ini - -import ( - "bytes" - "errors" - "fmt" - "reflect" - "strings" - "time" - "unicode" -) - -// NameMapper represents a ini tag name mapper. -type NameMapper func(string) string - -// Built-in name getters. -var ( - // AllCapsUnderscore converts to format ALL_CAPS_UNDERSCORE. - AllCapsUnderscore NameMapper = func(raw string) string { - newstr := make([]rune, 0, len(raw)) - for i, chr := range raw { - if isUpper := 'A' <= chr && chr <= 'Z'; isUpper { - if i > 0 { - newstr = append(newstr, '_') - } - } - newstr = append(newstr, unicode.ToUpper(chr)) - } - return string(newstr) - } - // TitleUnderscore converts to format title_underscore. - TitleUnderscore NameMapper = func(raw string) string { - newstr := make([]rune, 0, len(raw)) - for i, chr := range raw { - if isUpper := 'A' <= chr && chr <= 'Z'; isUpper { - if i > 0 { - newstr = append(newstr, '_') - } - chr -= ('A' - 'a') - } - newstr = append(newstr, chr) - } - return string(newstr) - } -) - -func (s *Section) parseFieldName(raw, actual string) string { - if len(actual) > 0 { - return actual - } - if s.f.NameMapper != nil { - return s.f.NameMapper(raw) - } - return raw -} - -func parseDelim(actual string) string { - if len(actual) > 0 { - return actual - } - return "," -} - -var reflectTime = reflect.TypeOf(time.Now()).Kind() - -// setSliceWithProperType sets proper values to slice based on its type. -func setSliceWithProperType(key *Key, field reflect.Value, delim string, allowShadow bool) error { - var strs []string - if allowShadow { - strs = key.StringsWithShadows(delim) - } else { - strs = key.Strings(delim) - } - - numVals := len(strs) - if numVals == 0 { - return nil - } - - var vals interface{} - - sliceOf := field.Type().Elem().Kind() - switch sliceOf { - case reflect.String: - vals = strs - case reflect.Int: - vals, _ = key.parseInts(strs, true, false) - case reflect.Int64: - vals, _ = key.parseInt64s(strs, true, false) - case reflect.Uint: - vals = key.Uints(delim) - case reflect.Uint64: - vals = key.Uint64s(delim) - case reflect.Float64: - vals = key.Float64s(delim) - case reflectTime: - vals = key.Times(delim) - default: - return fmt.Errorf("unsupported type '[]%s'", sliceOf) - } - - slice := reflect.MakeSlice(field.Type(), numVals, numVals) - for i := 0; i < numVals; i++ { - switch sliceOf { - case reflect.String: - slice.Index(i).Set(reflect.ValueOf(vals.([]string)[i])) - case reflect.Int: - slice.Index(i).Set(reflect.ValueOf(vals.([]int)[i])) - case reflect.Int64: - slice.Index(i).Set(reflect.ValueOf(vals.([]int64)[i])) - case reflect.Uint: - slice.Index(i).Set(reflect.ValueOf(vals.([]uint)[i])) - case reflect.Uint64: - slice.Index(i).Set(reflect.ValueOf(vals.([]uint64)[i])) - case reflect.Float64: - slice.Index(i).Set(reflect.ValueOf(vals.([]float64)[i])) - case reflectTime: - slice.Index(i).Set(reflect.ValueOf(vals.([]time.Time)[i])) - } - } - field.Set(slice) - return nil -} - -// setWithProperType sets proper value to field based on its type, -// but it does not return error for failing parsing, -// because we want to use default value that is already assigned to strcut. -func setWithProperType(t reflect.Type, key *Key, field reflect.Value, delim string, allowShadow bool) error { - switch t.Kind() { - case reflect.String: - if len(key.String()) == 0 { - return nil - } - field.SetString(key.String()) - case reflect.Bool: - boolVal, err := key.Bool() - if err != nil { - return nil - } - field.SetBool(boolVal) - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - durationVal, err := key.Duration() - // Skip zero value - if err == nil && int(durationVal) > 0 { - field.Set(reflect.ValueOf(durationVal)) - return nil - } - - intVal, err := key.Int64() - if err != nil || intVal == 0 { - return nil - } - field.SetInt(intVal) - // byte is an alias for uint8, so supporting uint8 breaks support for byte - case reflect.Uint, reflect.Uint16, reflect.Uint32, reflect.Uint64: - durationVal, err := key.Duration() - // Skip zero value - if err == nil && int(durationVal) > 0 { - field.Set(reflect.ValueOf(durationVal)) - return nil - } - - uintVal, err := key.Uint64() - if err != nil { - return nil - } - field.SetUint(uintVal) - - case reflect.Float32, reflect.Float64: - floatVal, err := key.Float64() - if err != nil { - return nil - } - field.SetFloat(floatVal) - case reflectTime: - timeVal, err := key.Time() - if err != nil { - return nil - } - field.Set(reflect.ValueOf(timeVal)) - case reflect.Slice: - return setSliceWithProperType(key, field, delim, allowShadow) - default: - return fmt.Errorf("unsupported type '%s'", t) - } - return nil -} - -func parseTagOptions(tag string) (rawName string, omitEmpty bool, allowShadow bool) { - opts := strings.SplitN(tag, ",", 3) - rawName = opts[0] - if len(opts) > 1 { - omitEmpty = opts[1] == "omitempty" - } - if len(opts) > 2 { - allowShadow = opts[2] == "allowshadow" - } - return rawName, omitEmpty, allowShadow -} - -func (s *Section) mapTo(val reflect.Value) error { - if val.Kind() == reflect.Ptr { - val = val.Elem() - } - typ := val.Type() - - for i := 0; i < typ.NumField(); i++ { - field := val.Field(i) - tpField := typ.Field(i) - - tag := tpField.Tag.Get("ini") - if tag == "-" { - continue - } - - rawName, _, allowShadow := parseTagOptions(tag) - fieldName := s.parseFieldName(tpField.Name, rawName) - if len(fieldName) == 0 || !field.CanSet() { - continue - } - - isAnonymous := tpField.Type.Kind() == reflect.Ptr && tpField.Anonymous - isStruct := tpField.Type.Kind() == reflect.Struct - if isAnonymous { - field.Set(reflect.New(tpField.Type.Elem())) - } - - if isAnonymous || isStruct { - if sec, err := s.f.GetSection(fieldName); err == nil { - if err = sec.mapTo(field); err != nil { - return fmt.Errorf("error mapping field(%s): %v", fieldName, err) - } - continue - } - } - - if key, err := s.GetKey(fieldName); err == nil { - delim := parseDelim(tpField.Tag.Get("delim")) - if err = setWithProperType(tpField.Type, key, field, delim, allowShadow); err != nil { - return fmt.Errorf("error mapping field(%s): %v", fieldName, err) - } - } - } - return nil -} - -// MapTo maps section to given struct. -func (s *Section) MapTo(v interface{}) error { - typ := reflect.TypeOf(v) - val := reflect.ValueOf(v) - if typ.Kind() == reflect.Ptr { - typ = typ.Elem() - val = val.Elem() - } else { - return errors.New("cannot map to non-pointer struct") - } - - return s.mapTo(val) -} - -// MapTo maps file to given struct. -func (f *File) MapTo(v interface{}) error { - return f.Section("").MapTo(v) -} - -// MapTo maps data sources to given struct with name mapper. -func MapToWithMapper(v interface{}, mapper NameMapper, source interface{}, others ...interface{}) error { - cfg, err := Load(source, others...) - if err != nil { - return err - } - cfg.NameMapper = mapper - return cfg.MapTo(v) -} - -// MapTo maps data sources to given struct. -func MapTo(v, source interface{}, others ...interface{}) error { - return MapToWithMapper(v, nil, source, others...) -} - -// reflectSliceWithProperType does the opposite thing as setSliceWithProperType. -func reflectSliceWithProperType(key *Key, field reflect.Value, delim string) error { - slice := field.Slice(0, field.Len()) - if field.Len() == 0 { - return nil - } - - var buf bytes.Buffer - sliceOf := field.Type().Elem().Kind() - for i := 0; i < field.Len(); i++ { - switch sliceOf { - case reflect.String: - buf.WriteString(slice.Index(i).String()) - case reflect.Int, reflect.Int64: - buf.WriteString(fmt.Sprint(slice.Index(i).Int())) - case reflect.Uint, reflect.Uint64: - buf.WriteString(fmt.Sprint(slice.Index(i).Uint())) - case reflect.Float64: - buf.WriteString(fmt.Sprint(slice.Index(i).Float())) - case reflectTime: - buf.WriteString(slice.Index(i).Interface().(time.Time).Format(time.RFC3339)) - default: - return fmt.Errorf("unsupported type '[]%s'", sliceOf) - } - buf.WriteString(delim) - } - key.SetValue(buf.String()[:buf.Len()-1]) - return nil -} - -// reflectWithProperType does the opposite thing as setWithProperType. -func reflectWithProperType(t reflect.Type, key *Key, field reflect.Value, delim string) error { - switch t.Kind() { - case reflect.String: - key.SetValue(field.String()) - case reflect.Bool: - key.SetValue(fmt.Sprint(field.Bool())) - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - key.SetValue(fmt.Sprint(field.Int())) - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: - key.SetValue(fmt.Sprint(field.Uint())) - case reflect.Float32, reflect.Float64: - key.SetValue(fmt.Sprint(field.Float())) - case reflectTime: - key.SetValue(fmt.Sprint(field.Interface().(time.Time).Format(time.RFC3339))) - case reflect.Slice: - return reflectSliceWithProperType(key, field, delim) - default: - return fmt.Errorf("unsupported type '%s'", t) - } - return nil -} - -// CR: copied from encoding/json/encode.go with modifications of time.Time support. -// TODO: add more test coverage. -func isEmptyValue(v reflect.Value) bool { - switch v.Kind() { - case reflect.Array, reflect.Map, reflect.Slice, reflect.String: - return v.Len() == 0 - case reflect.Bool: - return !v.Bool() - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return v.Int() == 0 - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return v.Uint() == 0 - case reflect.Float32, reflect.Float64: - return v.Float() == 0 - case reflectTime: - return v.Interface().(time.Time).IsZero() - case reflect.Interface, reflect.Ptr: - return v.IsNil() - } - return false -} - -func (s *Section) reflectFrom(val reflect.Value) error { - if val.Kind() == reflect.Ptr { - val = val.Elem() - } - typ := val.Type() - - for i := 0; i < typ.NumField(); i++ { - field := val.Field(i) - tpField := typ.Field(i) - - tag := tpField.Tag.Get("ini") - if tag == "-" { - continue - } - - opts := strings.SplitN(tag, ",", 2) - if len(opts) == 2 && opts[1] == "omitempty" && isEmptyValue(field) { - continue - } - - fieldName := s.parseFieldName(tpField.Name, opts[0]) - if len(fieldName) == 0 || !field.CanSet() { - continue - } - - if (tpField.Type.Kind() == reflect.Ptr && tpField.Anonymous) || - (tpField.Type.Kind() == reflect.Struct && tpField.Type.Name() != "Time") { - // Note: The only error here is section doesn't exist. - sec, err := s.f.GetSection(fieldName) - if err != nil { - // Note: fieldName can never be empty here, ignore error. - sec, _ = s.f.NewSection(fieldName) - } - if err = sec.reflectFrom(field); err != nil { - return fmt.Errorf("error reflecting field (%s): %v", fieldName, err) - } - continue - } - - // Note: Same reason as secion. - key, err := s.GetKey(fieldName) - if err != nil { - key, _ = s.NewKey(fieldName, "") - } - if err = reflectWithProperType(tpField.Type, key, field, parseDelim(tpField.Tag.Get("delim"))); err != nil { - return fmt.Errorf("error reflecting field (%s): %v", fieldName, err) - } - - } - return nil -} - -// ReflectFrom reflects secion from given struct. -func (s *Section) ReflectFrom(v interface{}) error { - typ := reflect.TypeOf(v) - val := reflect.ValueOf(v) - if typ.Kind() == reflect.Ptr { - typ = typ.Elem() - val = val.Elem() - } else { - return errors.New("cannot reflect from non-pointer struct") - } - - return s.reflectFrom(val) -} - -// ReflectFrom reflects file from given struct. -func (f *File) ReflectFrom(v interface{}) error { - return f.Section("").ReflectFrom(v) -} - -// ReflectFrom reflects data sources from given struct with name mapper. -func ReflectFromWithMapper(cfg *File, v interface{}, mapper NameMapper) error { - cfg.NameMapper = mapper - return cfg.ReflectFrom(v) -} - -// ReflectFrom reflects data sources from given struct. -func ReflectFrom(cfg *File, v interface{}) error { - return ReflectFromWithMapper(cfg, v, nil) -} diff --git a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/struct_test.go b/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/struct_test.go deleted file mode 100644 index 7237715..0000000 --- a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/struct_test.go +++ /dev/null @@ -1,337 +0,0 @@ -// Copyright 2014 Unknwon -// -// Licensed under the Apache License, Version 2.0 (the "License"): you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations -// under the License. - -package ini - -import ( - "bytes" - "fmt" - "strings" - "testing" - "time" - - . "github.com/smartystreets/goconvey/convey" -) - -type testNested struct { - Cities []string `delim:"|"` - Visits []time.Time - Years []int - Numbers []int64 - Ages []uint - Populations []uint64 - Coordinates []float64 - Note string - Unused int `ini:"-"` -} - -type testEmbeded struct { - GPA float64 -} - -type testStruct struct { - Name string `ini:"NAME"` - Age int - Male bool - Money float64 - Born time.Time - Time time.Duration `ini:"Duration"` - Others testNested - *testEmbeded `ini:"grade"` - Unused int `ini:"-"` - Unsigned uint - Omitted bool `ini:"omitthis,omitempty"` - Shadows []string `ini:",,allowshadow"` - ShadowInts []int `ini:"Shadows,,allowshadow"` -} - -const _CONF_DATA_STRUCT = ` -NAME = Unknwon -Age = 21 -Male = true -Money = 1.25 -Born = 1993-10-07T20:17:05Z -Duration = 2h45m -Unsigned = 3 -omitthis = true -Shadows = 1, 2 -Shadows = 3, 4 - -[Others] -Cities = HangZhou|Boston -Visits = 1993-10-07T20:17:05Z, 1993-10-07T20:17:05Z -Years = 1993,1994 -Numbers = 10010,10086 -Ages = 18,19 -Populations = 12345678,98765432 -Coordinates = 192.168,10.11 -Note = Hello world! - -[grade] -GPA = 2.8 - -[foo.bar] -Here = there -When = then -` - -type unsupport struct { - Byte byte -} - -type unsupport2 struct { - Others struct { - Cities byte - } -} - -type unsupport3 struct { - Cities byte -} - -type unsupport4 struct { - *unsupport3 `ini:"Others"` -} - -type defaultValue struct { - Name string - Age int - Male bool - Money float64 - Born time.Time - Cities []string -} - -type fooBar struct { - Here, When string -} - -const _INVALID_DATA_CONF_STRUCT = ` -Name = -Age = age -Male = 123 -Money = money -Born = nil -Cities = -` - -func Test_Struct(t *testing.T) { - Convey("Map to struct", t, func() { - Convey("Map file to struct", func() { - ts := new(testStruct) - So(MapTo(ts, []byte(_CONF_DATA_STRUCT)), ShouldBeNil) - - So(ts.Name, ShouldEqual, "Unknwon") - So(ts.Age, ShouldEqual, 21) - So(ts.Male, ShouldBeTrue) - So(ts.Money, ShouldEqual, 1.25) - So(ts.Unsigned, ShouldEqual, 3) - - t, err := time.Parse(time.RFC3339, "1993-10-07T20:17:05Z") - So(err, ShouldBeNil) - So(ts.Born.String(), ShouldEqual, t.String()) - - dur, err := time.ParseDuration("2h45m") - So(err, ShouldBeNil) - So(ts.Time.Seconds(), ShouldEqual, dur.Seconds()) - - So(strings.Join(ts.Others.Cities, ","), ShouldEqual, "HangZhou,Boston") - So(ts.Others.Visits[0].String(), ShouldEqual, t.String()) - So(fmt.Sprint(ts.Others.Years), ShouldEqual, "[1993 1994]") - So(fmt.Sprint(ts.Others.Numbers), ShouldEqual, "[10010 10086]") - So(fmt.Sprint(ts.Others.Ages), ShouldEqual, "[18 19]") - So(fmt.Sprint(ts.Others.Populations), ShouldEqual, "[12345678 98765432]") - So(fmt.Sprint(ts.Others.Coordinates), ShouldEqual, "[192.168 10.11]") - So(ts.Others.Note, ShouldEqual, "Hello world!") - So(ts.testEmbeded.GPA, ShouldEqual, 2.8) - }) - - Convey("Map section to struct", func() { - foobar := new(fooBar) - f, err := Load([]byte(_CONF_DATA_STRUCT)) - So(err, ShouldBeNil) - - So(f.Section("foo.bar").MapTo(foobar), ShouldBeNil) - So(foobar.Here, ShouldEqual, "there") - So(foobar.When, ShouldEqual, "then") - }) - - Convey("Map to non-pointer struct", func() { - cfg, err := Load([]byte(_CONF_DATA_STRUCT)) - So(err, ShouldBeNil) - So(cfg, ShouldNotBeNil) - - So(cfg.MapTo(testStruct{}), ShouldNotBeNil) - }) - - Convey("Map to unsupported type", func() { - cfg, err := Load([]byte(_CONF_DATA_STRUCT)) - So(err, ShouldBeNil) - So(cfg, ShouldNotBeNil) - - cfg.NameMapper = func(raw string) string { - if raw == "Byte" { - return "NAME" - } - return raw - } - So(cfg.MapTo(&unsupport{}), ShouldNotBeNil) - So(cfg.MapTo(&unsupport2{}), ShouldNotBeNil) - So(cfg.MapTo(&unsupport4{}), ShouldNotBeNil) - }) - - Convey("Map to omitempty field", func() { - ts := new(testStruct) - So(MapTo(ts, []byte(_CONF_DATA_STRUCT)), ShouldBeNil) - - So(ts.Omitted, ShouldEqual, true) - }) - - Convey("Map with shadows", func() { - cfg, err := LoadSources(LoadOptions{AllowShadows: true}, []byte(_CONF_DATA_STRUCT)) - So(err, ShouldBeNil) - ts := new(testStruct) - So(cfg.MapTo(ts), ShouldBeNil) - - So(strings.Join(ts.Shadows, " "), ShouldEqual, "1 2 3 4") - So(fmt.Sprintf("%v", ts.ShadowInts), ShouldEqual, "[1 2 3 4]") - }) - - Convey("Map from invalid data source", func() { - So(MapTo(&testStruct{}, "hi"), ShouldNotBeNil) - }) - - Convey("Map to wrong types and gain default values", func() { - cfg, err := Load([]byte(_INVALID_DATA_CONF_STRUCT)) - So(err, ShouldBeNil) - - t, err := time.Parse(time.RFC3339, "1993-10-07T20:17:05Z") - So(err, ShouldBeNil) - dv := &defaultValue{"Joe", 10, true, 1.25, t, []string{"HangZhou", "Boston"}} - So(cfg.MapTo(dv), ShouldBeNil) - So(dv.Name, ShouldEqual, "Joe") - So(dv.Age, ShouldEqual, 10) - So(dv.Male, ShouldBeTrue) - So(dv.Money, ShouldEqual, 1.25) - So(dv.Born.String(), ShouldEqual, t.String()) - So(strings.Join(dv.Cities, ","), ShouldEqual, "HangZhou,Boston") - }) - }) - - Convey("Reflect from struct", t, func() { - type Embeded struct { - Dates []time.Time `delim:"|"` - Places []string - Years []int - Numbers []int64 - Ages []uint - Populations []uint64 - Coordinates []float64 - None []int - } - type Author struct { - Name string `ini:"NAME"` - Male bool - Age int - Height uint - GPA float64 - Date time.Time - NeverMind string `ini:"-"` - *Embeded `ini:"infos"` - } - - t, err := time.Parse(time.RFC3339, "1993-10-07T20:17:05Z") - So(err, ShouldBeNil) - a := &Author{"Unknwon", true, 21, 100, 2.8, t, "", - &Embeded{ - []time.Time{t, t}, - []string{"HangZhou", "Boston"}, - []int{1993, 1994}, - []int64{10010, 10086}, - []uint{18, 19}, - []uint64{12345678, 98765432}, - []float64{192.168, 10.11}, - []int{}, - }} - cfg := Empty() - So(ReflectFrom(cfg, a), ShouldBeNil) - - var buf bytes.Buffer - _, err = cfg.WriteTo(&buf) - So(err, ShouldBeNil) - So(buf.String(), ShouldEqual, `NAME = Unknwon -Male = true -Age = 21 -Height = 100 -GPA = 2.8 -Date = 1993-10-07T20:17:05Z - -[infos] -Dates = 1993-10-07T20:17:05Z|1993-10-07T20:17:05Z -Places = HangZhou,Boston -Years = 1993,1994 -Numbers = 10010,10086 -Ages = 18,19 -Populations = 12345678,98765432 -Coordinates = 192.168,10.11 -None = - -`) - - Convey("Reflect from non-point struct", func() { - So(ReflectFrom(cfg, Author{}), ShouldNotBeNil) - }) - - Convey("Reflect from struct with omitempty", func() { - cfg := Empty() - type SpecialStruct struct { - FirstName string `ini:"first_name"` - LastName string `ini:"last_name"` - JustOmitMe string `ini:"omitempty"` - LastLogin time.Time `ini:"last_login,omitempty"` - LastLogin2 time.Time `ini:",omitempty"` - NotEmpty int `ini:"omitempty"` - } - - So(ReflectFrom(cfg, &SpecialStruct{FirstName: "John", LastName: "Doe", NotEmpty: 9}), ShouldBeNil) - - var buf bytes.Buffer - _, err = cfg.WriteTo(&buf) - So(buf.String(), ShouldEqual, `first_name = John -last_name = Doe -omitempty = 9 - -`) - }) - }) -} - -type testMapper struct { - PackageName string -} - -func Test_NameGetter(t *testing.T) { - Convey("Test name mappers", t, func() { - So(MapToWithMapper(&testMapper{}, TitleUnderscore, []byte("packag_name=ini")), ShouldBeNil) - - cfg, err := Load([]byte("PACKAGE_NAME=ini")) - So(err, ShouldBeNil) - So(cfg, ShouldNotBeNil) - - cfg.NameMapper = AllCapsUnderscore - tg := new(testMapper) - So(cfg.MapTo(tg), ShouldBeNil) - So(tg.PackageName, ShouldEqual, "ini") - }) -} diff --git a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/testdata/UTF-16-BE-BOM.ini b/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/testdata/UTF-16-BE-BOM.ini deleted file mode 100644 index c8bf82c..0000000 Binary files a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/testdata/UTF-16-BE-BOM.ini and /dev/null differ diff --git a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/testdata/UTF-16-LE-BOM.ini b/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/testdata/UTF-16-LE-BOM.ini deleted file mode 100644 index 27f6218..0000000 Binary files a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/testdata/UTF-16-LE-BOM.ini and /dev/null differ diff --git a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/testdata/UTF-8-BOM.ini b/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/testdata/UTF-8-BOM.ini deleted file mode 100644 index 2ed0ac1..0000000 --- a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/testdata/UTF-8-BOM.ini +++ /dev/null @@ -1,2 +0,0 @@ -[author] -E-MAIL = u@gogs.io \ No newline at end of file diff --git a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/testdata/aicc.ini b/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/testdata/aicc.ini deleted file mode 100644 index 59a6197..0000000 --- a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/testdata/aicc.ini +++ /dev/null @@ -1,11 +0,0 @@ -[Core] - Lesson_Location = 87 -Lesson_Status = C - Score = 3 -Time = 00:02:30 - -[CORE_LESSON] -my lesson state data – 1111111111111111111000000000000000001110000 -111111111111111111100000000000111000000000 – end my lesson state data -[COMMENTS] -<1> This slide has the fuel listed in the wrong units diff --git a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/testdata/conf.ini b/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/testdata/conf.ini deleted file mode 100644 index f8e7ec8..0000000 --- a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/testdata/conf.ini +++ /dev/null @@ -1,2 +0,0 @@ -[author] -E-MAIL = u@gogs.io \ No newline at end of file diff --git a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/.gitignore b/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/.gitignore deleted file mode 100644 index 531fcc1..0000000 --- a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -jpgo -jmespath-fuzz.zip -cpu.out -go-jmespath.test diff --git a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/.travis.yml b/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/.travis.yml deleted file mode 100644 index 1f98077..0000000 --- a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -language: go - -sudo: false - -go: - - 1.4 - -install: go get -v -t ./... -script: make test diff --git a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/LICENSE b/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/LICENSE deleted file mode 100644 index b03310a..0000000 --- a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright 2015 James Saryerwinnie - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/Makefile b/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/Makefile deleted file mode 100644 index a828d28..0000000 --- a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/Makefile +++ /dev/null @@ -1,44 +0,0 @@ - -CMD = jpgo - -help: - @echo "Please use \`make ' where is one of" - @echo " test to run all the tests" - @echo " build to build the library and jp executable" - @echo " generate to run codegen" - - -generate: - go generate ./... - -build: - rm -f $(CMD) - go build ./... - rm -f cmd/$(CMD)/$(CMD) && cd cmd/$(CMD)/ && go build ./... - mv cmd/$(CMD)/$(CMD) . - -test: - go test -v ./... - -check: - go vet ./... - @echo "golint ./..." - @lint=`golint ./...`; \ - lint=`echo "$$lint" | grep -v "astnodetype_string.go" | grep -v "toktype_string.go"`; \ - echo "$$lint"; \ - if [ "$$lint" != "" ]; then exit 1; fi - -htmlc: - go test -coverprofile="/tmp/jpcov" && go tool cover -html="/tmp/jpcov" && unlink /tmp/jpcov - -buildfuzz: - go-fuzz-build github.com/jmespath/go-jmespath/fuzz - -fuzz: buildfuzz - go-fuzz -bin=./jmespath-fuzz.zip -workdir=fuzz/testdata - -bench: - go test -bench . -cpuprofile cpu.out - -pprof-cpu: - go tool pprof ./go-jmespath.test ./cpu.out diff --git a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/README.md b/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/README.md deleted file mode 100644 index 187ef67..0000000 --- a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# go-jmespath - A JMESPath implementation in Go - -[![Build Status](https://img.shields.io/travis/jmespath/go-jmespath.svg)](https://travis-ci.org/jmespath/go-jmespath) - - - -See http://jmespath.org for more info. diff --git a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/api.go b/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/api.go deleted file mode 100644 index 9cfa988..0000000 --- a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/api.go +++ /dev/null @@ -1,49 +0,0 @@ -package jmespath - -import "strconv" - -// JmesPath is the epresentation of a compiled JMES path query. A JmesPath is -// safe for concurrent use by multiple goroutines. -type JMESPath struct { - ast ASTNode - intr *treeInterpreter -} - -// Compile parses a JMESPath expression and returns, if successful, a JMESPath -// object that can be used to match against data. -func Compile(expression string) (*JMESPath, error) { - parser := NewParser() - ast, err := parser.Parse(expression) - if err != nil { - return nil, err - } - jmespath := &JMESPath{ast: ast, intr: newInterpreter()} - return jmespath, nil -} - -// MustCompile is like Compile but panics if the expression cannot be parsed. -// It simplifies safe initialization of global variables holding compiled -// JMESPaths. -func MustCompile(expression string) *JMESPath { - jmespath, err := Compile(expression) - if err != nil { - panic(`jmespath: Compile(` + strconv.Quote(expression) + `): ` + err.Error()) - } - return jmespath -} - -// Search evaluates a JMESPath expression against input data and returns the result. -func (jp *JMESPath) Search(data interface{}) (interface{}, error) { - return jp.intr.Execute(jp.ast, data) -} - -// Search evaluates a JMESPath expression against input data and returns the result. -func Search(expression string, data interface{}) (interface{}, error) { - intr := newInterpreter() - parser := NewParser() - ast, err := parser.Parse(expression) - if err != nil { - return nil, err - } - return intr.Execute(ast, data) -} diff --git a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/api_test.go b/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/api_test.go deleted file mode 100644 index b0b106d..0000000 --- a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/api_test.go +++ /dev/null @@ -1,32 +0,0 @@ -package jmespath - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestValidPrecompiledExpressionSearches(t *testing.T) { - assert := assert.New(t) - data := make(map[string]interface{}) - data["foo"] = "bar" - precompiled, err := Compile("foo") - assert.Nil(err) - result, err := precompiled.Search(data) - assert.Nil(err) - assert.Equal("bar", result) -} - -func TestInvalidPrecompileErrors(t *testing.T) { - assert := assert.New(t) - _, err := Compile("not a valid expression") - assert.NotNil(err) -} - -func TestInvalidMustCompilePanics(t *testing.T) { - defer func() { - r := recover() - assert.NotNil(t, r) - }() - MustCompile("not a valid expression") -} diff --git a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/astnodetype_string.go b/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/astnodetype_string.go deleted file mode 100644 index 1cd2d23..0000000 --- a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/astnodetype_string.go +++ /dev/null @@ -1,16 +0,0 @@ -// generated by stringer -type astNodeType; DO NOT EDIT - -package jmespath - -import "fmt" - -const _astNodeType_name = "ASTEmptyASTComparatorASTCurrentNodeASTExpRefASTFunctionExpressionASTFieldASTFilterProjectionASTFlattenASTIdentityASTIndexASTIndexExpressionASTKeyValPairASTLiteralASTMultiSelectHashASTMultiSelectListASTOrExpressionASTAndExpressionASTNotExpressionASTPipeASTProjectionASTSubexpressionASTSliceASTValueProjection" - -var _astNodeType_index = [...]uint16{0, 8, 21, 35, 44, 65, 73, 92, 102, 113, 121, 139, 152, 162, 180, 198, 213, 229, 245, 252, 265, 281, 289, 307} - -func (i astNodeType) String() string { - if i < 0 || i >= astNodeType(len(_astNodeType_index)-1) { - return fmt.Sprintf("astNodeType(%d)", i) - } - return _astNodeType_name[_astNodeType_index[i]:_astNodeType_index[i+1]] -} diff --git a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/compliance_test.go b/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/compliance_test.go deleted file mode 100644 index 4ee9c95..0000000 --- a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/compliance_test.go +++ /dev/null @@ -1,123 +0,0 @@ -package jmespath - -import ( - "encoding/json" - "fmt" - "io/ioutil" - "os" - "path/filepath" - "testing" - - "github.com/stretchr/testify/assert" -) - -type TestSuite struct { - Given interface{} - TestCases []TestCase `json:"cases"` - Comment string -} -type TestCase struct { - Comment string - Expression string - Result interface{} - Error string -} - -var whiteListed = []string{ - "compliance/basic.json", - "compliance/current.json", - "compliance/escape.json", - "compliance/filters.json", - "compliance/functions.json", - "compliance/identifiers.json", - "compliance/indices.json", - "compliance/literal.json", - "compliance/multiselect.json", - "compliance/ormatch.json", - "compliance/pipe.json", - "compliance/slice.json", - "compliance/syntax.json", - "compliance/unicode.json", - "compliance/wildcard.json", - "compliance/boolean.json", -} - -func allowed(path string) bool { - for _, el := range whiteListed { - if el == path { - return true - } - } - return false -} - -func TestCompliance(t *testing.T) { - assert := assert.New(t) - - var complianceFiles []string - err := filepath.Walk("compliance", func(path string, _ os.FileInfo, _ error) error { - //if strings.HasSuffix(path, ".json") { - if allowed(path) { - complianceFiles = append(complianceFiles, path) - } - return nil - }) - if assert.Nil(err) { - for _, filename := range complianceFiles { - runComplianceTest(assert, filename) - } - } -} - -func runComplianceTest(assert *assert.Assertions, filename string) { - var testSuites []TestSuite - data, err := ioutil.ReadFile(filename) - if assert.Nil(err) { - err := json.Unmarshal(data, &testSuites) - if assert.Nil(err) { - for _, testsuite := range testSuites { - runTestSuite(assert, testsuite, filename) - } - } - } -} - -func runTestSuite(assert *assert.Assertions, testsuite TestSuite, filename string) { - for _, testcase := range testsuite.TestCases { - if testcase.Error != "" { - // This is a test case that verifies we error out properly. - runSyntaxTestCase(assert, testsuite.Given, testcase, filename) - } else { - runTestCase(assert, testsuite.Given, testcase, filename) - } - } -} - -func runSyntaxTestCase(assert *assert.Assertions, given interface{}, testcase TestCase, filename string) { - // Anything with an .Error means that we expect that JMESPath should return - // an error when we try to evaluate the expression. - _, err := Search(testcase.Expression, given) - assert.NotNil(err, fmt.Sprintf("Expression: %s", testcase.Expression)) -} - -func runTestCase(assert *assert.Assertions, given interface{}, testcase TestCase, filename string) { - lexer := NewLexer() - var err error - _, err = lexer.tokenize(testcase.Expression) - if err != nil { - errMsg := fmt.Sprintf("(%s) Could not lex expression: %s -- %s", filename, testcase.Expression, err.Error()) - assert.Fail(errMsg) - return - } - parser := NewParser() - _, err = parser.Parse(testcase.Expression) - if err != nil { - errMsg := fmt.Sprintf("(%s) Could not parse expression: %s -- %s", filename, testcase.Expression, err.Error()) - assert.Fail(errMsg) - return - } - actual, err := Search(testcase.Expression, given) - if assert.Nil(err, fmt.Sprintf("Expression: %s", testcase.Expression)) { - assert.Equal(testcase.Result, actual, fmt.Sprintf("Expression: %s", testcase.Expression)) - } -} diff --git a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/functions.go b/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/functions.go deleted file mode 100644 index 9b7cd89..0000000 --- a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/functions.go +++ /dev/null @@ -1,842 +0,0 @@ -package jmespath - -import ( - "encoding/json" - "errors" - "fmt" - "math" - "reflect" - "sort" - "strconv" - "strings" - "unicode/utf8" -) - -type jpFunction func(arguments []interface{}) (interface{}, error) - -type jpType string - -const ( - jpUnknown jpType = "unknown" - jpNumber jpType = "number" - jpString jpType = "string" - jpArray jpType = "array" - jpObject jpType = "object" - jpArrayNumber jpType = "array[number]" - jpArrayString jpType = "array[string]" - jpExpref jpType = "expref" - jpAny jpType = "any" -) - -type functionEntry struct { - name string - arguments []argSpec - handler jpFunction - hasExpRef bool -} - -type argSpec struct { - types []jpType - variadic bool -} - -type byExprString struct { - intr *treeInterpreter - node ASTNode - items []interface{} - hasError bool -} - -func (a *byExprString) Len() int { - return len(a.items) -} -func (a *byExprString) Swap(i, j int) { - a.items[i], a.items[j] = a.items[j], a.items[i] -} -func (a *byExprString) Less(i, j int) bool { - first, err := a.intr.Execute(a.node, a.items[i]) - if err != nil { - a.hasError = true - // Return a dummy value. - return true - } - ith, ok := first.(string) - if !ok { - a.hasError = true - return true - } - second, err := a.intr.Execute(a.node, a.items[j]) - if err != nil { - a.hasError = true - // Return a dummy value. - return true - } - jth, ok := second.(string) - if !ok { - a.hasError = true - return true - } - return ith < jth -} - -type byExprFloat struct { - intr *treeInterpreter - node ASTNode - items []interface{} - hasError bool -} - -func (a *byExprFloat) Len() int { - return len(a.items) -} -func (a *byExprFloat) Swap(i, j int) { - a.items[i], a.items[j] = a.items[j], a.items[i] -} -func (a *byExprFloat) Less(i, j int) bool { - first, err := a.intr.Execute(a.node, a.items[i]) - if err != nil { - a.hasError = true - // Return a dummy value. - return true - } - ith, ok := first.(float64) - if !ok { - a.hasError = true - return true - } - second, err := a.intr.Execute(a.node, a.items[j]) - if err != nil { - a.hasError = true - // Return a dummy value. - return true - } - jth, ok := second.(float64) - if !ok { - a.hasError = true - return true - } - return ith < jth -} - -type functionCaller struct { - functionTable map[string]functionEntry -} - -func newFunctionCaller() *functionCaller { - caller := &functionCaller{} - caller.functionTable = map[string]functionEntry{ - "length": { - name: "length", - arguments: []argSpec{ - {types: []jpType{jpString, jpArray, jpObject}}, - }, - handler: jpfLength, - }, - "starts_with": { - name: "starts_with", - arguments: []argSpec{ - {types: []jpType{jpString}}, - {types: []jpType{jpString}}, - }, - handler: jpfStartsWith, - }, - "abs": { - name: "abs", - arguments: []argSpec{ - {types: []jpType{jpNumber}}, - }, - handler: jpfAbs, - }, - "avg": { - name: "avg", - arguments: []argSpec{ - {types: []jpType{jpArrayNumber}}, - }, - handler: jpfAvg, - }, - "ceil": { - name: "ceil", - arguments: []argSpec{ - {types: []jpType{jpNumber}}, - }, - handler: jpfCeil, - }, - "contains": { - name: "contains", - arguments: []argSpec{ - {types: []jpType{jpArray, jpString}}, - {types: []jpType{jpAny}}, - }, - handler: jpfContains, - }, - "ends_with": { - name: "ends_with", - arguments: []argSpec{ - {types: []jpType{jpString}}, - {types: []jpType{jpString}}, - }, - handler: jpfEndsWith, - }, - "floor": { - name: "floor", - arguments: []argSpec{ - {types: []jpType{jpNumber}}, - }, - handler: jpfFloor, - }, - "map": { - name: "amp", - arguments: []argSpec{ - {types: []jpType{jpExpref}}, - {types: []jpType{jpArray}}, - }, - handler: jpfMap, - hasExpRef: true, - }, - "max": { - name: "max", - arguments: []argSpec{ - {types: []jpType{jpArrayNumber, jpArrayString}}, - }, - handler: jpfMax, - }, - "merge": { - name: "merge", - arguments: []argSpec{ - {types: []jpType{jpObject}, variadic: true}, - }, - handler: jpfMerge, - }, - "max_by": { - name: "max_by", - arguments: []argSpec{ - {types: []jpType{jpArray}}, - {types: []jpType{jpExpref}}, - }, - handler: jpfMaxBy, - hasExpRef: true, - }, - "sum": { - name: "sum", - arguments: []argSpec{ - {types: []jpType{jpArrayNumber}}, - }, - handler: jpfSum, - }, - "min": { - name: "min", - arguments: []argSpec{ - {types: []jpType{jpArrayNumber, jpArrayString}}, - }, - handler: jpfMin, - }, - "min_by": { - name: "min_by", - arguments: []argSpec{ - {types: []jpType{jpArray}}, - {types: []jpType{jpExpref}}, - }, - handler: jpfMinBy, - hasExpRef: true, - }, - "type": { - name: "type", - arguments: []argSpec{ - {types: []jpType{jpAny}}, - }, - handler: jpfType, - }, - "keys": { - name: "keys", - arguments: []argSpec{ - {types: []jpType{jpObject}}, - }, - handler: jpfKeys, - }, - "values": { - name: "values", - arguments: []argSpec{ - {types: []jpType{jpObject}}, - }, - handler: jpfValues, - }, - "sort": { - name: "sort", - arguments: []argSpec{ - {types: []jpType{jpArrayString, jpArrayNumber}}, - }, - handler: jpfSort, - }, - "sort_by": { - name: "sort_by", - arguments: []argSpec{ - {types: []jpType{jpArray}}, - {types: []jpType{jpExpref}}, - }, - handler: jpfSortBy, - hasExpRef: true, - }, - "join": { - name: "join", - arguments: []argSpec{ - {types: []jpType{jpString}}, - {types: []jpType{jpArrayString}}, - }, - handler: jpfJoin, - }, - "reverse": { - name: "reverse", - arguments: []argSpec{ - {types: []jpType{jpArray, jpString}}, - }, - handler: jpfReverse, - }, - "to_array": { - name: "to_array", - arguments: []argSpec{ - {types: []jpType{jpAny}}, - }, - handler: jpfToArray, - }, - "to_string": { - name: "to_string", - arguments: []argSpec{ - {types: []jpType{jpAny}}, - }, - handler: jpfToString, - }, - "to_number": { - name: "to_number", - arguments: []argSpec{ - {types: []jpType{jpAny}}, - }, - handler: jpfToNumber, - }, - "not_null": { - name: "not_null", - arguments: []argSpec{ - {types: []jpType{jpAny}, variadic: true}, - }, - handler: jpfNotNull, - }, - } - return caller -} - -func (e *functionEntry) resolveArgs(arguments []interface{}) ([]interface{}, error) { - if len(e.arguments) == 0 { - return arguments, nil - } - if !e.arguments[len(e.arguments)-1].variadic { - if len(e.arguments) != len(arguments) { - return nil, errors.New("incorrect number of args") - } - for i, spec := range e.arguments { - userArg := arguments[i] - err := spec.typeCheck(userArg) - if err != nil { - return nil, err - } - } - return arguments, nil - } - if len(arguments) < len(e.arguments) { - return nil, errors.New("Invalid arity.") - } - return arguments, nil -} - -func (a *argSpec) typeCheck(arg interface{}) error { - for _, t := range a.types { - switch t { - case jpNumber: - if _, ok := arg.(float64); ok { - return nil - } - case jpString: - if _, ok := arg.(string); ok { - return nil - } - case jpArray: - if isSliceType(arg) { - return nil - } - case jpObject: - if _, ok := arg.(map[string]interface{}); ok { - return nil - } - case jpArrayNumber: - if _, ok := toArrayNum(arg); ok { - return nil - } - case jpArrayString: - if _, ok := toArrayStr(arg); ok { - return nil - } - case jpAny: - return nil - case jpExpref: - if _, ok := arg.(expRef); ok { - return nil - } - } - } - return fmt.Errorf("Invalid type for: %v, expected: %#v", arg, a.types) -} - -func (f *functionCaller) CallFunction(name string, arguments []interface{}, intr *treeInterpreter) (interface{}, error) { - entry, ok := f.functionTable[name] - if !ok { - return nil, errors.New("unknown function: " + name) - } - resolvedArgs, err := entry.resolveArgs(arguments) - if err != nil { - return nil, err - } - if entry.hasExpRef { - var extra []interface{} - extra = append(extra, intr) - resolvedArgs = append(extra, resolvedArgs...) - } - return entry.handler(resolvedArgs) -} - -func jpfAbs(arguments []interface{}) (interface{}, error) { - num := arguments[0].(float64) - return math.Abs(num), nil -} - -func jpfLength(arguments []interface{}) (interface{}, error) { - arg := arguments[0] - if c, ok := arg.(string); ok { - return float64(utf8.RuneCountInString(c)), nil - } else if isSliceType(arg) { - v := reflect.ValueOf(arg) - return float64(v.Len()), nil - } else if c, ok := arg.(map[string]interface{}); ok { - return float64(len(c)), nil - } - return nil, errors.New("could not compute length()") -} - -func jpfStartsWith(arguments []interface{}) (interface{}, error) { - search := arguments[0].(string) - prefix := arguments[1].(string) - return strings.HasPrefix(search, prefix), nil -} - -func jpfAvg(arguments []interface{}) (interface{}, error) { - // We've already type checked the value so we can safely use - // type assertions. - args := arguments[0].([]interface{}) - length := float64(len(args)) - numerator := 0.0 - for _, n := range args { - numerator += n.(float64) - } - return numerator / length, nil -} -func jpfCeil(arguments []interface{}) (interface{}, error) { - val := arguments[0].(float64) - return math.Ceil(val), nil -} -func jpfContains(arguments []interface{}) (interface{}, error) { - search := arguments[0] - el := arguments[1] - if searchStr, ok := search.(string); ok { - if elStr, ok := el.(string); ok { - return strings.Index(searchStr, elStr) != -1, nil - } - return false, nil - } - // Otherwise this is a generic contains for []interface{} - general := search.([]interface{}) - for _, item := range general { - if item == el { - return true, nil - } - } - return false, nil -} -func jpfEndsWith(arguments []interface{}) (interface{}, error) { - search := arguments[0].(string) - suffix := arguments[1].(string) - return strings.HasSuffix(search, suffix), nil -} -func jpfFloor(arguments []interface{}) (interface{}, error) { - val := arguments[0].(float64) - return math.Floor(val), nil -} -func jpfMap(arguments []interface{}) (interface{}, error) { - intr := arguments[0].(*treeInterpreter) - exp := arguments[1].(expRef) - node := exp.ref - arr := arguments[2].([]interface{}) - mapped := make([]interface{}, 0, len(arr)) - for _, value := range arr { - current, err := intr.Execute(node, value) - if err != nil { - return nil, err - } - mapped = append(mapped, current) - } - return mapped, nil -} -func jpfMax(arguments []interface{}) (interface{}, error) { - if items, ok := toArrayNum(arguments[0]); ok { - if len(items) == 0 { - return nil, nil - } - if len(items) == 1 { - return items[0], nil - } - best := items[0] - for _, item := range items[1:] { - if item > best { - best = item - } - } - return best, nil - } - // Otherwise we're dealing with a max() of strings. - items, _ := toArrayStr(arguments[0]) - if len(items) == 0 { - return nil, nil - } - if len(items) == 1 { - return items[0], nil - } - best := items[0] - for _, item := range items[1:] { - if item > best { - best = item - } - } - return best, nil -} -func jpfMerge(arguments []interface{}) (interface{}, error) { - final := make(map[string]interface{}) - for _, m := range arguments { - mapped := m.(map[string]interface{}) - for key, value := range mapped { - final[key] = value - } - } - return final, nil -} -func jpfMaxBy(arguments []interface{}) (interface{}, error) { - intr := arguments[0].(*treeInterpreter) - arr := arguments[1].([]interface{}) - exp := arguments[2].(expRef) - node := exp.ref - if len(arr) == 0 { - return nil, nil - } else if len(arr) == 1 { - return arr[0], nil - } - start, err := intr.Execute(node, arr[0]) - if err != nil { - return nil, err - } - switch t := start.(type) { - case float64: - bestVal := t - bestItem := arr[0] - for _, item := range arr[1:] { - result, err := intr.Execute(node, item) - if err != nil { - return nil, err - } - current, ok := result.(float64) - if !ok { - return nil, errors.New("invalid type, must be number") - } - if current > bestVal { - bestVal = current - bestItem = item - } - } - return bestItem, nil - case string: - bestVal := t - bestItem := arr[0] - for _, item := range arr[1:] { - result, err := intr.Execute(node, item) - if err != nil { - return nil, err - } - current, ok := result.(string) - if !ok { - return nil, errors.New("invalid type, must be string") - } - if current > bestVal { - bestVal = current - bestItem = item - } - } - return bestItem, nil - default: - return nil, errors.New("invalid type, must be number of string") - } -} -func jpfSum(arguments []interface{}) (interface{}, error) { - items, _ := toArrayNum(arguments[0]) - sum := 0.0 - for _, item := range items { - sum += item - } - return sum, nil -} - -func jpfMin(arguments []interface{}) (interface{}, error) { - if items, ok := toArrayNum(arguments[0]); ok { - if len(items) == 0 { - return nil, nil - } - if len(items) == 1 { - return items[0], nil - } - best := items[0] - for _, item := range items[1:] { - if item < best { - best = item - } - } - return best, nil - } - items, _ := toArrayStr(arguments[0]) - if len(items) == 0 { - return nil, nil - } - if len(items) == 1 { - return items[0], nil - } - best := items[0] - for _, item := range items[1:] { - if item < best { - best = item - } - } - return best, nil -} - -func jpfMinBy(arguments []interface{}) (interface{}, error) { - intr := arguments[0].(*treeInterpreter) - arr := arguments[1].([]interface{}) - exp := arguments[2].(expRef) - node := exp.ref - if len(arr) == 0 { - return nil, nil - } else if len(arr) == 1 { - return arr[0], nil - } - start, err := intr.Execute(node, arr[0]) - if err != nil { - return nil, err - } - if t, ok := start.(float64); ok { - bestVal := t - bestItem := arr[0] - for _, item := range arr[1:] { - result, err := intr.Execute(node, item) - if err != nil { - return nil, err - } - current, ok := result.(float64) - if !ok { - return nil, errors.New("invalid type, must be number") - } - if current < bestVal { - bestVal = current - bestItem = item - } - } - return bestItem, nil - } else if t, ok := start.(string); ok { - bestVal := t - bestItem := arr[0] - for _, item := range arr[1:] { - result, err := intr.Execute(node, item) - if err != nil { - return nil, err - } - current, ok := result.(string) - if !ok { - return nil, errors.New("invalid type, must be string") - } - if current < bestVal { - bestVal = current - bestItem = item - } - } - return bestItem, nil - } else { - return nil, errors.New("invalid type, must be number of string") - } -} -func jpfType(arguments []interface{}) (interface{}, error) { - arg := arguments[0] - if _, ok := arg.(float64); ok { - return "number", nil - } - if _, ok := arg.(string); ok { - return "string", nil - } - if _, ok := arg.([]interface{}); ok { - return "array", nil - } - if _, ok := arg.(map[string]interface{}); ok { - return "object", nil - } - if arg == nil { - return "null", nil - } - if arg == true || arg == false { - return "boolean", nil - } - return nil, errors.New("unknown type") -} -func jpfKeys(arguments []interface{}) (interface{}, error) { - arg := arguments[0].(map[string]interface{}) - collected := make([]interface{}, 0, len(arg)) - for key := range arg { - collected = append(collected, key) - } - return collected, nil -} -func jpfValues(arguments []interface{}) (interface{}, error) { - arg := arguments[0].(map[string]interface{}) - collected := make([]interface{}, 0, len(arg)) - for _, value := range arg { - collected = append(collected, value) - } - return collected, nil -} -func jpfSort(arguments []interface{}) (interface{}, error) { - if items, ok := toArrayNum(arguments[0]); ok { - d := sort.Float64Slice(items) - sort.Stable(d) - final := make([]interface{}, len(d)) - for i, val := range d { - final[i] = val - } - return final, nil - } - // Otherwise we're dealing with sort()'ing strings. - items, _ := toArrayStr(arguments[0]) - d := sort.StringSlice(items) - sort.Stable(d) - final := make([]interface{}, len(d)) - for i, val := range d { - final[i] = val - } - return final, nil -} -func jpfSortBy(arguments []interface{}) (interface{}, error) { - intr := arguments[0].(*treeInterpreter) - arr := arguments[1].([]interface{}) - exp := arguments[2].(expRef) - node := exp.ref - if len(arr) == 0 { - return arr, nil - } else if len(arr) == 1 { - return arr, nil - } - start, err := intr.Execute(node, arr[0]) - if err != nil { - return nil, err - } - if _, ok := start.(float64); ok { - sortable := &byExprFloat{intr, node, arr, false} - sort.Stable(sortable) - if sortable.hasError { - return nil, errors.New("error in sort_by comparison") - } - return arr, nil - } else if _, ok := start.(string); ok { - sortable := &byExprString{intr, node, arr, false} - sort.Stable(sortable) - if sortable.hasError { - return nil, errors.New("error in sort_by comparison") - } - return arr, nil - } else { - return nil, errors.New("invalid type, must be number of string") - } -} -func jpfJoin(arguments []interface{}) (interface{}, error) { - sep := arguments[0].(string) - // We can't just do arguments[1].([]string), we have to - // manually convert each item to a string. - arrayStr := []string{} - for _, item := range arguments[1].([]interface{}) { - arrayStr = append(arrayStr, item.(string)) - } - return strings.Join(arrayStr, sep), nil -} -func jpfReverse(arguments []interface{}) (interface{}, error) { - if s, ok := arguments[0].(string); ok { - r := []rune(s) - for i, j := 0, len(r)-1; i < len(r)/2; i, j = i+1, j-1 { - r[i], r[j] = r[j], r[i] - } - return string(r), nil - } - items := arguments[0].([]interface{}) - length := len(items) - reversed := make([]interface{}, length) - for i, item := range items { - reversed[length-(i+1)] = item - } - return reversed, nil -} -func jpfToArray(arguments []interface{}) (interface{}, error) { - if _, ok := arguments[0].([]interface{}); ok { - return arguments[0], nil - } - return arguments[:1:1], nil -} -func jpfToString(arguments []interface{}) (interface{}, error) { - if v, ok := arguments[0].(string); ok { - return v, nil - } - result, err := json.Marshal(arguments[0]) - if err != nil { - return nil, err - } - return string(result), nil -} -func jpfToNumber(arguments []interface{}) (interface{}, error) { - arg := arguments[0] - if v, ok := arg.(float64); ok { - return v, nil - } - if v, ok := arg.(string); ok { - conv, err := strconv.ParseFloat(v, 64) - if err != nil { - return nil, nil - } - return conv, nil - } - if _, ok := arg.([]interface{}); ok { - return nil, nil - } - if _, ok := arg.(map[string]interface{}); ok { - return nil, nil - } - if arg == nil { - return nil, nil - } - if arg == true || arg == false { - return nil, nil - } - return nil, errors.New("unknown type") -} -func jpfNotNull(arguments []interface{}) (interface{}, error) { - for _, arg := range arguments { - if arg != nil { - return arg, nil - } - } - return nil, nil -} diff --git a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/fuzz/jmespath.go b/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/fuzz/jmespath.go deleted file mode 100644 index c7df087..0000000 --- a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/fuzz/jmespath.go +++ /dev/null @@ -1,13 +0,0 @@ -package jmespath - -import "github.com/jmespath/go-jmespath" - -// Fuzz will fuzz test the JMESPath parser. -func Fuzz(data []byte) int { - p := jmespath.NewParser() - _, err := p.Parse(string(data)) - if err != nil { - return 1 - } - return 0 -} diff --git a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/interpreter.go b/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/interpreter.go deleted file mode 100644 index 13c7460..0000000 --- a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/interpreter.go +++ /dev/null @@ -1,418 +0,0 @@ -package jmespath - -import ( - "errors" - "reflect" - "unicode" - "unicode/utf8" -) - -/* This is a tree based interpreter. It walks the AST and directly - interprets the AST to search through a JSON document. -*/ - -type treeInterpreter struct { - fCall *functionCaller -} - -func newInterpreter() *treeInterpreter { - interpreter := treeInterpreter{} - interpreter.fCall = newFunctionCaller() - return &interpreter -} - -type expRef struct { - ref ASTNode -} - -// Execute takes an ASTNode and input data and interprets the AST directly. -// It will produce the result of applying the JMESPath expression associated -// with the ASTNode to the input data "value". -func (intr *treeInterpreter) Execute(node ASTNode, value interface{}) (interface{}, error) { - switch node.nodeType { - case ASTComparator: - left, err := intr.Execute(node.children[0], value) - if err != nil { - return nil, err - } - right, err := intr.Execute(node.children[1], value) - if err != nil { - return nil, err - } - switch node.value { - case tEQ: - return objsEqual(left, right), nil - case tNE: - return !objsEqual(left, right), nil - } - leftNum, ok := left.(float64) - if !ok { - return nil, nil - } - rightNum, ok := right.(float64) - if !ok { - return nil, nil - } - switch node.value { - case tGT: - return leftNum > rightNum, nil - case tGTE: - return leftNum >= rightNum, nil - case tLT: - return leftNum < rightNum, nil - case tLTE: - return leftNum <= rightNum, nil - } - case ASTExpRef: - return expRef{ref: node.children[0]}, nil - case ASTFunctionExpression: - resolvedArgs := []interface{}{} - for _, arg := range node.children { - current, err := intr.Execute(arg, value) - if err != nil { - return nil, err - } - resolvedArgs = append(resolvedArgs, current) - } - return intr.fCall.CallFunction(node.value.(string), resolvedArgs, intr) - case ASTField: - if m, ok := value.(map[string]interface{}); ok { - key := node.value.(string) - return m[key], nil - } - return intr.fieldFromStruct(node.value.(string), value) - case ASTFilterProjection: - left, err := intr.Execute(node.children[0], value) - if err != nil { - return nil, nil - } - sliceType, ok := left.([]interface{}) - if !ok { - if isSliceType(left) { - return intr.filterProjectionWithReflection(node, left) - } - return nil, nil - } - compareNode := node.children[2] - collected := []interface{}{} - for _, element := range sliceType { - result, err := intr.Execute(compareNode, element) - if err != nil { - return nil, err - } - if !isFalse(result) { - current, err := intr.Execute(node.children[1], element) - if err != nil { - return nil, err - } - if current != nil { - collected = append(collected, current) - } - } - } - return collected, nil - case ASTFlatten: - left, err := intr.Execute(node.children[0], value) - if err != nil { - return nil, nil - } - sliceType, ok := left.([]interface{}) - if !ok { - // If we can't type convert to []interface{}, there's - // a chance this could still work via reflection if we're - // dealing with user provided types. - if isSliceType(left) { - return intr.flattenWithReflection(left) - } - return nil, nil - } - flattened := []interface{}{} - for _, element := range sliceType { - if elementSlice, ok := element.([]interface{}); ok { - flattened = append(flattened, elementSlice...) - } else if isSliceType(element) { - reflectFlat := []interface{}{} - v := reflect.ValueOf(element) - for i := 0; i < v.Len(); i++ { - reflectFlat = append(reflectFlat, v.Index(i).Interface()) - } - flattened = append(flattened, reflectFlat...) - } else { - flattened = append(flattened, element) - } - } - return flattened, nil - case ASTIdentity, ASTCurrentNode: - return value, nil - case ASTIndex: - if sliceType, ok := value.([]interface{}); ok { - index := node.value.(int) - if index < 0 { - index += len(sliceType) - } - if index < len(sliceType) && index >= 0 { - return sliceType[index], nil - } - return nil, nil - } - // Otherwise try via reflection. - rv := reflect.ValueOf(value) - if rv.Kind() == reflect.Slice { - index := node.value.(int) - if index < 0 { - index += rv.Len() - } - if index < rv.Len() && index >= 0 { - v := rv.Index(index) - return v.Interface(), nil - } - } - return nil, nil - case ASTKeyValPair: - return intr.Execute(node.children[0], value) - case ASTLiteral: - return node.value, nil - case ASTMultiSelectHash: - if value == nil { - return nil, nil - } - collected := make(map[string]interface{}) - for _, child := range node.children { - current, err := intr.Execute(child, value) - if err != nil { - return nil, err - } - key := child.value.(string) - collected[key] = current - } - return collected, nil - case ASTMultiSelectList: - if value == nil { - return nil, nil - } - collected := []interface{}{} - for _, child := range node.children { - current, err := intr.Execute(child, value) - if err != nil { - return nil, err - } - collected = append(collected, current) - } - return collected, nil - case ASTOrExpression: - matched, err := intr.Execute(node.children[0], value) - if err != nil { - return nil, err - } - if isFalse(matched) { - matched, err = intr.Execute(node.children[1], value) - if err != nil { - return nil, err - } - } - return matched, nil - case ASTAndExpression: - matched, err := intr.Execute(node.children[0], value) - if err != nil { - return nil, err - } - if isFalse(matched) { - return matched, nil - } - return intr.Execute(node.children[1], value) - case ASTNotExpression: - matched, err := intr.Execute(node.children[0], value) - if err != nil { - return nil, err - } - if isFalse(matched) { - return true, nil - } - return false, nil - case ASTPipe: - result := value - var err error - for _, child := range node.children { - result, err = intr.Execute(child, result) - if err != nil { - return nil, err - } - } - return result, nil - case ASTProjection: - left, err := intr.Execute(node.children[0], value) - if err != nil { - return nil, err - } - sliceType, ok := left.([]interface{}) - if !ok { - if isSliceType(left) { - return intr.projectWithReflection(node, left) - } - return nil, nil - } - collected := []interface{}{} - var current interface{} - for _, element := range sliceType { - current, err = intr.Execute(node.children[1], element) - if err != nil { - return nil, err - } - if current != nil { - collected = append(collected, current) - } - } - return collected, nil - case ASTSubexpression, ASTIndexExpression: - left, err := intr.Execute(node.children[0], value) - if err != nil { - return nil, err - } - return intr.Execute(node.children[1], left) - case ASTSlice: - sliceType, ok := value.([]interface{}) - if !ok { - if isSliceType(value) { - return intr.sliceWithReflection(node, value) - } - return nil, nil - } - parts := node.value.([]*int) - sliceParams := make([]sliceParam, 3) - for i, part := range parts { - if part != nil { - sliceParams[i].Specified = true - sliceParams[i].N = *part - } - } - return slice(sliceType, sliceParams) - case ASTValueProjection: - left, err := intr.Execute(node.children[0], value) - if err != nil { - return nil, nil - } - mapType, ok := left.(map[string]interface{}) - if !ok { - return nil, nil - } - values := make([]interface{}, len(mapType)) - for _, value := range mapType { - values = append(values, value) - } - collected := []interface{}{} - for _, element := range values { - current, err := intr.Execute(node.children[1], element) - if err != nil { - return nil, err - } - if current != nil { - collected = append(collected, current) - } - } - return collected, nil - } - return nil, errors.New("Unknown AST node: " + node.nodeType.String()) -} - -func (intr *treeInterpreter) fieldFromStruct(key string, value interface{}) (interface{}, error) { - rv := reflect.ValueOf(value) - first, n := utf8.DecodeRuneInString(key) - fieldName := string(unicode.ToUpper(first)) + key[n:] - if rv.Kind() == reflect.Struct { - v := rv.FieldByName(fieldName) - if !v.IsValid() { - return nil, nil - } - return v.Interface(), nil - } else if rv.Kind() == reflect.Ptr { - // Handle multiple levels of indirection? - if rv.IsNil() { - return nil, nil - } - rv = rv.Elem() - v := rv.FieldByName(fieldName) - if !v.IsValid() { - return nil, nil - } - return v.Interface(), nil - } - return nil, nil -} - -func (intr *treeInterpreter) flattenWithReflection(value interface{}) (interface{}, error) { - v := reflect.ValueOf(value) - flattened := []interface{}{} - for i := 0; i < v.Len(); i++ { - element := v.Index(i).Interface() - if reflect.TypeOf(element).Kind() == reflect.Slice { - // Then insert the contents of the element - // slice into the flattened slice, - // i.e flattened = append(flattened, mySlice...) - elementV := reflect.ValueOf(element) - for j := 0; j < elementV.Len(); j++ { - flattened = append( - flattened, elementV.Index(j).Interface()) - } - } else { - flattened = append(flattened, element) - } - } - return flattened, nil -} - -func (intr *treeInterpreter) sliceWithReflection(node ASTNode, value interface{}) (interface{}, error) { - v := reflect.ValueOf(value) - parts := node.value.([]*int) - sliceParams := make([]sliceParam, 3) - for i, part := range parts { - if part != nil { - sliceParams[i].Specified = true - sliceParams[i].N = *part - } - } - final := []interface{}{} - for i := 0; i < v.Len(); i++ { - element := v.Index(i).Interface() - final = append(final, element) - } - return slice(final, sliceParams) -} - -func (intr *treeInterpreter) filterProjectionWithReflection(node ASTNode, value interface{}) (interface{}, error) { - compareNode := node.children[2] - collected := []interface{}{} - v := reflect.ValueOf(value) - for i := 0; i < v.Len(); i++ { - element := v.Index(i).Interface() - result, err := intr.Execute(compareNode, element) - if err != nil { - return nil, err - } - if !isFalse(result) { - current, err := intr.Execute(node.children[1], element) - if err != nil { - return nil, err - } - if current != nil { - collected = append(collected, current) - } - } - } - return collected, nil -} - -func (intr *treeInterpreter) projectWithReflection(node ASTNode, value interface{}) (interface{}, error) { - collected := []interface{}{} - v := reflect.ValueOf(value) - for i := 0; i < v.Len(); i++ { - element := v.Index(i).Interface() - result, err := intr.Execute(node.children[1], element) - if err != nil { - return nil, err - } - if result != nil { - collected = append(collected, result) - } - } - return collected, nil -} diff --git a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/interpreter_test.go b/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/interpreter_test.go deleted file mode 100644 index 11c6d0a..0000000 --- a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/interpreter_test.go +++ /dev/null @@ -1,221 +0,0 @@ -package jmespath - -import ( - "encoding/json" - "testing" - - "github.com/stretchr/testify/assert" -) - -type scalars struct { - Foo string - Bar string -} - -type sliceType struct { - A string - B []scalars - C []*scalars -} - -type benchmarkStruct struct { - Fooasdfasdfasdfasdf string -} - -type benchmarkNested struct { - Fooasdfasdfasdfasdf nestedA -} - -type nestedA struct { - Fooasdfasdfasdfasdf nestedB -} - -type nestedB struct { - Fooasdfasdfasdfasdf nestedC -} - -type nestedC struct { - Fooasdfasdfasdfasdf string -} - -type nestedSlice struct { - A []sliceType -} - -func TestCanSupportEmptyInterface(t *testing.T) { - assert := assert.New(t) - data := make(map[string]interface{}) - data["foo"] = "bar" - result, err := Search("foo", data) - assert.Nil(err) - assert.Equal("bar", result) -} - -func TestCanSupportUserDefinedStructsValue(t *testing.T) { - assert := assert.New(t) - s := scalars{Foo: "one", Bar: "bar"} - result, err := Search("Foo", s) - assert.Nil(err) - assert.Equal("one", result) -} - -func TestCanSupportUserDefinedStructsRef(t *testing.T) { - assert := assert.New(t) - s := scalars{Foo: "one", Bar: "bar"} - result, err := Search("Foo", &s) - assert.Nil(err) - assert.Equal("one", result) -} - -func TestCanSupportStructWithSliceAll(t *testing.T) { - assert := assert.New(t) - data := sliceType{A: "foo", B: []scalars{{"f1", "b1"}, {"correct", "b2"}}} - result, err := Search("B[].Foo", data) - assert.Nil(err) - assert.Equal([]interface{}{"f1", "correct"}, result) -} - -func TestCanSupportStructWithSlicingExpression(t *testing.T) { - assert := assert.New(t) - data := sliceType{A: "foo", B: []scalars{{"f1", "b1"}, {"correct", "b2"}}} - result, err := Search("B[:].Foo", data) - assert.Nil(err) - assert.Equal([]interface{}{"f1", "correct"}, result) -} - -func TestCanSupportStructWithFilterProjection(t *testing.T) { - assert := assert.New(t) - data := sliceType{A: "foo", B: []scalars{{"f1", "b1"}, {"correct", "b2"}}} - result, err := Search("B[? `true` ].Foo", data) - assert.Nil(err) - assert.Equal([]interface{}{"f1", "correct"}, result) -} - -func TestCanSupportStructWithSlice(t *testing.T) { - assert := assert.New(t) - data := sliceType{A: "foo", B: []scalars{{"f1", "b1"}, {"correct", "b2"}}} - result, err := Search("B[-1].Foo", data) - assert.Nil(err) - assert.Equal("correct", result) -} - -func TestCanSupportStructWithOrExpressions(t *testing.T) { - assert := assert.New(t) - data := sliceType{A: "foo", C: nil} - result, err := Search("C || A", data) - assert.Nil(err) - assert.Equal("foo", result) -} - -func TestCanSupportStructWithSlicePointer(t *testing.T) { - assert := assert.New(t) - data := sliceType{A: "foo", C: []*scalars{{"f1", "b1"}, {"correct", "b2"}}} - result, err := Search("C[-1].Foo", data) - assert.Nil(err) - assert.Equal("correct", result) -} - -func TestWillAutomaticallyCapitalizeFieldNames(t *testing.T) { - assert := assert.New(t) - s := scalars{Foo: "one", Bar: "bar"} - // Note that there's a lower cased "foo" instead of "Foo", - // but it should still correspond to the Foo field in the - // scalars struct - result, err := Search("foo", &s) - assert.Nil(err) - assert.Equal("one", result) -} - -func TestCanSupportStructWithSliceLowerCased(t *testing.T) { - assert := assert.New(t) - data := sliceType{A: "foo", B: []scalars{{"f1", "b1"}, {"correct", "b2"}}} - result, err := Search("b[-1].foo", data) - assert.Nil(err) - assert.Equal("correct", result) -} - -func TestCanSupportStructWithNestedPointers(t *testing.T) { - assert := assert.New(t) - data := struct{ A *struct{ B int } }{} - result, err := Search("A.B", data) - assert.Nil(err) - assert.Nil(result) -} - -func TestCanSupportFlattenNestedSlice(t *testing.T) { - assert := assert.New(t) - data := nestedSlice{A: []sliceType{ - {B: []scalars{{Foo: "f1a"}, {Foo: "f1b"}}}, - {B: []scalars{{Foo: "f2a"}, {Foo: "f2b"}}}, - }} - result, err := Search("A[].B[].Foo", data) - assert.Nil(err) - assert.Equal([]interface{}{"f1a", "f1b", "f2a", "f2b"}, result) -} - -func TestCanSupportFlattenNestedEmptySlice(t *testing.T) { - assert := assert.New(t) - data := nestedSlice{A: []sliceType{ - {}, {B: []scalars{{Foo: "a"}}}, - }} - result, err := Search("A[].B[].Foo", data) - assert.Nil(err) - assert.Equal([]interface{}{"a"}, result) -} - -func TestCanSupportProjectionsWithStructs(t *testing.T) { - assert := assert.New(t) - data := nestedSlice{A: []sliceType{ - {A: "first"}, {A: "second"}, {A: "third"}, - }} - result, err := Search("A[*].A", data) - assert.Nil(err) - assert.Equal([]interface{}{"first", "second", "third"}, result) -} - -func TestCanSupportSliceOfStructsWithFunctions(t *testing.T) { - assert := assert.New(t) - data := []scalars{scalars{"a1", "b1"}, scalars{"a2", "b2"}} - result, err := Search("length(@)", data) - assert.Nil(err) - assert.Equal(result.(float64), 2.0) -} - -func BenchmarkInterpretSingleFieldStruct(b *testing.B) { - intr := newInterpreter() - parser := NewParser() - ast, _ := parser.Parse("fooasdfasdfasdfasdf") - data := benchmarkStruct{"foobarbazqux"} - for i := 0; i < b.N; i++ { - intr.Execute(ast, &data) - } -} - -func BenchmarkInterpretNestedStruct(b *testing.B) { - intr := newInterpreter() - parser := NewParser() - ast, _ := parser.Parse("fooasdfasdfasdfasdf.fooasdfasdfasdfasdf.fooasdfasdfasdfasdf.fooasdfasdfasdfasdf") - data := benchmarkNested{ - nestedA{ - nestedB{ - nestedC{"foobarbazqux"}, - }, - }, - } - for i := 0; i < b.N; i++ { - intr.Execute(ast, &data) - } -} - -func BenchmarkInterpretNestedMaps(b *testing.B) { - jsonData := []byte(`{"fooasdfasdfasdfasdf": {"fooasdfasdfasdfasdf": {"fooasdfasdfasdfasdf": {"fooasdfasdfasdfasdf": "foobarbazqux"}}}}`) - var data interface{} - json.Unmarshal(jsonData, &data) - - intr := newInterpreter() - parser := NewParser() - ast, _ := parser.Parse("fooasdfasdfasdfasdf.fooasdfasdfasdfasdf.fooasdfasdfasdfasdf.fooasdfasdfasdfasdf") - for i := 0; i < b.N; i++ { - intr.Execute(ast, data) - } -} diff --git a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/lexer.go b/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/lexer.go deleted file mode 100644 index 817900c..0000000 --- a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/lexer.go +++ /dev/null @@ -1,420 +0,0 @@ -package jmespath - -import ( - "bytes" - "encoding/json" - "fmt" - "strconv" - "strings" - "unicode/utf8" -) - -type token struct { - tokenType tokType - value string - position int - length int -} - -type tokType int - -const eof = -1 - -// Lexer contains information about the expression being tokenized. -type Lexer struct { - expression string // The expression provided by the user. - currentPos int // The current position in the string. - lastWidth int // The width of the current rune. This - buf bytes.Buffer // Internal buffer used for building up values. -} - -// SyntaxError is the main error used whenever a lexing or parsing error occurs. -type SyntaxError struct { - msg string // Error message displayed to user - Expression string // Expression that generated a SyntaxError - Offset int // The location in the string where the error occurred -} - -func (e SyntaxError) Error() string { - // In the future, it would be good to underline the specific - // location where the error occurred. - return "SyntaxError: " + e.msg -} - -// HighlightLocation will show where the syntax error occurred. -// It will place a "^" character on a line below the expression -// at the point where the syntax error occurred. -func (e SyntaxError) HighlightLocation() string { - return e.Expression + "\n" + strings.Repeat(" ", e.Offset) + "^" -} - -//go:generate stringer -type=tokType -const ( - tUnknown tokType = iota - tStar - tDot - tFilter - tFlatten - tLparen - tRparen - tLbracket - tRbracket - tLbrace - tRbrace - tOr - tPipe - tNumber - tUnquotedIdentifier - tQuotedIdentifier - tComma - tColon - tLT - tLTE - tGT - tGTE - tEQ - tNE - tJSONLiteral - tStringLiteral - tCurrent - tExpref - tAnd - tNot - tEOF -) - -var basicTokens = map[rune]tokType{ - '.': tDot, - '*': tStar, - ',': tComma, - ':': tColon, - '{': tLbrace, - '}': tRbrace, - ']': tRbracket, // tLbracket not included because it could be "[]" - '(': tLparen, - ')': tRparen, - '@': tCurrent, -} - -// Bit mask for [a-zA-Z_] shifted down 64 bits to fit in a single uint64. -// When using this bitmask just be sure to shift the rune down 64 bits -// before checking against identifierStartBits. -const identifierStartBits uint64 = 576460745995190270 - -// Bit mask for [a-zA-Z0-9], 128 bits -> 2 uint64s. -var identifierTrailingBits = [2]uint64{287948901175001088, 576460745995190270} - -var whiteSpace = map[rune]bool{ - ' ': true, '\t': true, '\n': true, '\r': true, -} - -func (t token) String() string { - return fmt.Sprintf("Token{%+v, %s, %d, %d}", - t.tokenType, t.value, t.position, t.length) -} - -// NewLexer creates a new JMESPath lexer. -func NewLexer() *Lexer { - lexer := Lexer{} - return &lexer -} - -func (lexer *Lexer) next() rune { - if lexer.currentPos >= len(lexer.expression) { - lexer.lastWidth = 0 - return eof - } - r, w := utf8.DecodeRuneInString(lexer.expression[lexer.currentPos:]) - lexer.lastWidth = w - lexer.currentPos += w - return r -} - -func (lexer *Lexer) back() { - lexer.currentPos -= lexer.lastWidth -} - -func (lexer *Lexer) peek() rune { - t := lexer.next() - lexer.back() - return t -} - -// tokenize takes an expression and returns corresponding tokens. -func (lexer *Lexer) tokenize(expression string) ([]token, error) { - var tokens []token - lexer.expression = expression - lexer.currentPos = 0 - lexer.lastWidth = 0 -loop: - for { - r := lexer.next() - if identifierStartBits&(1<<(uint64(r)-64)) > 0 { - t := lexer.consumeUnquotedIdentifier() - tokens = append(tokens, t) - } else if val, ok := basicTokens[r]; ok { - // Basic single char token. - t := token{ - tokenType: val, - value: string(r), - position: lexer.currentPos - lexer.lastWidth, - length: 1, - } - tokens = append(tokens, t) - } else if r == '-' || (r >= '0' && r <= '9') { - t := lexer.consumeNumber() - tokens = append(tokens, t) - } else if r == '[' { - t := lexer.consumeLBracket() - tokens = append(tokens, t) - } else if r == '"' { - t, err := lexer.consumeQuotedIdentifier() - if err != nil { - return tokens, err - } - tokens = append(tokens, t) - } else if r == '\'' { - t, err := lexer.consumeRawStringLiteral() - if err != nil { - return tokens, err - } - tokens = append(tokens, t) - } else if r == '`' { - t, err := lexer.consumeLiteral() - if err != nil { - return tokens, err - } - tokens = append(tokens, t) - } else if r == '|' { - t := lexer.matchOrElse(r, '|', tOr, tPipe) - tokens = append(tokens, t) - } else if r == '<' { - t := lexer.matchOrElse(r, '=', tLTE, tLT) - tokens = append(tokens, t) - } else if r == '>' { - t := lexer.matchOrElse(r, '=', tGTE, tGT) - tokens = append(tokens, t) - } else if r == '!' { - t := lexer.matchOrElse(r, '=', tNE, tNot) - tokens = append(tokens, t) - } else if r == '=' { - t := lexer.matchOrElse(r, '=', tEQ, tUnknown) - tokens = append(tokens, t) - } else if r == '&' { - t := lexer.matchOrElse(r, '&', tAnd, tExpref) - tokens = append(tokens, t) - } else if r == eof { - break loop - } else if _, ok := whiteSpace[r]; ok { - // Ignore whitespace - } else { - return tokens, lexer.syntaxError(fmt.Sprintf("Unknown char: %s", strconv.QuoteRuneToASCII(r))) - } - } - tokens = append(tokens, token{tEOF, "", len(lexer.expression), 0}) - return tokens, nil -} - -// Consume characters until the ending rune "r" is reached. -// If the end of the expression is reached before seeing the -// terminating rune "r", then an error is returned. -// If no error occurs then the matching substring is returned. -// The returned string will not include the ending rune. -func (lexer *Lexer) consumeUntil(end rune) (string, error) { - start := lexer.currentPos - current := lexer.next() - for current != end && current != eof { - if current == '\\' && lexer.peek() != eof { - lexer.next() - } - current = lexer.next() - } - if lexer.lastWidth == 0 { - // Then we hit an EOF so we never reached the closing - // delimiter. - return "", SyntaxError{ - msg: "Unclosed delimiter: " + string(end), - Expression: lexer.expression, - Offset: len(lexer.expression), - } - } - return lexer.expression[start : lexer.currentPos-lexer.lastWidth], nil -} - -func (lexer *Lexer) consumeLiteral() (token, error) { - start := lexer.currentPos - value, err := lexer.consumeUntil('`') - if err != nil { - return token{}, err - } - value = strings.Replace(value, "\\`", "`", -1) - return token{ - tokenType: tJSONLiteral, - value: value, - position: start, - length: len(value), - }, nil -} - -func (lexer *Lexer) consumeRawStringLiteral() (token, error) { - start := lexer.currentPos - currentIndex := start - current := lexer.next() - for current != '\'' && lexer.peek() != eof { - if current == '\\' && lexer.peek() == '\'' { - chunk := lexer.expression[currentIndex : lexer.currentPos-1] - lexer.buf.WriteString(chunk) - lexer.buf.WriteString("'") - lexer.next() - currentIndex = lexer.currentPos - } - current = lexer.next() - } - if lexer.lastWidth == 0 { - // Then we hit an EOF so we never reached the closing - // delimiter. - return token{}, SyntaxError{ - msg: "Unclosed delimiter: '", - Expression: lexer.expression, - Offset: len(lexer.expression), - } - } - if currentIndex < lexer.currentPos { - lexer.buf.WriteString(lexer.expression[currentIndex : lexer.currentPos-1]) - } - value := lexer.buf.String() - // Reset the buffer so it can reused again. - lexer.buf.Reset() - return token{ - tokenType: tStringLiteral, - value: value, - position: start, - length: len(value), - }, nil -} - -func (lexer *Lexer) syntaxError(msg string) SyntaxError { - return SyntaxError{ - msg: msg, - Expression: lexer.expression, - Offset: lexer.currentPos - 1, - } -} - -// Checks for a two char token, otherwise matches a single character -// token. This is used whenever a two char token overlaps a single -// char token, e.g. "||" -> tPipe, "|" -> tOr. -func (lexer *Lexer) matchOrElse(first rune, second rune, matchedType tokType, singleCharType tokType) token { - start := lexer.currentPos - lexer.lastWidth - nextRune := lexer.next() - var t token - if nextRune == second { - t = token{ - tokenType: matchedType, - value: string(first) + string(second), - position: start, - length: 2, - } - } else { - lexer.back() - t = token{ - tokenType: singleCharType, - value: string(first), - position: start, - length: 1, - } - } - return t -} - -func (lexer *Lexer) consumeLBracket() token { - // There's three options here: - // 1. A filter expression "[?" - // 2. A flatten operator "[]" - // 3. A bare rbracket "[" - start := lexer.currentPos - lexer.lastWidth - nextRune := lexer.next() - var t token - if nextRune == '?' { - t = token{ - tokenType: tFilter, - value: "[?", - position: start, - length: 2, - } - } else if nextRune == ']' { - t = token{ - tokenType: tFlatten, - value: "[]", - position: start, - length: 2, - } - } else { - t = token{ - tokenType: tLbracket, - value: "[", - position: start, - length: 1, - } - lexer.back() - } - return t -} - -func (lexer *Lexer) consumeQuotedIdentifier() (token, error) { - start := lexer.currentPos - value, err := lexer.consumeUntil('"') - if err != nil { - return token{}, err - } - var decoded string - asJSON := []byte("\"" + value + "\"") - if err := json.Unmarshal([]byte(asJSON), &decoded); err != nil { - return token{}, err - } - return token{ - tokenType: tQuotedIdentifier, - value: decoded, - position: start - 1, - length: len(decoded), - }, nil -} - -func (lexer *Lexer) consumeUnquotedIdentifier() token { - // Consume runes until we reach the end of an unquoted - // identifier. - start := lexer.currentPos - lexer.lastWidth - for { - r := lexer.next() - if r < 0 || r > 128 || identifierTrailingBits[uint64(r)/64]&(1<<(uint64(r)%64)) == 0 { - lexer.back() - break - } - } - value := lexer.expression[start:lexer.currentPos] - return token{ - tokenType: tUnquotedIdentifier, - value: value, - position: start, - length: lexer.currentPos - start, - } -} - -func (lexer *Lexer) consumeNumber() token { - // Consume runes until we reach something that's not a number. - start := lexer.currentPos - lexer.lastWidth - for { - r := lexer.next() - if r < '0' || r > '9' { - lexer.back() - break - } - } - value := lexer.expression[start:lexer.currentPos] - return token{ - tokenType: tNumber, - value: value, - position: start, - length: lexer.currentPos - start, - } -} diff --git a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/lexer_test.go b/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/lexer_test.go deleted file mode 100644 index d13a042..0000000 --- a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/lexer_test.go +++ /dev/null @@ -1,161 +0,0 @@ -package jmespath - -import ( - "fmt" - "testing" - - "github.com/stretchr/testify/assert" -) - -var lexingTests = []struct { - expression string - expected []token -}{ - {"*", []token{{tStar, "*", 0, 1}}}, - {".", []token{{tDot, ".", 0, 1}}}, - {"[?", []token{{tFilter, "[?", 0, 2}}}, - {"[]", []token{{tFlatten, "[]", 0, 2}}}, - {"(", []token{{tLparen, "(", 0, 1}}}, - {")", []token{{tRparen, ")", 0, 1}}}, - {"[", []token{{tLbracket, "[", 0, 1}}}, - {"]", []token{{tRbracket, "]", 0, 1}}}, - {"{", []token{{tLbrace, "{", 0, 1}}}, - {"}", []token{{tRbrace, "}", 0, 1}}}, - {"||", []token{{tOr, "||", 0, 2}}}, - {"|", []token{{tPipe, "|", 0, 1}}}, - {"29", []token{{tNumber, "29", 0, 2}}}, - {"2", []token{{tNumber, "2", 0, 1}}}, - {"0", []token{{tNumber, "0", 0, 1}}}, - {"-20", []token{{tNumber, "-20", 0, 3}}}, - {"foo", []token{{tUnquotedIdentifier, "foo", 0, 3}}}, - {`"bar"`, []token{{tQuotedIdentifier, "bar", 0, 3}}}, - // Escaping the delimiter - {`"bar\"baz"`, []token{{tQuotedIdentifier, `bar"baz`, 0, 7}}}, - {",", []token{{tComma, ",", 0, 1}}}, - {":", []token{{tColon, ":", 0, 1}}}, - {"<", []token{{tLT, "<", 0, 1}}}, - {"<=", []token{{tLTE, "<=", 0, 2}}}, - {">", []token{{tGT, ">", 0, 1}}}, - {">=", []token{{tGTE, ">=", 0, 2}}}, - {"==", []token{{tEQ, "==", 0, 2}}}, - {"!=", []token{{tNE, "!=", 0, 2}}}, - {"`[0, 1, 2]`", []token{{tJSONLiteral, "[0, 1, 2]", 1, 9}}}, - {"'foo'", []token{{tStringLiteral, "foo", 1, 3}}}, - {"'a'", []token{{tStringLiteral, "a", 1, 1}}}, - {`'foo\'bar'`, []token{{tStringLiteral, "foo'bar", 1, 7}}}, - {"@", []token{{tCurrent, "@", 0, 1}}}, - {"&", []token{{tExpref, "&", 0, 1}}}, - // Quoted identifier unicode escape sequences - {`"\u2713"`, []token{{tQuotedIdentifier, "✓", 0, 3}}}, - {`"\\"`, []token{{tQuotedIdentifier, `\`, 0, 1}}}, - {"`\"foo\"`", []token{{tJSONLiteral, "\"foo\"", 1, 5}}}, - // Combinations of tokens. - {"foo.bar", []token{ - {tUnquotedIdentifier, "foo", 0, 3}, - {tDot, ".", 3, 1}, - {tUnquotedIdentifier, "bar", 4, 3}, - }}, - {"foo[0]", []token{ - {tUnquotedIdentifier, "foo", 0, 3}, - {tLbracket, "[", 3, 1}, - {tNumber, "0", 4, 1}, - {tRbracket, "]", 5, 1}, - }}, - {"foo[?a 0 { - output += fmt.Sprintf("%schildren: {\n", strings.Repeat(" ", nextIndent)) - childIndent := nextIndent + 2 - for _, elem := range node.children { - output += elem.PrettyPrint(childIndent) - } - } - output += fmt.Sprintf("%s}\n", spaces) - return output -} - -var bindingPowers = map[tokType]int{ - tEOF: 0, - tUnquotedIdentifier: 0, - tQuotedIdentifier: 0, - tRbracket: 0, - tRparen: 0, - tComma: 0, - tRbrace: 0, - tNumber: 0, - tCurrent: 0, - tExpref: 0, - tColon: 0, - tPipe: 1, - tOr: 2, - tAnd: 3, - tEQ: 5, - tLT: 5, - tLTE: 5, - tGT: 5, - tGTE: 5, - tNE: 5, - tFlatten: 9, - tStar: 20, - tFilter: 21, - tDot: 40, - tNot: 45, - tLbrace: 50, - tLbracket: 55, - tLparen: 60, -} - -// Parser holds state about the current expression being parsed. -type Parser struct { - expression string - tokens []token - index int -} - -// NewParser creates a new JMESPath parser. -func NewParser() *Parser { - p := Parser{} - return &p -} - -// Parse will compile a JMESPath expression. -func (p *Parser) Parse(expression string) (ASTNode, error) { - lexer := NewLexer() - p.expression = expression - p.index = 0 - tokens, err := lexer.tokenize(expression) - if err != nil { - return ASTNode{}, err - } - p.tokens = tokens - parsed, err := p.parseExpression(0) - if err != nil { - return ASTNode{}, err - } - if p.current() != tEOF { - return ASTNode{}, p.syntaxError(fmt.Sprintf( - "Unexpected token at the end of the expresssion: %s", p.current())) - } - return parsed, nil -} - -func (p *Parser) parseExpression(bindingPower int) (ASTNode, error) { - var err error - leftToken := p.lookaheadToken(0) - p.advance() - leftNode, err := p.nud(leftToken) - if err != nil { - return ASTNode{}, err - } - currentToken := p.current() - for bindingPower < bindingPowers[currentToken] { - p.advance() - leftNode, err = p.led(currentToken, leftNode) - if err != nil { - return ASTNode{}, err - } - currentToken = p.current() - } - return leftNode, nil -} - -func (p *Parser) parseIndexExpression() (ASTNode, error) { - if p.lookahead(0) == tColon || p.lookahead(1) == tColon { - return p.parseSliceExpression() - } - indexStr := p.lookaheadToken(0).value - parsedInt, err := strconv.Atoi(indexStr) - if err != nil { - return ASTNode{}, err - } - indexNode := ASTNode{nodeType: ASTIndex, value: parsedInt} - p.advance() - if err := p.match(tRbracket); err != nil { - return ASTNode{}, err - } - return indexNode, nil -} - -func (p *Parser) parseSliceExpression() (ASTNode, error) { - parts := []*int{nil, nil, nil} - index := 0 - current := p.current() - for current != tRbracket && index < 3 { - if current == tColon { - index++ - p.advance() - } else if current == tNumber { - parsedInt, err := strconv.Atoi(p.lookaheadToken(0).value) - if err != nil { - return ASTNode{}, err - } - parts[index] = &parsedInt - p.advance() - } else { - return ASTNode{}, p.syntaxError( - "Expected tColon or tNumber" + ", received: " + p.current().String()) - } - current = p.current() - } - if err := p.match(tRbracket); err != nil { - return ASTNode{}, err - } - return ASTNode{ - nodeType: ASTSlice, - value: parts, - }, nil -} - -func (p *Parser) match(tokenType tokType) error { - if p.current() == tokenType { - p.advance() - return nil - } - return p.syntaxError("Expected " + tokenType.String() + ", received: " + p.current().String()) -} - -func (p *Parser) led(tokenType tokType, node ASTNode) (ASTNode, error) { - switch tokenType { - case tDot: - if p.current() != tStar { - right, err := p.parseDotRHS(bindingPowers[tDot]) - return ASTNode{ - nodeType: ASTSubexpression, - children: []ASTNode{node, right}, - }, err - } - p.advance() - right, err := p.parseProjectionRHS(bindingPowers[tDot]) - return ASTNode{ - nodeType: ASTValueProjection, - children: []ASTNode{node, right}, - }, err - case tPipe: - right, err := p.parseExpression(bindingPowers[tPipe]) - return ASTNode{nodeType: ASTPipe, children: []ASTNode{node, right}}, err - case tOr: - right, err := p.parseExpression(bindingPowers[tOr]) - return ASTNode{nodeType: ASTOrExpression, children: []ASTNode{node, right}}, err - case tAnd: - right, err := p.parseExpression(bindingPowers[tAnd]) - return ASTNode{nodeType: ASTAndExpression, children: []ASTNode{node, right}}, err - case tLparen: - name := node.value - var args []ASTNode - for p.current() != tRparen { - expression, err := p.parseExpression(0) - if err != nil { - return ASTNode{}, err - } - if p.current() == tComma { - if err := p.match(tComma); err != nil { - return ASTNode{}, err - } - } - args = append(args, expression) - } - if err := p.match(tRparen); err != nil { - return ASTNode{}, err - } - return ASTNode{ - nodeType: ASTFunctionExpression, - value: name, - children: args, - }, nil - case tFilter: - return p.parseFilter(node) - case tFlatten: - left := ASTNode{nodeType: ASTFlatten, children: []ASTNode{node}} - right, err := p.parseProjectionRHS(bindingPowers[tFlatten]) - return ASTNode{ - nodeType: ASTProjection, - children: []ASTNode{left, right}, - }, err - case tEQ, tNE, tGT, tGTE, tLT, tLTE: - right, err := p.parseExpression(bindingPowers[tokenType]) - if err != nil { - return ASTNode{}, err - } - return ASTNode{ - nodeType: ASTComparator, - value: tokenType, - children: []ASTNode{node, right}, - }, nil - case tLbracket: - tokenType := p.current() - var right ASTNode - var err error - if tokenType == tNumber || tokenType == tColon { - right, err = p.parseIndexExpression() - if err != nil { - return ASTNode{}, err - } - return p.projectIfSlice(node, right) - } - // Otherwise this is a projection. - if err := p.match(tStar); err != nil { - return ASTNode{}, err - } - if err := p.match(tRbracket); err != nil { - return ASTNode{}, err - } - right, err = p.parseProjectionRHS(bindingPowers[tStar]) - if err != nil { - return ASTNode{}, err - } - return ASTNode{ - nodeType: ASTProjection, - children: []ASTNode{node, right}, - }, nil - } - return ASTNode{}, p.syntaxError("Unexpected token: " + tokenType.String()) -} - -func (p *Parser) nud(token token) (ASTNode, error) { - switch token.tokenType { - case tJSONLiteral: - var parsed interface{} - err := json.Unmarshal([]byte(token.value), &parsed) - if err != nil { - return ASTNode{}, err - } - return ASTNode{nodeType: ASTLiteral, value: parsed}, nil - case tStringLiteral: - return ASTNode{nodeType: ASTLiteral, value: token.value}, nil - case tUnquotedIdentifier: - return ASTNode{ - nodeType: ASTField, - value: token.value, - }, nil - case tQuotedIdentifier: - node := ASTNode{nodeType: ASTField, value: token.value} - if p.current() == tLparen { - return ASTNode{}, p.syntaxErrorToken("Can't have quoted identifier as function name.", token) - } - return node, nil - case tStar: - left := ASTNode{nodeType: ASTIdentity} - var right ASTNode - var err error - if p.current() == tRbracket { - right = ASTNode{nodeType: ASTIdentity} - } else { - right, err = p.parseProjectionRHS(bindingPowers[tStar]) - } - return ASTNode{nodeType: ASTValueProjection, children: []ASTNode{left, right}}, err - case tFilter: - return p.parseFilter(ASTNode{nodeType: ASTIdentity}) - case tLbrace: - return p.parseMultiSelectHash() - case tFlatten: - left := ASTNode{ - nodeType: ASTFlatten, - children: []ASTNode{{nodeType: ASTIdentity}}, - } - right, err := p.parseProjectionRHS(bindingPowers[tFlatten]) - if err != nil { - return ASTNode{}, err - } - return ASTNode{nodeType: ASTProjection, children: []ASTNode{left, right}}, nil - case tLbracket: - tokenType := p.current() - //var right ASTNode - if tokenType == tNumber || tokenType == tColon { - right, err := p.parseIndexExpression() - if err != nil { - return ASTNode{}, nil - } - return p.projectIfSlice(ASTNode{nodeType: ASTIdentity}, right) - } else if tokenType == tStar && p.lookahead(1) == tRbracket { - p.advance() - p.advance() - right, err := p.parseProjectionRHS(bindingPowers[tStar]) - if err != nil { - return ASTNode{}, err - } - return ASTNode{ - nodeType: ASTProjection, - children: []ASTNode{{nodeType: ASTIdentity}, right}, - }, nil - } else { - return p.parseMultiSelectList() - } - case tCurrent: - return ASTNode{nodeType: ASTCurrentNode}, nil - case tExpref: - expression, err := p.parseExpression(bindingPowers[tExpref]) - if err != nil { - return ASTNode{}, err - } - return ASTNode{nodeType: ASTExpRef, children: []ASTNode{expression}}, nil - case tNot: - expression, err := p.parseExpression(bindingPowers[tNot]) - if err != nil { - return ASTNode{}, err - } - return ASTNode{nodeType: ASTNotExpression, children: []ASTNode{expression}}, nil - case tLparen: - expression, err := p.parseExpression(0) - if err != nil { - return ASTNode{}, err - } - if err := p.match(tRparen); err != nil { - return ASTNode{}, err - } - return expression, nil - case tEOF: - return ASTNode{}, p.syntaxErrorToken("Incomplete expression", token) - } - - return ASTNode{}, p.syntaxErrorToken("Invalid token: "+token.tokenType.String(), token) -} - -func (p *Parser) parseMultiSelectList() (ASTNode, error) { - var expressions []ASTNode - for { - expression, err := p.parseExpression(0) - if err != nil { - return ASTNode{}, err - } - expressions = append(expressions, expression) - if p.current() == tRbracket { - break - } - err = p.match(tComma) - if err != nil { - return ASTNode{}, err - } - } - err := p.match(tRbracket) - if err != nil { - return ASTNode{}, err - } - return ASTNode{ - nodeType: ASTMultiSelectList, - children: expressions, - }, nil -} - -func (p *Parser) parseMultiSelectHash() (ASTNode, error) { - var children []ASTNode - for { - keyToken := p.lookaheadToken(0) - if err := p.match(tUnquotedIdentifier); err != nil { - if err := p.match(tQuotedIdentifier); err != nil { - return ASTNode{}, p.syntaxError("Expected tQuotedIdentifier or tUnquotedIdentifier") - } - } - keyName := keyToken.value - err := p.match(tColon) - if err != nil { - return ASTNode{}, err - } - value, err := p.parseExpression(0) - if err != nil { - return ASTNode{}, err - } - node := ASTNode{ - nodeType: ASTKeyValPair, - value: keyName, - children: []ASTNode{value}, - } - children = append(children, node) - if p.current() == tComma { - err := p.match(tComma) - if err != nil { - return ASTNode{}, nil - } - } else if p.current() == tRbrace { - err := p.match(tRbrace) - if err != nil { - return ASTNode{}, nil - } - break - } - } - return ASTNode{ - nodeType: ASTMultiSelectHash, - children: children, - }, nil -} - -func (p *Parser) projectIfSlice(left ASTNode, right ASTNode) (ASTNode, error) { - indexExpr := ASTNode{ - nodeType: ASTIndexExpression, - children: []ASTNode{left, right}, - } - if right.nodeType == ASTSlice { - right, err := p.parseProjectionRHS(bindingPowers[tStar]) - return ASTNode{ - nodeType: ASTProjection, - children: []ASTNode{indexExpr, right}, - }, err - } - return indexExpr, nil -} -func (p *Parser) parseFilter(node ASTNode) (ASTNode, error) { - var right, condition ASTNode - var err error - condition, err = p.parseExpression(0) - if err != nil { - return ASTNode{}, err - } - if err := p.match(tRbracket); err != nil { - return ASTNode{}, err - } - if p.current() == tFlatten { - right = ASTNode{nodeType: ASTIdentity} - } else { - right, err = p.parseProjectionRHS(bindingPowers[tFilter]) - if err != nil { - return ASTNode{}, err - } - } - - return ASTNode{ - nodeType: ASTFilterProjection, - children: []ASTNode{node, right, condition}, - }, nil -} - -func (p *Parser) parseDotRHS(bindingPower int) (ASTNode, error) { - lookahead := p.current() - if tokensOneOf([]tokType{tQuotedIdentifier, tUnquotedIdentifier, tStar}, lookahead) { - return p.parseExpression(bindingPower) - } else if lookahead == tLbracket { - if err := p.match(tLbracket); err != nil { - return ASTNode{}, err - } - return p.parseMultiSelectList() - } else if lookahead == tLbrace { - if err := p.match(tLbrace); err != nil { - return ASTNode{}, err - } - return p.parseMultiSelectHash() - } - return ASTNode{}, p.syntaxError("Expected identifier, lbracket, or lbrace") -} - -func (p *Parser) parseProjectionRHS(bindingPower int) (ASTNode, error) { - current := p.current() - if bindingPowers[current] < 10 { - return ASTNode{nodeType: ASTIdentity}, nil - } else if current == tLbracket { - return p.parseExpression(bindingPower) - } else if current == tFilter { - return p.parseExpression(bindingPower) - } else if current == tDot { - err := p.match(tDot) - if err != nil { - return ASTNode{}, err - } - return p.parseDotRHS(bindingPower) - } else { - return ASTNode{}, p.syntaxError("Error") - } -} - -func (p *Parser) lookahead(number int) tokType { - return p.lookaheadToken(number).tokenType -} - -func (p *Parser) current() tokType { - return p.lookahead(0) -} - -func (p *Parser) lookaheadToken(number int) token { - return p.tokens[p.index+number] -} - -func (p *Parser) advance() { - p.index++ -} - -func tokensOneOf(elements []tokType, token tokType) bool { - for _, elem := range elements { - if elem == token { - return true - } - } - return false -} - -func (p *Parser) syntaxError(msg string) SyntaxError { - return SyntaxError{ - msg: msg, - Expression: p.expression, - Offset: p.lookaheadToken(0).position, - } -} - -// Create a SyntaxError based on the provided token. -// This differs from syntaxError() which creates a SyntaxError -// based on the current lookahead token. -func (p *Parser) syntaxErrorToken(msg string, t token) SyntaxError { - return SyntaxError{ - msg: msg, - Expression: p.expression, - Offset: t.position, - } -} diff --git a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/parser_test.go b/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/parser_test.go deleted file mode 100644 index 997a0f4..0000000 --- a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/parser_test.go +++ /dev/null @@ -1,136 +0,0 @@ -package jmespath - -import ( - "fmt" - "testing" - - "github.com/stretchr/testify/assert" -) - -var parsingErrorTests = []struct { - expression string - msg string -}{ - {"foo.", "Incopmlete expression"}, - {"[foo", "Incopmlete expression"}, - {"]", "Invalid"}, - {")", "Invalid"}, - {"}", "Invalid"}, - {"foo..bar", "Invalid"}, - {`foo."bar`, "Forwards lexer errors"}, - {`{foo: bar`, "Incomplete expression"}, - {`{foo bar}`, "Invalid"}, - {`[foo bar]`, "Invalid"}, - {`foo@`, "Invalid"}, - {`&&&&&&&&&&&&t(`, "Invalid"}, - {`[*][`, "Invalid"}, -} - -func TestParsingErrors(t *testing.T) { - assert := assert.New(t) - parser := NewParser() - for _, tt := range parsingErrorTests { - _, err := parser.Parse(tt.expression) - assert.NotNil(err, fmt.Sprintf("Expected parsing error: %s, for expression: %s", tt.msg, tt.expression)) - } -} - -var prettyPrinted = `ASTProjection { - children: { - ASTField { - value: "foo" - } - ASTSubexpression { - children: { - ASTSubexpression { - children: { - ASTField { - value: "bar" - } - ASTField { - value: "baz" - } - } - ASTField { - value: "qux" - } - } -} -` - -var prettyPrintedCompNode = `ASTFilterProjection { - children: { - ASTField { - value: "a" - } - ASTIdentity { - } - ASTComparator { - value: tLTE - children: { - ASTField { - value: "b" - } - ASTField { - value: "c" - } - } -} -` - -func TestPrettyPrintedAST(t *testing.T) { - assert := assert.New(t) - parser := NewParser() - parsed, _ := parser.Parse("foo[*].bar.baz.qux") - assert.Equal(parsed.PrettyPrint(0), prettyPrinted) -} - -func TestPrettyPrintedCompNode(t *testing.T) { - assert := assert.New(t) - parser := NewParser() - parsed, _ := parser.Parse("a[?b<=c]") - assert.Equal(parsed.PrettyPrint(0), prettyPrintedCompNode) -} - -func BenchmarkParseIdentifier(b *testing.B) { - runParseBenchmark(b, exprIdentifier) -} - -func BenchmarkParseSubexpression(b *testing.B) { - runParseBenchmark(b, exprSubexpr) -} - -func BenchmarkParseDeeplyNested50(b *testing.B) { - runParseBenchmark(b, deeplyNested50) -} - -func BenchmarkParseDeepNested50Pipe(b *testing.B) { - runParseBenchmark(b, deeplyNested50Pipe) -} - -func BenchmarkParseDeepNested50Index(b *testing.B) { - runParseBenchmark(b, deeplyNested50Index) -} - -func BenchmarkParseQuotedIdentifier(b *testing.B) { - runParseBenchmark(b, exprQuotedIdentifier) -} - -func BenchmarkParseQuotedIdentifierEscapes(b *testing.B) { - runParseBenchmark(b, quotedIdentifierEscapes) -} - -func BenchmarkParseRawStringLiteral(b *testing.B) { - runParseBenchmark(b, rawStringLiteral) -} - -func BenchmarkParseDeepProjection104(b *testing.B) { - runParseBenchmark(b, deepProjection104) -} - -func runParseBenchmark(b *testing.B, expression string) { - parser := NewParser() - for i := 0; i < b.N; i++ { - parser.Parse(expression) - } -} diff --git a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/toktype_string.go b/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/toktype_string.go deleted file mode 100644 index dae79cb..0000000 --- a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/toktype_string.go +++ /dev/null @@ -1,16 +0,0 @@ -// generated by stringer -type=tokType; DO NOT EDIT - -package jmespath - -import "fmt" - -const _tokType_name = "tUnknowntStartDottFiltertFlattentLparentRparentLbrackettRbrackettLbracetRbracetOrtPipetNumbertUnquotedIdentifiertQuotedIdentifiertCommatColontLTtLTEtGTtGTEtEQtNEtJSONLiteraltStringLiteraltCurrenttExpreftAndtNottEOF" - -var _tokType_index = [...]uint8{0, 8, 13, 17, 24, 32, 39, 46, 55, 64, 71, 78, 81, 86, 93, 112, 129, 135, 141, 144, 148, 151, 155, 158, 161, 173, 187, 195, 202, 206, 210, 214} - -func (i tokType) String() string { - if i < 0 || i >= tokType(len(_tokType_index)-1) { - return fmt.Sprintf("tokType(%d)", i) - } - return _tokType_name[_tokType_index[i]:_tokType_index[i+1]] -} diff --git a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/util.go b/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/util.go deleted file mode 100644 index ddc1b7d..0000000 --- a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/util.go +++ /dev/null @@ -1,185 +0,0 @@ -package jmespath - -import ( - "errors" - "reflect" -) - -// IsFalse determines if an object is false based on the JMESPath spec. -// JMESPath defines false values to be any of: -// - An empty string array, or hash. -// - The boolean value false. -// - nil -func isFalse(value interface{}) bool { - switch v := value.(type) { - case bool: - return !v - case []interface{}: - return len(v) == 0 - case map[string]interface{}: - return len(v) == 0 - case string: - return len(v) == 0 - case nil: - return true - } - // Try the reflection cases before returning false. - rv := reflect.ValueOf(value) - switch rv.Kind() { - case reflect.Struct: - // A struct type will never be false, even if - // all of its values are the zero type. - return false - case reflect.Slice, reflect.Map: - return rv.Len() == 0 - case reflect.Ptr: - if rv.IsNil() { - return true - } - // If it's a pointer type, we'll try to deref the pointer - // and evaluate the pointer value for isFalse. - element := rv.Elem() - return isFalse(element.Interface()) - } - return false -} - -// ObjsEqual is a generic object equality check. -// It will take two arbitrary objects and recursively determine -// if they are equal. -func objsEqual(left interface{}, right interface{}) bool { - return reflect.DeepEqual(left, right) -} - -// SliceParam refers to a single part of a slice. -// A slice consists of a start, a stop, and a step, similar to -// python slices. -type sliceParam struct { - N int - Specified bool -} - -// Slice supports [start:stop:step] style slicing that's supported in JMESPath. -func slice(slice []interface{}, parts []sliceParam) ([]interface{}, error) { - computed, err := computeSliceParams(len(slice), parts) - if err != nil { - return nil, err - } - start, stop, step := computed[0], computed[1], computed[2] - result := []interface{}{} - if step > 0 { - for i := start; i < stop; i += step { - result = append(result, slice[i]) - } - } else { - for i := start; i > stop; i += step { - result = append(result, slice[i]) - } - } - return result, nil -} - -func computeSliceParams(length int, parts []sliceParam) ([]int, error) { - var start, stop, step int - if !parts[2].Specified { - step = 1 - } else if parts[2].N == 0 { - return nil, errors.New("Invalid slice, step cannot be 0") - } else { - step = parts[2].N - } - var stepValueNegative bool - if step < 0 { - stepValueNegative = true - } else { - stepValueNegative = false - } - - if !parts[0].Specified { - if stepValueNegative { - start = length - 1 - } else { - start = 0 - } - } else { - start = capSlice(length, parts[0].N, step) - } - - if !parts[1].Specified { - if stepValueNegative { - stop = -1 - } else { - stop = length - } - } else { - stop = capSlice(length, parts[1].N, step) - } - return []int{start, stop, step}, nil -} - -func capSlice(length int, actual int, step int) int { - if actual < 0 { - actual += length - if actual < 0 { - if step < 0 { - actual = -1 - } else { - actual = 0 - } - } - } else if actual >= length { - if step < 0 { - actual = length - 1 - } else { - actual = length - } - } - return actual -} - -// ToArrayNum converts an empty interface type to a slice of float64. -// If any element in the array cannot be converted, then nil is returned -// along with a second value of false. -func toArrayNum(data interface{}) ([]float64, bool) { - // Is there a better way to do this with reflect? - if d, ok := data.([]interface{}); ok { - result := make([]float64, len(d)) - for i, el := range d { - item, ok := el.(float64) - if !ok { - return nil, false - } - result[i] = item - } - return result, true - } - return nil, false -} - -// ToArrayStr converts an empty interface type to a slice of strings. -// If any element in the array cannot be converted, then nil is returned -// along with a second value of false. If the input data could be entirely -// converted, then the converted data, along with a second value of true, -// will be returned. -func toArrayStr(data interface{}) ([]string, bool) { - // Is there a better way to do this with reflect? - if d, ok := data.([]interface{}); ok { - result := make([]string, len(d)) - for i, el := range d { - item, ok := el.(string) - if !ok { - return nil, false - } - result[i] = item - } - return result, true - } - return nil, false -} - -func isSliceType(v interface{}) bool { - if v == nil { - return false - } - return reflect.TypeOf(v).Kind() == reflect.Slice -} diff --git a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/util_test.go b/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/util_test.go deleted file mode 100644 index 1754b5d..0000000 --- a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/util_test.go +++ /dev/null @@ -1,73 +0,0 @@ -package jmespath - -import ( - "github.com/stretchr/testify/assert" - "testing" -) - -func TestSlicePositiveStep(t *testing.T) { - assert := assert.New(t) - input := make([]interface{}, 5) - input[0] = 0 - input[1] = 1 - input[2] = 2 - input[3] = 3 - input[4] = 4 - result, err := slice(input, []sliceParam{{0, true}, {3, true}, {1, true}}) - assert.Nil(err) - assert.Equal(input[:3], result) -} - -func TestIsFalseJSONTypes(t *testing.T) { - assert := assert.New(t) - assert.True(isFalse(false)) - assert.True(isFalse("")) - var empty []interface{} - assert.True(isFalse(empty)) - m := make(map[string]interface{}) - assert.True(isFalse(m)) - assert.True(isFalse(nil)) - -} - -func TestIsFalseWithUserDefinedStructs(t *testing.T) { - assert := assert.New(t) - type nilStructType struct { - SliceOfPointers []*string - } - nilStruct := nilStructType{SliceOfPointers: nil} - assert.True(isFalse(nilStruct.SliceOfPointers)) - - // A user defined struct will never be false though, - // even if it's fields are the zero type. - assert.False(isFalse(nilStruct)) -} - -func TestIsFalseWithNilInterface(t *testing.T) { - assert := assert.New(t) - var a *int = nil - var nilInterface interface{} - nilInterface = a - assert.True(isFalse(nilInterface)) -} - -func TestIsFalseWithMapOfUserStructs(t *testing.T) { - assert := assert.New(t) - type foo struct { - Bar string - Baz string - } - m := make(map[int]foo) - assert.True(isFalse(m)) -} - -func TestObjsEqual(t *testing.T) { - assert := assert.New(t) - assert.True(objsEqual("foo", "foo")) - assert.True(objsEqual(20, 20)) - assert.True(objsEqual([]int{1, 2, 3}, []int{1, 2, 3})) - assert.True(objsEqual(nil, nil)) - assert.True(!objsEqual(nil, "foo")) - assert.True(objsEqual([]int{}, []int{})) - assert.True(!objsEqual([]int{}, nil)) -} diff --git a/vendor/github.com/go-ini/ini/.gitignore b/vendor/github.com/go-ini/ini/.gitignore index 7adca94..1241112 100644 --- a/vendor/github.com/go-ini/ini/.gitignore +++ b/vendor/github.com/go-ini/ini/.gitignore @@ -2,3 +2,5 @@ testdata/conf_out.ini ini.sublime-project ini.sublime-workspace testdata/conf_reflect.ini +.idea +/.vscode diff --git a/vendor/github.com/go-ini/ini/.travis.yml b/vendor/github.com/go-ini/ini/.travis.yml new file mode 100644 index 0000000..3cb77dc --- /dev/null +++ b/vendor/github.com/go-ini/ini/.travis.yml @@ -0,0 +1,17 @@ +sudo: false +language: go +go: + - 1.5.x + - 1.6.x + - 1.7.x + - 1.8.x + - 1.9.x + - 1.10.x + +script: + - go get golang.org/x/tools/cmd/cover + - go get github.com/smartystreets/goconvey + - mkdir -p $HOME/gopath/src/gopkg.in + - ln -s $HOME/gopath/src/github.com/go-ini/ini $HOME/gopath/src/gopkg.in/ini.v1 + - cd $HOME/gopath/src/gopkg.in/ini.v1 + - go test -v -cover -race diff --git a/vendor/github.com/go-ini/ini/LICENSE b/vendor/github.com/go-ini/ini/LICENSE index 37ec93a..d361bbc 100644 --- a/vendor/github.com/go-ini/ini/LICENSE +++ b/vendor/github.com/go-ini/ini/LICENSE @@ -176,7 +176,7 @@ recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [yyyy] [name of copyright owner] + Copyright 2014 Unknwon Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/Makefile b/vendor/github.com/go-ini/ini/Makefile similarity index 51% rename from vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/Makefile rename to vendor/github.com/go-ini/ini/Makefile index ac034e5..af27ff0 100644 --- a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/Makefile +++ b/vendor/github.com/go-ini/ini/Makefile @@ -1,4 +1,4 @@ -.PHONY: build test bench vet +.PHONY: build test bench vet coverage build: vet bench @@ -10,3 +10,6 @@ bench: vet: go vet + +coverage: + go test -coverprofile=c.out && go tool cover -html=c.out && rm c.out diff --git a/vendor/github.com/go-ini/ini/README.md b/vendor/github.com/go-ini/ini/README.md index c52f63a..95d920d 100644 --- a/vendor/github.com/go-ini/ini/README.md +++ b/vendor/github.com/go-ini/ini/README.md @@ -1,15 +1,13 @@ -ini [![Build Status](https://drone.io/github.com/go-ini/ini/status.png)](https://drone.io/github.com/go-ini/ini/latest) [![](http://gocover.io/_badge/github.com/go-ini/ini)](http://gocover.io/github.com/go-ini/ini) +INI [![Build Status](https://travis-ci.org/go-ini/ini.svg?branch=master)](https://travis-ci.org/go-ini/ini) [![Sourcegraph](https://sourcegraph.com/github.com/go-ini/ini/-/badge.svg)](https://sourcegraph.com/github.com/go-ini/ini?badge) === ![](https://avatars0.githubusercontent.com/u/10216035?v=3&s=200) Package ini provides INI file read and write functionality in Go. -[简体中文](README_ZH.md) +## Features -## Feature - -- Load multiple data sources(`[]byte` or file) with overwrites. +- Load from multiple data sources(`[]byte`, file and `io.ReadCloser`) with overwrites. - Read with recursion values. - Read with parent-child sections. - Read with auto-increment key names. @@ -24,566 +22,22 @@ Package ini provides INI file read and write functionality in Go. To use a tagged revision: - go get gopkg.in/ini.v1 - -To use with latest changes: - - go get github.com/go-ini/ini - -### Testing - -If you want to test on your machine, please apply `-t` flag: - - go get -t gopkg.in/ini.v1 - -## Getting Started - -### Loading from data sources - -A **Data Source** is either raw data in type `[]byte` or a file name with type `string` and you can load **as many as** data sources you want. Passing other types will simply return an error. - -```go -cfg, err := ini.Load([]byte("raw data"), "filename") -``` - -Or start with an empty object: - -```go -cfg := ini.Empty() -``` - -When you cannot decide how many data sources to load at the beginning, you still able to **Append()** them later. - -```go -err := cfg.Append("other file", []byte("other raw data")) -``` - -### Working with sections - -To get a section, you would need to: - -```go -section, err := cfg.GetSection("section name") -``` - -For a shortcut for default section, just give an empty string as name: - -```go -section, err := cfg.GetSection("") -``` - -When you're pretty sure the section exists, following code could make your life easier: - -```go -section := cfg.Section("") -``` - -What happens when the section somehow does not exist? Don't panic, it automatically creates and returns a new section to you. - -To create a new section: - -```go -err := cfg.NewSection("new section") -``` - -To get a list of sections or section names: - -```go -sections := cfg.Sections() -names := cfg.SectionStrings() -``` - -### Working with keys - -To get a key under a section: - -```go -key, err := cfg.Section("").GetKey("key name") -``` - -Same rule applies to key operations: - -```go -key := cfg.Section("").Key("key name") -``` - -To check if a key exists: - -```go -yes := cfg.Section("").HasKey("key name") -``` - -To create a new key: - -```go -err := cfg.Section("").NewKey("name", "value") -``` - -To get a list of keys or key names: - -```go -keys := cfg.Section("").Keys() -names := cfg.Section("").KeyStrings() -``` - -To get a clone hash of keys and corresponding values: - -```go -hash := cfg.GetSection("").KeysHash() -``` - -### Working with values - -To get a string value: - -```go -val := cfg.Section("").Key("key name").String() -``` - -To validate key value on the fly: - -```go -val := cfg.Section("").Key("key name").Validate(func(in string) string { - if len(in) == 0 { - return "default" - } - return in -}) -``` - -If you do not want any auto-transformation (such as recursive read) for the values, you can get raw value directly (this way you get much better performance): - -```go -val := cfg.Section("").Key("key name").Value() -``` - -To check if raw value exists: - -```go -yes := cfg.Section("").HasValue("test value") -``` - -To get value with types: - -```go -// For boolean values: -// true when value is: 1, t, T, TRUE, true, True, YES, yes, Yes, y, ON, on, On -// false when value is: 0, f, F, FALSE, false, False, NO, no, No, n, OFF, off, Off -v, err = cfg.Section("").Key("BOOL").Bool() -v, err = cfg.Section("").Key("FLOAT64").Float64() -v, err = cfg.Section("").Key("INT").Int() -v, err = cfg.Section("").Key("INT64").Int64() -v, err = cfg.Section("").Key("UINT").Uint() -v, err = cfg.Section("").Key("UINT64").Uint64() -v, err = cfg.Section("").Key("TIME").TimeFormat(time.RFC3339) -v, err = cfg.Section("").Key("TIME").Time() // RFC3339 - -v = cfg.Section("").Key("BOOL").MustBool() -v = cfg.Section("").Key("FLOAT64").MustFloat64() -v = cfg.Section("").Key("INT").MustInt() -v = cfg.Section("").Key("INT64").MustInt64() -v = cfg.Section("").Key("UINT").MustUint() -v = cfg.Section("").Key("UINT64").MustUint64() -v = cfg.Section("").Key("TIME").MustTimeFormat(time.RFC3339) -v = cfg.Section("").Key("TIME").MustTime() // RFC3339 - -// Methods start with Must also accept one argument for default value -// when key not found or fail to parse value to given type. -// Except method MustString, which you have to pass a default value. - -v = cfg.Section("").Key("String").MustString("default") -v = cfg.Section("").Key("BOOL").MustBool(true) -v = cfg.Section("").Key("FLOAT64").MustFloat64(1.25) -v = cfg.Section("").Key("INT").MustInt(10) -v = cfg.Section("").Key("INT64").MustInt64(99) -v = cfg.Section("").Key("UINT").MustUint(3) -v = cfg.Section("").Key("UINT64").MustUint64(6) -v = cfg.Section("").Key("TIME").MustTimeFormat(time.RFC3339, time.Now()) -v = cfg.Section("").Key("TIME").MustTime(time.Now()) // RFC3339 -``` - -What if my value is three-line long? - -```ini -[advance] -ADDRESS = """404 road, -NotFound, State, 5000 -Earth""" -``` - -Not a problem! - -```go -cfg.Section("advance").Key("ADDRESS").String() - -/* --- start --- -404 road, -NotFound, State, 5000 -Earth ------- end --- */ -``` - -That's cool, how about continuation lines? - -```ini -[advance] -two_lines = how about \ - continuation lines? -lots_of_lines = 1 \ - 2 \ - 3 \ - 4 -``` - -Piece of cake! - -```go -cfg.Section("advance").Key("two_lines").String() // how about continuation lines? -cfg.Section("advance").Key("lots_of_lines").String() // 1 2 3 4 -``` - -Note that single quotes around values will be stripped: - -```ini -foo = "some value" // foo: some value -bar = 'some value' // bar: some value -``` - -That's all? Hmm, no. - -#### Helper methods of working with values - -To get value with given candidates: - -```go -v = cfg.Section("").Key("STRING").In("default", []string{"str", "arr", "types"}) -v = cfg.Section("").Key("FLOAT64").InFloat64(1.1, []float64{1.25, 2.5, 3.75}) -v = cfg.Section("").Key("INT").InInt(5, []int{10, 20, 30}) -v = cfg.Section("").Key("INT64").InInt64(10, []int64{10, 20, 30}) -v = cfg.Section("").Key("UINT").InUint(4, []int{3, 6, 9}) -v = cfg.Section("").Key("UINT64").InUint64(8, []int64{3, 6, 9}) -v = cfg.Section("").Key("TIME").InTimeFormat(time.RFC3339, time.Now(), []time.Time{time1, time2, time3}) -v = cfg.Section("").Key("TIME").InTime(time.Now(), []time.Time{time1, time2, time3}) // RFC3339 -``` - -Default value will be presented if value of key is not in candidates you given, and default value does not need be one of candidates. - -To validate value in a given range: - -```go -vals = cfg.Section("").Key("FLOAT64").RangeFloat64(0.0, 1.1, 2.2) -vals = cfg.Section("").Key("INT").RangeInt(0, 10, 20) -vals = cfg.Section("").Key("INT64").RangeInt64(0, 10, 20) -vals = cfg.Section("").Key("UINT").RangeUint(0, 3, 9) -vals = cfg.Section("").Key("UINT64").RangeUint64(0, 3, 9) -vals = cfg.Section("").Key("TIME").RangeTimeFormat(time.RFC3339, time.Now(), minTime, maxTime) -vals = cfg.Section("").Key("TIME").RangeTime(time.Now(), minTime, maxTime) // RFC3339 -``` - -To auto-split value into slice: - -```go -vals = cfg.Section("").Key("STRINGS").Strings(",") -vals = cfg.Section("").Key("FLOAT64S").Float64s(",") -vals = cfg.Section("").Key("INTS").Ints(",") -vals = cfg.Section("").Key("INT64S").Int64s(",") -vals = cfg.Section("").Key("UINTS").Uints(",") -vals = cfg.Section("").Key("UINT64S").Uint64s(",") -vals = cfg.Section("").Key("TIMES").Times(",") -``` - -### Save your configuration - -Finally, it's time to save your configuration to somewhere. - -A typical way to save configuration is writing it to a file: - -```go -// ... -err = cfg.SaveTo("my.ini") -err = cfg.SaveToIndent("my.ini", "\t") -``` - -Another way to save is writing to a `io.Writer` interface: - -```go -// ... -cfg.WriteTo(writer) -cfg.WriteToIndent(writer, "\t") -``` - -## Advanced Usage - -### Recursive Values - -For all value of keys, there is a special syntax `%()s`, where `` is the key name in same section or default section, and `%()s` will be replaced by corresponding value(empty string if key not found). You can use this syntax at most 99 level of recursions. - -```ini -NAME = ini - -[author] -NAME = Unknwon -GITHUB = https://github.com/%(NAME)s - -[package] -FULL_NAME = github.com/go-ini/%(NAME)s -``` - -```go -cfg.Section("author").Key("GITHUB").String() // https://github.com/Unknwon -cfg.Section("package").Key("FULL_NAME").String() // github.com/go-ini/ini -``` - -### Parent-child Sections - -You can use `.` in section name to indicate parent-child relationship between two or more sections. If the key not found in the child section, library will try again on its parent section until there is no parent section. - -```ini -NAME = ini -VERSION = v1 -IMPORT_PATH = gopkg.in/%(NAME)s.%(VERSION)s - -[package] -CLONE_URL = https://%(IMPORT_PATH)s - -[package.sub] -``` - -```go -cfg.Section("package.sub").Key("CLONE_URL").String() // https://gopkg.in/ini.v1 -``` - -### Auto-increment Key Names - -If key name is `-` in data source, then it would be seen as special syntax for auto-increment key name start from 1, and every section is independent on counter. - -```ini -[features] --: Support read/write comments of keys and sections --: Support auto-increment of key names --: Support load multiple files to overwrite key values -``` - -```go -cfg.Section("features").KeyStrings() // []{"#1", "#2", "#3"} +```sh +$ go get gopkg.in/ini.v1 ``` -### Map To Struct - -Want more objective way to play with INI? Cool. - -```ini -Name = Unknwon -age = 21 -Male = true -Born = 1993-01-01T20:17:05Z - -[Note] -Content = Hi is a good man! -Cities = HangZhou, Boston -``` - -```go -type Note struct { - Content string - Cities []string -} - -type Person struct { - Name string - Age int `ini:"age"` - Male bool - Born time.Time - Note - Created time.Time `ini:"-"` -} - -func main() { - cfg, err := ini.Load("path/to/ini") - // ... - p := new(Person) - err = cfg.MapTo(p) - // ... - - // Things can be simpler. - err = ini.MapTo(p, "path/to/ini") - // ... - - // Just map a section? Fine. - n := new(Note) - err = cfg.Section("Note").MapTo(n) - // ... -} -``` - -Can I have default value for field? Absolutely. - -Assign it before you map to struct. It will keep the value as it is if the key is not presented or got wrong type. - -```go -// ... -p := &Person{ - Name: "Joe", -} -// ... -``` - -It's really cool, but what's the point if you can't give me my file back from struct? - -### Reflect From Struct - -Why not? - -```go -type Embeded struct { - Dates []time.Time `delim:"|"` - Places []string - None []int -} - -type Author struct { - Name string `ini:"NAME"` - Male bool - Age int - GPA float64 - NeverMind string `ini:"-"` - *Embeded -} - -func main() { - a := &Author{"Unknwon", true, 21, 2.8, "", - &Embeded{ - []time.Time{time.Now(), time.Now()}, - []string{"HangZhou", "Boston"}, - []int{}, - }} - cfg := ini.Empty() - err = ini.ReflectFrom(cfg, a) - // ... -} -``` - -So, what do I get? - -```ini -NAME = Unknwon -Male = true -Age = 21 -GPA = 2.8 - -[Embeded] -Dates = 2015-08-07T22:14:22+08:00|2015-08-07T22:14:22+08:00 -Places = HangZhou,Boston -None = -``` - -#### Name Mapper - -To save your time and make your code cleaner, this library supports [`NameMapper`](https://gowalker.org/gopkg.in/ini.v1#NameMapper) between struct field and actual section and key name. - -There are 2 built-in name mappers: - -- `AllCapsUnderscore`: it converts to format `ALL_CAPS_UNDERSCORE` then match section or key. -- `TitleUnderscore`: it converts to format `title_underscore` then match section or key. - -To use them: - -```go -type Info struct { - PackageName string -} - -func main() { - err = ini.MapToWithMapper(&Info{}, ini.TitleUnderscore, []byte("package_name=ini")) - // ... - - cfg, err := ini.Load([]byte("PACKAGE_NAME=ini")) - // ... - info := new(Info) - cfg.NameMapper = ini.AllCapsUnderscore - err = cfg.MapTo(info) - // ... -} -``` - -Same rules of name mapper apply to `ini.ReflectFromWithMapper` function. - -#### Other Notes On Map/Reflect - -Any embedded struct is treated as a section by default, and there is no automatic parent-child relations in map/reflect feature: - -```go -type Child struct { - Age string -} - -type Parent struct { - Name string - Child -} - -type Config struct { - City string - Parent -} -``` - -Example configuration: - -```ini -City = Boston - -[Parent] -Name = Unknwon - -[Child] -Age = 21 -``` - -What if, yes, I'm paranoid, I want embedded struct to be in the same section. Well, all roads lead to Rome. - -```go -type Child struct { - Age string -} - -type Parent struct { - Name string - Child `ini:"Parent"` -} +To use with latest changes: -type Config struct { - City string - Parent -} +```sh +$ go get github.com/go-ini/ini ``` -Example configuration: - -```ini -City = Boston - -[Parent] -Name = Unknwon -Age = 21 -``` +Please add `-u` flag to update in the future. ## Getting Help +- [Getting Started](https://ini.unknwon.io/docs/intro/getting_started) - [API Documentation](https://gowalker.org/gopkg.in/ini.v1) -- [File An Issue](https://github.com/go-ini/ini/issues/new) - -## FAQs - -### What does `BlockMode` field do? - -By default, library lets you read and write values so we need a locker to make sure your data is safe. But in cases that you are very sure about only reading data through the library, you can set `cfg.BlockMode = false` to speed up read operations about **50-70%** faster. - -### Why another INI library? - -Many people are using my another INI library [goconfig](https://github.com/Unknwon/goconfig), so the reason for this one is I would like to make more Go style code. Also when you set `cfg.BlockMode = false`, this one is about **10-30%** faster. - -To make those changes I have to confirm API broken, so it's safer to keep it in another place and start using `gopkg.in` to version my package at this time.(PS: shorter import path) ## License diff --git a/vendor/github.com/go-ini/ini/README_ZH.md b/vendor/github.com/go-ini/ini/README_ZH.md deleted file mode 100644 index ce6d8eb..0000000 --- a/vendor/github.com/go-ini/ini/README_ZH.md +++ /dev/null @@ -1,577 +0,0 @@ -本包提供了 Go 语言中读写 INI 文件的功能。 - -## 功能特性 - -- 支持覆盖加载多个数据源(`[]byte` 或文件) -- 支持递归读取键值 -- 支持读取父子分区 -- 支持读取自增键名 -- 支持读取多行的键值 -- 支持大量辅助方法 -- 支持在读取时直接转换为 Go 语言类型 -- 支持读取和 **写入** 分区和键的注释 -- 轻松操作分区、键值和注释 -- 在保存文件时分区和键值会保持原有的顺序 - -## 下载安装 - -使用一个特定版本: - - go get gopkg.in/ini.v1 - -使用最新版: - - go get github.com/go-ini/ini - -### 测试安装 - -如果您想要在自己的机器上运行测试,请使用 `-t` 标记: - - go get -t gopkg.in/ini.v1 - -## 开始使用 - -### 从数据源加载 - -一个 **数据源** 可以是 `[]byte` 类型的原始数据,或 `string` 类型的文件路径。您可以加载 **任意多个** 数据源。如果您传递其它类型的数据源,则会直接返回错误。 - -```go -cfg, err := ini.Load([]byte("raw data"), "filename") -``` - -或者从一个空白的文件开始: - -```go -cfg := ini.Empty() -``` - -当您在一开始无法决定需要加载哪些数据源时,仍可以使用 **Append()** 在需要的时候加载它们。 - -```go -err := cfg.Append("other file", []byte("other raw data")) -``` - -### 操作分区(Section) - -获取指定分区: - -```go -section, err := cfg.GetSection("section name") -``` - -如果您想要获取默认分区,则可以用空字符串代替分区名: - -```go -section, err := cfg.GetSection("") -``` - -当您非常确定某个分区是存在的,可以使用以下简便方法: - -```go -section := cfg.Section("") -``` - -如果不小心判断错了,要获取的分区其实是不存在的,那会发生什么呢?没事的,它会自动创建并返回一个对应的分区对象给您。 - -创建一个分区: - -```go -err := cfg.NewSection("new section") -``` - -获取所有分区对象或名称: - -```go -sections := cfg.Sections() -names := cfg.SectionStrings() -``` - -### 操作键(Key) - -获取某个分区下的键: - -```go -key, err := cfg.Section("").GetKey("key name") -``` - -和分区一样,您也可以直接获取键而忽略错误处理: - -```go -key := cfg.Section("").Key("key name") -``` - -判断某个键是否存在: - -```go -yes := cfg.Section("").HasKey("key name") -``` - -创建一个新的键: - -```go -err := cfg.Section("").NewKey("name", "value") -``` - -获取分区下的所有键或键名: - -```go -keys := cfg.Section("").Keys() -names := cfg.Section("").KeyStrings() -``` - -获取分区下的所有键值对的克隆: - -```go -hash := cfg.GetSection("").KeysHash() -``` - -### 操作键值(Value) - -获取一个类型为字符串(string)的值: - -```go -val := cfg.Section("").Key("key name").String() -``` - -获取值的同时通过自定义函数进行处理验证: - -```go -val := cfg.Section("").Key("key name").Validate(func(in string) string { - if len(in) == 0 { - return "default" - } - return in -}) -``` - -如果您不需要任何对值的自动转变功能(例如递归读取),可以直接获取原值(这种方式性能最佳): - -```go -val := cfg.Section("").Key("key name").Value() -``` - -判断某个原值是否存在: - -```go -yes := cfg.Section("").HasValue("test value") -``` - -获取其它类型的值: - -```go -// 布尔值的规则: -// true 当值为:1, t, T, TRUE, true, True, YES, yes, Yes, y, ON, on, On -// false 当值为:0, f, F, FALSE, false, False, NO, no, No, n, OFF, off, Off -v, err = cfg.Section("").Key("BOOL").Bool() -v, err = cfg.Section("").Key("FLOAT64").Float64() -v, err = cfg.Section("").Key("INT").Int() -v, err = cfg.Section("").Key("INT64").Int64() -v, err = cfg.Section("").Key("UINT").Uint() -v, err = cfg.Section("").Key("UINT64").Uint64() -v, err = cfg.Section("").Key("TIME").TimeFormat(time.RFC3339) -v, err = cfg.Section("").Key("TIME").Time() // RFC3339 - -v = cfg.Section("").Key("BOOL").MustBool() -v = cfg.Section("").Key("FLOAT64").MustFloat64() -v = cfg.Section("").Key("INT").MustInt() -v = cfg.Section("").Key("INT64").MustInt64() -v = cfg.Section("").Key("UINT").MustUint() -v = cfg.Section("").Key("UINT64").MustUint64() -v = cfg.Section("").Key("TIME").MustTimeFormat(time.RFC3339) -v = cfg.Section("").Key("TIME").MustTime() // RFC3339 - -// 由 Must 开头的方法名允许接收一个相同类型的参数来作为默认值, -// 当键不存在或者转换失败时,则会直接返回该默认值。 -// 但是,MustString 方法必须传递一个默认值。 - -v = cfg.Seciont("").Key("String").MustString("default") -v = cfg.Section("").Key("BOOL").MustBool(true) -v = cfg.Section("").Key("FLOAT64").MustFloat64(1.25) -v = cfg.Section("").Key("INT").MustInt(10) -v = cfg.Section("").Key("INT64").MustInt64(99) -v = cfg.Section("").Key("UINT").MustUint(3) -v = cfg.Section("").Key("UINT64").MustUint64(6) -v = cfg.Section("").Key("TIME").MustTimeFormat(time.RFC3339, time.Now()) -v = cfg.Section("").Key("TIME").MustTime(time.Now()) // RFC3339 -``` - -如果我的值有好多行怎么办? - -```ini -[advance] -ADDRESS = """404 road, -NotFound, State, 5000 -Earth""" -``` - -嗯哼?小 case! - -```go -cfg.Section("advance").Key("ADDRESS").String() - -/* --- start --- -404 road, -NotFound, State, 5000 -Earth ------- end --- */ -``` - -赞爆了!那要是我属于一行的内容写不下想要写到第二行怎么办? - -```ini -[advance] -two_lines = how about \ - continuation lines? -lots_of_lines = 1 \ - 2 \ - 3 \ - 4 -``` - -简直是小菜一碟! - -```go -cfg.Section("advance").Key("two_lines").String() // how about continuation lines? -cfg.Section("advance").Key("lots_of_lines").String() // 1 2 3 4 -``` - -需要注意的是,值两侧的单引号会被自动剔除: - -```ini -foo = "some value" // foo: some value -bar = 'some value' // bar: some value -``` - -这就是全部了?哈哈,当然不是。 - -#### 操作键值的辅助方法 - -获取键值时设定候选值: - -```go -v = cfg.Section("").Key("STRING").In("default", []string{"str", "arr", "types"}) -v = cfg.Section("").Key("FLOAT64").InFloat64(1.1, []float64{1.25, 2.5, 3.75}) -v = cfg.Section("").Key("INT").InInt(5, []int{10, 20, 30}) -v = cfg.Section("").Key("INT64").InInt64(10, []int64{10, 20, 30}) -v = cfg.Section("").Key("UINT").InUint(4, []int{3, 6, 9}) -v = cfg.Section("").Key("UINT64").InUint64(8, []int64{3, 6, 9}) -v = cfg.Section("").Key("TIME").InTimeFormat(time.RFC3339, time.Now(), []time.Time{time1, time2, time3}) -v = cfg.Section("").Key("TIME").InTime(time.Now(), []time.Time{time1, time2, time3}) // RFC3339 -``` - -如果获取到的值不是候选值的任意一个,则会返回默认值,而默认值不需要是候选值中的一员。 - -验证获取的值是否在指定范围内: - -```go -vals = cfg.Section("").Key("FLOAT64").RangeFloat64(0.0, 1.1, 2.2) -vals = cfg.Section("").Key("INT").RangeInt(0, 10, 20) -vals = cfg.Section("").Key("INT64").RangeInt64(0, 10, 20) -vals = cfg.Section("").Key("UINT").RangeUint(0, 3, 9) -vals = cfg.Section("").Key("UINT64").RangeUint64(0, 3, 9) -vals = cfg.Section("").Key("TIME").RangeTimeFormat(time.RFC3339, time.Now(), minTime, maxTime) -vals = cfg.Section("").Key("TIME").RangeTime(time.Now(), minTime, maxTime) // RFC3339 -``` - -自动分割键值为切片(slice): - -```go -vals = cfg.Section("").Key("STRINGS").Strings(",") -vals = cfg.Section("").Key("FLOAT64S").Float64s(",") -vals = cfg.Section("").Key("INTS").Ints(",") -vals = cfg.Section("").Key("INT64S").Int64s(",") -vals = cfg.Section("").Key("UINTS").Uints(",") -vals = cfg.Section("").Key("UINT64S").Uint64s(",") -vals = cfg.Section("").Key("TIMES").Times(",") -``` - -### 保存配置 - -终于到了这个时刻,是时候保存一下配置了。 - -比较原始的做法是输出配置到某个文件: - -```go -// ... -err = cfg.SaveTo("my.ini") -err = cfg.SaveToIndent("my.ini", "\t") -``` - -另一个比较高级的做法是写入到任何实现 `io.Writer` 接口的对象中: - -```go -// ... -cfg.WriteTo(writer) -cfg.WriteToIndent(writer, "\t") -``` - -### 高级用法 - -#### 递归读取键值 - -在获取所有键值的过程中,特殊语法 `%()s` 会被应用,其中 `` 可以是相同分区或者默认分区下的键名。字符串 `%()s` 会被相应的键值所替代,如果指定的键不存在,则会用空字符串替代。您可以最多使用 99 层的递归嵌套。 - -```ini -NAME = ini - -[author] -NAME = Unknwon -GITHUB = https://github.com/%(NAME)s - -[package] -FULL_NAME = github.com/go-ini/%(NAME)s -``` - -```go -cfg.Section("author").Key("GITHUB").String() // https://github.com/Unknwon -cfg.Section("package").Key("FULL_NAME").String() // github.com/go-ini/ini -``` - -#### 读取父子分区 - -您可以在分区名称中使用 `.` 来表示两个或多个分区之间的父子关系。如果某个键在子分区中不存在,则会去它的父分区中再次寻找,直到没有父分区为止。 - -```ini -NAME = ini -VERSION = v1 -IMPORT_PATH = gopkg.in/%(NAME)s.%(VERSION)s - -[package] -CLONE_URL = https://%(IMPORT_PATH)s - -[package.sub] -``` - -```go -cfg.Section("package.sub").Key("CLONE_URL").String() // https://gopkg.in/ini.v1 -``` - -#### 读取自增键名 - -如果数据源中的键名为 `-`,则认为该键使用了自增键名的特殊语法。计数器从 1 开始,并且分区之间是相互独立的。 - -```ini -[features] --: Support read/write comments of keys and sections --: Support auto-increment of key names --: Support load multiple files to overwrite key values -``` - -```go -cfg.Section("features").KeyStrings() // []{"#1", "#2", "#3"} -``` - -### 映射到结构 - -想要使用更加面向对象的方式玩转 INI 吗?好主意。 - -```ini -Name = Unknwon -age = 21 -Male = true -Born = 1993-01-01T20:17:05Z - -[Note] -Content = Hi is a good man! -Cities = HangZhou, Boston -``` - -```go -type Note struct { - Content string - Cities []string -} - -type Person struct { - Name string - Age int `ini:"age"` - Male bool - Born time.Time - Note - Created time.Time `ini:"-"` -} - -func main() { - cfg, err := ini.Load("path/to/ini") - // ... - p := new(Person) - err = cfg.MapTo(p) - // ... - - // 一切竟可以如此的简单。 - err = ini.MapTo(p, "path/to/ini") - // ... - - // 嗯哼?只需要映射一个分区吗? - n := new(Note) - err = cfg.Section("Note").MapTo(n) - // ... -} -``` - -结构的字段怎么设置默认值呢?很简单,只要在映射之前对指定字段进行赋值就可以了。如果键未找到或者类型错误,该值不会发生改变。 - -```go -// ... -p := &Person{ - Name: "Joe", -} -// ... -``` - -这样玩 INI 真的好酷啊!然而,如果不能还给我原来的配置文件,有什么卵用? - -### 从结构反射 - -可是,我有说不能吗? - -```go -type Embeded struct { - Dates []time.Time `delim:"|"` - Places []string - None []int -} - -type Author struct { - Name string `ini:"NAME"` - Male bool - Age int - GPA float64 - NeverMind string `ini:"-"` - *Embeded -} - -func main() { - a := &Author{"Unknwon", true, 21, 2.8, "", - &Embeded{ - []time.Time{time.Now(), time.Now()}, - []string{"HangZhou", "Boston"}, - []int{}, - }} - cfg := ini.Empty() - err = ini.ReflectFrom(cfg, a) - // ... -} -``` - -瞧瞧,奇迹发生了。 - -```ini -NAME = Unknwon -Male = true -Age = 21 -GPA = 2.8 - -[Embeded] -Dates = 2015-08-07T22:14:22+08:00|2015-08-07T22:14:22+08:00 -Places = HangZhou,Boston -None = -``` - -#### 名称映射器(Name Mapper) - -为了节省您的时间并简化代码,本库支持类型为 [`NameMapper`](https://gowalker.org/gopkg.in/ini.v1#NameMapper) 的名称映射器,该映射器负责结构字段名与分区名和键名之间的映射。 - -目前有 2 款内置的映射器: - -- `AllCapsUnderscore`:该映射器将字段名转换至格式 `ALL_CAPS_UNDERSCORE` 后再去匹配分区名和键名。 -- `TitleUnderscore`:该映射器将字段名转换至格式 `title_underscore` 后再去匹配分区名和键名。 - -使用方法: - -```go -type Info struct{ - PackageName string -} - -func main() { - err = ini.MapToWithMapper(&Info{}, ini.TitleUnderscore, []byte("package_name=ini")) - // ... - - cfg, err := ini.Load([]byte("PACKAGE_NAME=ini")) - // ... - info := new(Info) - cfg.NameMapper = ini.AllCapsUnderscore - err = cfg.MapTo(info) - // ... -} -``` - -使用函数 `ini.ReflectFromWithMapper` 时也可应用相同的规则。 - -#### 映射/反射的其它说明 - -任何嵌入的结构都会被默认认作一个不同的分区,并且不会自动产生所谓的父子分区关联: - -```go -type Child struct { - Age string -} - -type Parent struct { - Name string - Child -} - -type Config struct { - City string - Parent -} -``` - -示例配置文件: - -```ini -City = Boston - -[Parent] -Name = Unknwon - -[Child] -Age = 21 -``` - -很好,但是,我就是要嵌入结构也在同一个分区。好吧,你爹是李刚! - -```go -type Child struct { - Age string -} - -type Parent struct { - Name string - Child `ini:"Parent"` -} - -type Config struct { - City string - Parent -} -``` - -示例配置文件: - -```ini -City = Boston - -[Parent] -Name = Unknwon -Age = 21 -``` - -## 获取帮助 - -- [API 文档](https://gowalker.org/gopkg.in/ini.v1) -- [创建工单](https://github.com/go-ini/ini/issues/new) - -## 常见问题 - -### 字段 `BlockMode` 是什么? - -默认情况下,本库会在您进行读写操作时采用锁机制来确保数据时间。但在某些情况下,您非常确定只进行读操作。此时,您可以通过设置 `cfg.BlockMode = false` 来将读操作提升大约 **50-70%** 的性能。 - -### 为什么要写另一个 INI 解析库? - -许多人都在使用我的 [goconfig](https://github.com/Unknwon/goconfig) 来完成对 INI 文件的操作,但我希望使用更加 Go 风格的代码。并且当您设置 `cfg.BlockMode = false` 时,会有大约 **10-30%** 的性能提升。 - -为了做出这些改变,我必须对 API 进行破坏,所以新开一个仓库是最安全的做法。除此之外,本库直接使用 `gopkg.in` 来进行版本化发布。(其实真相是导入路径更短了) diff --git a/vendor/github.com/go-ini/ini/bench_test.go b/vendor/github.com/go-ini/ini/bench_test.go new file mode 100644 index 0000000..fc18024 --- /dev/null +++ b/vendor/github.com/go-ini/ini/bench_test.go @@ -0,0 +1,118 @@ +// Copyright 2017 Unknwon +// +// Licensed under the Apache License, Version 2.0 (the "License"): you may +// not use this file except in compliance with the License. You may obtain +// a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. + +package ini_test + +import ( + "testing" + + "gopkg.in/ini.v1" +) + +func newTestFile(block bool) *ini.File { + c, _ := ini.Load([]byte(_CONF_DATA)) + c.BlockMode = block + return c +} + +func Benchmark_Key_Value(b *testing.B) { + c := newTestFile(true) + for i := 0; i < b.N; i++ { + c.Section("").Key("NAME").Value() + } +} + +func Benchmark_Key_Value_NonBlock(b *testing.B) { + c := newTestFile(false) + for i := 0; i < b.N; i++ { + c.Section("").Key("NAME").Value() + } +} + +func Benchmark_Key_Value_ViaSection(b *testing.B) { + c := newTestFile(true) + sec := c.Section("") + for i := 0; i < b.N; i++ { + sec.Key("NAME").Value() + } +} + +func Benchmark_Key_Value_ViaSection_NonBlock(b *testing.B) { + c := newTestFile(false) + sec := c.Section("") + for i := 0; i < b.N; i++ { + sec.Key("NAME").Value() + } +} + +func Benchmark_Key_Value_Direct(b *testing.B) { + c := newTestFile(true) + key := c.Section("").Key("NAME") + for i := 0; i < b.N; i++ { + key.Value() + } +} + +func Benchmark_Key_Value_Direct_NonBlock(b *testing.B) { + c := newTestFile(false) + key := c.Section("").Key("NAME") + for i := 0; i < b.N; i++ { + key.Value() + } +} + +func Benchmark_Key_String(b *testing.B) { + c := newTestFile(true) + for i := 0; i < b.N; i++ { + _ = c.Section("").Key("NAME").String() + } +} + +func Benchmark_Key_String_NonBlock(b *testing.B) { + c := newTestFile(false) + for i := 0; i < b.N; i++ { + _ = c.Section("").Key("NAME").String() + } +} + +func Benchmark_Key_String_ViaSection(b *testing.B) { + c := newTestFile(true) + sec := c.Section("") + for i := 0; i < b.N; i++ { + _ = sec.Key("NAME").String() + } +} + +func Benchmark_Key_String_ViaSection_NonBlock(b *testing.B) { + c := newTestFile(false) + sec := c.Section("") + for i := 0; i < b.N; i++ { + _ = sec.Key("NAME").String() + } +} + +func Benchmark_Key_SetValue(b *testing.B) { + c := newTestFile(true) + for i := 0; i < b.N; i++ { + c.Section("").Key("NAME").SetValue("10") + } +} + +func Benchmark_Key_SetValue_VisSection(b *testing.B) { + c := newTestFile(true) + sec := c.Section("") + for i := 0; i < b.N; i++ { + sec.Key("NAME").SetValue("10") + } +} diff --git a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/error.go b/vendor/github.com/go-ini/ini/error.go similarity index 100% rename from vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/error.go rename to vendor/github.com/go-ini/ini/error.go diff --git a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/ini.go b/vendor/github.com/go-ini/ini/file.go similarity index 55% rename from vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/ini.go rename to vendor/github.com/go-ini/ini/file.go index 68d73aa..d7982c3 100644 --- a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/ini.go +++ b/vendor/github.com/go-ini/ini/file.go @@ -1,4 +1,4 @@ -// Copyright 2014 Unknwon +// Copyright 2017 Unknwon // // Licensed under the Apache License, Version 2.0 (the "License"): you may // not use this file except in compliance with the License. You may obtain @@ -12,7 +12,6 @@ // License for the specific language governing permissions and limitations // under the License. -// Package ini provides INI file read and write functionality in Go. package ini import ( @@ -22,121 +21,23 @@ import ( "io" "io/ioutil" "os" - "regexp" - "runtime" - "strconv" "strings" "sync" - "time" ) -const ( - // Name for default section. You can use this constant or the string literal. - // In most of cases, an empty string is all you need to access the section. - DEFAULT_SECTION = "DEFAULT" - - // Maximum allowed depth when recursively substituing variable names. - _DEPTH_VALUES = 99 - _VERSION = "1.25.4" -) - -// Version returns current package version literal. -func Version() string { - return _VERSION -} - -var ( - // Delimiter to determine or compose a new line. - // This variable will be changed to "\r\n" automatically on Windows - // at package init time. - LineBreak = "\n" - - // Variable regexp pattern: %(variable)s - varPattern = regexp.MustCompile(`%\(([^\)]+)\)s`) - - // Indicate whether to align "=" sign with spaces to produce pretty output - // or reduce all possible spaces for compact format. - PrettyFormat = true - - // Explicitly write DEFAULT section header - DefaultHeader = false -) - -func init() { - if runtime.GOOS == "windows" { - LineBreak = "\r\n" - } -} - -func inSlice(str string, s []string) bool { - for _, v := range s { - if str == v { - return true - } - } - return false -} - -// dataSource is an interface that returns object which can be read and closed. -type dataSource interface { - ReadCloser() (io.ReadCloser, error) -} - -// sourceFile represents an object that contains content on the local file system. -type sourceFile struct { - name string -} - -func (s sourceFile) ReadCloser() (_ io.ReadCloser, err error) { - return os.Open(s.name) -} - -type bytesReadCloser struct { - reader io.Reader -} - -func (rc *bytesReadCloser) Read(p []byte) (n int, err error) { - return rc.reader.Read(p) -} - -func (rc *bytesReadCloser) Close() error { - return nil -} - -// sourceData represents an object that contains content in memory. -type sourceData struct { - data []byte -} - -func (s *sourceData) ReadCloser() (io.ReadCloser, error) { - return ioutil.NopCloser(bytes.NewReader(s.data)), nil -} - -// sourceReadCloser represents an input stream with Close method. -type sourceReadCloser struct { - reader io.ReadCloser -} - -func (s *sourceReadCloser) ReadCloser() (io.ReadCloser, error) { - return s.reader, nil -} - // File represents a combination of a or more INI file(s) in memory. type File struct { + options LoadOptions + dataSources []dataSource + // Should make things safe, but sometimes doesn't matter. BlockMode bool - // Make sure data is safe in multiple goroutines. - lock sync.RWMutex - - // Allow combination of multiple data sources. - dataSources []dataSource - // Actual data is stored here. - sections map[string]*Section + lock sync.RWMutex // To keep data in order. sectionList []string - - options LoadOptions + // Actual data is stored here. + sections map[string]*Section NameMapper ValueMapper @@ -153,80 +54,6 @@ func newFile(dataSources []dataSource, opts LoadOptions) *File { } } -func parseDataSource(source interface{}) (dataSource, error) { - switch s := source.(type) { - case string: - return sourceFile{s}, nil - case []byte: - return &sourceData{s}, nil - case io.ReadCloser: - return &sourceReadCloser{s}, nil - default: - return nil, fmt.Errorf("error parsing data source: unknown type '%s'", s) - } -} - -type LoadOptions struct { - // Loose indicates whether the parser should ignore nonexistent files or return error. - Loose bool - // Insensitive indicates whether the parser forces all section and key names to lowercase. - Insensitive bool - // IgnoreContinuation indicates whether to ignore continuation lines while parsing. - IgnoreContinuation bool - // AllowBooleanKeys indicates whether to allow boolean type keys or treat as value is missing. - // This type of keys are mostly used in my.cnf. - AllowBooleanKeys bool - // AllowShadows indicates whether to keep track of keys with same name under same section. - AllowShadows bool - // Some INI formats allow group blocks that store a block of raw content that doesn't otherwise - // conform to key/value pairs. Specify the names of those blocks here. - UnparseableSections []string -} - -func LoadSources(opts LoadOptions, source interface{}, others ...interface{}) (_ *File, err error) { - sources := make([]dataSource, len(others)+1) - sources[0], err = parseDataSource(source) - if err != nil { - return nil, err - } - for i := range others { - sources[i+1], err = parseDataSource(others[i]) - if err != nil { - return nil, err - } - } - f := newFile(sources, opts) - if err = f.Reload(); err != nil { - return nil, err - } - return f, nil -} - -// Load loads and parses from INI data sources. -// Arguments can be mixed of file name with string type, or raw data in []byte. -// It will return error if list contains nonexistent files. -func Load(source interface{}, others ...interface{}) (*File, error) { - return LoadSources(LoadOptions{}, source, others...) -} - -// LooseLoad has exactly same functionality as Load function -// except it ignores nonexistent files instead of returning error. -func LooseLoad(source interface{}, others ...interface{}) (*File, error) { - return LoadSources(LoadOptions{Loose: true}, source, others...) -} - -// InsensitiveLoad has exactly same functionality as Load function -// except it forces all section and key names to be lowercased. -func InsensitiveLoad(source interface{}, others ...interface{}) (*File, error) { - return LoadSources(LoadOptions{Insensitive: true}, source, others...) -} - -// InsensitiveLoad has exactly same functionality as Load function -// except it allows have shadow keys. -func ShadowLoad(source interface{}, others ...interface{}) (*File, error) { - return LoadSources(LoadOptions{AllowShadows: true}, source, others...) -} - // Empty returns an empty file object. func Empty() *File { // Ignore error here, we sure our data is good. @@ -282,7 +109,8 @@ func (f *File) NewSections(names ...string) (err error) { func (f *File) GetSection(name string) (*Section, error) { if len(name) == 0 { name = DEFAULT_SECTION - } else if f.options.Insensitive { + } + if f.options.Insensitive { name = strings.ToLower(name) } @@ -312,13 +140,23 @@ func (f *File) Section(name string) *Section { // Section returns list of Section. func (f *File) Sections() []*Section { + if f.BlockMode { + f.lock.RLock() + defer f.lock.RUnlock() + } + sections := make([]*Section, len(f.sectionList)) - for i := range f.sectionList { - sections[i] = f.Section(f.sectionList[i]) + for i, name := range f.sectionList { + sections[i] = f.sections[name] } return sections } +// ChildSections returns a list of child sections of given section name. +func (f *File) ChildSections(name string) []*Section { + return f.Section(name).ChildSections() +} + // SectionStrings returns list of section names. func (f *File) SectionStrings() []string { list := make([]string, len(f.sectionList)) @@ -388,12 +226,9 @@ func (f *File) Append(source interface{}, others ...interface{}) error { return f.Reload() } -// WriteToIndent writes content into io.Writer with given indention. -// If PrettyFormat has been set to be true, -// it will align "=" sign with spaces under each section. -func (f *File) WriteToIndent(w io.Writer, indent string) (n int64, err error) { +func (f *File) writeToBuffer(indent string) (*bytes.Buffer, error) { equalSign := "=" - if PrettyFormat { + if PrettyFormat || PrettyEqual { equalSign = " = " } @@ -404,15 +239,17 @@ func (f *File) WriteToIndent(w io.Writer, indent string) (n int64, err error) { if len(sec.Comment) > 0 { if sec.Comment[0] != '#' && sec.Comment[0] != ';' { sec.Comment = "; " + sec.Comment + } else { + sec.Comment = sec.Comment[:1] + " " + strings.TrimSpace(sec.Comment[1:]) } - if _, err = buf.WriteString(sec.Comment + LineBreak); err != nil { - return 0, err + if _, err := buf.WriteString(sec.Comment + LineBreak); err != nil { + return nil, err } } if i > 0 || DefaultHeader { - if _, err = buf.WriteString("[" + sname + "]" + LineBreak); err != nil { - return 0, err + if _, err := buf.WriteString("[" + sname + "]" + LineBreak); err != nil { + return nil, err } } else { // Write nothing if default section is empty @@ -422,8 +259,15 @@ func (f *File) WriteToIndent(w io.Writer, indent string) (n int64, err error) { } if sec.isRawSection { - if _, err = buf.WriteString(sec.rawBody); err != nil { - return 0, err + if _, err := buf.WriteString(sec.rawBody); err != nil { + return nil, err + } + + if PrettySection { + // Put a line between sections + if _, err := buf.WriteString(LineBreak); err != nil { + return nil, err + } } continue } @@ -458,9 +302,15 @@ func (f *File) WriteToIndent(w io.Writer, indent string) (n int64, err error) { } if key.Comment[0] != '#' && key.Comment[0] != ';' { key.Comment = "; " + key.Comment + } else { + key.Comment = key.Comment[:1] + " " + strings.TrimSpace(key.Comment[1:]) } - if _, err = buf.WriteString(key.Comment + LineBreak); err != nil { - return 0, err + + // Support multiline comments + key.Comment = strings.Replace(key.Comment, "\n", "\n; ", -1) + + if _, err := buf.WriteString(key.Comment + LineBreak); err != nil { + return nil, err } } @@ -478,8 +328,8 @@ func (f *File) WriteToIndent(w io.Writer, indent string) (n int64, err error) { } for _, val := range key.ValueWithShadows() { - if _, err = buf.WriteString(kname); err != nil { - return 0, err + if _, err := buf.WriteString(kname); err != nil { + return nil, err } if key.isBooleanType { @@ -497,21 +347,40 @@ func (f *File) WriteToIndent(w io.Writer, indent string) (n int64, err error) { // In case key value contains "\n", "`", "\"", "#" or ";" if strings.ContainsAny(val, "\n`") { val = `"""` + val + `"""` - } else if strings.ContainsAny(val, "#;") { + } else if !f.options.IgnoreInlineComment && strings.ContainsAny(val, "#;") { val = "`" + val + "`" } - if _, err = buf.WriteString(equalSign + val + LineBreak); err != nil { - return 0, err + if _, err := buf.WriteString(equalSign + val + LineBreak); err != nil { + return nil, err + } + } + + for _, val := range key.nestedValues { + if _, err := buf.WriteString(indent + " " + val + LineBreak); err != nil { + return nil, err } } } - // Put a line between sections - if _, err = buf.WriteString(LineBreak); err != nil { - return 0, err + if PrettySection { + // Put a line between sections + if _, err := buf.WriteString(LineBreak); err != nil { + return nil, err + } } } + return buf, nil +} + +// WriteToIndent writes content into io.Writer with given indention. +// If PrettyFormat has been set to be true, +// it will align "=" sign with spaces under each section. +func (f *File) WriteToIndent(w io.Writer, indent string) (int64, error) { + buf, err := f.writeToBuffer(indent) + if err != nil { + return 0, err + } return buf.WriteTo(w) } @@ -524,23 +393,12 @@ func (f *File) WriteTo(w io.Writer) (int64, error) { func (f *File) SaveToIndent(filename, indent string) error { // Note: Because we are truncating with os.Create, // so it's safer to save to a temporary file location and rename afte done. - tmpPath := filename + "." + strconv.Itoa(time.Now().Nanosecond()) + ".tmp" - defer os.Remove(tmpPath) - - fw, err := os.Create(tmpPath) + buf, err := f.writeToBuffer(indent) if err != nil { return err } - if _, err = f.WriteToIndent(fw, indent); err != nil { - fw.Close() - return err - } - fw.Close() - - // Remove old file and rename the new one. - os.Remove(filename) - return os.Rename(tmpPath, filename) + return ioutil.WriteFile(filename, buf.Bytes(), 0666) } // SaveTo writes content to file system. diff --git a/vendor/github.com/go-ini/ini/file_test.go b/vendor/github.com/go-ini/ini/file_test.go new file mode 100644 index 0000000..2a0ca7c --- /dev/null +++ b/vendor/github.com/go-ini/ini/file_test.go @@ -0,0 +1,294 @@ +// Copyright 2017 Unknwon +// +// Licensed under the Apache License, Version 2.0 (the "License"): you may +// not use this file except in compliance with the License. You may obtain +// a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. + +package ini_test + +import ( + "bytes" + "io/ioutil" + "testing" + + . "github.com/smartystreets/goconvey/convey" + "gopkg.in/ini.v1" +) + +func TestEmpty(t *testing.T) { + Convey("Create an empty object", t, func() { + f := ini.Empty() + So(f, ShouldNotBeNil) + + // Should only have the default section + So(len(f.Sections()), ShouldEqual, 1) + + // Default section should not contain any key + So(len(f.Section("").Keys()), ShouldBeZeroValue) + }) +} + +func TestFile_NewSection(t *testing.T) { + Convey("Create a new section", t, func() { + f := ini.Empty() + So(f, ShouldNotBeNil) + + sec, err := f.NewSection("author") + So(err, ShouldBeNil) + So(sec, ShouldNotBeNil) + So(sec.Name(), ShouldEqual, "author") + + So(f.SectionStrings(), ShouldResemble, []string{ini.DEFAULT_SECTION, "author"}) + + Convey("With duplicated name", func() { + sec, err := f.NewSection("author") + So(err, ShouldBeNil) + So(sec, ShouldNotBeNil) + + // Does nothing if section already exists + So(f.SectionStrings(), ShouldResemble, []string{ini.DEFAULT_SECTION, "author"}) + }) + + Convey("With empty string", func() { + _, err := f.NewSection("") + So(err, ShouldNotBeNil) + }) + }) +} + +func TestFile_NewRawSection(t *testing.T) { + Convey("Create a new raw section", t, func() { + f := ini.Empty() + So(f, ShouldNotBeNil) + + sec, err := f.NewRawSection("comments", `1111111111111111111000000000000000001110000 +111111111111111111100000000000111000000000`) + So(err, ShouldBeNil) + So(sec, ShouldNotBeNil) + So(sec.Name(), ShouldEqual, "comments") + + So(f.SectionStrings(), ShouldResemble, []string{ini.DEFAULT_SECTION, "comments"}) + So(f.Section("comments").Body(), ShouldEqual, `1111111111111111111000000000000000001110000 +111111111111111111100000000000111000000000`) + + Convey("With duplicated name", func() { + sec, err := f.NewRawSection("comments", `1111111111111111111000000000000000001110000`) + So(err, ShouldBeNil) + So(sec, ShouldNotBeNil) + So(f.SectionStrings(), ShouldResemble, []string{ini.DEFAULT_SECTION, "comments"}) + + // Overwrite previous existed section + So(f.Section("comments").Body(), ShouldEqual, `1111111111111111111000000000000000001110000`) + }) + + Convey("With empty string", func() { + _, err := f.NewRawSection("", "") + So(err, ShouldNotBeNil) + }) + }) +} + +func TestFile_NewSections(t *testing.T) { + Convey("Create new sections", t, func() { + f := ini.Empty() + So(f, ShouldNotBeNil) + + So(f.NewSections("package", "author"), ShouldBeNil) + So(f.SectionStrings(), ShouldResemble, []string{ini.DEFAULT_SECTION, "package", "author"}) + + Convey("With duplicated name", func() { + So(f.NewSections("author", "features"), ShouldBeNil) + + // Ignore section already exists + So(f.SectionStrings(), ShouldResemble, []string{ini.DEFAULT_SECTION, "package", "author", "features"}) + }) + + Convey("With empty string", func() { + So(f.NewSections("", ""), ShouldNotBeNil) + }) + }) +} + +func TestFile_GetSection(t *testing.T) { + Convey("Get a section", t, func() { + f, err := ini.Load(_FULL_CONF) + So(err, ShouldBeNil) + So(f, ShouldNotBeNil) + + sec, err := f.GetSection("author") + So(err, ShouldBeNil) + So(sec, ShouldNotBeNil) + So(sec.Name(), ShouldEqual, "author") + + Convey("Section not exists", func() { + _, err := f.GetSection("404") + So(err, ShouldNotBeNil) + }) + }) +} + +func TestFile_Section(t *testing.T) { + Convey("Get a section", t, func() { + f, err := ini.Load(_FULL_CONF) + So(err, ShouldBeNil) + So(f, ShouldNotBeNil) + + sec := f.Section("author") + So(sec, ShouldNotBeNil) + So(sec.Name(), ShouldEqual, "author") + + Convey("Section not exists", func() { + sec := f.Section("404") + So(sec, ShouldNotBeNil) + So(sec.Name(), ShouldEqual, "404") + }) + }) + + Convey("Get default section in lower case with insensitive load", t, func() { + f, err := ini.InsensitiveLoad([]byte(` +[default] +NAME = ini +VERSION = v1`)) + So(err, ShouldBeNil) + So(f, ShouldNotBeNil) + + So(f.Section("").Key("name").String(), ShouldEqual, "ini") + So(f.Section("").Key("version").String(), ShouldEqual, "v1") + }) +} + +func TestFile_Sections(t *testing.T) { + Convey("Get all sections", t, func() { + f, err := ini.Load(_FULL_CONF) + So(err, ShouldBeNil) + So(f, ShouldNotBeNil) + + secs := f.Sections() + names := []string{ini.DEFAULT_SECTION, "author", "package", "package.sub", "features", "types", "array", "note", "comments", "string escapes", "advance"} + So(len(secs), ShouldEqual, len(names)) + for i, name := range names { + So(secs[i].Name(), ShouldEqual, name) + } + }) +} + +func TestFile_ChildSections(t *testing.T) { + Convey("Get child sections by parent name", t, func() { + f, err := ini.Load([]byte(` +[node] +[node.biz1] +[node.biz2] +[node.biz3] +[node.bizN] +`)) + So(err, ShouldBeNil) + So(f, ShouldNotBeNil) + + children := f.ChildSections("node") + names := []string{"node.biz1", "node.biz2", "node.biz3", "node.bizN"} + So(len(children), ShouldEqual, len(names)) + for i, name := range names { + So(children[i].Name(), ShouldEqual, name) + } + }) +} + +func TestFile_SectionStrings(t *testing.T) { + Convey("Get all section names", t, func() { + f, err := ini.Load(_FULL_CONF) + So(err, ShouldBeNil) + So(f, ShouldNotBeNil) + + So(f.SectionStrings(), ShouldResemble, []string{ini.DEFAULT_SECTION, "author", "package", "package.sub", "features", "types", "array", "note", "comments", "string escapes", "advance"}) + }) +} + +func TestFile_DeleteSection(t *testing.T) { + Convey("Delete a section", t, func() { + f := ini.Empty() + So(f, ShouldNotBeNil) + + f.NewSections("author", "package", "features") + f.DeleteSection("features") + f.DeleteSection("") + So(f.SectionStrings(), ShouldResemble, []string{"author", "package"}) + }) +} + +func TestFile_Append(t *testing.T) { + Convey("Append a data source", t, func() { + f := ini.Empty() + So(f, ShouldNotBeNil) + + So(f.Append(_MINIMAL_CONF, []byte(` +[author] +NAME = Unknwon`)), ShouldBeNil) + + Convey("With bad input", func() { + So(f.Append(123), ShouldNotBeNil) + So(f.Append(_MINIMAL_CONF, 123), ShouldNotBeNil) + }) + }) +} + +func TestFile_WriteTo(t *testing.T) { + Convey("Write content to somewhere", t, func() { + f, err := ini.Load(_FULL_CONF) + So(err, ShouldBeNil) + So(f, ShouldNotBeNil) + + f.Section("author").Comment = `Information about package author +# Bio can be written in multiple lines.` + f.Section("author").Key("NAME").Comment = "This is author name" + f.Section("note").NewBooleanKey("boolean_key") + f.Section("note").NewKey("more", "notes") + + var buf bytes.Buffer + _, err = f.WriteTo(&buf) + So(err, ShouldBeNil) + + golden := "testdata/TestFile_WriteTo.golden" + if *update { + ioutil.WriteFile(golden, buf.Bytes(), 0644) + } + + expected, err := ioutil.ReadFile(golden) + So(err, ShouldBeNil) + So(buf.String(), ShouldEqual, string(expected)) + }) + + Convey("Support multiline comments", t, func() { + f := ini.Empty() + f.Section("").Key("test").Comment = "Multiline\nComment" + + var buf bytes.Buffer + _, err := f.WriteTo(&buf) + So(err, ShouldBeNil) + + So(buf.String(), ShouldEqual, `; Multiline +; Comment +test = + +`) + + }) +} + +func TestFile_SaveTo(t *testing.T) { + Convey("Write content to somewhere", t, func() { + f, err := ini.Load(_FULL_CONF) + So(err, ShouldBeNil) + So(f, ShouldNotBeNil) + + So(f.SaveTo("testdata/conf_out.ini"), ShouldBeNil) + So(f.SaveToIndent("testdata/conf_out.ini", "\t"), ShouldBeNil) + }) +} diff --git a/vendor/github.com/go-ini/ini/ini.go b/vendor/github.com/go-ini/ini/ini.go index 1a27f06..15ebc8f 100644 --- a/vendor/github.com/go-ini/ini/ini.go +++ b/vendor/github.com/go-ini/ini/ini.go @@ -17,38 +17,50 @@ package ini import ( "bytes" - "errors" "fmt" "io" + "io/ioutil" "os" "regexp" "runtime" - "strconv" - "strings" - "sync" - "time" ) const ( + // Name for default section. You can use this constant or the string literal. + // In most of cases, an empty string is all you need to access the section. DEFAULT_SECTION = "DEFAULT" + // Maximum allowed depth when recursively substituing variable names. _DEPTH_VALUES = 99 - - _VERSION = "1.8.6" + _VERSION = "1.37.0" ) +// Version returns current package version literal. func Version() string { return _VERSION } var ( + // Delimiter to determine or compose a new line. + // This variable will be changed to "\r\n" automatically on Windows + // at package init time. LineBreak = "\n" // Variable regexp pattern: %(variable)s varPattern = regexp.MustCompile(`%\(([^\)]+)\)s`) - // Write spaces around "=" to look better. + // Indicate whether to align "=" sign with spaces to produce pretty output + // or reduce all possible spaces for compact format. PrettyFormat = true + + // Place spaces around "=" sign even when PrettyFormat is false + PrettyEqual = false + + // Explicitly write DEFAULT section header + DefaultHeader = false + + // Indicate whether to put a line between sections + PrettySection = true ) func init() { @@ -66,11 +78,12 @@ func inSlice(str string, s []string) bool { return false } -// dataSource is a interface that returns file content. +// dataSource is an interface that returns object which can be read and closed. type dataSource interface { ReadCloser() (io.ReadCloser, error) } +// sourceFile represents an object that contains content on the local file system. type sourceFile struct { name string } @@ -79,667 +92,22 @@ func (s sourceFile) ReadCloser() (_ io.ReadCloser, err error) { return os.Open(s.name) } -type bytesReadCloser struct { - reader io.Reader -} - -func (rc *bytesReadCloser) Read(p []byte) (n int, err error) { - return rc.reader.Read(p) -} - -func (rc *bytesReadCloser) Close() error { - return nil -} - +// sourceData represents an object that contains content in memory. type sourceData struct { data []byte } func (s *sourceData) ReadCloser() (io.ReadCloser, error) { - return &bytesReadCloser{bytes.NewReader(s.data)}, nil -} - -// ____ __. -// | |/ _|____ ___.__. -// | <_/ __ < | | -// | | \ ___/\___ | -// |____|__ \___ > ____| -// \/ \/\/ - -// Key represents a key under a section. -type Key struct { - s *Section - Comment string - name string - value string - isAutoIncr bool -} - -// Name returns name of key. -func (k *Key) Name() string { - return k.name -} - -// Value returns raw value of key for performance purpose. -func (k *Key) Value() string { - return k.value -} - -// String returns string representation of value. -func (k *Key) String() string { - val := k.value - if strings.Index(val, "%") == -1 { - return val - } - - for i := 0; i < _DEPTH_VALUES; i++ { - vr := varPattern.FindString(val) - if len(vr) == 0 { - break - } - - // Take off leading '%(' and trailing ')s'. - noption := strings.TrimLeft(vr, "%(") - noption = strings.TrimRight(noption, ")s") - - // Search in the same section. - nk, err := k.s.GetKey(noption) - if err != nil { - // Search again in default section. - nk, _ = k.s.f.Section("").GetKey(noption) - } - - // Substitute by new value and take off leading '%(' and trailing ')s'. - val = strings.Replace(val, vr, nk.value, -1) - } - return val -} - -// Validate accepts a validate function which can -// return modifed result as key value. -func (k *Key) Validate(fn func(string) string) string { - return fn(k.String()) -} - -// parseBool returns the boolean value represented by the string. -// -// It accepts 1, t, T, TRUE, true, True, YES, yes, Yes, y, ON, on, On, -// 0, f, F, FALSE, false, False, NO, no, No, n, OFF, off, Off. -// Any other value returns an error. -func parseBool(str string) (value bool, err error) { - switch str { - case "1", "t", "T", "true", "TRUE", "True", "YES", "yes", "Yes", "y", "ON", "on", "On": - return true, nil - case "0", "f", "F", "false", "FALSE", "False", "NO", "no", "No", "n", "OFF", "off", "Off": - return false, nil - } - return false, fmt.Errorf("parsing \"%s\": invalid syntax", str) -} - -// Bool returns bool type value. -func (k *Key) Bool() (bool, error) { - return parseBool(k.String()) -} - -// Float64 returns float64 type value. -func (k *Key) Float64() (float64, error) { - return strconv.ParseFloat(k.String(), 64) -} - -// Int returns int type value. -func (k *Key) Int() (int, error) { - return strconv.Atoi(k.String()) -} - -// Int64 returns int64 type value. -func (k *Key) Int64() (int64, error) { - return strconv.ParseInt(k.String(), 10, 64) -} - -// Uint returns uint type valued. -func (k *Key) Uint() (uint, error) { - u, e := strconv.ParseUint(k.String(), 10, 64) - return uint(u), e -} - -// Uint64 returns uint64 type value. -func (k *Key) Uint64() (uint64, error) { - return strconv.ParseUint(k.String(), 10, 64) -} - -// Duration returns time.Duration type value. -func (k *Key) Duration() (time.Duration, error) { - return time.ParseDuration(k.String()) -} - -// TimeFormat parses with given format and returns time.Time type value. -func (k *Key) TimeFormat(format string) (time.Time, error) { - return time.Parse(format, k.String()) -} - -// Time parses with RFC3339 format and returns time.Time type value. -func (k *Key) Time() (time.Time, error) { - return k.TimeFormat(time.RFC3339) -} - -// MustString returns default value if key value is empty. -func (k *Key) MustString(defaultVal string) string { - val := k.String() - if len(val) == 0 { - return defaultVal - } - return val -} - -// MustBool always returns value without error, -// it returns false if error occurs. -func (k *Key) MustBool(defaultVal ...bool) bool { - val, err := k.Bool() - if len(defaultVal) > 0 && err != nil { - return defaultVal[0] - } - return val -} - -// MustFloat64 always returns value without error, -// it returns 0.0 if error occurs. -func (k *Key) MustFloat64(defaultVal ...float64) float64 { - val, err := k.Float64() - if len(defaultVal) > 0 && err != nil { - return defaultVal[0] - } - return val -} - -// MustInt always returns value without error, -// it returns 0 if error occurs. -func (k *Key) MustInt(defaultVal ...int) int { - val, err := k.Int() - if len(defaultVal) > 0 && err != nil { - return defaultVal[0] - } - return val -} - -// MustInt64 always returns value without error, -// it returns 0 if error occurs. -func (k *Key) MustInt64(defaultVal ...int64) int64 { - val, err := k.Int64() - if len(defaultVal) > 0 && err != nil { - return defaultVal[0] - } - return val -} - -// MustUint always returns value without error, -// it returns 0 if error occurs. -func (k *Key) MustUint(defaultVal ...uint) uint { - val, err := k.Uint() - if len(defaultVal) > 0 && err != nil { - return defaultVal[0] - } - return val -} - -// MustUint64 always returns value without error, -// it returns 0 if error occurs. -func (k *Key) MustUint64(defaultVal ...uint64) uint64 { - val, err := k.Uint64() - if len(defaultVal) > 0 && err != nil { - return defaultVal[0] - } - return val -} - -// MustDuration always returns value without error, -// it returns zero value if error occurs. -func (k *Key) MustDuration(defaultVal ...time.Duration) time.Duration { - val, err := k.Duration() - if len(defaultVal) > 0 && err != nil { - return defaultVal[0] - } - return val -} - -// MustTimeFormat always parses with given format and returns value without error, -// it returns zero value if error occurs. -func (k *Key) MustTimeFormat(format string, defaultVal ...time.Time) time.Time { - val, err := k.TimeFormat(format) - if len(defaultVal) > 0 && err != nil { - return defaultVal[0] - } - return val -} - -// MustTime always parses with RFC3339 format and returns value without error, -// it returns zero value if error occurs. -func (k *Key) MustTime(defaultVal ...time.Time) time.Time { - return k.MustTimeFormat(time.RFC3339, defaultVal...) -} - -// In always returns value without error, -// it returns default value if error occurs or doesn't fit into candidates. -func (k *Key) In(defaultVal string, candidates []string) string { - val := k.String() - for _, cand := range candidates { - if val == cand { - return val - } - } - return defaultVal -} - -// InFloat64 always returns value without error, -// it returns default value if error occurs or doesn't fit into candidates. -func (k *Key) InFloat64(defaultVal float64, candidates []float64) float64 { - val := k.MustFloat64() - for _, cand := range candidates { - if val == cand { - return val - } - } - return defaultVal -} - -// InInt always returns value without error, -// it returns default value if error occurs or doesn't fit into candidates. -func (k *Key) InInt(defaultVal int, candidates []int) int { - val := k.MustInt() - for _, cand := range candidates { - if val == cand { - return val - } - } - return defaultVal -} - -// InInt64 always returns value without error, -// it returns default value if error occurs or doesn't fit into candidates. -func (k *Key) InInt64(defaultVal int64, candidates []int64) int64 { - val := k.MustInt64() - for _, cand := range candidates { - if val == cand { - return val - } - } - return defaultVal -} - -// InUint always returns value without error, -// it returns default value if error occurs or doesn't fit into candidates. -func (k *Key) InUint(defaultVal uint, candidates []uint) uint { - val := k.MustUint() - for _, cand := range candidates { - if val == cand { - return val - } - } - return defaultVal -} - -// InUint64 always returns value without error, -// it returns default value if error occurs or doesn't fit into candidates. -func (k *Key) InUint64(defaultVal uint64, candidates []uint64) uint64 { - val := k.MustUint64() - for _, cand := range candidates { - if val == cand { - return val - } - } - return defaultVal -} - -// InTimeFormat always parses with given format and returns value without error, -// it returns default value if error occurs or doesn't fit into candidates. -func (k *Key) InTimeFormat(format string, defaultVal time.Time, candidates []time.Time) time.Time { - val := k.MustTimeFormat(format) - for _, cand := range candidates { - if val == cand { - return val - } - } - return defaultVal -} - -// InTime always parses with RFC3339 format and returns value without error, -// it returns default value if error occurs or doesn't fit into candidates. -func (k *Key) InTime(defaultVal time.Time, candidates []time.Time) time.Time { - return k.InTimeFormat(time.RFC3339, defaultVal, candidates) -} - -// RangeFloat64 checks if value is in given range inclusively, -// and returns default value if it's not. -func (k *Key) RangeFloat64(defaultVal, min, max float64) float64 { - val := k.MustFloat64() - if val < min || val > max { - return defaultVal - } - return val -} - -// RangeInt checks if value is in given range inclusively, -// and returns default value if it's not. -func (k *Key) RangeInt(defaultVal, min, max int) int { - val := k.MustInt() - if val < min || val > max { - return defaultVal - } - return val -} - -// RangeInt64 checks if value is in given range inclusively, -// and returns default value if it's not. -func (k *Key) RangeInt64(defaultVal, min, max int64) int64 { - val := k.MustInt64() - if val < min || val > max { - return defaultVal - } - return val -} - -// RangeTimeFormat checks if value with given format is in given range inclusively, -// and returns default value if it's not. -func (k *Key) RangeTimeFormat(format string, defaultVal, min, max time.Time) time.Time { - val := k.MustTimeFormat(format) - if val.Unix() < min.Unix() || val.Unix() > max.Unix() { - return defaultVal - } - return val -} - -// RangeTime checks if value with RFC3339 format is in given range inclusively, -// and returns default value if it's not. -func (k *Key) RangeTime(defaultVal, min, max time.Time) time.Time { - return k.RangeTimeFormat(time.RFC3339, defaultVal, min, max) -} - -// Strings returns list of string divided by given delimiter. -func (k *Key) Strings(delim string) []string { - str := k.String() - if len(str) == 0 { - return []string{} - } - - vals := strings.Split(str, delim) - for i := range vals { - vals[i] = strings.TrimSpace(vals[i]) - } - return vals -} - -// Float64s returns list of float64 divided by given delimiter. -func (k *Key) Float64s(delim string) []float64 { - strs := k.Strings(delim) - vals := make([]float64, len(strs)) - for i := range strs { - vals[i], _ = strconv.ParseFloat(strs[i], 64) - } - return vals -} - -// Ints returns list of int divided by given delimiter. -func (k *Key) Ints(delim string) []int { - strs := k.Strings(delim) - vals := make([]int, len(strs)) - for i := range strs { - vals[i], _ = strconv.Atoi(strs[i]) - } - return vals -} - -// Int64s returns list of int64 divided by given delimiter. -func (k *Key) Int64s(delim string) []int64 { - strs := k.Strings(delim) - vals := make([]int64, len(strs)) - for i := range strs { - vals[i], _ = strconv.ParseInt(strs[i], 10, 64) - } - return vals -} - -// Uints returns list of uint divided by given delimiter. -func (k *Key) Uints(delim string) []uint { - strs := k.Strings(delim) - vals := make([]uint, len(strs)) - for i := range strs { - u, _ := strconv.ParseUint(strs[i], 10, 0) - vals[i] = uint(u) - } - return vals -} - -// Uint64s returns list of uint64 divided by given delimiter. -func (k *Key) Uint64s(delim string) []uint64 { - strs := k.Strings(delim) - vals := make([]uint64, len(strs)) - for i := range strs { - vals[i], _ = strconv.ParseUint(strs[i], 10, 64) - } - return vals + return ioutil.NopCloser(bytes.NewReader(s.data)), nil } -// TimesFormat parses with given format and returns list of time.Time divided by given delimiter. -func (k *Key) TimesFormat(format, delim string) []time.Time { - strs := k.Strings(delim) - vals := make([]time.Time, len(strs)) - for i := range strs { - vals[i], _ = time.Parse(format, strs[i]) - } - return vals -} - -// Times parses with RFC3339 format and returns list of time.Time divided by given delimiter. -func (k *Key) Times(delim string) []time.Time { - return k.TimesFormat(time.RFC3339, delim) -} - -// SetValue changes key value. -func (k *Key) SetValue(v string) { - if k.s.f.BlockMode { - k.s.f.lock.Lock() - defer k.s.f.lock.Unlock() - } - - k.value = v - k.s.keysHash[k.name] = v -} - -// _________ __ .__ -// / _____/ ____ _____/ |_|__| ____ ____ -// \_____ \_/ __ \_/ ___\ __\ |/ _ \ / \ -// / \ ___/\ \___| | | ( <_> ) | \ -// /_______ /\___ >\___ >__| |__|\____/|___| / -// \/ \/ \/ \/ - -// Section represents a config section. -type Section struct { - f *File - Comment string - name string - keys map[string]*Key - keyList []string - keysHash map[string]string +// sourceReadCloser represents an input stream with Close method. +type sourceReadCloser struct { + reader io.ReadCloser } -func newSection(f *File, name string) *Section { - return &Section{f, "", name, make(map[string]*Key), make([]string, 0, 10), make(map[string]string)} -} - -// Name returns name of Section. -func (s *Section) Name() string { - return s.name -} - -// NewKey creates a new key to given section. -func (s *Section) NewKey(name, val string) (*Key, error) { - if len(name) == 0 { - return nil, errors.New("error creating new key: empty key name") - } - - if s.f.BlockMode { - s.f.lock.Lock() - defer s.f.lock.Unlock() - } - - if inSlice(name, s.keyList) { - s.keys[name].value = val - return s.keys[name], nil - } - - s.keyList = append(s.keyList, name) - s.keys[name] = &Key{s, "", name, val, false} - s.keysHash[name] = val - return s.keys[name], nil -} - -// GetKey returns key in section by given name. -func (s *Section) GetKey(name string) (*Key, error) { - // FIXME: change to section level lock? - if s.f.BlockMode { - s.f.lock.RLock() - } - key := s.keys[name] - if s.f.BlockMode { - s.f.lock.RUnlock() - } - - if key == nil { - // Check if it is a child-section. - sname := s.name - for { - if i := strings.LastIndex(sname, "."); i > -1 { - sname = sname[:i] - sec, err := s.f.GetSection(sname) - if err != nil { - continue - } - return sec.GetKey(name) - } else { - break - } - } - return nil, fmt.Errorf("error when getting key of section '%s': key '%s' not exists", s.name, name) - } - return key, nil -} - -// HasKey returns true if section contains a key with given name. -func (s *Section) HasKey(name string) bool { - key, _ := s.GetKey(name) - return key != nil -} - -// Haskey is a backwards-compatible name for HasKey. -func (s *Section) Haskey(name string) bool { - return s.HasKey(name) -} - -// HasValue returns true if section contains given raw value. -func (s *Section) HasValue(value string) bool { - if s.f.BlockMode { - s.f.lock.RLock() - defer s.f.lock.RUnlock() - } - - for _, k := range s.keys { - if value == k.value { - return true - } - } - return false -} - -// Key assumes named Key exists in section and returns a zero-value when not. -func (s *Section) Key(name string) *Key { - key, err := s.GetKey(name) - if err != nil { - // It's OK here because the only possible error is empty key name, - // but if it's empty, this piece of code won't be executed. - key, _ = s.NewKey(name, "") - return key - } - return key -} - -// Keys returns list of keys of section. -func (s *Section) Keys() []*Key { - keys := make([]*Key, len(s.keyList)) - for i := range s.keyList { - keys[i] = s.Key(s.keyList[i]) - } - return keys -} - -// KeyStrings returns list of key names of section. -func (s *Section) KeyStrings() []string { - list := make([]string, len(s.keyList)) - copy(list, s.keyList) - return list -} - -// KeysHash returns keys hash consisting of names and values. -func (s *Section) KeysHash() map[string]string { - if s.f.BlockMode { - s.f.lock.RLock() - defer s.f.lock.RUnlock() - } - - hash := map[string]string{} - for key, value := range s.keysHash { - hash[key] = value - } - return hash -} - -// DeleteKey deletes a key from section. -func (s *Section) DeleteKey(name string) { - if s.f.BlockMode { - s.f.lock.Lock() - defer s.f.lock.Unlock() - } - - for i, k := range s.keyList { - if k == name { - s.keyList = append(s.keyList[:i], s.keyList[i+1:]...) - delete(s.keys, name) - return - } - } -} - -// ___________.__.__ -// \_ _____/|__| | ____ -// | __) | | | _/ __ \ -// | \ | | |_\ ___/ -// \___ / |__|____/\___ > -// \/ \/ - -// File represents a combination of a or more INI file(s) in memory. -type File struct { - // Should make things safe, but sometimes doesn't matter. - BlockMode bool - // Make sure data is safe in multiple goroutines. - lock sync.RWMutex - - // Allow combination of multiple data sources. - dataSources []dataSource - // Actual data is stored here. - sections map[string]*Section - - // To keep data in order. - sectionList []string - - NameMapper -} - -// newFile initializes File object with given data sources. -func newFile(dataSources []dataSource) *File { - return &File{ - BlockMode: true, - dataSources: dataSources, - sections: make(map[string]*Section), - sectionList: make([]string, 0, 10), - } +func (s *sourceReadCloser) ReadCloser() (io.ReadCloser, error) { + return s.reader, nil } func parseDataSource(source interface{}) (dataSource, error) { @@ -748,14 +116,53 @@ func parseDataSource(source interface{}) (dataSource, error) { return sourceFile{s}, nil case []byte: return &sourceData{s}, nil + case io.ReadCloser: + return &sourceReadCloser{s}, nil default: return nil, fmt.Errorf("error parsing data source: unknown type '%s'", s) } } -// Load loads and parses from INI data sources. -// Arguments can be mixed of file name with string type, or raw data in []byte. -func Load(source interface{}, others ...interface{}) (_ *File, err error) { +type LoadOptions struct { + // Loose indicates whether the parser should ignore nonexistent files or return error. + Loose bool + // Insensitive indicates whether the parser forces all section and key names to lowercase. + Insensitive bool + // IgnoreContinuation indicates whether to ignore continuation lines while parsing. + IgnoreContinuation bool + // IgnoreInlineComment indicates whether to ignore comments at the end of value and treat it as part of value. + IgnoreInlineComment bool + // AllowBooleanKeys indicates whether to allow boolean type keys or treat as value is missing. + // This type of keys are mostly used in my.cnf. + AllowBooleanKeys bool + // AllowShadows indicates whether to keep track of keys with same name under same section. + AllowShadows bool + // AllowNestedValues indicates whether to allow AWS-like nested values. + // Docs: http://docs.aws.amazon.com/cli/latest/topic/config-vars.html#nested-values + AllowNestedValues bool + // AllowPythonMultilineValues indicates whether to allow Python-like multi-line values. + // Docs: https://docs.python.org/3/library/configparser.html#supported-ini-file-structure + // Relevant quote: Values can also span multiple lines, as long as they are indented deeper + // than the first line of the value. + AllowPythonMultilineValues bool + // SpaceBeforeInlineComment indicates whether to allow comment symbols (\# and \;) inside value. + // Docs: https://docs.python.org/2/library/configparser.html + // Quote: Comments may appear on their own in an otherwise empty line, or may be entered in lines holding values or section names. + // In the latter case, they need to be preceded by a whitespace character to be recognized as a comment. + SpaceBeforeInlineComment bool + // UnescapeValueDoubleQuotes indicates whether to unescape double quotes inside value to regular format + // when value is surrounded by double quotes, e.g. key="a \"value\"" => key=a "value" + UnescapeValueDoubleQuotes bool + // UnescapeValueCommentSymbols indicates to unescape comment symbols (\# and \;) inside value to regular format + // when value is NOT surrounded by any quotes. + // Note: UNSTABLE, behavior might change to only unescape inside double quotes but may noy necessary at all. + UnescapeValueCommentSymbols bool + // Some INI formats allow group blocks that store a block of raw content that doesn't otherwise + // conform to key/value pairs. Specify the names of those blocks here. + UnparseableSections []string +} + +func LoadSources(opts LoadOptions, source interface{}, others ...interface{}) (_ *File, err error) { sources := make([]dataSource, len(others)+1) sources[0], err = parseDataSource(source) if err != nil { @@ -767,261 +174,34 @@ func Load(source interface{}, others ...interface{}) (_ *File, err error) { return nil, err } } - f := newFile(sources) + f := newFile(sources, opts) if err = f.Reload(); err != nil { return nil, err } return f, nil } -// Empty returns an empty file object. -func Empty() *File { - // Ignore error here, we sure our data is good. - f, _ := Load([]byte("")) - return f -} - -// NewSection creates a new section. -func (f *File) NewSection(name string) (*Section, error) { - if len(name) == 0 { - return nil, errors.New("error creating new section: empty section name") - } - - if f.BlockMode { - f.lock.Lock() - defer f.lock.Unlock() - } - - if inSlice(name, f.sectionList) { - return f.sections[name], nil - } - - f.sectionList = append(f.sectionList, name) - f.sections[name] = newSection(f, name) - return f.sections[name], nil -} - -// NewSections creates a list of sections. -func (f *File) NewSections(names ...string) (err error) { - for _, name := range names { - if _, err = f.NewSection(name); err != nil { - return err - } - } - return nil -} - -// GetSection returns section by given name. -func (f *File) GetSection(name string) (*Section, error) { - if len(name) == 0 { - name = DEFAULT_SECTION - } - - if f.BlockMode { - f.lock.RLock() - defer f.lock.RUnlock() - } - - sec := f.sections[name] - if sec == nil { - return nil, fmt.Errorf("error when getting section: section '%s' not exists", name) - } - return sec, nil -} - -// Section assumes named section exists and returns a zero-value when not. -func (f *File) Section(name string) *Section { - sec, err := f.GetSection(name) - if err != nil { - // Note: It's OK here because the only possible error is empty section name, - // but if it's empty, this piece of code won't be executed. - sec, _ = f.NewSection(name) - return sec - } - return sec -} - -// Section returns list of Section. -func (f *File) Sections() []*Section { - sections := make([]*Section, len(f.sectionList)) - for i := range f.sectionList { - sections[i] = f.Section(f.sectionList[i]) - } - return sections -} - -// SectionStrings returns list of section names. -func (f *File) SectionStrings() []string { - list := make([]string, len(f.sectionList)) - copy(list, f.sectionList) - return list -} - -// DeleteSection deletes a section. -func (f *File) DeleteSection(name string) { - if f.BlockMode { - f.lock.Lock() - defer f.lock.Unlock() - } - - if len(name) == 0 { - name = DEFAULT_SECTION - } - - for i, s := range f.sectionList { - if s == name { - f.sectionList = append(f.sectionList[:i], f.sectionList[i+1:]...) - delete(f.sections, name) - return - } - } -} - -func (f *File) reload(s dataSource) error { - r, err := s.ReadCloser() - if err != nil { - return err - } - defer r.Close() - - return f.parse(r) -} - -// Reload reloads and parses all data sources. -func (f *File) Reload() (err error) { - for _, s := range f.dataSources { - if err = f.reload(s); err != nil { - return err - } - } - return nil -} - -// Append appends one or more data sources and reloads automatically. -func (f *File) Append(source interface{}, others ...interface{}) error { - ds, err := parseDataSource(source) - if err != nil { - return err - } - f.dataSources = append(f.dataSources, ds) - for _, s := range others { - ds, err = parseDataSource(s) - if err != nil { - return err - } - f.dataSources = append(f.dataSources, ds) - } - return f.Reload() -} - -// WriteToIndent writes file content into io.Writer with given value indention. -func (f *File) WriteToIndent(w io.Writer, indent string) (n int64, err error) { - equalSign := "=" - if PrettyFormat { - equalSign = " = " - } - - // Use buffer to make sure target is safe until finish encoding. - buf := bytes.NewBuffer(nil) - for i, sname := range f.sectionList { - sec := f.Section(sname) - if len(sec.Comment) > 0 { - if sec.Comment[0] != '#' && sec.Comment[0] != ';' { - sec.Comment = "; " + sec.Comment - } - if _, err = buf.WriteString(sec.Comment + LineBreak); err != nil { - return 0, err - } - } - - if i > 0 { - if _, err = buf.WriteString("[" + sname + "]" + LineBreak); err != nil { - return 0, err - } - } else { - // Write nothing if default section is empty. - if len(sec.keyList) == 0 { - continue - } - } - - for _, kname := range sec.keyList { - key := sec.Key(kname) - if len(key.Comment) > 0 { - if len(indent) > 0 && sname != DEFAULT_SECTION { - buf.WriteString(indent) - } - if key.Comment[0] != '#' && key.Comment[0] != ';' { - key.Comment = "; " + key.Comment - } - if _, err = buf.WriteString(key.Comment + LineBreak); err != nil { - return 0, err - } - } - - if len(indent) > 0 && sname != DEFAULT_SECTION { - buf.WriteString(indent) - } - - switch { - case key.isAutoIncr: - kname = "-" - case strings.ContainsAny(kname, "\"=:"): - kname = "`" + kname + "`" - case strings.Contains(kname, "`"): - kname = `"""` + kname + `"""` - } - - val := key.value - // In case key value contains "\n", "`", "\"", "#" or ";". - if strings.ContainsAny(val, "\n`") { - val = `"""` + val + `"""` - } else if strings.ContainsAny(val, "#;") { - val = "`" + val + "`" - } - if _, err = buf.WriteString(kname + equalSign + val + LineBreak); err != nil { - return 0, err - } - } - - // Put a line between sections. - if _, err = buf.WriteString(LineBreak); err != nil { - return 0, err - } - } - - return buf.WriteTo(w) +// Load loads and parses from INI data sources. +// Arguments can be mixed of file name with string type, or raw data in []byte. +// It will return error if list contains nonexistent files. +func Load(source interface{}, others ...interface{}) (*File, error) { + return LoadSources(LoadOptions{}, source, others...) } -// WriteTo writes file content into io.Writer. -func (f *File) WriteTo(w io.Writer) (int64, error) { - return f.WriteToIndent(w, "") +// LooseLoad has exactly same functionality as Load function +// except it ignores nonexistent files instead of returning error. +func LooseLoad(source interface{}, others ...interface{}) (*File, error) { + return LoadSources(LoadOptions{Loose: true}, source, others...) } -// SaveToIndent writes content to file system with given value indention. -func (f *File) SaveToIndent(filename, indent string) error { - // Note: Because we are truncating with os.Create, - // so it's safer to save to a temporary file location and rename afte done. - tmpPath := filename + "." + strconv.Itoa(time.Now().Nanosecond()) + ".tmp" - defer os.Remove(tmpPath) - - fw, err := os.Create(tmpPath) - if err != nil { - return err - } - - if _, err = f.WriteToIndent(fw, indent); err != nil { - fw.Close() - return err - } - fw.Close() - - // Remove old file and rename the new one. - os.Remove(filename) - return os.Rename(tmpPath, filename) +// InsensitiveLoad has exactly same functionality as Load function +// except it forces all section and key names to be lowercased. +func InsensitiveLoad(source interface{}, others ...interface{}) (*File, error) { + return LoadSources(LoadOptions{Insensitive: true}, source, others...) } -// SaveTo writes content to file system. -func (f *File) SaveTo(filename string) error { - return f.SaveToIndent(filename, "") +// InsensitiveLoad has exactly same functionality as Load function +// except it allows have shadow keys. +func ShadowLoad(source interface{}, others ...interface{}) (*File, error) { + return LoadSources(LoadOptions{AllowShadows: true}, source, others...) } diff --git a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/parser_test.go b/vendor/github.com/go-ini/ini/ini_internal_test.go similarity index 56% rename from vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/parser_test.go rename to vendor/github.com/go-ini/ini/ini_internal_test.go index 0525819..257ef1e 100644 --- a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/parser_test.go +++ b/vendor/github.com/go-ini/ini/ini_internal_test.go @@ -1,4 +1,4 @@ -// Copyright 2016 Unknwon +// Copyright 2017 Unknwon // // Licensed under the Apache License, Version 2.0 (the "License"): you may // not use this file except in compliance with the License. You may obtain @@ -20,23 +20,16 @@ import ( . "github.com/smartystreets/goconvey/convey" ) -func Test_BOM(t *testing.T) { - Convey("Test handling BOM", t, func() { - Convey("UTF-8-BOM", func() { - cfg, err := Load("testdata/UTF-8-BOM.ini") - So(err, ShouldBeNil) - So(cfg, ShouldNotBeNil) - - So(cfg.Section("author").Key("E-MAIL").String(), ShouldEqual, "u@gogs.io") - }) - - Convey("UTF-16-LE-BOM", func() { - cfg, err := Load("testdata/UTF-16-LE-BOM.ini") - So(err, ShouldBeNil) - So(cfg, ShouldNotBeNil) - }) +func Test_Version(t *testing.T) { + Convey("Get version", t, func() { + So(Version(), ShouldEqual, _VERSION) + }) +} - Convey("UTF-16-BE-BOM", func() { - }) +func Test_isSlice(t *testing.T) { + Convey("Check if a string is in the slice", t, func() { + ss := []string{"a", "b", "c"} + So(inSlice("a", ss), ShouldBeTrue) + So(inSlice("d", ss), ShouldBeFalse) }) } diff --git a/vendor/github.com/go-ini/ini/ini_test.go b/vendor/github.com/go-ini/ini/ini_test.go index c0b0cc9..d68c7ca 100644 --- a/vendor/github.com/go-ini/ini/ini_test.go +++ b/vendor/github.com/go-ini/ini/ini_test.go @@ -12,563 +12,1199 @@ // License for the specific language governing permissions and limitations // under the License. -package ini +package ini_test import ( "bytes" - "fmt" - "strings" + "flag" + "io/ioutil" "testing" - "time" . "github.com/smartystreets/goconvey/convey" + "gopkg.in/ini.v1" ) -func Test_Version(t *testing.T) { - Convey("Get version", t, func() { - So(Version(), ShouldEqual, _VERSION) - }) -} +const ( + _CONF_DATA = ` + ; Package name + NAME = ini + ; Package version + VERSION = v1 + ; Package import path + IMPORT_PATH = gopkg.in/%(NAME)s.%(VERSION)s + + # Information about package author + # Bio can be written in multiple lines. + [author] + NAME = Unknwon ; Succeeding comment + E-MAIL = fake@localhost + GITHUB = https://github.com/%(NAME)s + BIO = """Gopher. + Coding addict. + Good man. + """ # Succeeding comment` + _MINIMAL_CONF = "testdata/minimal.ini" + _FULL_CONF = "testdata/full.ini" + _NOT_FOUND_CONF = "testdata/404.ini" +) + +var update = flag.Bool("update", false, "Update .golden files") -const _CONF_DATA = ` -; Package name +func TestLoad(t *testing.T) { + Convey("Load from good data sources", t, func() { + f, err := ini.Load([]byte(` NAME = ini -; Package version VERSION = v1 -; Package import path -IMPORT_PATH = gopkg.in/%(NAME)s.%(VERSION)s - -# Information about package author -# Bio can be written in multiple lines. +IMPORT_PATH = gopkg.in/%(NAME)s.%(VERSION)s`), + "testdata/minimal.ini", + ioutil.NopCloser(bytes.NewReader([]byte(` [author] -NAME = Unknwon ; Succeeding comment -E-MAIL = fake@localhost -GITHUB = https://github.com/%(NAME)s -BIO = """Gopher. -Coding addict. -Good man. -""" # Succeeding comment - -[package] -CLONE_URL = https://%(IMPORT_PATH)s - -[package.sub] -UNUSED_KEY = should be deleted - -[features] --: Support read/write comments of keys and sections --: Support auto-increment of key names --: Support load multiple files to overwrite key values - -[types] -STRING = str -BOOL = true -BOOL_FALSE = false -FLOAT64 = 1.25 -INT = 10 -TIME = 2015-01-01T20:17:05Z -DURATION = 2h45m -UINT = 3 - -[array] -STRINGS = en, zh, de -FLOAT64S = 1.1, 2.2, 3.3 -INTS = 1, 2, 3 -UINTS = 1, 2, 3 -TIMES = 2015-01-01T20:17:05Z,2015-01-01T20:17:05Z,2015-01-01T20:17:05Z - -[note] -empty_lines = next line is empty\ - -; Comment before the section -[comments] ; This is a comment for the section too -; Comment before key -key = "value" -key2 = "value2" ; This is a comment for key2 -key3 = "one", "two", "three" - -[advance] -value with quotes = "some value" -value quote2 again = 'some value' -true = 2+3=5 -"1+1=2" = true -"""6+1=7""" = true -"""` + "`" + `5+5` + "`" + `""" = 10 -` + "`" + `"6+6"` + "`" + ` = 12 -` + "`" + `7-2=4` + "`" + ` = false -ADDRESS = ` + "`" + `404 road, -NotFound, State, 50000` + "`" + ` - -two_lines = how about \ - continuation lines? -lots_of_lines = 1 \ - 2 \ - 3 \ - 4 \ -` - -func Test_Load(t *testing.T) { - Convey("Load from data sources", t, func() { - - Convey("Load with empty data", func() { - So(Empty(), ShouldNotBeNil) - }) - - Convey("Load with multiple data sources", func() { - cfg, err := Load([]byte(_CONF_DATA), "testdata/conf.ini") - So(err, ShouldBeNil) - So(cfg, ShouldNotBeNil) - }) - }) - - Convey("Bad load process", t, func() { - - Convey("Load from invalid data sources", func() { - _, err := Load(_CONF_DATA) - So(err, ShouldNotBeNil) +NAME = Unknwon +`))), + ) + So(err, ShouldBeNil) + So(f, ShouldNotBeNil) - f, err := Load("testdata/404.ini") - So(err, ShouldNotBeNil) - So(f, ShouldBeNil) + // Validate values make sure all sources are loaded correctly + sec := f.Section("") + So(sec.Key("NAME").String(), ShouldEqual, "ini") + So(sec.Key("VERSION").String(), ShouldEqual, "v1") + So(sec.Key("IMPORT_PATH").String(), ShouldEqual, "gopkg.in/ini.v1") - _, err = Load(1) - So(err, ShouldNotBeNil) + sec = f.Section("author") + So(sec.Key("NAME").String(), ShouldEqual, "Unknwon") + So(sec.Key("E-MAIL").String(), ShouldEqual, "u@gogs.io") + }) - _, err = Load([]byte(""), 1) + Convey("Load from bad data sources", t, func() { + Convey("Invalid input", func() { + _, err := ini.Load(_NOT_FOUND_CONF) So(err, ShouldNotBeNil) }) - Convey("Load with bad section name", func() { - _, err := Load([]byte("[]")) - So(err, ShouldNotBeNil) - - _, err = Load([]byte("[")) + Convey("Unsupported type", func() { + _, err := ini.Load(123) So(err, ShouldNotBeNil) }) + }) - Convey("Load with bad keys", func() { - _, err := Load([]byte(`"""name`)) - So(err, ShouldNotBeNil) + Convey("Can't properly parse INI files containing `#` or `;` in value", t, func() { + f, err := ini.Load([]byte(` + [author] + NAME = U#n#k#n#w#o#n + GITHUB = U;n;k;n;w;o;n + `)) + So(err, ShouldBeNil) + So(f, ShouldNotBeNil) - _, err = Load([]byte(`"""name"""`)) - So(err, ShouldNotBeNil) + sec := f.Section("author") + nameValue := sec.Key("NAME").String() + githubValue := sec.Key("GITHUB").String() + So(nameValue, ShouldEqual, "U") + So(githubValue, ShouldEqual, "U") + }) - _, err = Load([]byte(`""=1`)) - So(err, ShouldNotBeNil) + Convey("Can't parse small python-compatible INI files", t, func() { + f, err := ini.Load([]byte(` +[long] +long_rsa_private_key = -----BEGIN RSA PRIVATE KEY----- + foo + bar + foobar + barfoo + -----END RSA PRIVATE KEY----- +`)) + So(err, ShouldNotBeNil) + So(f, ShouldBeNil) + So(err.Error(), ShouldEqual, "key-value delimiter not found: foo\n") + }) - _, err = Load([]byte(`=`)) - So(err, ShouldNotBeNil) + Convey("Can't parse big python-compatible INI files", t, func() { + f, err := ini.Load([]byte(` +[long] +long_rsa_private_key = -----BEGIN RSA PRIVATE KEY----- + 1foo + 2bar + 3foobar + 4barfoo + 5foo + 6bar + 7foobar + 8barfoo + 9foo + 10bar + 11foobar + 12barfoo + 13foo + 14bar + 15foobar + 16barfoo + 17foo + 18bar + 19foobar + 20barfoo + 21foo + 22bar + 23foobar + 24barfoo + 25foo + 26bar + 27foobar + 28barfoo + 29foo + 30bar + 31foobar + 32barfoo + 33foo + 34bar + 35foobar + 36barfoo + 37foo + 38bar + 39foobar + 40barfoo + 41foo + 42bar + 43foobar + 44barfoo + 45foo + 46bar + 47foobar + 48barfoo + 49foo + 50bar + 51foobar + 52barfoo + 53foo + 54bar + 55foobar + 56barfoo + 57foo + 58bar + 59foobar + 60barfoo + 61foo + 62bar + 63foobar + 64barfoo + 65foo + 66bar + 67foobar + 68barfoo + 69foo + 70bar + 71foobar + 72barfoo + 73foo + 74bar + 75foobar + 76barfoo + 77foo + 78bar + 79foobar + 80barfoo + 81foo + 82bar + 83foobar + 84barfoo + 85foo + 86bar + 87foobar + 88barfoo + 89foo + 90bar + 91foobar + 92barfoo + 93foo + 94bar + 95foobar + 96barfoo + -----END RSA PRIVATE KEY----- +`)) + So(err, ShouldNotBeNil) + So(f, ShouldBeNil) + So(err.Error(), ShouldEqual, "key-value delimiter not found: 1foo\n") + }) +} - _, err = Load([]byte(`name`)) - So(err, ShouldNotBeNil) - }) +func TestLooseLoad(t *testing.T) { + Convey("Load from data sources with option `Loose` true", t, func() { + f, err := ini.LoadSources(ini.LoadOptions{Loose: true}, _NOT_FOUND_CONF, _MINIMAL_CONF) + So(err, ShouldBeNil) + So(f, ShouldNotBeNil) - Convey("Load with bad values", func() { - _, err := Load([]byte(`name="""Unknwon`)) + Convey("Inverse case", func() { + _, err = ini.Load(_NOT_FOUND_CONF) So(err, ShouldNotBeNil) }) }) } -func Test_Values(t *testing.T) { - Convey("Test getting and setting values", t, func() { - cfg, err := Load([]byte(_CONF_DATA), "testdata/conf.ini") +func TestInsensitiveLoad(t *testing.T) { + Convey("Insensitive to section and key names", t, func() { + f, err := ini.InsensitiveLoad(_MINIMAL_CONF) So(err, ShouldBeNil) - So(cfg, ShouldNotBeNil) - - Convey("Get values in default section", func() { - sec := cfg.Section("") - So(sec, ShouldNotBeNil) - So(sec.Key("NAME").Value(), ShouldEqual, "ini") - So(sec.Key("NAME").String(), ShouldEqual, "ini") - So(sec.Key("NAME").Validate(func(in string) string { - return in - }), ShouldEqual, "ini") - So(sec.Key("NAME").Comment, ShouldEqual, "; Package name") - So(sec.Key("IMPORT_PATH").String(), ShouldEqual, "gopkg.in/ini.v1") - }) + So(f, ShouldNotBeNil) - Convey("Get values in non-default section", func() { - sec := cfg.Section("author") - So(sec, ShouldNotBeNil) - So(sec.Key("NAME").String(), ShouldEqual, "Unknwon") - So(sec.Key("GITHUB").String(), ShouldEqual, "https://github.com/Unknwon") + So(f.Section("Author").Key("e-mail").String(), ShouldEqual, "u@gogs.io") - sec = cfg.Section("package") - So(sec, ShouldNotBeNil) - So(sec.Key("CLONE_URL").String(), ShouldEqual, "https://gopkg.in/ini.v1") - }) + Convey("Write out", func() { + var buf bytes.Buffer + _, err := f.WriteTo(&buf) + So(err, ShouldBeNil) + So(buf.String(), ShouldEqual, `[author] +e-mail = u@gogs.io - Convey("Get auto-increment key names", func() { - keys := cfg.Section("features").Keys() - for i, k := range keys { - So(k.Name(), ShouldEqual, fmt.Sprintf("#%d", i+1)) - } +`) }) - Convey("Get overwrite value", func() { - So(cfg.Section("author").Key("E-MAIL").String(), ShouldEqual, "u@gogs.io") - }) + Convey("Inverse case", func() { + f, err := ini.Load(_MINIMAL_CONF) + So(err, ShouldBeNil) + So(f, ShouldNotBeNil) - Convey("Get sections", func() { - sections := cfg.Sections() - for i, name := range []string{DEFAULT_SECTION, "author", "package", "package.sub", "features", "types", "array", "note", "comments", "advance"} { - So(sections[i].Name(), ShouldEqual, name) - } + So(f.Section("Author").Key("e-mail").String(), ShouldBeEmpty) }) + }) +} - Convey("Get parent section value", func() { - So(cfg.Section("package.sub").Key("CLONE_URL").String(), ShouldEqual, "https://gopkg.in/ini.v1") - So(cfg.Section("package.fake.sub").Key("CLONE_URL").String(), ShouldEqual, "https://gopkg.in/ini.v1") - }) +func TestLoadSources(t *testing.T) { + Convey("Load from data sources with options", t, func() { + Convey("with true `AllowPythonMultilineValues`", func() { + Convey("Ignore nonexistent files", func() { + f, err := ini.LoadSources(ini.LoadOptions{AllowPythonMultilineValues: true, Loose: true}, _NOT_FOUND_CONF, _MINIMAL_CONF) + So(err, ShouldBeNil) + So(f, ShouldNotBeNil) - Convey("Get multiple line value", func() { - So(cfg.Section("author").Key("BIO").String(), ShouldEqual, "Gopher.\nCoding addict.\nGood man.\n") - }) + Convey("Inverse case", func() { + _, err = ini.LoadSources(ini.LoadOptions{AllowPythonMultilineValues: true}, _NOT_FOUND_CONF) + So(err, ShouldNotBeNil) + }) + }) - Convey("Get values with type", func() { - sec := cfg.Section("types") - v1, err := sec.Key("BOOL").Bool() - So(err, ShouldBeNil) - So(v1, ShouldBeTrue) + Convey("Insensitive to section and key names", func() { + f, err := ini.LoadSources(ini.LoadOptions{AllowPythonMultilineValues: true, Insensitive: true}, _MINIMAL_CONF) + So(err, ShouldBeNil) + So(f, ShouldNotBeNil) - v1, err = sec.Key("BOOL_FALSE").Bool() - So(err, ShouldBeNil) - So(v1, ShouldBeFalse) + So(f.Section("Author").Key("e-mail").String(), ShouldEqual, "u@gogs.io") - v2, err := sec.Key("FLOAT64").Float64() - So(err, ShouldBeNil) - So(v2, ShouldEqual, 1.25) + Convey("Write out", func() { + var buf bytes.Buffer + _, err := f.WriteTo(&buf) + So(err, ShouldBeNil) + So(buf.String(), ShouldEqual, `[author] +e-mail = u@gogs.io - v3, err := sec.Key("INT").Int() - So(err, ShouldBeNil) - So(v3, ShouldEqual, 10) +`) + }) - v4, err := sec.Key("INT").Int64() - So(err, ShouldBeNil) - So(v4, ShouldEqual, 10) + Convey("Inverse case", func() { + f, err := ini.LoadSources(ini.LoadOptions{AllowPythonMultilineValues: true}, _MINIMAL_CONF) + So(err, ShouldBeNil) + So(f, ShouldNotBeNil) - v5, err := sec.Key("UINT").Uint() - So(err, ShouldBeNil) - So(v5, ShouldEqual, 3) + So(f.Section("Author").Key("e-mail").String(), ShouldBeEmpty) + }) + }) - v6, err := sec.Key("UINT").Uint64() - So(err, ShouldBeNil) - So(v6, ShouldEqual, 3) + Convey("Ignore continuation lines", func() { + f, err := ini.LoadSources(ini.LoadOptions{ + AllowPythonMultilineValues: true, + IgnoreContinuation: true, + }, []byte(` +key1=a\b\ +key2=c\d\ +key3=value`)) + So(err, ShouldBeNil) + So(f, ShouldNotBeNil) - t, err := time.Parse(time.RFC3339, "2015-01-01T20:17:05Z") - So(err, ShouldBeNil) - v7, err := sec.Key("TIME").Time() - So(err, ShouldBeNil) - So(v7.String(), ShouldEqual, t.String()) - - Convey("Must get values with type", func() { - So(sec.Key("STRING").MustString("404"), ShouldEqual, "str") - So(sec.Key("BOOL").MustBool(), ShouldBeTrue) - So(sec.Key("FLOAT64").MustFloat64(), ShouldEqual, 1.25) - So(sec.Key("INT").MustInt(), ShouldEqual, 10) - So(sec.Key("INT").MustInt64(), ShouldEqual, 10) - So(sec.Key("UINT").MustUint(), ShouldEqual, 3) - So(sec.Key("UINT").MustUint64(), ShouldEqual, 3) - So(sec.Key("TIME").MustTime().String(), ShouldEqual, t.String()) - - dur, err := time.ParseDuration("2h45m") + So(f.Section("").Key("key1").String(), ShouldEqual, `a\b\`) + So(f.Section("").Key("key2").String(), ShouldEqual, `c\d\`) + So(f.Section("").Key("key3").String(), ShouldEqual, "value") + + Convey("Inverse case", func() { + f, err := ini.LoadSources(ini.LoadOptions{AllowPythonMultilineValues: true}, []byte(` +key1=a\b\ +key2=c\d\`)) + So(err, ShouldBeNil) + So(f, ShouldNotBeNil) + + So(f.Section("").Key("key1").String(), ShouldEqual, `a\bkey2=c\d`) + }) + }) + + Convey("Ignore inline comments", func() { + f, err := ini.LoadSources(ini.LoadOptions{ + AllowPythonMultilineValues: true, + IgnoreInlineComment: true, + }, []byte(` +key1=value ;comment +key2=value2 #comment2 +key3=val#ue #comment3`)) So(err, ShouldBeNil) - So(sec.Key("DURATION").MustDuration().Seconds(), ShouldEqual, dur.Seconds()) - - Convey("Must get values with default value", func() { - So(sec.Key("STRING_404").MustString("404"), ShouldEqual, "404") - So(sec.Key("BOOL_404").MustBool(true), ShouldBeTrue) - So(sec.Key("FLOAT64_404").MustFloat64(2.5), ShouldEqual, 2.5) - So(sec.Key("INT_404").MustInt(15), ShouldEqual, 15) - So(sec.Key("INT_404").MustInt64(15), ShouldEqual, 15) - So(sec.Key("UINT_404").MustUint(6), ShouldEqual, 6) - So(sec.Key("UINT_404").MustUint64(6), ShouldEqual, 6) - - t, err := time.Parse(time.RFC3339, "2014-01-01T20:17:05Z") + So(f, ShouldNotBeNil) + + So(f.Section("").Key("key1").String(), ShouldEqual, `value ;comment`) + So(f.Section("").Key("key2").String(), ShouldEqual, `value2 #comment2`) + So(f.Section("").Key("key3").String(), ShouldEqual, `val#ue #comment3`) + + Convey("Inverse case", func() { + f, err := ini.LoadSources(ini.LoadOptions{AllowPythonMultilineValues: true}, []byte(` +key1=value ;comment +key2=value2 #comment2`)) So(err, ShouldBeNil) - So(sec.Key("TIME_404").MustTime(t).String(), ShouldEqual, t.String()) + So(f, ShouldNotBeNil) - So(sec.Key("DURATION_404").MustDuration(dur).Seconds(), ShouldEqual, dur.Seconds()) + So(f.Section("").Key("key1").String(), ShouldEqual, `value`) + So(f.Section("").Key("key1").Comment, ShouldEqual, `;comment`) + So(f.Section("").Key("key2").String(), ShouldEqual, `value2`) + So(f.Section("").Key("key2").Comment, ShouldEqual, `#comment2`) }) }) - }) - Convey("Get value with candidates", func() { - sec := cfg.Section("types") - So(sec.Key("STRING").In("", []string{"str", "arr", "types"}), ShouldEqual, "str") - So(sec.Key("FLOAT64").InFloat64(0, []float64{1.25, 2.5, 3.75}), ShouldEqual, 1.25) - So(sec.Key("INT").InInt(0, []int{10, 20, 30}), ShouldEqual, 10) - So(sec.Key("INT").InInt64(0, []int64{10, 20, 30}), ShouldEqual, 10) - So(sec.Key("UINT").InUint(0, []uint{3, 6, 9}), ShouldEqual, 3) - So(sec.Key("UINT").InUint64(0, []uint64{3, 6, 9}), ShouldEqual, 3) + Convey("Allow boolean type keys", func() { + f, err := ini.LoadSources(ini.LoadOptions{ + AllowPythonMultilineValues: true, + AllowBooleanKeys: true, + }, []byte(` +key1=hello +#key2 +key3`)) + So(err, ShouldBeNil) + So(f, ShouldNotBeNil) - zt, err := time.Parse(time.RFC3339, "0001-01-01T01:00:00Z") - So(err, ShouldBeNil) - t, err := time.Parse(time.RFC3339, "2015-01-01T20:17:05Z") - So(err, ShouldBeNil) - So(sec.Key("TIME").InTime(zt, []time.Time{t, time.Now(), time.Now().Add(1 * time.Second)}).String(), ShouldEqual, t.String()) - - Convey("Get value with candidates and default value", func() { - So(sec.Key("STRING_404").In("str", []string{"str", "arr", "types"}), ShouldEqual, "str") - So(sec.Key("FLOAT64_404").InFloat64(1.25, []float64{1.25, 2.5, 3.75}), ShouldEqual, 1.25) - So(sec.Key("INT_404").InInt(10, []int{10, 20, 30}), ShouldEqual, 10) - So(sec.Key("INT64_404").InInt64(10, []int64{10, 20, 30}), ShouldEqual, 10) - So(sec.Key("UINT_404").InUint(3, []uint{3, 6, 9}), ShouldEqual, 3) - So(sec.Key("UINT_404").InUint64(3, []uint64{3, 6, 9}), ShouldEqual, 3) - So(sec.Key("TIME_404").InTime(t, []time.Time{time.Now(), time.Now(), time.Now().Add(1 * time.Second)}).String(), ShouldEqual, t.String()) + So(f.Section("").KeyStrings(), ShouldResemble, []string{"key1", "key3"}) + So(f.Section("").Key("key3").MustBool(false), ShouldBeTrue) + + Convey("Write out", func() { + var buf bytes.Buffer + _, err := f.WriteTo(&buf) + So(err, ShouldBeNil) + So(buf.String(), ShouldEqual, `key1 = hello +# key2 +key3 +`) + }) + + Convey("Inverse case", func() { + _, err := ini.LoadSources(ini.LoadOptions{AllowPythonMultilineValues: true}, []byte(` +key1=hello +#key2 +key3`)) + So(err, ShouldNotBeNil) + }) }) - }) - Convey("Get values in range", func() { - sec := cfg.Section("types") - So(sec.Key("FLOAT64").RangeFloat64(0, 1, 2), ShouldEqual, 1.25) - So(sec.Key("INT").RangeInt(0, 10, 20), ShouldEqual, 10) - So(sec.Key("INT").RangeInt64(0, 10, 20), ShouldEqual, 10) + Convey("Allow shadow keys", func() { + f, err := ini.LoadSources(ini.LoadOptions{AllowShadows: true, AllowPythonMultilineValues: true}, []byte(` +[remote "origin"] +url = https://github.com/Antergone/test1.git +url = https://github.com/Antergone/test2.git +fetch = +refs/heads/*:refs/remotes/origin/*`)) + So(err, ShouldBeNil) + So(f, ShouldNotBeNil) - minT, err := time.Parse(time.RFC3339, "0001-01-01T01:00:00Z") - So(err, ShouldBeNil) - midT, err := time.Parse(time.RFC3339, "2013-01-01T01:00:00Z") - So(err, ShouldBeNil) - maxT, err := time.Parse(time.RFC3339, "9999-01-01T01:00:00Z") - So(err, ShouldBeNil) - t, err := time.Parse(time.RFC3339, "2015-01-01T20:17:05Z") - So(err, ShouldBeNil) - So(sec.Key("TIME").RangeTime(t, minT, maxT).String(), ShouldEqual, t.String()) + So(f.Section(`remote "origin"`).Key("url").String(), ShouldEqual, "https://github.com/Antergone/test1.git") + So(f.Section(`remote "origin"`).Key("url").ValueWithShadows(), ShouldResemble, []string{ + "https://github.com/Antergone/test1.git", + "https://github.com/Antergone/test2.git", + }) + So(f.Section(`remote "origin"`).Key("fetch").String(), ShouldEqual, "+refs/heads/*:refs/remotes/origin/*") + + Convey("Write out", func() { + var buf bytes.Buffer + _, err := f.WriteTo(&buf) + So(err, ShouldBeNil) + So(buf.String(), ShouldEqual, `[remote "origin"] +url = https://github.com/Antergone/test1.git +url = https://github.com/Antergone/test2.git +fetch = +refs/heads/*:refs/remotes/origin/* + +`) + }) - Convey("Get value in range with default value", func() { - So(sec.Key("FLOAT64").RangeFloat64(5, 0, 1), ShouldEqual, 5) - So(sec.Key("INT").RangeInt(7, 0, 5), ShouldEqual, 7) - So(sec.Key("INT").RangeInt64(7, 0, 5), ShouldEqual, 7) - So(sec.Key("TIME").RangeTime(t, minT, midT).String(), ShouldEqual, t.String()) + Convey("Inverse case", func() { + f, err := ini.LoadSources(ini.LoadOptions{AllowPythonMultilineValues: true}, []byte(` +[remote "origin"] +url = https://github.com/Antergone/test1.git +url = https://github.com/Antergone/test2.git`)) + So(err, ShouldBeNil) + So(f, ShouldNotBeNil) + + So(f.Section(`remote "origin"`).Key("url").String(), ShouldEqual, "https://github.com/Antergone/test2.git") + }) }) - }) - Convey("Get values into slice", func() { - sec := cfg.Section("array") - So(strings.Join(sec.Key("STRINGS").Strings(","), ","), ShouldEqual, "en,zh,de") - So(len(sec.Key("STRINGS_404").Strings(",")), ShouldEqual, 0) - - vals1 := sec.Key("FLOAT64S").Float64s(",") - for i, v := range []float64{1.1, 2.2, 3.3} { - So(vals1[i], ShouldEqual, v) - } - - vals2 := sec.Key("INTS").Ints(",") - for i, v := range []int{1, 2, 3} { - So(vals2[i], ShouldEqual, v) - } - - vals3 := sec.Key("INTS").Int64s(",") - for i, v := range []int64{1, 2, 3} { - So(vals3[i], ShouldEqual, v) - } - - vals4 := sec.Key("UINTS").Uints(",") - for i, v := range []uint{1, 2, 3} { - So(vals4[i], ShouldEqual, v) - } - - vals5 := sec.Key("UINTS").Uint64s(",") - for i, v := range []uint64{1, 2, 3} { - So(vals5[i], ShouldEqual, v) - } - - t, err := time.Parse(time.RFC3339, "2015-01-01T20:17:05Z") - So(err, ShouldBeNil) - vals6 := sec.Key("TIMES").Times(",") - for i, v := range []time.Time{t, t, t} { - So(vals6[i].String(), ShouldEqual, v.String()) - } - }) + Convey("Unescape double quotes inside value", func() { + f, err := ini.LoadSources(ini.LoadOptions{ + AllowPythonMultilineValues: true, + UnescapeValueDoubleQuotes: true, + }, []byte(` +create_repo="创建了仓库 %s"`)) + So(err, ShouldBeNil) + So(f, ShouldNotBeNil) - Convey("Get key hash", func() { - cfg.Section("").KeysHash() - }) + So(f.Section("").Key("create_repo").String(), ShouldEqual, `创建了仓库 %s`) - Convey("Set key value", func() { - k := cfg.Section("author").Key("NAME") - k.SetValue("无闻") - So(k.String(), ShouldEqual, "无闻") - }) + Convey("Inverse case", func() { + f, err := ini.LoadSources(ini.LoadOptions{AllowPythonMultilineValues: true}, []byte(` +create_repo="创建了仓库 %s"`)) + So(err, ShouldBeNil) + So(f, ShouldNotBeNil) - Convey("Get key strings", func() { - So(strings.Join(cfg.Section("types").KeyStrings(), ","), ShouldEqual, "STRING,BOOL,BOOL_FALSE,FLOAT64,INT,TIME,DURATION,UINT") - }) + So(f.Section("").Key("create_repo").String(), ShouldEqual, `"创建了仓库 %s"`) + }) + }) - Convey("Delete a key", func() { - cfg.Section("package.sub").DeleteKey("UNUSED_KEY") - _, err := cfg.Section("package.sub").GetKey("UNUSED_KEY") - So(err, ShouldNotBeNil) - }) + Convey("Unescape comment symbols inside value", func() { + f, err := ini.LoadSources(ini.LoadOptions{ + AllowPythonMultilineValues: true, + IgnoreInlineComment: true, + UnescapeValueCommentSymbols: true, + }, []byte(` +key = test value more text +`)) + So(err, ShouldBeNil) + So(f, ShouldNotBeNil) - Convey("Has Key (backwards compatible)", func() { - sec := cfg.Section("package.sub") - haskey1 := sec.Haskey("UNUSED_KEY") - haskey2 := sec.Haskey("CLONE_URL") - haskey3 := sec.Haskey("CLONE_URL_NO") - So(haskey1, ShouldBeTrue) - So(haskey2, ShouldBeTrue) - So(haskey3, ShouldBeFalse) - }) + So(f.Section("").Key("key").String(), ShouldEqual, `test value more text`) + }) - Convey("Has Key", func() { - sec := cfg.Section("package.sub") - haskey1 := sec.HasKey("UNUSED_KEY") - haskey2 := sec.HasKey("CLONE_URL") - haskey3 := sec.HasKey("CLONE_URL_NO") - So(haskey1, ShouldBeTrue) - So(haskey2, ShouldBeTrue) - So(haskey3, ShouldBeFalse) - }) + Convey("Can parse small python-compatible INI files", func() { + f, err := ini.LoadSources(ini.LoadOptions{ + AllowPythonMultilineValues: true, + Insensitive: true, + UnparseableSections: []string{"core_lesson", "comments"}, + }, []byte(` +[long] +long_rsa_private_key = -----BEGIN RSA PRIVATE KEY----- + foo + bar + foobar + barfoo + -----END RSA PRIVATE KEY----- +`)) + So(err, ShouldBeNil) + So(f, ShouldNotBeNil) - Convey("Has Value", func() { - sec := cfg.Section("author") - hasvalue1 := sec.HasValue("Unknwon") - hasvalue2 := sec.HasValue("doc") - So(hasvalue1, ShouldBeTrue) - So(hasvalue2, ShouldBeFalse) - }) + So(f.Section("long").Key("long_rsa_private_key").String(), ShouldEqual, "-----BEGIN RSA PRIVATE KEY-----\nfoo\nbar\nfoobar\nbarfoo\n-----END RSA PRIVATE KEY-----") + }) - Convey("Get section strings", func() { - So(strings.Join(cfg.SectionStrings(), ","), ShouldEqual, "DEFAULT,author,package,package.sub,features,types,array,note,comments,advance") - }) + Convey("Can parse big python-compatible INI files", func() { + f, err := ini.LoadSources(ini.LoadOptions{ + AllowPythonMultilineValues: true, + Insensitive: true, + UnparseableSections: []string{"core_lesson", "comments"}, + }, []byte(` +[long] +long_rsa_private_key = -----BEGIN RSA PRIVATE KEY----- + 1foo + 2bar + 3foobar + 4barfoo + 5foo + 6bar + 7foobar + 8barfoo + 9foo + 10bar + 11foobar + 12barfoo + 13foo + 14bar + 15foobar + 16barfoo + 17foo + 18bar + 19foobar + 20barfoo + 21foo + 22bar + 23foobar + 24barfoo + 25foo + 26bar + 27foobar + 28barfoo + 29foo + 30bar + 31foobar + 32barfoo + 33foo + 34bar + 35foobar + 36barfoo + 37foo + 38bar + 39foobar + 40barfoo + 41foo + 42bar + 43foobar + 44barfoo + 45foo + 46bar + 47foobar + 48barfoo + 49foo + 50bar + 51foobar + 52barfoo + 53foo + 54bar + 55foobar + 56barfoo + 57foo + 58bar + 59foobar + 60barfoo + 61foo + 62bar + 63foobar + 64barfoo + 65foo + 66bar + 67foobar + 68barfoo + 69foo + 70bar + 71foobar + 72barfoo + 73foo + 74bar + 75foobar + 76barfoo + 77foo + 78bar + 79foobar + 80barfoo + 81foo + 82bar + 83foobar + 84barfoo + 85foo + 86bar + 87foobar + 88barfoo + 89foo + 90bar + 91foobar + 92barfoo + 93foo + 94bar + 95foobar + 96barfoo + -----END RSA PRIVATE KEY----- +`)) + So(err, ShouldBeNil) + So(f, ShouldNotBeNil) + + So(f.Section("long").Key("long_rsa_private_key").String(), ShouldEqual, `-----BEGIN RSA PRIVATE KEY----- +1foo +2bar +3foobar +4barfoo +5foo +6bar +7foobar +8barfoo +9foo +10bar +11foobar +12barfoo +13foo +14bar +15foobar +16barfoo +17foo +18bar +19foobar +20barfoo +21foo +22bar +23foobar +24barfoo +25foo +26bar +27foobar +28barfoo +29foo +30bar +31foobar +32barfoo +33foo +34bar +35foobar +36barfoo +37foo +38bar +39foobar +40barfoo +41foo +42bar +43foobar +44barfoo +45foo +46bar +47foobar +48barfoo +49foo +50bar +51foobar +52barfoo +53foo +54bar +55foobar +56barfoo +57foo +58bar +59foobar +60barfoo +61foo +62bar +63foobar +64barfoo +65foo +66bar +67foobar +68barfoo +69foo +70bar +71foobar +72barfoo +73foo +74bar +75foobar +76barfoo +77foo +78bar +79foobar +80barfoo +81foo +82bar +83foobar +84barfoo +85foo +86bar +87foobar +88barfoo +89foo +90bar +91foobar +92barfoo +93foo +94bar +95foobar +96barfoo +-----END RSA PRIVATE KEY-----`) + }) - Convey("Delete a section", func() { - cfg.DeleteSection("") - So(cfg.SectionStrings()[0], ShouldNotEqual, DEFAULT_SECTION) - }) + Convey("Allow unparsable sections", func() { + f, err := ini.LoadSources(ini.LoadOptions{ + AllowPythonMultilineValues: true, + Insensitive: true, + UnparseableSections: []string{"core_lesson", "comments"}, + }, []byte(` +Lesson_Location = 87 +Lesson_Status = C +Score = 3 +Time = 00:02:30 + +[CORE_LESSON] +my lesson state data – 1111111111111111111000000000000000001110000 +111111111111111111100000000000111000000000 – end my lesson state data + +[COMMENTS] +<1> This slide has the fuel listed in the wrong units `)) + So(err, ShouldBeNil) + So(f, ShouldNotBeNil) - Convey("Create new sections", func() { - cfg.NewSections("test", "test2") - _, err := cfg.GetSection("test") - So(err, ShouldBeNil) - _, err = cfg.GetSection("test2") - So(err, ShouldBeNil) - }) - }) + So(f.Section("").Key("score").String(), ShouldEqual, "3") + So(f.Section("").Body(), ShouldBeEmpty) + So(f.Section("core_lesson").Body(), ShouldEqual, `my lesson state data – 1111111111111111111000000000000000001110000 +111111111111111111100000000000111000000000 – end my lesson state data`) + So(f.Section("comments").Body(), ShouldEqual, `<1> This slide has the fuel listed in the wrong units `) - Convey("Test getting and setting bad values", t, func() { - cfg, err := Load([]byte(_CONF_DATA), "testdata/conf.ini") - So(err, ShouldBeNil) - So(cfg, ShouldNotBeNil) + Convey("Write out", func() { + var buf bytes.Buffer + _, err := f.WriteTo(&buf) + So(err, ShouldBeNil) + So(buf.String(), ShouldEqual, `lesson_location = 87 +lesson_status = C +score = 3 +time = 00:02:30 + +[core_lesson] +my lesson state data – 1111111111111111111000000000000000001110000 +111111111111111111100000000000111000000000 – end my lesson state data + +[comments] +<1> This slide has the fuel listed in the wrong units +`) + }) - Convey("Create new key with empty name", func() { - k, err := cfg.Section("").NewKey("", "") - So(err, ShouldNotBeNil) - So(k, ShouldBeNil) - }) + Convey("Inverse case", func() { + _, err := ini.LoadSources(ini.LoadOptions{AllowPythonMultilineValues: true}, []byte(` +[CORE_LESSON] +my lesson state data – 1111111111111111111000000000000000001110000 +111111111111111111100000000000111000000000 – end my lesson state data`)) + So(err, ShouldNotBeNil) + }) + }) - Convey("Create new section with empty name", func() { - s, err := cfg.NewSection("") - So(err, ShouldNotBeNil) - So(s, ShouldBeNil) - }) + Convey("And false `SpaceBeforeInlineComment`", func() { + Convey("Can't parse INI files containing `#` or `;` in value", func() { + f, err := ini.LoadSources( + ini.LoadOptions{AllowPythonMultilineValues: false, SpaceBeforeInlineComment: false}, + []byte(` +[author] +NAME = U#n#k#n#w#o#n +GITHUB = U;n;k;n;w;o;n +`)) + So(err, ShouldBeNil) + So(f, ShouldNotBeNil) + sec := f.Section("author") + nameValue := sec.Key("NAME").String() + githubValue := sec.Key("GITHUB").String() + So(nameValue, ShouldEqual, "U") + So(githubValue, ShouldEqual, "U") + }) + }) - Convey("Create new sections with empty name", func() { - So(cfg.NewSections(""), ShouldNotBeNil) + Convey("And true `SpaceBeforeInlineComment`", func() { + Convey("Can parse INI files containing `#` or `;` in value", func() { + f, err := ini.LoadSources( + ini.LoadOptions{AllowPythonMultilineValues: false, SpaceBeforeInlineComment: true}, + []byte(` +[author] +NAME = U#n#k#n#w#o#n +GITHUB = U;n;k;n;w;o;n +`)) + So(err, ShouldBeNil) + So(f, ShouldNotBeNil) + sec := f.Section("author") + nameValue := sec.Key("NAME").String() + githubValue := sec.Key("GITHUB").String() + So(nameValue, ShouldEqual, "U#n#k#n#w#o#n") + So(githubValue, ShouldEqual, "U;n;k;n;w;o;n") + }) + }) }) - Convey("Get section that not exists", func() { - s, err := cfg.GetSection("404") - So(err, ShouldNotBeNil) - So(s, ShouldBeNil) + Convey("with false `AllowPythonMultilineValues`", func() { + Convey("Ignore nonexistent files", func() { + f, err := ini.LoadSources(ini.LoadOptions{AllowPythonMultilineValues: false, Loose: true}, _NOT_FOUND_CONF, _MINIMAL_CONF) + So(err, ShouldBeNil) + So(f, ShouldNotBeNil) - s = cfg.Section("404") - So(s, ShouldNotBeNil) - }) - }) + Convey("Inverse case", func() { + _, err = ini.LoadSources(ini.LoadOptions{AllowPythonMultilineValues: false}, _NOT_FOUND_CONF) + So(err, ShouldNotBeNil) + }) + }) - Convey("Test key hash clone", t, func() { - cfg, err := Load([]byte(strings.Replace("network=tcp,addr=127.0.0.1:6379,db=4,pool_size=100,idle_timeout=180", ",", "\n", -1))) - So(err, ShouldBeNil) - for _, v := range cfg.Section("").KeysHash() { - So(len(v), ShouldBeGreaterThan, 0) - } - }) + Convey("Insensitive to section and key names", func() { + f, err := ini.LoadSources(ini.LoadOptions{AllowPythonMultilineValues: false, Insensitive: true}, _MINIMAL_CONF) + So(err, ShouldBeNil) + So(f, ShouldNotBeNil) - Convey("Key has empty value", t, func() { - _conf := `key1= -key2= ; comment` - cfg, err := Load([]byte(_conf)) - So(err, ShouldBeNil) - So(cfg.Section("").Key("key1").Value(), ShouldBeEmpty) - }) -} + So(f.Section("Author").Key("e-mail").String(), ShouldEqual, "u@gogs.io") -func Test_File_Append(t *testing.T) { - Convey("Append data sources", t, func() { - cfg, err := Load([]byte("")) - So(err, ShouldBeNil) - So(cfg, ShouldNotBeNil) + Convey("Write out", func() { + var buf bytes.Buffer + _, err := f.WriteTo(&buf) + So(err, ShouldBeNil) + So(buf.String(), ShouldEqual, `[author] +e-mail = u@gogs.io - So(cfg.Append([]byte(""), []byte("")), ShouldBeNil) +`) + }) - Convey("Append bad data sources", func() { - So(cfg.Append(1), ShouldNotBeNil) - So(cfg.Append([]byte(""), 1), ShouldNotBeNil) - }) - }) -} + Convey("Inverse case", func() { + f, err := ini.LoadSources(ini.LoadOptions{AllowPythonMultilineValues: false}, _MINIMAL_CONF) + So(err, ShouldBeNil) + So(f, ShouldNotBeNil) -func Test_File_WriteTo(t *testing.T) { - Convey("Write to somewhere", t, func() { - var buf bytes.Buffer - cfg := Empty() - cfg.WriteTo(&buf) - }) -} + So(f.Section("Author").Key("e-mail").String(), ShouldBeEmpty) + }) + }) -func Test_File_SaveTo(t *testing.T) { - Convey("Save file", t, func() { - cfg, err := Load([]byte(_CONF_DATA), "testdata/conf.ini") - So(err, ShouldBeNil) - So(cfg, ShouldNotBeNil) + Convey("Ignore continuation lines", func() { + f, err := ini.LoadSources(ini.LoadOptions{ + AllowPythonMultilineValues: false, + IgnoreContinuation: true, + }, []byte(` +key1=a\b\ +key2=c\d\ +key3=value`)) + So(err, ShouldBeNil) + So(f, ShouldNotBeNil) - cfg.Section("").Key("NAME").Comment = "Package name" - cfg.Section("author").Comment = `Information about package author -# Bio can be written in multiple lines.` - cfg.Section("advanced").Key("val w/ pound").SetValue("my#password") - So(cfg.SaveTo("testdata/conf_out.ini"), ShouldBeNil) + So(f.Section("").Key("key1").String(), ShouldEqual, `a\b\`) + So(f.Section("").Key("key2").String(), ShouldEqual, `c\d\`) + So(f.Section("").Key("key3").String(), ShouldEqual, "value") - cfg.Section("author").Key("NAME").Comment = "This is author name" - So(cfg.SaveToIndent("testdata/conf_out.ini", "\t"), ShouldBeNil) - }) -} + Convey("Inverse case", func() { + f, err := ini.LoadSources(ini.LoadOptions{AllowPythonMultilineValues: false}, []byte(` +key1=a\b\ +key2=c\d\`)) + So(err, ShouldBeNil) + So(f, ShouldNotBeNil) -func Benchmark_Key_Value(b *testing.B) { - c, _ := Load([]byte(_CONF_DATA)) - for i := 0; i < b.N; i++ { - c.Section("").Key("NAME").Value() - } -} + So(f.Section("").Key("key1").String(), ShouldEqual, `a\bkey2=c\d`) + }) + }) -func Benchmark_Key_String(b *testing.B) { - c, _ := Load([]byte(_CONF_DATA)) - for i := 0; i < b.N; i++ { - c.Section("").Key("NAME").String() - } -} + Convey("Ignore inline comments", func() { + f, err := ini.LoadSources(ini.LoadOptions{ + AllowPythonMultilineValues: false, + IgnoreInlineComment: true, + }, []byte(` +key1=value ;comment +key2=value2 #comment2 +key3=val#ue #comment3`)) + So(err, ShouldBeNil) + So(f, ShouldNotBeNil) -func Benchmark_Key_Value_NonBlock(b *testing.B) { - c, _ := Load([]byte(_CONF_DATA)) - c.BlockMode = false - for i := 0; i < b.N; i++ { - c.Section("").Key("NAME").Value() - } -} + So(f.Section("").Key("key1").String(), ShouldEqual, `value ;comment`) + So(f.Section("").Key("key2").String(), ShouldEqual, `value2 #comment2`) + So(f.Section("").Key("key3").String(), ShouldEqual, `val#ue #comment3`) -func Benchmark_Key_String_NonBlock(b *testing.B) { - c, _ := Load([]byte(_CONF_DATA)) - c.BlockMode = false - for i := 0; i < b.N; i++ { - c.Section("").Key("NAME").String() - } -} + Convey("Inverse case", func() { + f, err := ini.LoadSources(ini.LoadOptions{AllowPythonMultilineValues: false}, []byte(` +key1=value ;comment +key2=value2 #comment2`)) + So(err, ShouldBeNil) + So(f, ShouldNotBeNil) + + So(f.Section("").Key("key1").String(), ShouldEqual, `value`) + So(f.Section("").Key("key1").Comment, ShouldEqual, `;comment`) + So(f.Section("").Key("key2").String(), ShouldEqual, `value2`) + So(f.Section("").Key("key2").Comment, ShouldEqual, `#comment2`) + }) + }) -func Benchmark_Key_SetValue(b *testing.B) { - c, _ := Load([]byte(_CONF_DATA)) - for i := 0; i < b.N; i++ { - c.Section("").Key("NAME").SetValue("10") - } + Convey("Allow boolean type keys", func() { + f, err := ini.LoadSources(ini.LoadOptions{ + AllowPythonMultilineValues: false, + AllowBooleanKeys: true, + }, []byte(` +key1=hello +#key2 +key3`)) + So(err, ShouldBeNil) + So(f, ShouldNotBeNil) + + So(f.Section("").KeyStrings(), ShouldResemble, []string{"key1", "key3"}) + So(f.Section("").Key("key3").MustBool(false), ShouldBeTrue) + + Convey("Write out", func() { + var buf bytes.Buffer + _, err := f.WriteTo(&buf) + So(err, ShouldBeNil) + So(buf.String(), ShouldEqual, `key1 = hello +# key2 +key3 +`) + }) + + Convey("Inverse case", func() { + _, err := ini.LoadSources(ini.LoadOptions{AllowPythonMultilineValues: false}, []byte(` +key1=hello +#key2 +key3`)) + So(err, ShouldNotBeNil) + }) + }) + + Convey("Allow shadow keys", func() { + f, err := ini.LoadSources(ini.LoadOptions{AllowPythonMultilineValues: false, AllowShadows: true}, []byte(` +[remote "origin"] +url = https://github.com/Antergone/test1.git +url = https://github.com/Antergone/test2.git +fetch = +refs/heads/*:refs/remotes/origin/*`)) + So(err, ShouldBeNil) + So(f, ShouldNotBeNil) + + So(f.Section(`remote "origin"`).Key("url").String(), ShouldEqual, "https://github.com/Antergone/test1.git") + So(f.Section(`remote "origin"`).Key("url").ValueWithShadows(), ShouldResemble, []string{ + "https://github.com/Antergone/test1.git", + "https://github.com/Antergone/test2.git", + }) + So(f.Section(`remote "origin"`).Key("fetch").String(), ShouldEqual, "+refs/heads/*:refs/remotes/origin/*") + + Convey("Write out", func() { + var buf bytes.Buffer + _, err := f.WriteTo(&buf) + So(err, ShouldBeNil) + So(buf.String(), ShouldEqual, `[remote "origin"] +url = https://github.com/Antergone/test1.git +url = https://github.com/Antergone/test2.git +fetch = +refs/heads/*:refs/remotes/origin/* + +`) + }) + + Convey("Inverse case", func() { + f, err := ini.LoadSources(ini.LoadOptions{AllowPythonMultilineValues: false}, []byte(` +[remote "origin"] +url = https://github.com/Antergone/test1.git +url = https://github.com/Antergone/test2.git`)) + So(err, ShouldBeNil) + So(f, ShouldNotBeNil) + + So(f.Section(`remote "origin"`).Key("url").String(), ShouldEqual, "https://github.com/Antergone/test2.git") + }) + }) + + Convey("Unescape double quotes inside value", func() { + f, err := ini.LoadSources(ini.LoadOptions{ + AllowPythonMultilineValues: false, + UnescapeValueDoubleQuotes: true, + }, []byte(` +create_repo="创建了仓库 %s"`)) + So(err, ShouldBeNil) + So(f, ShouldNotBeNil) + + So(f.Section("").Key("create_repo").String(), ShouldEqual, `创建了仓库 %s`) + + Convey("Inverse case", func() { + f, err := ini.LoadSources(ini.LoadOptions{AllowPythonMultilineValues: false}, []byte(` +create_repo="创建了仓库 %s"`)) + So(err, ShouldBeNil) + So(f, ShouldNotBeNil) + + So(f.Section("").Key("create_repo").String(), ShouldEqual, `"创建了仓库 %s"`) + }) + }) + + Convey("Unescape comment symbols inside value", func() { + f, err := ini.LoadSources(ini.LoadOptions{ + AllowPythonMultilineValues: false, + IgnoreInlineComment: true, + UnescapeValueCommentSymbols: true, + }, []byte(` +key = test value more text +`)) + So(err, ShouldBeNil) + So(f, ShouldNotBeNil) + + So(f.Section("").Key("key").String(), ShouldEqual, `test value more text`) + }) + + Convey("Can't parse small python-compatible INI files", func() { + f, err := ini.LoadSources(ini.LoadOptions{AllowPythonMultilineValues: false}, []byte(` +[long] +long_rsa_private_key = -----BEGIN RSA PRIVATE KEY----- + foo + bar + foobar + barfoo + -----END RSA PRIVATE KEY----- +`)) + So(err, ShouldNotBeNil) + So(f, ShouldBeNil) + So(err.Error(), ShouldEqual, "key-value delimiter not found: foo\n") + }) + + Convey("Can't parse big python-compatible INI files", func() { + f, err := ini.LoadSources(ini.LoadOptions{AllowPythonMultilineValues: false}, []byte(` +[long] +long_rsa_private_key = -----BEGIN RSA PRIVATE KEY----- + 1foo + 2bar + 3foobar + 4barfoo + 5foo + 6bar + 7foobar + 8barfoo + 9foo + 10bar + 11foobar + 12barfoo + 13foo + 14bar + 15foobar + 16barfoo + 17foo + 18bar + 19foobar + 20barfoo + 21foo + 22bar + 23foobar + 24barfoo + 25foo + 26bar + 27foobar + 28barfoo + 29foo + 30bar + 31foobar + 32barfoo + 33foo + 34bar + 35foobar + 36barfoo + 37foo + 38bar + 39foobar + 40barfoo + 41foo + 42bar + 43foobar + 44barfoo + 45foo + 46bar + 47foobar + 48barfoo + 49foo + 50bar + 51foobar + 52barfoo + 53foo + 54bar + 55foobar + 56barfoo + 57foo + 58bar + 59foobar + 60barfoo + 61foo + 62bar + 63foobar + 64barfoo + 65foo + 66bar + 67foobar + 68barfoo + 69foo + 70bar + 71foobar + 72barfoo + 73foo + 74bar + 75foobar + 76barfoo + 77foo + 78bar + 79foobar + 80barfoo + 81foo + 82bar + 83foobar + 84barfoo + 85foo + 86bar + 87foobar + 88barfoo + 89foo + 90bar + 91foobar + 92barfoo + 93foo + 94bar + 95foobar + 96barfoo + -----END RSA PRIVATE KEY----- +`)) + So(err, ShouldNotBeNil) + So(f, ShouldBeNil) + So(err.Error(), ShouldEqual, "key-value delimiter not found: 1foo\n") + }) + + Convey("Allow unparsable sections", func() { + f, err := ini.LoadSources(ini.LoadOptions{ + AllowPythonMultilineValues: false, + Insensitive: true, + UnparseableSections: []string{"core_lesson", "comments"}, + }, []byte(` +Lesson_Location = 87 +Lesson_Status = C +Score = 3 +Time = 00:02:30 + +[CORE_LESSON] +my lesson state data – 1111111111111111111000000000000000001110000 +111111111111111111100000000000111000000000 – end my lesson state data + +[COMMENTS] +<1> This slide has the fuel listed in the wrong units `)) + So(err, ShouldBeNil) + So(f, ShouldNotBeNil) + + So(f.Section("").Key("score").String(), ShouldEqual, "3") + So(f.Section("").Body(), ShouldBeEmpty) + So(f.Section("core_lesson").Body(), ShouldEqual, `my lesson state data – 1111111111111111111000000000000000001110000 +111111111111111111100000000000111000000000 – end my lesson state data`) + So(f.Section("comments").Body(), ShouldEqual, `<1> This slide has the fuel listed in the wrong units `) + + Convey("Write out", func() { + var buf bytes.Buffer + _, err := f.WriteTo(&buf) + So(err, ShouldBeNil) + So(buf.String(), ShouldEqual, `lesson_location = 87 +lesson_status = C +score = 3 +time = 00:02:30 + +[core_lesson] +my lesson state data – 1111111111111111111000000000000000001110000 +111111111111111111100000000000111000000000 – end my lesson state data + +[comments] +<1> This slide has the fuel listed in the wrong units +`) + }) + + Convey("Inverse case", func() { + _, err := ini.LoadSources(ini.LoadOptions{AllowPythonMultilineValues: false}, []byte(` +[CORE_LESSON] +my lesson state data – 1111111111111111111000000000000000001110000 +111111111111111111100000000000111000000000 – end my lesson state data`)) + So(err, ShouldNotBeNil) + }) + }) + + Convey("And false `SpaceBeforeInlineComment`", func() { + Convey("Can't parse INI files containing `#` or `;` in value", func() { + f, err := ini.LoadSources( + ini.LoadOptions{AllowPythonMultilineValues: true, SpaceBeforeInlineComment: false}, + []byte(` +[author] +NAME = U#n#k#n#w#o#n +GITHUB = U;n;k;n;w;o;n +`)) + So(err, ShouldBeNil) + So(f, ShouldNotBeNil) + sec := f.Section("author") + nameValue := sec.Key("NAME").String() + githubValue := sec.Key("GITHUB").String() + So(nameValue, ShouldEqual, "U") + So(githubValue, ShouldEqual, "U") + }) + }) + + Convey("And true `SpaceBeforeInlineComment`", func() { + Convey("Can parse INI files containing `#` or `;` in value", func() { + f, err := ini.LoadSources( + ini.LoadOptions{AllowPythonMultilineValues: true, SpaceBeforeInlineComment: true}, + []byte(` +[author] +NAME = U#n#k#n#w#o#n +GITHUB = U;n;k;n;w;o;n +`)) + So(err, ShouldBeNil) + So(f, ShouldNotBeNil) + sec := f.Section("author") + nameValue := sec.Key("NAME").String() + githubValue := sec.Key("GITHUB").String() + So(nameValue, ShouldEqual, "U#n#k#n#w#o#n") + So(githubValue, ShouldEqual, "U;n;k;n;w;o;n") + }) + }) + }) + }) } diff --git a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/key.go b/vendor/github.com/go-ini/ini/key.go similarity index 87% rename from vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/key.go rename to vendor/github.com/go-ini/ini/key.go index 852696f..7c8566a 100644 --- a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/key.go +++ b/vendor/github.com/go-ini/ini/key.go @@ -15,6 +15,7 @@ package ini import ( + "bytes" "errors" "fmt" "strconv" @@ -25,6 +26,7 @@ import ( // Key represents a key under a section. type Key struct { s *Section + Comment string name string value string isAutoIncrement bool @@ -33,7 +35,7 @@ type Key struct { isShadow bool shadows []*Key - Comment string + nestedValues []string } // newKey simply return a key object with given values. @@ -66,6 +68,22 @@ func (k *Key) AddShadow(val string) error { return k.addShadow(val) } +func (k *Key) addNestedValue(val string) error { + if k.isAutoIncrement || k.isBooleanType { + return errors.New("cannot add nested value to auto-increment or boolean key") + } + + k.nestedValues = append(k.nestedValues, val) + return nil +} + +func (k *Key) AddNestedValue(val string) error { + if !k.s.f.options.AllowNestedValues { + return errors.New("nested value is not allowed") + } + return k.addNestedValue(val) +} + // ValueMapper represents a mapping function for values, e.g. os.ExpandEnv type ValueMapper func(string) string @@ -92,6 +110,12 @@ func (k *Key) ValueWithShadows() []string { return vals } +// NestedValues returns nested values stored in the key. +// It is possible returned value is nil if no nested values stored in the key. +func (k *Key) NestedValues() []string { + return k.nestedValues +} + // transformValue takes a raw value and transforms to its final string. func (k *Key) transformValue(val string) string { if k.s.f.ValueMapper != nil { @@ -114,7 +138,7 @@ func (k *Key) transformValue(val string) string { // Search in the same section. nk, err := k.s.GetKey(noption) - if err != nil { + if err != nil || k == nk { // Search again in default section. nk, _ = k.s.f.Section("").GetKey(noption) } @@ -444,11 +468,39 @@ func (k *Key) Strings(delim string) []string { return []string{} } - vals := strings.Split(str, delim) - for i := range vals { - // vals[i] = k.transformValue(strings.TrimSpace(vals[i])) - vals[i] = strings.TrimSpace(vals[i]) + runes := []rune(str) + vals := make([]string, 0, 2) + var buf bytes.Buffer + escape := false + idx := 0 + for { + if escape { + escape = false + if runes[idx] != '\\' && !strings.HasPrefix(string(runes[idx:]), delim) { + buf.WriteRune('\\') + } + buf.WriteRune(runes[idx]) + } else { + if runes[idx] == '\\' { + escape = true + } else if strings.HasPrefix(string(runes[idx:]), delim) { + idx += len(delim) - 1 + vals = append(vals, strings.TrimSpace(buf.String())) + buf.Reset() + } else { + buf.WriteRune(runes[idx]) + } + } + idx += 1 + if idx == len(runes) { + break + } + } + + if buf.Len() > 0 { + vals = append(vals, strings.TrimSpace(buf.String())) } + return vals } @@ -473,7 +525,7 @@ func (k *Key) StringsWithShadows(delim string) []string { // Float64s returns list of float64 divided by given delimiter. Any invalid input will be treated as zero value. func (k *Key) Float64s(delim string) []float64 { - vals, _ := k.getFloat64s(delim, true, false) + vals, _ := k.parseFloat64s(k.Strings(delim), true, false) return vals } @@ -491,20 +543,20 @@ func (k *Key) Int64s(delim string) []int64 { // Uints returns list of uint divided by given delimiter. Any invalid input will be treated as zero value. func (k *Key) Uints(delim string) []uint { - vals, _ := k.getUints(delim, true, false) + vals, _ := k.parseUints(k.Strings(delim), true, false) return vals } // Uint64s returns list of uint64 divided by given delimiter. Any invalid input will be treated as zero value. func (k *Key) Uint64s(delim string) []uint64 { - vals, _ := k.getUint64s(delim, true, false) + vals, _ := k.parseUint64s(k.Strings(delim), true, false) return vals } // TimesFormat parses with given format and returns list of time.Time divided by given delimiter. // Any invalid input will be treated as zero value (0001-01-01 00:00:00 +0000 UTC). func (k *Key) TimesFormat(format, delim string) []time.Time { - vals, _ := k.getTimesFormat(format, delim, true, false) + vals, _ := k.parseTimesFormat(format, k.Strings(delim), true, false) return vals } @@ -517,7 +569,7 @@ func (k *Key) Times(delim string) []time.Time { // ValidFloat64s returns list of float64 divided by given delimiter. If some value is not float, then // it will not be included to result list. func (k *Key) ValidFloat64s(delim string) []float64 { - vals, _ := k.getFloat64s(delim, false, false) + vals, _ := k.parseFloat64s(k.Strings(delim), false, false) return vals } @@ -538,20 +590,20 @@ func (k *Key) ValidInt64s(delim string) []int64 { // ValidUints returns list of uint divided by given delimiter. If some value is not unsigned integer, // then it will not be included to result list. func (k *Key) ValidUints(delim string) []uint { - vals, _ := k.getUints(delim, false, false) + vals, _ := k.parseUints(k.Strings(delim), false, false) return vals } // ValidUint64s returns list of uint64 divided by given delimiter. If some value is not 64-bit unsigned // integer, then it will not be included to result list. func (k *Key) ValidUint64s(delim string) []uint64 { - vals, _ := k.getUint64s(delim, false, false) + vals, _ := k.parseUint64s(k.Strings(delim), false, false) return vals } // ValidTimesFormat parses with given format and returns list of time.Time divided by given delimiter. func (k *Key) ValidTimesFormat(format, delim string) []time.Time { - vals, _ := k.getTimesFormat(format, delim, false, false) + vals, _ := k.parseTimesFormat(format, k.Strings(delim), false, false) return vals } @@ -562,7 +614,7 @@ func (k *Key) ValidTimes(delim string) []time.Time { // StrictFloat64s returns list of float64 divided by given delimiter or error on first invalid input. func (k *Key) StrictFloat64s(delim string) ([]float64, error) { - return k.getFloat64s(delim, false, true) + return k.parseFloat64s(k.Strings(delim), false, true) } // StrictInts returns list of int divided by given delimiter or error on first invalid input. @@ -577,18 +629,18 @@ func (k *Key) StrictInt64s(delim string) ([]int64, error) { // StrictUints returns list of uint divided by given delimiter or error on first invalid input. func (k *Key) StrictUints(delim string) ([]uint, error) { - return k.getUints(delim, false, true) + return k.parseUints(k.Strings(delim), false, true) } // StrictUint64s returns list of uint64 divided by given delimiter or error on first invalid input. func (k *Key) StrictUint64s(delim string) ([]uint64, error) { - return k.getUint64s(delim, false, true) + return k.parseUint64s(k.Strings(delim), false, true) } // StrictTimesFormat parses with given format and returns list of time.Time divided by given delimiter // or error on first invalid input. func (k *Key) StrictTimesFormat(format, delim string) ([]time.Time, error) { - return k.getTimesFormat(format, delim, false, true) + return k.parseTimesFormat(format, k.Strings(delim), false, true) } // StrictTimes parses with RFC3339 format and returns list of time.Time divided by given delimiter @@ -597,9 +649,8 @@ func (k *Key) StrictTimes(delim string) ([]time.Time, error) { return k.StrictTimesFormat(time.RFC3339, delim) } -// getFloat64s returns list of float64 divided by given delimiter. -func (k *Key) getFloat64s(delim string, addInvalid, returnOnInvalid bool) ([]float64, error) { - strs := k.Strings(delim) +// parseFloat64s transforms strings to float64s. +func (k *Key) parseFloat64s(strs []string, addInvalid, returnOnInvalid bool) ([]float64, error) { vals := make([]float64, 0, len(strs)) for _, str := range strs { val, err := strconv.ParseFloat(str, 64) @@ -643,9 +694,8 @@ func (k *Key) parseInt64s(strs []string, addInvalid, returnOnInvalid bool) ([]in return vals, nil } -// getUints returns list of uint divided by given delimiter. -func (k *Key) getUints(delim string, addInvalid, returnOnInvalid bool) ([]uint, error) { - strs := k.Strings(delim) +// parseUints transforms strings to uints. +func (k *Key) parseUints(strs []string, addInvalid, returnOnInvalid bool) ([]uint, error) { vals := make([]uint, 0, len(strs)) for _, str := range strs { val, err := strconv.ParseUint(str, 10, 0) @@ -659,9 +709,8 @@ func (k *Key) getUints(delim string, addInvalid, returnOnInvalid bool) ([]uint, return vals, nil } -// getUint64s returns list of uint64 divided by given delimiter. -func (k *Key) getUint64s(delim string, addInvalid, returnOnInvalid bool) ([]uint64, error) { - strs := k.Strings(delim) +// parseUint64s transforms strings to uint64s. +func (k *Key) parseUint64s(strs []string, addInvalid, returnOnInvalid bool) ([]uint64, error) { vals := make([]uint64, 0, len(strs)) for _, str := range strs { val, err := strconv.ParseUint(str, 10, 64) @@ -675,9 +724,8 @@ func (k *Key) getUint64s(delim string, addInvalid, returnOnInvalid bool) ([]uint return vals, nil } -// getTimesFormat parses with given format and returns list of time.Time divided by given delimiter. -func (k *Key) getTimesFormat(format, delim string, addInvalid, returnOnInvalid bool) ([]time.Time, error) { - strs := k.Strings(delim) +// parseTimesFormat transforms strings to times in given format. +func (k *Key) parseTimesFormat(format string, strs []string, addInvalid, returnOnInvalid bool) ([]time.Time, error) { vals := make([]time.Time, 0, len(strs)) for _, str := range strs { val, err := time.Parse(format, str) diff --git a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/key_test.go b/vendor/github.com/go-ini/ini/key_test.go similarity index 61% rename from vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/key_test.go rename to vendor/github.com/go-ini/ini/key_test.go index 1281d5b..a13ad95 100644 --- a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/key_test.go +++ b/vendor/github.com/go-ini/ini/key_test.go @@ -12,7 +12,7 @@ // License for the specific language governing permissions and limitations // under the License. -package ini +package ini_test import ( "bytes" @@ -22,16 +22,99 @@ import ( "time" . "github.com/smartystreets/goconvey/convey" + "gopkg.in/ini.v1" ) -func Test_Key(t *testing.T) { - Convey("Test getting and setting values", t, func() { - cfg, err := Load([]byte(_CONF_DATA), "testdata/conf.ini") +func TestKey_AddShadow(t *testing.T) { + Convey("Add shadow to a key", t, func() { + f, err := ini.ShadowLoad([]byte(` +[notes] +-: note1`)) So(err, ShouldBeNil) - So(cfg, ShouldNotBeNil) + So(f, ShouldNotBeNil) - Convey("Get values in default section", func() { - sec := cfg.Section("") + k, err := f.Section("").NewKey("NAME", "ini") + So(err, ShouldBeNil) + So(k, ShouldNotBeNil) + + So(k.AddShadow("ini.v1"), ShouldBeNil) + So(k.ValueWithShadows(), ShouldResemble, []string{"ini", "ini.v1"}) + + Convey("Add shadow to boolean key", func() { + k, err := f.Section("").NewBooleanKey("published") + So(err, ShouldBeNil) + So(k, ShouldNotBeNil) + So(k.AddShadow("beta"), ShouldNotBeNil) + }) + + Convey("Add shadow to auto-increment key", func() { + So(f.Section("notes").Key("#1").AddShadow("beta"), ShouldNotBeNil) + }) + }) + + Convey("Shadow is not allowed", t, func() { + f := ini.Empty() + So(f, ShouldNotBeNil) + + k, err := f.Section("").NewKey("NAME", "ini") + So(err, ShouldBeNil) + So(k, ShouldNotBeNil) + + So(k.AddShadow("ini.v1"), ShouldNotBeNil) + }) +} + +// Helpers for slice tests. +func float64sEqual(values []float64, expected ...float64) { + So(values, ShouldHaveLength, len(expected)) + for i, v := range expected { + So(values[i], ShouldEqual, v) + } +} + +func intsEqual(values []int, expected ...int) { + So(values, ShouldHaveLength, len(expected)) + for i, v := range expected { + So(values[i], ShouldEqual, v) + } +} + +func int64sEqual(values []int64, expected ...int64) { + So(values, ShouldHaveLength, len(expected)) + for i, v := range expected { + So(values[i], ShouldEqual, v) + } +} + +func uintsEqual(values []uint, expected ...uint) { + So(values, ShouldHaveLength, len(expected)) + for i, v := range expected { + So(values[i], ShouldEqual, v) + } +} + +func uint64sEqual(values []uint64, expected ...uint64) { + So(values, ShouldHaveLength, len(expected)) + for i, v := range expected { + So(values[i], ShouldEqual, v) + } +} + +func timesEqual(values []time.Time, expected ...time.Time) { + So(values, ShouldHaveLength, len(expected)) + for i, v := range expected { + So(values[i].String(), ShouldEqual, v.String()) + } +} + +func TestKey_Helpers(t *testing.T) { + Convey("Getting and setting values", t, func() { + f, err := ini.Load(_FULL_CONF) + So(err, ShouldBeNil) + So(f, ShouldNotBeNil) + + Convey("Get string representation", func() { + sec := f.Section("") So(sec, ShouldNotBeNil) So(sec.Key("NAME").Value(), ShouldEqual, "ini") So(sec.Key("NAME").String(), ShouldEqual, "ini") @@ -40,55 +123,65 @@ func Test_Key(t *testing.T) { }), ShouldEqual, "ini") So(sec.Key("NAME").Comment, ShouldEqual, "; Package name") So(sec.Key("IMPORT_PATH").String(), ShouldEqual, "gopkg.in/ini.v1") + + Convey("With ValueMapper", func() { + f.ValueMapper = func(in string) string { + if in == "gopkg.in/%(NAME)s.%(VERSION)s" { + return "github.com/go-ini/ini" + } + return in + } + So(sec.Key("IMPORT_PATH").String(), ShouldEqual, "github.com/go-ini/ini") + }) }) Convey("Get values in non-default section", func() { - sec := cfg.Section("author") + sec := f.Section("author") So(sec, ShouldNotBeNil) So(sec.Key("NAME").String(), ShouldEqual, "Unknwon") So(sec.Key("GITHUB").String(), ShouldEqual, "https://github.com/Unknwon") - sec = cfg.Section("package") + sec = f.Section("package") So(sec, ShouldNotBeNil) So(sec.Key("CLONE_URL").String(), ShouldEqual, "https://gopkg.in/ini.v1") }) Convey("Get auto-increment key names", func() { - keys := cfg.Section("features").Keys() + keys := f.Section("features").Keys() for i, k := range keys { So(k.Name(), ShouldEqual, fmt.Sprintf("#%d", i+1)) } }) Convey("Get parent-keys that are available to the child section", func() { - parentKeys := cfg.Section("package.sub").ParentKeys() + parentKeys := f.Section("package.sub").ParentKeys() for _, k := range parentKeys { So(k.Name(), ShouldEqual, "CLONE_URL") } }) Convey("Get overwrite value", func() { - So(cfg.Section("author").Key("E-MAIL").String(), ShouldEqual, "u@gogs.io") + So(f.Section("author").Key("E-MAIL").String(), ShouldEqual, "u@gogs.io") }) Convey("Get sections", func() { - sections := cfg.Sections() - for i, name := range []string{DEFAULT_SECTION, "author", "package", "package.sub", "features", "types", "array", "note", "comments", "advance"} { + sections := f.Sections() + for i, name := range []string{ini.DEFAULT_SECTION, "author", "package", "package.sub", "features", "types", "array", "note", "comments", "string escapes", "advance"} { So(sections[i].Name(), ShouldEqual, name) } }) Convey("Get parent section value", func() { - So(cfg.Section("package.sub").Key("CLONE_URL").String(), ShouldEqual, "https://gopkg.in/ini.v1") - So(cfg.Section("package.fake.sub").Key("CLONE_URL").String(), ShouldEqual, "https://gopkg.in/ini.v1") + So(f.Section("package.sub").Key("CLONE_URL").String(), ShouldEqual, "https://gopkg.in/ini.v1") + So(f.Section("package.fake.sub").Key("CLONE_URL").String(), ShouldEqual, "https://gopkg.in/ini.v1") }) Convey("Get multiple line value", func() { - So(cfg.Section("author").Key("BIO").String(), ShouldEqual, "Gopher.\nCoding addict.\nGood man.\n") + So(f.Section("author").Key("BIO").String(), ShouldEqual, "Gopher.\nCoding addict.\nGood man.\n") }) Convey("Get values with type", func() { - sec := cfg.Section("types") + sec := f.Section("types") v1, err := sec.Key("BOOL").Bool() So(err, ShouldBeNil) So(v1, ShouldBeTrue) @@ -168,7 +261,7 @@ func Test_Key(t *testing.T) { }) Convey("Get value with candidates", func() { - sec := cfg.Section("types") + sec := f.Section("types") So(sec.Key("STRING").In("", []string{"str", "arr", "types"}), ShouldEqual, "str") So(sec.Key("FLOAT64").InFloat64(0, []float64{1.25, 2.5, 3.75}), ShouldEqual, 1.25) So(sec.Key("INT").InInt(0, []int{10, 20, 30}), ShouldEqual, 10) @@ -194,7 +287,7 @@ func Test_Key(t *testing.T) { }) Convey("Get values in range", func() { - sec := cfg.Section("types") + sec := f.Section("types") So(sec.Key("FLOAT64").RangeFloat64(0, 1, 2), ShouldEqual, 1.25) So(sec.Key("INT").RangeInt(0, 10, 20), ShouldEqual, 10) So(sec.Key("INT").RangeInt64(0, 10, 20), ShouldEqual, 10) @@ -218,7 +311,7 @@ func Test_Key(t *testing.T) { }) Convey("Get values into slice", func() { - sec := cfg.Section("array") + sec := f.Section("array") So(strings.Join(sec.Key("STRINGS").Strings(","), ","), ShouldEqual, "en,zh,de") So(len(sec.Key("STRINGS_404").Strings(",")), ShouldEqual, 0) @@ -243,8 +336,18 @@ func Test_Key(t *testing.T) { timesEqual(vals6, t, t, t) }) + Convey("Test string slice escapes", func() { + sec := f.Section("string escapes") + So(sec.Key("key1").Strings(","), ShouldResemble, []string{"value1", "value2", "value3"}) + So(sec.Key("key2").Strings(","), ShouldResemble, []string{"value1, value2"}) + So(sec.Key("key3").Strings(","), ShouldResemble, []string{`val\ue1`, "value2"}) + So(sec.Key("key4").Strings(","), ShouldResemble, []string{`value1\`, `value\\2`}) + So(sec.Key("key5").Strings(",,"), ShouldResemble, []string{"value1,, value2"}) + So(sec.Key("key6").Strings(" "), ShouldResemble, []string{"aaa", "bbb and space", "ccc"}) + }) + Convey("Get valid values into slice", func() { - sec := cfg.Section("array") + sec := f.Section("array") vals1 := sec.Key("FLOAT64S").ValidFloat64s(",") float64sEqual(vals1, 1.1, 2.2, 3.3) @@ -267,7 +370,7 @@ func Test_Key(t *testing.T) { }) Convey("Get values one type into slice of another type", func() { - sec := cfg.Section("array") + sec := f.Section("array") vals1 := sec.Key("STRINGS").ValidFloat64s(",") So(vals1, ShouldBeEmpty) @@ -288,7 +391,7 @@ func Test_Key(t *testing.T) { }) Convey("Get valid values into slice without errors", func() { - sec := cfg.Section("array") + sec := f.Section("array") vals1, err := sec.Key("FLOAT64S").StrictFloat64s(",") So(err, ShouldBeNil) float64sEqual(vals1, 1.1, 2.2, 3.3) @@ -317,7 +420,7 @@ func Test_Key(t *testing.T) { }) Convey("Get invalid values into slice", func() { - sec := cfg.Section("array") + sec := f.Section("array") vals1, err := sec.Key("STRINGS").StrictFloat64s(",") So(vals1, ShouldBeEmpty) So(err, ShouldNotBeNil) @@ -342,232 +445,79 @@ func Test_Key(t *testing.T) { So(vals6, ShouldBeEmpty) So(err, ShouldNotBeNil) }) - - Convey("Get key hash", func() { - cfg.Section("").KeysHash() - }) - - Convey("Set key value", func() { - k := cfg.Section("author").Key("NAME") - k.SetValue("无闻") - So(k.String(), ShouldEqual, "无闻") - }) - - Convey("Get key strings", func() { - So(strings.Join(cfg.Section("types").KeyStrings(), ","), ShouldEqual, "STRING,BOOL,BOOL_FALSE,FLOAT64,INT,TIME,DURATION,UINT") - }) - - Convey("Delete a key", func() { - cfg.Section("package.sub").DeleteKey("UNUSED_KEY") - _, err := cfg.Section("package.sub").GetKey("UNUSED_KEY") - So(err, ShouldNotBeNil) - }) - - Convey("Has Key (backwards compatible)", func() { - sec := cfg.Section("package.sub") - haskey1 := sec.Haskey("UNUSED_KEY") - haskey2 := sec.Haskey("CLONE_URL") - haskey3 := sec.Haskey("CLONE_URL_NO") - So(haskey1, ShouldBeTrue) - So(haskey2, ShouldBeTrue) - So(haskey3, ShouldBeFalse) - }) - - Convey("Has Key", func() { - sec := cfg.Section("package.sub") - haskey1 := sec.HasKey("UNUSED_KEY") - haskey2 := sec.HasKey("CLONE_URL") - haskey3 := sec.HasKey("CLONE_URL_NO") - So(haskey1, ShouldBeTrue) - So(haskey2, ShouldBeTrue) - So(haskey3, ShouldBeFalse) - }) - - Convey("Has Value", func() { - sec := cfg.Section("author") - hasvalue1 := sec.HasValue("Unknwon") - hasvalue2 := sec.HasValue("doc") - So(hasvalue1, ShouldBeTrue) - So(hasvalue2, ShouldBeFalse) - }) }) +} - Convey("Test getting and setting bad values", t, func() { - cfg, err := Load([]byte(_CONF_DATA), "testdata/conf.ini") +func TestKey_StringsWithShadows(t *testing.T) { + Convey("Get strings of shadows of a key", t, func() { + f, err := ini.ShadowLoad([]byte("")) So(err, ShouldBeNil) - So(cfg, ShouldNotBeNil) - - Convey("Create new key with empty name", func() { - k, err := cfg.Section("").NewKey("", "") - So(err, ShouldNotBeNil) - So(k, ShouldBeNil) - }) - - Convey("Create new section with empty name", func() { - s, err := cfg.NewSection("") - So(err, ShouldNotBeNil) - So(s, ShouldBeNil) - }) - - Convey("Create new sections with empty name", func() { - So(cfg.NewSections(""), ShouldNotBeNil) - }) + So(f, ShouldNotBeNil) - Convey("Get section that not exists", func() { - s, err := cfg.GetSection("404") - So(err, ShouldNotBeNil) - So(s, ShouldBeNil) - - s = cfg.Section("404") - So(s, ShouldNotBeNil) - }) - }) - - Convey("Test key hash clone", t, func() { - cfg, err := Load([]byte(strings.Replace("network=tcp,addr=127.0.0.1:6379,db=4,pool_size=100,idle_timeout=180", ",", "\n", -1))) + k, err := f.Section("").NewKey("NUMS", "1,2") So(err, ShouldBeNil) - for _, v := range cfg.Section("").KeysHash() { - So(len(v), ShouldBeGreaterThan, 0) - } - }) - - Convey("Key has empty value", t, func() { - _conf := `key1= -key2= ; comment` - cfg, err := Load([]byte(_conf)) + So(k, ShouldNotBeNil) + k, err = f.Section("").NewKey("NUMS", "4,5,6") So(err, ShouldBeNil) - So(cfg.Section("").Key("key1").Value(), ShouldBeEmpty) - }) -} - -const _CONF_GIT_CONFIG = ` -[remote "origin"] - url = https://github.com/Antergone/test1.git - url = https://github.com/Antergone/test2.git -` - -func Test_Key_Shadows(t *testing.T) { - Convey("Shadows keys", t, func() { - Convey("Disable shadows", func() { - cfg, err := Load([]byte(_CONF_GIT_CONFIG)) - So(err, ShouldBeNil) - So(cfg.Section(`remote "origin"`).Key("url").String(), ShouldEqual, "https://github.com/Antergone/test2.git") - }) - - Convey("Enable shadows", func() { - cfg, err := ShadowLoad([]byte(_CONF_GIT_CONFIG)) - So(err, ShouldBeNil) - So(cfg.Section(`remote "origin"`).Key("url").String(), ShouldEqual, "https://github.com/Antergone/test1.git") - So(strings.Join(cfg.Section(`remote "origin"`).Key("url").ValueWithShadows(), " "), ShouldEqual, - "https://github.com/Antergone/test1.git https://github.com/Antergone/test2.git") + So(k, ShouldNotBeNil) - Convey("Save with shadows", func() { - var buf bytes.Buffer - _, err := cfg.WriteTo(&buf) - So(err, ShouldBeNil) - So(buf.String(), ShouldEqual, `[remote "origin"] -url = https://github.com/Antergone/test1.git -url = https://github.com/Antergone/test2.git - -`) - }) - }) + So(k.StringsWithShadows(","), ShouldResemble, []string{"1", "2", "4", "5", "6"}) }) } -func newTestFile(block bool) *File { - c, _ := Load([]byte(_CONF_DATA)) - c.BlockMode = block - return c -} +func TestKey_SetValue(t *testing.T) { + Convey("Set value of key", t, func() { + f := ini.Empty() + So(f, ShouldNotBeNil) -func Benchmark_Key_Value(b *testing.B) { - c := newTestFile(true) - for i := 0; i < b.N; i++ { - c.Section("").Key("NAME").Value() - } -} - -func Benchmark_Key_Value_NonBlock(b *testing.B) { - c := newTestFile(false) - for i := 0; i < b.N; i++ { - c.Section("").Key("NAME").Value() - } -} - -func Benchmark_Key_Value_ViaSection(b *testing.B) { - c := newTestFile(true) - sec := c.Section("") - for i := 0; i < b.N; i++ { - sec.Key("NAME").Value() - } -} - -func Benchmark_Key_Value_ViaSection_NonBlock(b *testing.B) { - c := newTestFile(false) - sec := c.Section("") - for i := 0; i < b.N; i++ { - sec.Key("NAME").Value() - } -} - -func Benchmark_Key_Value_Direct(b *testing.B) { - c := newTestFile(true) - key := c.Section("").Key("NAME") - for i := 0; i < b.N; i++ { - key.Value() - } -} - -func Benchmark_Key_Value_Direct_NonBlock(b *testing.B) { - c := newTestFile(false) - key := c.Section("").Key("NAME") - for i := 0; i < b.N; i++ { - key.Value() - } -} + k, err := f.Section("").NewKey("NAME", "ini") + So(err, ShouldBeNil) + So(k, ShouldNotBeNil) + So(k.Value(), ShouldEqual, "ini") -func Benchmark_Key_String(b *testing.B) { - c := newTestFile(true) - for i := 0; i < b.N; i++ { - _ = c.Section("").Key("NAME").String() - } + k.SetValue("ini.v1") + So(k.Value(), ShouldEqual, "ini.v1") + }) } -func Benchmark_Key_String_NonBlock(b *testing.B) { - c := newTestFile(false) - for i := 0; i < b.N; i++ { - _ = c.Section("").Key("NAME").String() - } -} +func TestKey_NestedValues(t *testing.T) { + Convey("Read and write nested values", t, func() { + f, err := ini.LoadSources(ini.LoadOptions{ + AllowNestedValues: true, + }, []byte(` +aws_access_key_id = foo +aws_secret_access_key = bar +region = us-west-2 +s3 = + max_concurrent_requests=10 + max_queue_size=1000`)) + So(err, ShouldBeNil) + So(f, ShouldNotBeNil) -func Benchmark_Key_String_ViaSection(b *testing.B) { - c := newTestFile(true) - sec := c.Section("") - for i := 0; i < b.N; i++ { - _ = sec.Key("NAME").String() - } -} + So(f.Section("").Key("s3").NestedValues(), ShouldResemble, []string{"max_concurrent_requests=10", "max_queue_size=1000"}) -func Benchmark_Key_String_ViaSection_NonBlock(b *testing.B) { - c := newTestFile(false) - sec := c.Section("") - for i := 0; i < b.N; i++ { - _ = sec.Key("NAME").String() - } -} + var buf bytes.Buffer + _, err = f.WriteTo(&buf) + So(err, ShouldBeNil) + So(buf.String(), ShouldEqual, `aws_access_key_id = foo +aws_secret_access_key = bar +region = us-west-2 +s3 = + max_concurrent_requests=10 + max_queue_size=1000 -func Benchmark_Key_SetValue(b *testing.B) { - c := newTestFile(true) - for i := 0; i < b.N; i++ { - c.Section("").Key("NAME").SetValue("10") - } +`) + }) } -func Benchmark_Key_SetValue_VisSection(b *testing.B) { - c := newTestFile(true) - sec := c.Section("") - for i := 0; i < b.N; i++ { - sec.Key("NAME").SetValue("10") - } +func TestRecursiveValues(t *testing.T) { + Convey("Recursive values should not reflect on same key", t, func() { + f, err := ini.Load([]byte(` +NAME = ini +[package] +NAME = %(NAME)s`)) + So(err, ShouldBeNil) + So(f, ShouldNotBeNil) + So(f.Section("package").Key("NAME").String(), ShouldEqual, "ini") + }) } diff --git a/vendor/github.com/go-ini/ini/parser.go b/vendor/github.com/go-ini/ini/parser.go index 1c1bf91..d5aa2db 100644 --- a/vendor/github.com/go-ini/ini/parser.go +++ b/vendor/github.com/go-ini/ini/parser.go @@ -19,11 +19,14 @@ import ( "bytes" "fmt" "io" + "regexp" "strconv" "strings" "unicode" ) +var pythonMultiline = regexp.MustCompile("^(\\s+)([^\n]+)") + type tokenType int const ( @@ -48,16 +51,31 @@ func newParser(r io.Reader) *parser { } } -// BOM handles header of BOM-UTF8 format. +// BOM handles header of UTF-8, UTF-16 LE and UTF-16 BE's BOM format. // http://en.wikipedia.org/wiki/Byte_order_mark#Representations_of_byte_order_marks_by_encoding func (p *parser) BOM() error { - mask, err := p.buf.Peek(3) + mask, err := p.buf.Peek(2) if err != nil && err != io.EOF { return err - } else if len(mask) < 3 { + } else if len(mask) < 2 { return nil - } else if mask[0] == 239 && mask[1] == 187 && mask[2] == 191 { + } + + switch { + case mask[0] == 254 && mask[1] == 255: + fallthrough + case mask[0] == 255 && mask[1] == 254: p.buf.Read(mask) + case mask[0] == 239 && mask[1] == 187: + mask, err := p.buf.Peek(3) + if err != nil && err != io.EOF { + return err + } else if len(mask) < 3 { + return nil + } + if mask[2] == 191 { + p.buf.Read(mask) + } } return nil } @@ -111,7 +129,7 @@ func readKeyName(in []byte) (string, int, error) { // Find key-value delimiter i := strings.IndexAny(line[pos+startIdx:], "=:") if i < 0 { - return "", -1, fmt.Errorf("key-value delimiter not found: %s", line) + return "", -1, ErrDelimiterNotFound{line} } endIdx = pos + i return strings.TrimSpace(line[startIdx:pos]), endIdx + startIdx + 1, nil @@ -119,7 +137,7 @@ func readKeyName(in []byte) (string, int, error) { endIdx = strings.IndexAny(line, "=:") if endIdx < 0 { - return "", -1, fmt.Errorf("key-value delimiter not found: %s", line) + return "", -1, ErrDelimiterNotFound{line} } return strings.TrimSpace(line[0:endIdx]), endIdx + 1, nil } @@ -174,11 +192,14 @@ func (p *parser) readContinuationLines(val string) (string, error) { // are quotes \" or \'. // It returns false if any other parts also contain same kind of quotes. func hasSurroundedQuote(in string, quote byte) bool { - return len(in) > 2 && in[0] == quote && in[len(in)-1] == quote && + return len(in) >= 2 && in[0] == quote && in[len(in)-1] == quote && strings.IndexByte(in[1:], quote) == len(in)-2 } -func (p *parser) readValue(in []byte) (string, error) { +func (p *parser) readValue(in []byte, + parserBufferSize int, + ignoreContinuation, ignoreInlineComment, unescapeValueDoubleQuotes, unescapeValueCommentSymbols, allowPythonMultilines, spaceBeforeInlineComment bool) (string, error) { + line := strings.TrimLeftFunc(string(in), unicode.IsSpace) if len(line) == 0 { return "", nil @@ -189,6 +210,8 @@ func (p *parser) readValue(in []byte) (string, error) { valQuote = `"""` } else if line[0] == '`' { valQuote = "`" + } else if unescapeValueDoubleQuotes && line[0] == '"' { + valQuote = `"` } if len(valQuote) > 0 { @@ -199,28 +222,97 @@ func (p *parser) readValue(in []byte) (string, error) { return p.readMultilines(line, line[startIdx:], valQuote) } + if unescapeValueDoubleQuotes && valQuote == `"` { + return strings.Replace(line[startIdx:pos+startIdx], `\"`, `"`, -1), nil + } return line[startIdx : pos+startIdx], nil } - // Won't be able to reach here if value only contains whitespace. + lastChar := line[len(line)-1] + // Won't be able to reach here if value only contains whitespace line = strings.TrimSpace(line) + trimmedLastChar := line[len(line)-1] - // Check continuation lines - if line[len(line)-1] == '\\' { + // Check continuation lines when desired + if !ignoreContinuation && trimmedLastChar == '\\' { return p.readContinuationLines(line[:len(line)-1]) } - i := strings.IndexAny(line, "#;") - if i > -1 { - p.comment.WriteString(line[i:]) - line = strings.TrimSpace(line[:i]) + // Check if ignore inline comment + if !ignoreInlineComment { + var i int + if spaceBeforeInlineComment { + i = strings.Index(line, " #") + if i == -1 { + i = strings.Index(line, " ;") + } + + } else { + i = strings.IndexAny(line, "#;") + } + + if i > -1 { + p.comment.WriteString(line[i:]) + line = strings.TrimSpace(line[:i]) + } + } - // Trim single quotes + // Trim single and double quotes if hasSurroundedQuote(line, '\'') || hasSurroundedQuote(line, '"') { line = line[1 : len(line)-1] + } else if len(valQuote) == 0 && unescapeValueCommentSymbols { + if strings.Contains(line, `\;`) { + line = strings.Replace(line, `\;`, ";", -1) + } + if strings.Contains(line, `\#`) { + line = strings.Replace(line, `\#`, "#", -1) + } + } else if allowPythonMultilines && lastChar == '\n' { + parserBufferPeekResult, _ := p.buf.Peek(parserBufferSize) + peekBuffer := bytes.NewBuffer(parserBufferPeekResult) + + identSize := -1 + val := line + + for { + peekData, peekErr := peekBuffer.ReadBytes('\n') + if peekErr != nil { + if peekErr == io.EOF { + return val, nil + } + return "", peekErr + } + + peekMatches := pythonMultiline.FindStringSubmatch(string(peekData)) + if len(peekMatches) != 3 { + return val, nil + } + + currentIdentSize := len(peekMatches[1]) + // NOTE: Return if not a python-ini multi-line value. + if currentIdentSize < 0 { + return val, nil + } + identSize = currentIdentSize + + // NOTE: Just advance the parser reader (buffer) in-sync with the peek buffer. + _, err := p.readUntil('\n') + if err != nil { + return "", err + } + + val += fmt.Sprintf("\n%s", peekMatches[2]) + } + + // NOTE: If it was a Python multi-line value, + // return the appended value. + if identSize > 0 { + return val, nil + } } + return line, nil } @@ -232,15 +324,55 @@ func (f *File) parse(reader io.Reader) (err error) { } // Ignore error because default section name is never empty string. - section, _ := f.NewSection(DEFAULT_SECTION) + name := DEFAULT_SECTION + if f.options.Insensitive { + name = strings.ToLower(DEFAULT_SECTION) + } + section, _ := f.NewSection(name) + + // This "last" is not strictly equivalent to "previous one" if current key is not the first nested key + var isLastValueEmpty bool + var lastRegularKey *Key var line []byte + var inUnparseableSection bool + + // NOTE: Iterate and increase `currentPeekSize` until + // the size of the parser buffer is found. + // TODO: When Golang 1.10 is the lowest version supported, + // replace with `parserBufferSize := p.buf.Size()`. + parserBufferSize := 0 + // NOTE: Peek 1kb at a time. + currentPeekSize := 1024 + + if f.options.AllowPythonMultilineValues { + for { + peekBytes, _ := p.buf.Peek(currentPeekSize) + peekBytesLength := len(peekBytes) + + if parserBufferSize >= peekBytesLength { + break + } + + currentPeekSize *= 2 + parserBufferSize = peekBytesLength + } + } + for !p.isEOF { line, err = p.readUntil('\n') if err != nil { return err } + if f.options.AllowNestedValues && + isLastValueEmpty && len(line) > 0 { + if line[0] == ' ' || line[0] == '\t' { + lastRegularKey.addNestedValue(string(bytes.TrimSpace(line))) + continue + } + } + line = bytes.TrimLeftFunc(line, unicode.IsSpace) if len(line) == 0 { continue @@ -258,12 +390,14 @@ func (f *File) parse(reader io.Reader) (err error) { // Section if line[0] == '[' { // Read to the next ']' (TODO: support quoted strings) - closeIdx := bytes.IndexByte(line, ']') + // TODO(unknwon): use LastIndexByte when stop supporting Go1.4 + closeIdx := bytes.LastIndex(line, []byte("]")) if closeIdx == -1 { return fmt.Errorf("unclosed section: %s", line) } - section, err = f.NewSection(string(line[1:closeIdx])) + name := string(line[1:closeIdx]) + section, err = f.NewSection(name) if err != nil { return err } @@ -278,11 +412,47 @@ func (f *File) parse(reader io.Reader) (err error) { // Reset aotu-counter and comments p.comment.Reset() p.count = 1 + + inUnparseableSection = false + for i := range f.options.UnparseableSections { + if f.options.UnparseableSections[i] == name || + (f.options.Insensitive && strings.ToLower(f.options.UnparseableSections[i]) == strings.ToLower(name)) { + inUnparseableSection = true + continue + } + } + continue + } + + if inUnparseableSection { + section.isRawSection = true + section.rawBody += string(line) continue } kname, offset, err := readKeyName(line) if err != nil { + // Treat as boolean key when desired, and whole line is key name. + if IsErrDelimiterNotFound(err) && f.options.AllowBooleanKeys { + kname, err := p.readValue(line, + parserBufferSize, + f.options.IgnoreContinuation, + f.options.IgnoreInlineComment, + f.options.UnescapeValueDoubleQuotes, + f.options.UnescapeValueCommentSymbols, + f.options.AllowPythonMultilineValues, + f.options.SpaceBeforeInlineComment) + if err != nil { + return err + } + key, err := section.NewBooleanKey(kname) + if err != nil { + return err + } + key.Comment = strings.TrimSpace(p.comment.String()) + p.comment.Reset() + continue + } return err } @@ -294,19 +464,27 @@ func (f *File) parse(reader io.Reader) (err error) { p.count++ } - key, err := section.NewKey(kname, "") + value, err := p.readValue(line[offset:], + parserBufferSize, + f.options.IgnoreContinuation, + f.options.IgnoreInlineComment, + f.options.UnescapeValueDoubleQuotes, + f.options.UnescapeValueCommentSymbols, + f.options.AllowPythonMultilineValues, + f.options.SpaceBeforeInlineComment) if err != nil { return err } - key.isAutoIncr = isAutoIncr + isLastValueEmpty = len(value) == 0 - value, err := p.readValue(line[offset:]) + key, err := section.NewKey(kname, value) if err != nil { return err } - key.SetValue(value) + key.isAutoIncrement = isAutoIncr key.Comment = strings.TrimSpace(p.comment.String()) p.comment.Reset() + lastRegularKey = key } return nil } diff --git a/vendor/github.com/go-ini/ini/parser_test.go b/vendor/github.com/go-ini/ini/parser_test.go new file mode 100644 index 0000000..bb0f266 --- /dev/null +++ b/vendor/github.com/go-ini/ini/parser_test.go @@ -0,0 +1,77 @@ +// Copyright 2016 Unknwon +// +// Licensed under the Apache License, Version 2.0 (the "License"): you may +// not use this file except in compliance with the License. You may obtain +// a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. + +package ini_test + +import ( + "testing" + + . "github.com/smartystreets/goconvey/convey" + "gopkg.in/ini.v1" +) + +func TestBOM(t *testing.T) { + Convey("Test handling BOM", t, func() { + Convey("UTF-8-BOM", func() { + f, err := ini.Load("testdata/UTF-8-BOM.ini") + So(err, ShouldBeNil) + So(f, ShouldNotBeNil) + + So(f.Section("author").Key("E-MAIL").String(), ShouldEqual, "u@gogs.io") + }) + + Convey("UTF-16-LE-BOM", func() { + f, err := ini.Load("testdata/UTF-16-LE-BOM.ini") + So(err, ShouldBeNil) + So(f, ShouldNotBeNil) + }) + + Convey("UTF-16-BE-BOM", func() { + }) + }) +} + +func TestBadLoad(t *testing.T) { + Convey("Load with bad data", t, func() { + Convey("Bad section name", func() { + _, err := ini.Load([]byte("[]")) + So(err, ShouldNotBeNil) + + _, err = ini.Load([]byte("[")) + So(err, ShouldNotBeNil) + }) + + Convey("Bad keys", func() { + _, err := ini.Load([]byte(`"""name`)) + So(err, ShouldNotBeNil) + + _, err = ini.Load([]byte(`"""name"""`)) + So(err, ShouldNotBeNil) + + _, err = ini.Load([]byte(`""=1`)) + So(err, ShouldNotBeNil) + + _, err = ini.Load([]byte(`=`)) + So(err, ShouldNotBeNil) + + _, err = ini.Load([]byte(`name`)) + So(err, ShouldNotBeNil) + }) + + Convey("Bad values", func() { + _, err := ini.Load([]byte(`name="""Unknwon`)) + So(err, ShouldNotBeNil) + }) + }) +} diff --git a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/section.go b/vendor/github.com/go-ini/ini/section.go similarity index 89% rename from vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/section.go rename to vendor/github.com/go-ini/ini/section.go index c9fa27e..d8a4026 100644 --- a/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/section.go +++ b/vendor/github.com/go-ini/ini/section.go @@ -54,6 +54,14 @@ func (s *Section) Body() string { return strings.TrimSpace(s.rawBody) } +// SetBody updates body content only if section is raw. +func (s *Section) SetBody(body string) { + if !s.isRawSection { + return + } + s.rawBody = body +} + // NewKey creates a new key to given section. func (s *Section) NewKey(name, val string) (*Key, error) { if len(name) == 0 { @@ -136,6 +144,7 @@ func (s *Section) HasKey(name string) bool { } // Haskey is a backwards-compatible name for HasKey. +// TODO: delete me in v2 func (s *Section) Haskey(name string) bool { return s.HasKey(name) } @@ -232,3 +241,17 @@ func (s *Section) DeleteKey(name string) { } } } + +// ChildSections returns a list of child sections of current section. +// For example, "[parent.child1]" and "[parent.child12]" are child sections +// of section "[parent]". +func (s *Section) ChildSections() []*Section { + prefix := s.name + "." + children := make([]*Section, 0, 3) + for _, name := range s.f.sectionList { + if strings.HasPrefix(name, prefix) { + children = append(children, s.f.sections[name]) + } + } + return children +} diff --git a/vendor/github.com/go-ini/ini/section_test.go b/vendor/github.com/go-ini/ini/section_test.go new file mode 100644 index 0000000..e9c3478 --- /dev/null +++ b/vendor/github.com/go-ini/ini/section_test.go @@ -0,0 +1,313 @@ +// Copyright 2014 Unknwon +// +// Licensed under the Apache License, Version 2.0 (the "License"): you may +// not use this file except in compliance with the License. You may obtain +// a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. + +package ini_test + +import ( + "testing" + + . "github.com/smartystreets/goconvey/convey" + "gopkg.in/ini.v1" +) + +func TestSection_SetBody(t *testing.T) { + Convey("Set body of raw section", t, func() { + f := ini.Empty() + So(f, ShouldNotBeNil) + + sec, err := f.NewRawSection("comments", `1111111111111111111000000000000000001110000 +111111111111111111100000000000111000000000`) + So(err, ShouldBeNil) + So(sec, ShouldNotBeNil) + So(sec.Body(), ShouldEqual, `1111111111111111111000000000000000001110000 +111111111111111111100000000000111000000000`) + + sec.SetBody("1111111111111111111000000000000000001110000") + So(sec.Body(), ShouldEqual, `1111111111111111111000000000000000001110000`) + + Convey("Set for non-raw section", func() { + sec, err := f.NewSection("author") + So(err, ShouldBeNil) + So(sec, ShouldNotBeNil) + So(sec.Body(), ShouldBeEmpty) + + sec.SetBody("1111111111111111111000000000000000001110000") + So(sec.Body(), ShouldBeEmpty) + }) + }) +} + +func TestSection_NewKey(t *testing.T) { + Convey("Create a new key", t, func() { + f := ini.Empty() + So(f, ShouldNotBeNil) + + k, err := f.Section("").NewKey("NAME", "ini") + So(err, ShouldBeNil) + So(k, ShouldNotBeNil) + So(k.Name(), ShouldEqual, "NAME") + So(k.Value(), ShouldEqual, "ini") + + Convey("With duplicated name", func() { + k, err := f.Section("").NewKey("NAME", "ini.v1") + So(err, ShouldBeNil) + So(k, ShouldNotBeNil) + + // Overwrite previous existed key + So(k.Value(), ShouldEqual, "ini.v1") + }) + + Convey("With empty string", func() { + _, err := f.Section("").NewKey("", "") + So(err, ShouldNotBeNil) + }) + }) + + Convey("Create keys with same name and allow shadow", t, func() { + f, err := ini.ShadowLoad([]byte("")) + So(err, ShouldBeNil) + So(f, ShouldNotBeNil) + + k, err := f.Section("").NewKey("NAME", "ini") + So(err, ShouldBeNil) + So(k, ShouldNotBeNil) + k, err = f.Section("").NewKey("NAME", "ini.v1") + So(err, ShouldBeNil) + So(k, ShouldNotBeNil) + + So(k.ValueWithShadows(), ShouldResemble, []string{"ini", "ini.v1"}) + }) +} + +func TestSection_NewBooleanKey(t *testing.T) { + Convey("Create a new boolean key", t, func() { + f := ini.Empty() + So(f, ShouldNotBeNil) + + k, err := f.Section("").NewBooleanKey("start-ssh-server") + So(err, ShouldBeNil) + So(k, ShouldNotBeNil) + So(k.Name(), ShouldEqual, "start-ssh-server") + So(k.Value(), ShouldEqual, "true") + + Convey("With empty string", func() { + _, err := f.Section("").NewBooleanKey("") + So(err, ShouldNotBeNil) + }) + }) +} + +func TestSection_GetKey(t *testing.T) { + Convey("Get a key", t, func() { + f := ini.Empty() + So(f, ShouldNotBeNil) + + k, err := f.Section("").NewKey("NAME", "ini") + So(err, ShouldBeNil) + So(k, ShouldNotBeNil) + + k, err = f.Section("").GetKey("NAME") + So(err, ShouldBeNil) + So(k, ShouldNotBeNil) + So(k.Name(), ShouldEqual, "NAME") + So(k.Value(), ShouldEqual, "ini") + + Convey("Key not exists", func() { + _, err := f.Section("").GetKey("404") + So(err, ShouldNotBeNil) + }) + + Convey("Key exists in parent section", func() { + k, err := f.Section("parent").NewKey("AGE", "18") + So(err, ShouldBeNil) + So(k, ShouldNotBeNil) + + k, err = f.Section("parent.child.son").GetKey("AGE") + So(err, ShouldBeNil) + So(k, ShouldNotBeNil) + So(k.Value(), ShouldEqual, "18") + }) + }) +} + +func TestSection_HasKey(t *testing.T) { + Convey("Check if a key exists", t, func() { + f := ini.Empty() + So(f, ShouldNotBeNil) + + k, err := f.Section("").NewKey("NAME", "ini") + So(err, ShouldBeNil) + So(k, ShouldNotBeNil) + + So(f.Section("").HasKey("NAME"), ShouldBeTrue) + So(f.Section("").Haskey("NAME"), ShouldBeTrue) + So(f.Section("").HasKey("404"), ShouldBeFalse) + So(f.Section("").Haskey("404"), ShouldBeFalse) + }) +} + +func TestSection_HasValue(t *testing.T) { + Convey("Check if contains a value in any key", t, func() { + f := ini.Empty() + So(f, ShouldNotBeNil) + + k, err := f.Section("").NewKey("NAME", "ini") + So(err, ShouldBeNil) + So(k, ShouldNotBeNil) + + So(f.Section("").HasValue("ini"), ShouldBeTrue) + So(f.Section("").HasValue("404"), ShouldBeFalse) + }) +} + +func TestSection_Key(t *testing.T) { + Convey("Get a key", t, func() { + f := ini.Empty() + So(f, ShouldNotBeNil) + + k, err := f.Section("").NewKey("NAME", "ini") + So(err, ShouldBeNil) + So(k, ShouldNotBeNil) + + k = f.Section("").Key("NAME") + So(k, ShouldNotBeNil) + So(k.Name(), ShouldEqual, "NAME") + So(k.Value(), ShouldEqual, "ini") + + Convey("Key not exists", func() { + k := f.Section("").Key("404") + So(k, ShouldNotBeNil) + So(k.Name(), ShouldEqual, "404") + }) + + Convey("Key exists in parent section", func() { + k, err := f.Section("parent").NewKey("AGE", "18") + So(err, ShouldBeNil) + So(k, ShouldNotBeNil) + + k = f.Section("parent.child.son").Key("AGE") + So(k, ShouldNotBeNil) + So(k.Value(), ShouldEqual, "18") + }) + }) +} + +func TestSection_Keys(t *testing.T) { + Convey("Get all keys in a section", t, func() { + f := ini.Empty() + So(f, ShouldNotBeNil) + + k, err := f.Section("").NewKey("NAME", "ini") + So(err, ShouldBeNil) + So(k, ShouldNotBeNil) + k, err = f.Section("").NewKey("VERSION", "v1") + So(err, ShouldBeNil) + So(k, ShouldNotBeNil) + k, err = f.Section("").NewKey("IMPORT_PATH", "gopkg.in/ini.v1") + So(err, ShouldBeNil) + So(k, ShouldNotBeNil) + + keys := f.Section("").Keys() + names := []string{"NAME", "VERSION", "IMPORT_PATH"} + So(len(keys), ShouldEqual, len(names)) + for i, name := range names { + So(keys[i].Name(), ShouldEqual, name) + } + }) +} + +func TestSection_ParentKeys(t *testing.T) { + Convey("Get all keys of parent sections", t, func() { + f := ini.Empty() + So(f, ShouldNotBeNil) + + k, err := f.Section("package").NewKey("NAME", "ini") + So(err, ShouldBeNil) + So(k, ShouldNotBeNil) + k, err = f.Section("package").NewKey("VERSION", "v1") + So(err, ShouldBeNil) + So(k, ShouldNotBeNil) + k, err = f.Section("package").NewKey("IMPORT_PATH", "gopkg.in/ini.v1") + So(err, ShouldBeNil) + So(k, ShouldNotBeNil) + + keys := f.Section("package.sub.sub2").ParentKeys() + names := []string{"NAME", "VERSION", "IMPORT_PATH"} + So(len(keys), ShouldEqual, len(names)) + for i, name := range names { + So(keys[i].Name(), ShouldEqual, name) + } + }) +} + +func TestSection_KeyStrings(t *testing.T) { + Convey("Get all key names in a section", t, func() { + f := ini.Empty() + So(f, ShouldNotBeNil) + + k, err := f.Section("").NewKey("NAME", "ini") + So(err, ShouldBeNil) + So(k, ShouldNotBeNil) + k, err = f.Section("").NewKey("VERSION", "v1") + So(err, ShouldBeNil) + So(k, ShouldNotBeNil) + k, err = f.Section("").NewKey("IMPORT_PATH", "gopkg.in/ini.v1") + So(err, ShouldBeNil) + So(k, ShouldNotBeNil) + + So(f.Section("").KeyStrings(), ShouldResemble, []string{"NAME", "VERSION", "IMPORT_PATH"}) + }) +} + +func TestSection_KeyHash(t *testing.T) { + Convey("Get clone of key hash", t, func() { + f := ini.Empty() + So(f, ShouldNotBeNil) + + k, err := f.Section("").NewKey("NAME", "ini") + So(err, ShouldBeNil) + So(k, ShouldNotBeNil) + k, err = f.Section("").NewKey("VERSION", "v1") + So(err, ShouldBeNil) + So(k, ShouldNotBeNil) + k, err = f.Section("").NewKey("IMPORT_PATH", "gopkg.in/ini.v1") + So(err, ShouldBeNil) + So(k, ShouldNotBeNil) + + hash := f.Section("").KeysHash() + relation := map[string]string{ + "NAME": "ini", + "VERSION": "v1", + "IMPORT_PATH": "gopkg.in/ini.v1", + } + for k, v := range hash { + So(v, ShouldEqual, relation[k]) + } + }) +} + +func TestSection_DeleteKey(t *testing.T) { + Convey("Delete a key", t, func() { + f := ini.Empty() + So(f, ShouldNotBeNil) + + k, err := f.Section("").NewKey("NAME", "ini") + So(err, ShouldBeNil) + So(k, ShouldNotBeNil) + + So(f.Section("").HasKey("NAME"), ShouldBeTrue) + f.Section("").DeleteKey("NAME") + So(f.Section("").HasKey("NAME"), ShouldBeFalse) + }) +} diff --git a/vendor/github.com/go-ini/ini/struct.go b/vendor/github.com/go-ini/ini/struct.go index 3fb92c3..9719dc6 100644 --- a/vendor/github.com/go-ini/ini/struct.go +++ b/vendor/github.com/go-ini/ini/struct.go @@ -19,6 +19,7 @@ import ( "errors" "fmt" "reflect" + "strings" "time" "unicode" ) @@ -76,10 +77,80 @@ func parseDelim(actual string) string { var reflectTime = reflect.TypeOf(time.Now()).Kind() +// setSliceWithProperType sets proper values to slice based on its type. +func setSliceWithProperType(key *Key, field reflect.Value, delim string, allowShadow, isStrict bool) error { + var strs []string + if allowShadow { + strs = key.StringsWithShadows(delim) + } else { + strs = key.Strings(delim) + } + + numVals := len(strs) + if numVals == 0 { + return nil + } + + var vals interface{} + var err error + + sliceOf := field.Type().Elem().Kind() + switch sliceOf { + case reflect.String: + vals = strs + case reflect.Int: + vals, err = key.parseInts(strs, true, false) + case reflect.Int64: + vals, err = key.parseInt64s(strs, true, false) + case reflect.Uint: + vals, err = key.parseUints(strs, true, false) + case reflect.Uint64: + vals, err = key.parseUint64s(strs, true, false) + case reflect.Float64: + vals, err = key.parseFloat64s(strs, true, false) + case reflectTime: + vals, err = key.parseTimesFormat(time.RFC3339, strs, true, false) + default: + return fmt.Errorf("unsupported type '[]%s'", sliceOf) + } + if err != nil && isStrict { + return err + } + + slice := reflect.MakeSlice(field.Type(), numVals, numVals) + for i := 0; i < numVals; i++ { + switch sliceOf { + case reflect.String: + slice.Index(i).Set(reflect.ValueOf(vals.([]string)[i])) + case reflect.Int: + slice.Index(i).Set(reflect.ValueOf(vals.([]int)[i])) + case reflect.Int64: + slice.Index(i).Set(reflect.ValueOf(vals.([]int64)[i])) + case reflect.Uint: + slice.Index(i).Set(reflect.ValueOf(vals.([]uint)[i])) + case reflect.Uint64: + slice.Index(i).Set(reflect.ValueOf(vals.([]uint64)[i])) + case reflect.Float64: + slice.Index(i).Set(reflect.ValueOf(vals.([]float64)[i])) + case reflectTime: + slice.Index(i).Set(reflect.ValueOf(vals.([]time.Time)[i])) + } + } + field.Set(slice) + return nil +} + +func wrapStrictError(err error, isStrict bool) error { + if isStrict { + return err + } + return nil +} + // setWithProperType sets proper value to field based on its type, // but it does not return error for failing parsing, // because we want to use default value that is already assigned to strcut. -func setWithProperType(t reflect.Type, key *Key, field reflect.Value, delim string) error { +func setWithProperType(t reflect.Type, key *Key, field reflect.Value, delim string, allowShadow, isStrict bool) error { switch t.Kind() { case reflect.String: if len(key.String()) == 0 { @@ -89,79 +160,70 @@ func setWithProperType(t reflect.Type, key *Key, field reflect.Value, delim stri case reflect.Bool: boolVal, err := key.Bool() if err != nil { - return nil + return wrapStrictError(err, isStrict) } field.SetBool(boolVal) case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: durationVal, err := key.Duration() // Skip zero value - if err == nil && int(durationVal) > 0 { + if err == nil && int64(durationVal) > 0 { field.Set(reflect.ValueOf(durationVal)) return nil } intVal, err := key.Int64() - if err != nil || intVal == 0 { - return nil + if err != nil { + return wrapStrictError(err, isStrict) } field.SetInt(intVal) // byte is an alias for uint8, so supporting uint8 breaks support for byte case reflect.Uint, reflect.Uint16, reflect.Uint32, reflect.Uint64: durationVal, err := key.Duration() - if err == nil { + // Skip zero value + if err == nil && int(durationVal) > 0 { field.Set(reflect.ValueOf(durationVal)) return nil } uintVal, err := key.Uint64() if err != nil { - return nil + return wrapStrictError(err, isStrict) } field.SetUint(uintVal) - case reflect.Float64: + case reflect.Float32, reflect.Float64: floatVal, err := key.Float64() if err != nil { - return nil + return wrapStrictError(err, isStrict) } field.SetFloat(floatVal) case reflectTime: timeVal, err := key.Time() if err != nil { - return nil + return wrapStrictError(err, isStrict) } field.Set(reflect.ValueOf(timeVal)) case reflect.Slice: - vals := key.Strings(delim) - numVals := len(vals) - if numVals == 0 { - return nil - } - - sliceOf := field.Type().Elem().Kind() - - var times []time.Time - if sliceOf == reflectTime { - times = key.Times(delim) - } - - slice := reflect.MakeSlice(field.Type(), numVals, numVals) - for i := 0; i < numVals; i++ { - switch sliceOf { - case reflectTime: - slice.Index(i).Set(reflect.ValueOf(times[i])) - default: - slice.Index(i).Set(reflect.ValueOf(vals[i])) - } - } - field.Set(slice) + return setSliceWithProperType(key, field, delim, allowShadow, isStrict) default: return fmt.Errorf("unsupported type '%s'", t) } return nil } -func (s *Section) mapTo(val reflect.Value) error { +func parseTagOptions(tag string) (rawName string, omitEmpty bool, allowShadow bool) { + opts := strings.SplitN(tag, ",", 3) + rawName = opts[0] + if len(opts) > 1 { + omitEmpty = opts[1] == "omitempty" + } + if len(opts) > 2 { + allowShadow = opts[2] == "allowshadow" + } + return rawName, omitEmpty, allowShadow +} + +func (s *Section) mapTo(val reflect.Value, isStrict bool) error { if val.Kind() == reflect.Ptr { val = val.Elem() } @@ -176,7 +238,8 @@ func (s *Section) mapTo(val reflect.Value) error { continue } - fieldName := s.parseFieldName(tpField.Name, tag) + rawName, _, allowShadow := parseTagOptions(tag) + fieldName := s.parseFieldName(tpField.Name, rawName) if len(fieldName) == 0 || !field.CanSet() { continue } @@ -189,7 +252,7 @@ func (s *Section) mapTo(val reflect.Value) error { if isAnonymous || isStruct { if sec, err := s.f.GetSection(fieldName); err == nil { - if err = sec.mapTo(field); err != nil { + if err = sec.mapTo(field, isStrict); err != nil { return fmt.Errorf("error mapping field(%s): %v", fieldName, err) } continue @@ -197,7 +260,8 @@ func (s *Section) mapTo(val reflect.Value) error { } if key, err := s.GetKey(fieldName); err == nil { - if err = setWithProperType(tpField.Type, key, field, parseDelim(tpField.Tag.Get("delim"))); err != nil { + delim := parseDelim(tpField.Tag.Get("delim")) + if err = setWithProperType(tpField.Type, key, field, delim, allowShadow, isStrict); err != nil { return fmt.Errorf("error mapping field(%s): %v", fieldName, err) } } @@ -216,7 +280,22 @@ func (s *Section) MapTo(v interface{}) error { return errors.New("cannot map to non-pointer struct") } - return s.mapTo(val) + return s.mapTo(val, false) +} + +// MapTo maps section to given struct in strict mode, +// which returns all possible error including value parsing error. +func (s *Section) StrictMapTo(v interface{}) error { + typ := reflect.TypeOf(v) + val := reflect.ValueOf(v) + if typ.Kind() == reflect.Ptr { + typ = typ.Elem() + val = val.Elem() + } else { + return errors.New("cannot map to non-pointer struct") + } + + return s.mapTo(val, true) } // MapTo maps file to given struct. @@ -224,6 +303,12 @@ func (f *File) MapTo(v interface{}) error { return f.Section("").MapTo(v) } +// MapTo maps file to given struct in strict mode, +// which returns all possible error including value parsing error. +func (f *File) StrictMapTo(v interface{}) error { + return f.Section("").StrictMapTo(v) +} + // MapTo maps data sources to given struct with name mapper. func MapToWithMapper(v interface{}, mapper NameMapper, source interface{}, others ...interface{}) error { cfg, err := Load(source, others...) @@ -234,45 +319,104 @@ func MapToWithMapper(v interface{}, mapper NameMapper, source interface{}, other return cfg.MapTo(v) } +// StrictMapToWithMapper maps data sources to given struct with name mapper in strict mode, +// which returns all possible error including value parsing error. +func StrictMapToWithMapper(v interface{}, mapper NameMapper, source interface{}, others ...interface{}) error { + cfg, err := Load(source, others...) + if err != nil { + return err + } + cfg.NameMapper = mapper + return cfg.StrictMapTo(v) +} + // MapTo maps data sources to given struct. func MapTo(v, source interface{}, others ...interface{}) error { return MapToWithMapper(v, nil, source, others...) } -// reflectWithProperType does the opposite thing with setWithProperType. +// StrictMapTo maps data sources to given struct in strict mode, +// which returns all possible error including value parsing error. +func StrictMapTo(v, source interface{}, others ...interface{}) error { + return StrictMapToWithMapper(v, nil, source, others...) +} + +// reflectSliceWithProperType does the opposite thing as setSliceWithProperType. +func reflectSliceWithProperType(key *Key, field reflect.Value, delim string) error { + slice := field.Slice(0, field.Len()) + if field.Len() == 0 { + return nil + } + + var buf bytes.Buffer + sliceOf := field.Type().Elem().Kind() + for i := 0; i < field.Len(); i++ { + switch sliceOf { + case reflect.String: + buf.WriteString(slice.Index(i).String()) + case reflect.Int, reflect.Int64: + buf.WriteString(fmt.Sprint(slice.Index(i).Int())) + case reflect.Uint, reflect.Uint64: + buf.WriteString(fmt.Sprint(slice.Index(i).Uint())) + case reflect.Float64: + buf.WriteString(fmt.Sprint(slice.Index(i).Float())) + case reflectTime: + buf.WriteString(slice.Index(i).Interface().(time.Time).Format(time.RFC3339)) + default: + return fmt.Errorf("unsupported type '[]%s'", sliceOf) + } + buf.WriteString(delim) + } + key.SetValue(buf.String()[:buf.Len()-1]) + return nil +} + +// reflectWithProperType does the opposite thing as setWithProperType. func reflectWithProperType(t reflect.Type, key *Key, field reflect.Value, delim string) error { switch t.Kind() { case reflect.String: key.SetValue(field.String()) - case reflect.Bool, - reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, - reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, - reflect.Float64, - reflectTime: - key.SetValue(fmt.Sprint(field)) + case reflect.Bool: + key.SetValue(fmt.Sprint(field.Bool())) + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + key.SetValue(fmt.Sprint(field.Int())) + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: + key.SetValue(fmt.Sprint(field.Uint())) + case reflect.Float32, reflect.Float64: + key.SetValue(fmt.Sprint(field.Float())) + case reflectTime: + key.SetValue(fmt.Sprint(field.Interface().(time.Time).Format(time.RFC3339))) case reflect.Slice: - vals := field.Slice(0, field.Len()) - if field.Len() == 0 { - return nil - } - - var buf bytes.Buffer - isTime := fmt.Sprint(field.Type()) == "[]time.Time" - for i := 0; i < field.Len(); i++ { - if isTime { - buf.WriteString(vals.Index(i).Interface().(time.Time).Format(time.RFC3339)) - } else { - buf.WriteString(fmt.Sprint(vals.Index(i))) - } - buf.WriteString(delim) - } - key.SetValue(buf.String()[:buf.Len()-1]) + return reflectSliceWithProperType(key, field, delim) default: return fmt.Errorf("unsupported type '%s'", t) } return nil } +// CR: copied from encoding/json/encode.go with modifications of time.Time support. +// TODO: add more test coverage. +func isEmptyValue(v reflect.Value) bool { + switch v.Kind() { + case reflect.Array, reflect.Map, reflect.Slice, reflect.String: + return v.Len() == 0 + case reflect.Bool: + return !v.Bool() + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + return v.Int() == 0 + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + return v.Uint() == 0 + case reflect.Float32, reflect.Float64: + return v.Float() == 0 + case reflect.Interface, reflect.Ptr: + return v.IsNil() + case reflectTime: + t, ok := v.Interface().(time.Time) + return ok && t.IsZero() + } + return false +} + func (s *Section) reflectFrom(val reflect.Value) error { if val.Kind() == reflect.Ptr { val = val.Elem() @@ -288,21 +432,32 @@ func (s *Section) reflectFrom(val reflect.Value) error { continue } - fieldName := s.parseFieldName(tpField.Name, tag) + opts := strings.SplitN(tag, ",", 2) + if len(opts) == 2 && opts[1] == "omitempty" && isEmptyValue(field) { + continue + } + + fieldName := s.parseFieldName(tpField.Name, opts[0]) if len(fieldName) == 0 || !field.CanSet() { continue } if (tpField.Type.Kind() == reflect.Ptr && tpField.Anonymous) || - (tpField.Type.Kind() == reflect.Struct) { + (tpField.Type.Kind() == reflect.Struct && tpField.Type.Name() != "Time") { // Note: The only error here is section doesn't exist. sec, err := s.f.GetSection(fieldName) if err != nil { // Note: fieldName can never be empty here, ignore error. sec, _ = s.f.NewSection(fieldName) } + + // Add comment from comment tag + if len(sec.Comment) == 0 { + sec.Comment = tpField.Tag.Get("comment") + } + if err = sec.reflectFrom(field); err != nil { - return fmt.Errorf("error reflecting field(%s): %v", fieldName, err) + return fmt.Errorf("error reflecting field (%s): %v", fieldName, err) } continue } @@ -312,8 +467,14 @@ func (s *Section) reflectFrom(val reflect.Value) error { if err != nil { key, _ = s.NewKey(fieldName, "") } + + // Add comment from comment tag + if len(key.Comment) == 0 { + key.Comment = tpField.Tag.Get("comment") + } + if err = reflectWithProperType(tpField.Type, key, field, parseDelim(tpField.Tag.Get("delim"))); err != nil { - return fmt.Errorf("error reflecting field(%s): %v", fieldName, err) + return fmt.Errorf("error reflecting field (%s): %v", fieldName, err) } } diff --git a/vendor/github.com/go-ini/ini/struct_test.go b/vendor/github.com/go-ini/ini/struct_test.go index d865ad7..0dbbef2 100644 --- a/vendor/github.com/go-ini/ini/struct_test.go +++ b/vendor/github.com/go-ini/ini/struct_test.go @@ -12,24 +12,32 @@ // License for the specific language governing permissions and limitations // under the License. -package ini +package ini_test import ( + "bytes" + "fmt" "strings" "testing" "time" . "github.com/smartystreets/goconvey/convey" + "gopkg.in/ini.v1" ) type testNested struct { - Cities []string `delim:"|"` - Visits []time.Time - Note string - Unused int `ini:"-"` + Cities []string `delim:"|"` + Visits []time.Time + Years []int + Numbers []int64 + Ages []uint + Populations []uint64 + Coordinates []float64 + Note string + Unused int `ini:"-"` } -type testEmbeded struct { +type TestEmbeded struct { GPA float64 } @@ -41,9 +49,12 @@ type testStruct struct { Born time.Time Time time.Duration `ini:"Duration"` Others testNested - *testEmbeded `ini:"grade"` + *TestEmbeded `ini:"grade"` Unused int `ini:"-"` Unsigned uint + Omitted bool `ini:"omitthis,omitempty"` + Shadows []string `ini:",,allowshadow"` + ShadowInts []int `ini:"Shadows,,allowshadow"` } const _CONF_DATA_STRUCT = ` @@ -54,10 +65,18 @@ Money = 1.25 Born = 1993-10-07T20:17:05Z Duration = 2h45m Unsigned = 3 +omitthis = true +Shadows = 1, 2 +Shadows = 3, 4 [Others] Cities = HangZhou|Boston Visits = 1993-10-07T20:17:05Z, 1993-10-07T20:17:05Z +Years = 1993,1994 +Numbers = 10010,10086 +Ages = 18,19 +Populations = 12345678,98765432 +Coordinates = 192.168,10.11 Note = Hello world! [grade] @@ -78,12 +97,12 @@ type unsupport2 struct { } } -type unsupport3 struct { +type Unsupport3 struct { Cities byte } type unsupport4 struct { - *unsupport3 `ini:"Others"` + *Unsupport3 `ini:"Others"` } type defaultValue struct { @@ -108,11 +127,11 @@ Born = nil Cities = ` -func Test_Struct(t *testing.T) { +func Test_MapToStruct(t *testing.T) { Convey("Map to struct", t, func() { Convey("Map file to struct", func() { ts := new(testStruct) - So(MapTo(ts, []byte(_CONF_DATA_STRUCT)), ShouldBeNil) + So(ini.MapTo(ts, []byte(_CONF_DATA_STRUCT)), ShouldBeNil) So(ts.Name, ShouldEqual, "Unknwon") So(ts.Age, ShouldEqual, 21) @@ -130,13 +149,18 @@ func Test_Struct(t *testing.T) { So(strings.Join(ts.Others.Cities, ","), ShouldEqual, "HangZhou,Boston") So(ts.Others.Visits[0].String(), ShouldEqual, t.String()) + So(fmt.Sprint(ts.Others.Years), ShouldEqual, "[1993 1994]") + So(fmt.Sprint(ts.Others.Numbers), ShouldEqual, "[10010 10086]") + So(fmt.Sprint(ts.Others.Ages), ShouldEqual, "[18 19]") + So(fmt.Sprint(ts.Others.Populations), ShouldEqual, "[12345678 98765432]") + So(fmt.Sprint(ts.Others.Coordinates), ShouldEqual, "[192.168 10.11]") So(ts.Others.Note, ShouldEqual, "Hello world!") - So(ts.testEmbeded.GPA, ShouldEqual, 2.8) + So(ts.TestEmbeded.GPA, ShouldEqual, 2.8) }) Convey("Map section to struct", func() { foobar := new(fooBar) - f, err := Load([]byte(_CONF_DATA_STRUCT)) + f, err := ini.Load([]byte(_CONF_DATA_STRUCT)) So(err, ShouldBeNil) So(f.Section("foo.bar").MapTo(foobar), ShouldBeNil) @@ -145,41 +169,58 @@ func Test_Struct(t *testing.T) { }) Convey("Map to non-pointer struct", func() { - cfg, err := Load([]byte(_CONF_DATA_STRUCT)) + f, err := ini.Load([]byte(_CONF_DATA_STRUCT)) So(err, ShouldBeNil) - So(cfg, ShouldNotBeNil) + So(f, ShouldNotBeNil) - So(cfg.MapTo(testStruct{}), ShouldNotBeNil) + So(f.MapTo(testStruct{}), ShouldNotBeNil) }) Convey("Map to unsupported type", func() { - cfg, err := Load([]byte(_CONF_DATA_STRUCT)) + f, err := ini.Load([]byte(_CONF_DATA_STRUCT)) So(err, ShouldBeNil) - So(cfg, ShouldNotBeNil) + So(f, ShouldNotBeNil) - cfg.NameMapper = func(raw string) string { + f.NameMapper = func(raw string) string { if raw == "Byte" { return "NAME" } return raw } - So(cfg.MapTo(&unsupport{}), ShouldNotBeNil) - So(cfg.MapTo(&unsupport2{}), ShouldNotBeNil) - So(cfg.MapTo(&unsupport4{}), ShouldNotBeNil) + So(f.MapTo(&unsupport{}), ShouldNotBeNil) + So(f.MapTo(&unsupport2{}), ShouldNotBeNil) + So(f.MapTo(&unsupport4{}), ShouldNotBeNil) + }) + + Convey("Map to omitempty field", func() { + ts := new(testStruct) + So(ini.MapTo(ts, []byte(_CONF_DATA_STRUCT)), ShouldBeNil) + + So(ts.Omitted, ShouldEqual, true) + }) + + Convey("Map with shadows", func() { + f, err := ini.LoadSources(ini.LoadOptions{AllowShadows: true}, []byte(_CONF_DATA_STRUCT)) + So(err, ShouldBeNil) + ts := new(testStruct) + So(f.MapTo(ts), ShouldBeNil) + + So(strings.Join(ts.Shadows, " "), ShouldEqual, "1 2 3 4") + So(fmt.Sprintf("%v", ts.ShadowInts), ShouldEqual, "[1 2 3 4]") }) Convey("Map from invalid data source", func() { - So(MapTo(&testStruct{}, "hi"), ShouldNotBeNil) + So(ini.MapTo(&testStruct{}, "hi"), ShouldNotBeNil) }) Convey("Map to wrong types and gain default values", func() { - cfg, err := Load([]byte(_INVALID_DATA_CONF_STRUCT)) + f, err := ini.Load([]byte(_INVALID_DATA_CONF_STRUCT)) So(err, ShouldBeNil) t, err := time.Parse(time.RFC3339, "1993-10-07T20:17:05Z") So(err, ShouldBeNil) dv := &defaultValue{"Joe", 10, true, 1.25, t, []string{"HangZhou", "Boston"}} - So(cfg.MapTo(dv), ShouldBeNil) + So(f.MapTo(dv), ShouldBeNil) So(dv.Name, ShouldEqual, "Joe") So(dv.Age, ShouldEqual, 10) So(dv.Male, ShouldBeTrue) @@ -189,32 +230,124 @@ func Test_Struct(t *testing.T) { }) }) + Convey("Map to struct in strict mode", t, func() { + f, err := ini.Load([]byte(` +name=bruce +age=a30`)) + So(err, ShouldBeNil) + + type Strict struct { + Name string `ini:"name"` + Age int `ini:"age"` + } + s := new(Strict) + + So(f.Section("").StrictMapTo(s), ShouldNotBeNil) + }) + + Convey("Map slice in strict mode", t, func() { + f, err := ini.Load([]byte(` +names=alice, bruce`)) + So(err, ShouldBeNil) + + type Strict struct { + Names []string `ini:"names"` + } + s := new(Strict) + + So(f.Section("").StrictMapTo(s), ShouldBeNil) + So(fmt.Sprint(s.Names), ShouldEqual, "[alice bruce]") + }) +} + +func Test_ReflectFromStruct(t *testing.T) { Convey("Reflect from struct", t, func() { type Embeded struct { - Dates []time.Time `delim:"|"` - Places []string - None []int + Dates []time.Time `delim:"|" comment:"Time data"` + Places []string + Years []int + Numbers []int64 + Ages []uint + Populations []uint64 + Coordinates []float64 + None []int } type Author struct { Name string `ini:"NAME"` Male bool - Age int + Age int `comment:"Author's age"` + Height uint GPA float64 + Date time.Time NeverMind string `ini:"-"` - *Embeded `ini:"infos"` + *Embeded `ini:"infos" comment:"Embeded section"` } - a := &Author{"Unknwon", true, 21, 2.8, "", + + t, err := time.Parse(time.RFC3339, "1993-10-07T20:17:05Z") + So(err, ShouldBeNil) + a := &Author{"Unknwon", true, 21, 100, 2.8, t, "", &Embeded{ - []time.Time{time.Now(), time.Now()}, + []time.Time{t, t}, []string{"HangZhou", "Boston"}, + []int{1993, 1994}, + []int64{10010, 10086}, + []uint{18, 19}, + []uint64{12345678, 98765432}, + []float64{192.168, 10.11}, []int{}, }} - cfg := Empty() - So(ReflectFrom(cfg, a), ShouldBeNil) - cfg.SaveTo("testdata/conf_reflect.ini") + cfg := ini.Empty() + So(ini.ReflectFrom(cfg, a), ShouldBeNil) + + var buf bytes.Buffer + _, err = cfg.WriteTo(&buf) + So(err, ShouldBeNil) + So(buf.String(), ShouldEqual, `NAME = Unknwon +Male = true +; Author's age +Age = 21 +Height = 100 +GPA = 2.8 +Date = 1993-10-07T20:17:05Z + +; Embeded section +[infos] +; Time data +Dates = 1993-10-07T20:17:05Z|1993-10-07T20:17:05Z +Places = HangZhou,Boston +Years = 1993,1994 +Numbers = 10010,10086 +Ages = 18,19 +Populations = 12345678,98765432 +Coordinates = 192.168,10.11 +None = + +`) Convey("Reflect from non-point struct", func() { - So(ReflectFrom(cfg, Author{}), ShouldNotBeNil) + So(ini.ReflectFrom(cfg, Author{}), ShouldNotBeNil) + }) + + Convey("Reflect from struct with omitempty", func() { + cfg := ini.Empty() + type SpecialStruct struct { + FirstName string `ini:"first_name"` + LastName string `ini:"last_name"` + JustOmitMe string `ini:"omitempty"` + LastLogin time.Time `ini:"last_login,omitempty"` + LastLogin2 time.Time `ini:",omitempty"` + NotEmpty int `ini:"omitempty"` + } + + So(ini.ReflectFrom(cfg, &SpecialStruct{FirstName: "John", LastName: "Doe", NotEmpty: 9}), ShouldBeNil) + + var buf bytes.Buffer + _, err = cfg.WriteTo(&buf) + So(buf.String(), ShouldEqual, `first_name = John +last_name = Doe +omitempty = 9 + +`) }) }) } @@ -225,15 +358,30 @@ type testMapper struct { func Test_NameGetter(t *testing.T) { Convey("Test name mappers", t, func() { - So(MapToWithMapper(&testMapper{}, TitleUnderscore, []byte("packag_name=ini")), ShouldBeNil) + So(ini.MapToWithMapper(&testMapper{}, ini.TitleUnderscore, []byte("packag_name=ini")), ShouldBeNil) - cfg, err := Load([]byte("PACKAGE_NAME=ini")) + cfg, err := ini.Load([]byte("PACKAGE_NAME=ini")) So(err, ShouldBeNil) So(cfg, ShouldNotBeNil) - cfg.NameMapper = AllCapsUnderscore + cfg.NameMapper = ini.AllCapsUnderscore tg := new(testMapper) So(cfg.MapTo(tg), ShouldBeNil) So(tg.PackageName, ShouldEqual, "ini") }) } + +type testDurationStruct struct { + Duration time.Duration `ini:"Duration"` +} + +func Test_Duration(t *testing.T) { + Convey("Duration less than 16m50s", t, func() { + ds := new(testDurationStruct) + So(ini.MapTo(ds, []byte("Duration=16m49s")), ShouldBeNil) + + dur, err := time.ParseDuration("16m49s") + So(err, ShouldBeNil) + So(ds.Duration.Seconds(), ShouldEqual, dur.Seconds()) + }) +} diff --git a/vendor/github.com/go-ini/ini/testdata/conf.ini b/vendor/github.com/go-ini/ini/testdata/conf.ini deleted file mode 100644 index 2ed0ac1..0000000 --- a/vendor/github.com/go-ini/ini/testdata/conf.ini +++ /dev/null @@ -1,2 +0,0 @@ -[author] -E-MAIL = u@gogs.io \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/cmd/jpgo/main.go b/vendor/github.com/jmespath/go-jmespath/cmd/jpgo/main.go deleted file mode 100644 index 1c53cfc..0000000 --- a/vendor/github.com/jmespath/go-jmespath/cmd/jpgo/main.go +++ /dev/null @@ -1,96 +0,0 @@ -/*Basic command line interface for debug and testing purposes. - -Examples: - -Only print the AST for the expression: - - jp.go -ast "foo.bar.baz" - -Evaluate the JMESPath expression against JSON data from a file: - - jp.go -input /tmp/data.json "foo.bar.baz" - -This program can also be used as an executable to the jp-compliance -runner (github.com/jmespath/jmespath.test). - -*/ -package main - -import ( - "flag" - "fmt" - "io/ioutil" - "os" -) - -import ( - "encoding/json" - - "github.com/jmespath/go-jmespath" -) - -func errMsg(msg string, a ...interface{}) int { - fmt.Fprintf(os.Stderr, msg, a...) - fmt.Fprintln(os.Stderr) - return 1 -} - -func run() int { - - astOnly := flag.Bool("ast", false, "Print the AST for the input expression and exit.") - inputFile := flag.String("input", "", "Filename containing JSON data to search. If not provided, data is read from stdin.") - - flag.Parse() - args := flag.Args() - if len(args) != 1 { - fmt.Fprintf(os.Stderr, "Usage:\n\n") - flag.PrintDefaults() - return errMsg("\nError: expected a single argument (the JMESPath expression).") - } - - expression := args[0] - parser := jmespath.NewParser() - parsed, err := parser.Parse(expression) - if err != nil { - if syntaxError, ok := err.(jmespath.SyntaxError); ok { - return errMsg("%s\n%s\n", syntaxError, syntaxError.HighlightLocation()) - } - return errMsg("%s", err) - } - if *astOnly { - fmt.Println("") - fmt.Printf("%s\n", parsed) - return 0 - } - - var inputData []byte - if *inputFile != "" { - inputData, err = ioutil.ReadFile(*inputFile) - if err != nil { - return errMsg("Error loading file %s: %s", *inputFile, err) - } - } else { - // If an input data file is not provided then we read the - // data from stdin. - inputData, err = ioutil.ReadAll(os.Stdin) - if err != nil { - return errMsg("Error reading from stdin: %s", err) - } - } - var data interface{} - json.Unmarshal(inputData, &data) - result, err := jmespath.Search(expression, data) - if err != nil { - return errMsg("Error executing expression: %s", err) - } - toJSON, err := json.MarshalIndent(result, "", " ") - if err != nil { - return errMsg("Error serializing result to JSON: %s", err) - } - fmt.Println(string(toJSON)) - return 0 -} - -func main() { - os.Exit(run()) -} diff --git a/vendor/github.com/jmespath/go-jmespath/compliance/basic.json b/vendor/github.com/jmespath/go-jmespath/compliance/basic.json deleted file mode 100644 index d550e96..0000000 --- a/vendor/github.com/jmespath/go-jmespath/compliance/basic.json +++ /dev/null @@ -1,96 +0,0 @@ -[{ - "given": - {"foo": {"bar": {"baz": "correct"}}}, - "cases": [ - { - "expression": "foo", - "result": {"bar": {"baz": "correct"}} - }, - { - "expression": "foo.bar", - "result": {"baz": "correct"} - }, - { - "expression": "foo.bar.baz", - "result": "correct" - }, - { - "expression": "foo\n.\nbar\n.baz", - "result": "correct" - }, - { - "expression": "foo.bar.baz.bad", - "result": null - }, - { - "expression": "foo.bar.bad", - "result": null - }, - { - "expression": "foo.bad", - "result": null - }, - { - "expression": "bad", - "result": null - }, - { - "expression": "bad.morebad.morebad", - "result": null - } - ] -}, -{ - "given": - {"foo": {"bar": ["one", "two", "three"]}}, - "cases": [ - { - "expression": "foo", - "result": {"bar": ["one", "two", "three"]} - }, - { - "expression": "foo.bar", - "result": ["one", "two", "three"] - } - ] -}, -{ - "given": ["one", "two", "three"], - "cases": [ - { - "expression": "one", - "result": null - }, - { - "expression": "two", - "result": null - }, - { - "expression": "three", - "result": null - }, - { - "expression": "one.two", - "result": null - } - ] -}, -{ - "given": - {"foo": {"1": ["one", "two", "three"], "-1": "bar"}}, - "cases": [ - { - "expression": "foo.\"1\"", - "result": ["one", "two", "three"] - }, - { - "expression": "foo.\"1\"[0]", - "result": "one" - }, - { - "expression": "foo.\"-1\"", - "result": "bar" - } - ] -} -] diff --git a/vendor/github.com/jmespath/go-jmespath/compliance/boolean.json b/vendor/github.com/jmespath/go-jmespath/compliance/boolean.json deleted file mode 100644 index e3fa196..0000000 --- a/vendor/github.com/jmespath/go-jmespath/compliance/boolean.json +++ /dev/null @@ -1,257 +0,0 @@ -[ - { - "given": { - "outer": { - "foo": "foo", - "bar": "bar", - "baz": "baz" - } - }, - "cases": [ - { - "expression": "outer.foo || outer.bar", - "result": "foo" - }, - { - "expression": "outer.foo||outer.bar", - "result": "foo" - }, - { - "expression": "outer.bar || outer.baz", - "result": "bar" - }, - { - "expression": "outer.bar||outer.baz", - "result": "bar" - }, - { - "expression": "outer.bad || outer.foo", - "result": "foo" - }, - { - "expression": "outer.bad||outer.foo", - "result": "foo" - }, - { - "expression": "outer.foo || outer.bad", - "result": "foo" - }, - { - "expression": "outer.foo||outer.bad", - "result": "foo" - }, - { - "expression": "outer.bad || outer.alsobad", - "result": null - }, - { - "expression": "outer.bad||outer.alsobad", - "result": null - } - ] - }, - { - "given": { - "outer": { - "foo": "foo", - "bool": false, - "empty_list": [], - "empty_string": "" - } - }, - "cases": [ - { - "expression": "outer.empty_string || outer.foo", - "result": "foo" - }, - { - "expression": "outer.nokey || outer.bool || outer.empty_list || outer.empty_string || outer.foo", - "result": "foo" - } - ] - }, - { - "given": { - "True": true, - "False": false, - "Number": 5, - "EmptyList": [], - "Zero": 0 - }, - "cases": [ - { - "expression": "True && False", - "result": false - }, - { - "expression": "False && True", - "result": false - }, - { - "expression": "True && True", - "result": true - }, - { - "expression": "False && False", - "result": false - }, - { - "expression": "True && Number", - "result": 5 - }, - { - "expression": "Number && True", - "result": true - }, - { - "expression": "Number && False", - "result": false - }, - { - "expression": "Number && EmptyList", - "result": [] - }, - { - "expression": "Number && True", - "result": true - }, - { - "expression": "EmptyList && True", - "result": [] - }, - { - "expression": "EmptyList && False", - "result": [] - }, - { - "expression": "True || False", - "result": true - }, - { - "expression": "True || True", - "result": true - }, - { - "expression": "False || True", - "result": true - }, - { - "expression": "False || False", - "result": false - }, - { - "expression": "Number || EmptyList", - "result": 5 - }, - { - "expression": "Number || True", - "result": 5 - }, - { - "expression": "Number || True && False", - "result": 5 - }, - { - "expression": "(Number || True) && False", - "result": false - }, - { - "expression": "Number || (True && False)", - "result": 5 - }, - { - "expression": "!True", - "result": false - }, - { - "expression": "!False", - "result": true - }, - { - "expression": "!Number", - "result": false - }, - { - "expression": "!EmptyList", - "result": true - }, - { - "expression": "True && !False", - "result": true - }, - { - "expression": "True && !EmptyList", - "result": true - }, - { - "expression": "!False && !EmptyList", - "result": true - }, - { - "expression": "!(True && False)", - "result": true - }, - { - "expression": "!Zero", - "result": false - }, - { - "expression": "!!Zero", - "result": true - } - ] - }, - { - "given": { - "one": 1, - "two": 2, - "three": 3 - }, - "cases": [ - { - "expression": "one < two", - "result": true - }, - { - "expression": "one <= two", - "result": true - }, - { - "expression": "one == one", - "result": true - }, - { - "expression": "one == two", - "result": false - }, - { - "expression": "one > two", - "result": false - }, - { - "expression": "one >= two", - "result": false - }, - { - "expression": "one != two", - "result": true - }, - { - "expression": "one < two && three > one", - "result": true - }, - { - "expression": "one < two || three > one", - "result": true - }, - { - "expression": "one < two || three < one", - "result": true - }, - { - "expression": "two < one || three < one", - "result": false - } - ] - } -] diff --git a/vendor/github.com/jmespath/go-jmespath/compliance/current.json b/vendor/github.com/jmespath/go-jmespath/compliance/current.json deleted file mode 100644 index 0c26248..0000000 --- a/vendor/github.com/jmespath/go-jmespath/compliance/current.json +++ /dev/null @@ -1,25 +0,0 @@ -[ - { - "given": { - "foo": [{"name": "a"}, {"name": "b"}], - "bar": {"baz": "qux"} - }, - "cases": [ - { - "expression": "@", - "result": { - "foo": [{"name": "a"}, {"name": "b"}], - "bar": {"baz": "qux"} - } - }, - { - "expression": "@.bar", - "result": {"baz": "qux"} - }, - { - "expression": "@.foo[0]", - "result": {"name": "a"} - } - ] - } -] diff --git a/vendor/github.com/jmespath/go-jmespath/compliance/escape.json b/vendor/github.com/jmespath/go-jmespath/compliance/escape.json deleted file mode 100644 index 4a62d95..0000000 --- a/vendor/github.com/jmespath/go-jmespath/compliance/escape.json +++ /dev/null @@ -1,46 +0,0 @@ -[{ - "given": { - "foo.bar": "dot", - "foo bar": "space", - "foo\nbar": "newline", - "foo\"bar": "doublequote", - "c:\\\\windows\\path": "windows", - "/unix/path": "unix", - "\"\"\"": "threequotes", - "bar": {"baz": "qux"} - }, - "cases": [ - { - "expression": "\"foo.bar\"", - "result": "dot" - }, - { - "expression": "\"foo bar\"", - "result": "space" - }, - { - "expression": "\"foo\\nbar\"", - "result": "newline" - }, - { - "expression": "\"foo\\\"bar\"", - "result": "doublequote" - }, - { - "expression": "\"c:\\\\\\\\windows\\\\path\"", - "result": "windows" - }, - { - "expression": "\"/unix/path\"", - "result": "unix" - }, - { - "expression": "\"\\\"\\\"\\\"\"", - "result": "threequotes" - }, - { - "expression": "\"bar\".\"baz\"", - "result": "qux" - } - ] -}] diff --git a/vendor/github.com/jmespath/go-jmespath/compliance/filters.json b/vendor/github.com/jmespath/go-jmespath/compliance/filters.json deleted file mode 100644 index 5b9f52b..0000000 --- a/vendor/github.com/jmespath/go-jmespath/compliance/filters.json +++ /dev/null @@ -1,468 +0,0 @@ -[ - { - "given": {"foo": [{"name": "a"}, {"name": "b"}]}, - "cases": [ - { - "comment": "Matching a literal", - "expression": "foo[?name == 'a']", - "result": [{"name": "a"}] - } - ] - }, - { - "given": {"foo": [0, 1], "bar": [2, 3]}, - "cases": [ - { - "comment": "Matching a literal", - "expression": "*[?[0] == `0`]", - "result": [[], []] - } - ] - }, - { - "given": {"foo": [{"first": "foo", "last": "bar"}, - {"first": "foo", "last": "foo"}, - {"first": "foo", "last": "baz"}]}, - "cases": [ - { - "comment": "Matching an expression", - "expression": "foo[?first == last]", - "result": [{"first": "foo", "last": "foo"}] - }, - { - "comment": "Verify projection created from filter", - "expression": "foo[?first == last].first", - "result": ["foo"] - } - ] - }, - { - "given": {"foo": [{"age": 20}, - {"age": 25}, - {"age": 30}]}, - "cases": [ - { - "comment": "Greater than with a number", - "expression": "foo[?age > `25`]", - "result": [{"age": 30}] - }, - { - "expression": "foo[?age >= `25`]", - "result": [{"age": 25}, {"age": 30}] - }, - { - "comment": "Greater than with a number", - "expression": "foo[?age > `30`]", - "result": [] - }, - { - "comment": "Greater than with a number", - "expression": "foo[?age < `25`]", - "result": [{"age": 20}] - }, - { - "comment": "Greater than with a number", - "expression": "foo[?age <= `25`]", - "result": [{"age": 20}, {"age": 25}] - }, - { - "comment": "Greater than with a number", - "expression": "foo[?age < `20`]", - "result": [] - }, - { - "expression": "foo[?age == `20`]", - "result": [{"age": 20}] - }, - { - "expression": "foo[?age != `20`]", - "result": [{"age": 25}, {"age": 30}] - } - ] - }, - { - "given": {"foo": [{"top": {"name": "a"}}, - {"top": {"name": "b"}}]}, - "cases": [ - { - "comment": "Filter with subexpression", - "expression": "foo[?top.name == 'a']", - "result": [{"top": {"name": "a"}}] - } - ] - }, - { - "given": {"foo": [{"top": {"first": "foo", "last": "bar"}}, - {"top": {"first": "foo", "last": "foo"}}, - {"top": {"first": "foo", "last": "baz"}}]}, - "cases": [ - { - "comment": "Matching an expression", - "expression": "foo[?top.first == top.last]", - "result": [{"top": {"first": "foo", "last": "foo"}}] - }, - { - "comment": "Matching a JSON array", - "expression": "foo[?top == `{\"first\": \"foo\", \"last\": \"bar\"}`]", - "result": [{"top": {"first": "foo", "last": "bar"}}] - } - ] - }, - { - "given": {"foo": [ - {"key": true}, - {"key": false}, - {"key": 0}, - {"key": 1}, - {"key": [0]}, - {"key": {"bar": [0]}}, - {"key": null}, - {"key": [1]}, - {"key": {"a":2}} - ]}, - "cases": [ - { - "expression": "foo[?key == `true`]", - "result": [{"key": true}] - }, - { - "expression": "foo[?key == `false`]", - "result": [{"key": false}] - }, - { - "expression": "foo[?key == `0`]", - "result": [{"key": 0}] - }, - { - "expression": "foo[?key == `1`]", - "result": [{"key": 1}] - }, - { - "expression": "foo[?key == `[0]`]", - "result": [{"key": [0]}] - }, - { - "expression": "foo[?key == `{\"bar\": [0]}`]", - "result": [{"key": {"bar": [0]}}] - }, - { - "expression": "foo[?key == `null`]", - "result": [{"key": null}] - }, - { - "expression": "foo[?key == `[1]`]", - "result": [{"key": [1]}] - }, - { - "expression": "foo[?key == `{\"a\":2}`]", - "result": [{"key": {"a":2}}] - }, - { - "expression": "foo[?`true` == key]", - "result": [{"key": true}] - }, - { - "expression": "foo[?`false` == key]", - "result": [{"key": false}] - }, - { - "expression": "foo[?`0` == key]", - "result": [{"key": 0}] - }, - { - "expression": "foo[?`1` == key]", - "result": [{"key": 1}] - }, - { - "expression": "foo[?`[0]` == key]", - "result": [{"key": [0]}] - }, - { - "expression": "foo[?`{\"bar\": [0]}` == key]", - "result": [{"key": {"bar": [0]}}] - }, - { - "expression": "foo[?`null` == key]", - "result": [{"key": null}] - }, - { - "expression": "foo[?`[1]` == key]", - "result": [{"key": [1]}] - }, - { - "expression": "foo[?`{\"a\":2}` == key]", - "result": [{"key": {"a":2}}] - }, - { - "expression": "foo[?key != `true`]", - "result": [{"key": false}, {"key": 0}, {"key": 1}, {"key": [0]}, - {"key": {"bar": [0]}}, {"key": null}, {"key": [1]}, {"key": {"a":2}}] - }, - { - "expression": "foo[?key != `false`]", - "result": [{"key": true}, {"key": 0}, {"key": 1}, {"key": [0]}, - {"key": {"bar": [0]}}, {"key": null}, {"key": [1]}, {"key": {"a":2}}] - }, - { - "expression": "foo[?key != `0`]", - "result": [{"key": true}, {"key": false}, {"key": 1}, {"key": [0]}, - {"key": {"bar": [0]}}, {"key": null}, {"key": [1]}, {"key": {"a":2}}] - }, - { - "expression": "foo[?key != `1`]", - "result": [{"key": true}, {"key": false}, {"key": 0}, {"key": [0]}, - {"key": {"bar": [0]}}, {"key": null}, {"key": [1]}, {"key": {"a":2}}] - }, - { - "expression": "foo[?key != `null`]", - "result": [{"key": true}, {"key": false}, {"key": 0}, {"key": 1}, {"key": [0]}, - {"key": {"bar": [0]}}, {"key": [1]}, {"key": {"a":2}}] - }, - { - "expression": "foo[?key != `[1]`]", - "result": [{"key": true}, {"key": false}, {"key": 0}, {"key": 1}, {"key": [0]}, - {"key": {"bar": [0]}}, {"key": null}, {"key": {"a":2}}] - }, - { - "expression": "foo[?key != `{\"a\":2}`]", - "result": [{"key": true}, {"key": false}, {"key": 0}, {"key": 1}, {"key": [0]}, - {"key": {"bar": [0]}}, {"key": null}, {"key": [1]}] - }, - { - "expression": "foo[?`true` != key]", - "result": [{"key": false}, {"key": 0}, {"key": 1}, {"key": [0]}, - {"key": {"bar": [0]}}, {"key": null}, {"key": [1]}, {"key": {"a":2}}] - }, - { - "expression": "foo[?`false` != key]", - "result": [{"key": true}, {"key": 0}, {"key": 1}, {"key": [0]}, - {"key": {"bar": [0]}}, {"key": null}, {"key": [1]}, {"key": {"a":2}}] - }, - { - "expression": "foo[?`0` != key]", - "result": [{"key": true}, {"key": false}, {"key": 1}, {"key": [0]}, - {"key": {"bar": [0]}}, {"key": null}, {"key": [1]}, {"key": {"a":2}}] - }, - { - "expression": "foo[?`1` != key]", - "result": [{"key": true}, {"key": false}, {"key": 0}, {"key": [0]}, - {"key": {"bar": [0]}}, {"key": null}, {"key": [1]}, {"key": {"a":2}}] - }, - { - "expression": "foo[?`null` != key]", - "result": [{"key": true}, {"key": false}, {"key": 0}, {"key": 1}, {"key": [0]}, - {"key": {"bar": [0]}}, {"key": [1]}, {"key": {"a":2}}] - }, - { - "expression": "foo[?`[1]` != key]", - "result": [{"key": true}, {"key": false}, {"key": 0}, {"key": 1}, {"key": [0]}, - {"key": {"bar": [0]}}, {"key": null}, {"key": {"a":2}}] - }, - { - "expression": "foo[?`{\"a\":2}` != key]", - "result": [{"key": true}, {"key": false}, {"key": 0}, {"key": 1}, {"key": [0]}, - {"key": {"bar": [0]}}, {"key": null}, {"key": [1]}] - } - ] - }, - { - "given": {"reservations": [ - {"instances": [ - {"foo": 1, "bar": 2}, {"foo": 1, "bar": 3}, - {"foo": 1, "bar": 2}, {"foo": 2, "bar": 1}]}]}, - "cases": [ - { - "expression": "reservations[].instances[?bar==`1`]", - "result": [[{"foo": 2, "bar": 1}]] - }, - { - "expression": "reservations[*].instances[?bar==`1`]", - "result": [[{"foo": 2, "bar": 1}]] - }, - { - "expression": "reservations[].instances[?bar==`1`][]", - "result": [{"foo": 2, "bar": 1}] - } - ] - }, - { - "given": { - "baz": "other", - "foo": [ - {"bar": 1}, {"bar": 2}, {"bar": 3}, {"bar": 4}, {"bar": 1, "baz": 2} - ] - }, - "cases": [ - { - "expression": "foo[?bar==`1`].bar[0]", - "result": [] - } - ] - }, - { - "given": { - "foo": [ - {"a": 1, "b": {"c": "x"}}, - {"a": 1, "b": {"c": "y"}}, - {"a": 1, "b": {"c": "z"}}, - {"a": 2, "b": {"c": "z"}}, - {"a": 1, "baz": 2} - ] - }, - "cases": [ - { - "expression": "foo[?a==`1`].b.c", - "result": ["x", "y", "z"] - } - ] - }, - { - "given": {"foo": [{"name": "a"}, {"name": "b"}, {"name": "c"}]}, - "cases": [ - { - "comment": "Filter with or expression", - "expression": "foo[?name == 'a' || name == 'b']", - "result": [{"name": "a"}, {"name": "b"}] - }, - { - "expression": "foo[?name == 'a' || name == 'e']", - "result": [{"name": "a"}] - }, - { - "expression": "foo[?name == 'a' || name == 'b' || name == 'c']", - "result": [{"name": "a"}, {"name": "b"}, {"name": "c"}] - } - ] - }, - { - "given": {"foo": [{"a": 1, "b": 2}, {"a": 1, "b": 3}]}, - "cases": [ - { - "comment": "Filter with and expression", - "expression": "foo[?a == `1` && b == `2`]", - "result": [{"a": 1, "b": 2}] - }, - { - "expression": "foo[?a == `1` && b == `4`]", - "result": [] - } - ] - }, - { - "given": {"foo": [{"a": 1, "b": 2, "c": 3}, {"a": 3, "b": 4}]}, - "cases": [ - { - "comment": "Filter with Or and And expressions", - "expression": "foo[?c == `3` || a == `1` && b == `4`]", - "result": [{"a": 1, "b": 2, "c": 3}] - }, - { - "expression": "foo[?b == `2` || a == `3` && b == `4`]", - "result": [{"a": 1, "b": 2, "c": 3}, {"a": 3, "b": 4}] - }, - { - "expression": "foo[?a == `3` && b == `4` || b == `2`]", - "result": [{"a": 1, "b": 2, "c": 3}, {"a": 3, "b": 4}] - }, - { - "expression": "foo[?(a == `3` && b == `4`) || b == `2`]", - "result": [{"a": 1, "b": 2, "c": 3}, {"a": 3, "b": 4}] - }, - { - "expression": "foo[?((a == `3` && b == `4`)) || b == `2`]", - "result": [{"a": 1, "b": 2, "c": 3}, {"a": 3, "b": 4}] - }, - { - "expression": "foo[?a == `3` && (b == `4` || b == `2`)]", - "result": [{"a": 3, "b": 4}] - }, - { - "expression": "foo[?a == `3` && ((b == `4` || b == `2`))]", - "result": [{"a": 3, "b": 4}] - } - ] - }, - { - "given": {"foo": [{"a": 1, "b": 2, "c": 3}, {"a": 3, "b": 4}]}, - "cases": [ - { - "comment": "Verify precedence of or/and expressions", - "expression": "foo[?a == `1` || b ==`2` && c == `5`]", - "result": [{"a": 1, "b": 2, "c": 3}] - }, - { - "comment": "Parentheses can alter precedence", - "expression": "foo[?(a == `1` || b ==`2`) && c == `5`]", - "result": [] - }, - { - "comment": "Not expressions combined with and/or", - "expression": "foo[?!(a == `1` || b ==`2`)]", - "result": [{"a": 3, "b": 4}] - } - ] - }, - { - "given": { - "foo": [ - {"key": true}, - {"key": false}, - {"key": []}, - {"key": {}}, - {"key": [0]}, - {"key": {"a": "b"}}, - {"key": 0}, - {"key": 1}, - {"key": null}, - {"notkey": true} - ] - }, - "cases": [ - { - "comment": "Unary filter expression", - "expression": "foo[?key]", - "result": [ - {"key": true}, {"key": [0]}, {"key": {"a": "b"}}, - {"key": 0}, {"key": 1} - ] - }, - { - "comment": "Unary not filter expression", - "expression": "foo[?!key]", - "result": [ - {"key": false}, {"key": []}, {"key": {}}, - {"key": null}, {"notkey": true} - ] - }, - { - "comment": "Equality with null RHS", - "expression": "foo[?key == `null`]", - "result": [ - {"key": null}, {"notkey": true} - ] - } - ] - }, - { - "given": { - "foo": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] - }, - "cases": [ - { - "comment": "Using @ in a filter expression", - "expression": "foo[?@ < `5`]", - "result": [0, 1, 2, 3, 4] - }, - { - "comment": "Using @ in a filter expression", - "expression": "foo[?`5` > @]", - "result": [0, 1, 2, 3, 4] - }, - { - "comment": "Using @ in a filter expression", - "expression": "foo[?@ == @]", - "result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] - } - ] - } -] diff --git a/vendor/github.com/jmespath/go-jmespath/compliance/functions.json b/vendor/github.com/jmespath/go-jmespath/compliance/functions.json deleted file mode 100644 index 8b8db36..0000000 --- a/vendor/github.com/jmespath/go-jmespath/compliance/functions.json +++ /dev/null @@ -1,825 +0,0 @@ -[{ - "given": - { - "foo": -1, - "zero": 0, - "numbers": [-1, 3, 4, 5], - "array": [-1, 3, 4, 5, "a", "100"], - "strings": ["a", "b", "c"], - "decimals": [1.01, 1.2, -1.5], - "str": "Str", - "false": false, - "empty_list": [], - "empty_hash": {}, - "objects": {"foo": "bar", "bar": "baz"}, - "null_key": null - }, - "cases": [ - { - "expression": "abs(foo)", - "result": 1 - }, - { - "expression": "abs(foo)", - "result": 1 - }, - { - "expression": "abs(str)", - "error": "invalid-type" - }, - { - "expression": "abs(array[1])", - "result": 3 - }, - { - "expression": "abs(array[1])", - "result": 3 - }, - { - "expression": "abs(`false`)", - "error": "invalid-type" - }, - { - "expression": "abs(`-24`)", - "result": 24 - }, - { - "expression": "abs(`-24`)", - "result": 24 - }, - { - "expression": "abs(`1`, `2`)", - "error": "invalid-arity" - }, - { - "expression": "abs()", - "error": "invalid-arity" - }, - { - "expression": "unknown_function(`1`, `2`)", - "error": "unknown-function" - }, - { - "expression": "avg(numbers)", - "result": 2.75 - }, - { - "expression": "avg(array)", - "error": "invalid-type" - }, - { - "expression": "avg('abc')", - "error": "invalid-type" - }, - { - "expression": "avg(foo)", - "error": "invalid-type" - }, - { - "expression": "avg(@)", - "error": "invalid-type" - }, - { - "expression": "avg(strings)", - "error": "invalid-type" - }, - { - "expression": "ceil(`1.2`)", - "result": 2 - }, - { - "expression": "ceil(decimals[0])", - "result": 2 - }, - { - "expression": "ceil(decimals[1])", - "result": 2 - }, - { - "expression": "ceil(decimals[2])", - "result": -1 - }, - { - "expression": "ceil('string')", - "error": "invalid-type" - }, - { - "expression": "contains('abc', 'a')", - "result": true - }, - { - "expression": "contains('abc', 'd')", - "result": false - }, - { - "expression": "contains(`false`, 'd')", - "error": "invalid-type" - }, - { - "expression": "contains(strings, 'a')", - "result": true - }, - { - "expression": "contains(decimals, `1.2`)", - "result": true - }, - { - "expression": "contains(decimals, `false`)", - "result": false - }, - { - "expression": "ends_with(str, 'r')", - "result": true - }, - { - "expression": "ends_with(str, 'tr')", - "result": true - }, - { - "expression": "ends_with(str, 'Str')", - "result": true - }, - { - "expression": "ends_with(str, 'SStr')", - "result": false - }, - { - "expression": "ends_with(str, 'foo')", - "result": false - }, - { - "expression": "ends_with(str, `0`)", - "error": "invalid-type" - }, - { - "expression": "floor(`1.2`)", - "result": 1 - }, - { - "expression": "floor('string')", - "error": "invalid-type" - }, - { - "expression": "floor(decimals[0])", - "result": 1 - }, - { - "expression": "floor(foo)", - "result": -1 - }, - { - "expression": "floor(str)", - "error": "invalid-type" - }, - { - "expression": "length('abc')", - "result": 3 - }, - { - "expression": "length('✓foo')", - "result": 4 - }, - { - "expression": "length('')", - "result": 0 - }, - { - "expression": "length(@)", - "result": 12 - }, - { - "expression": "length(strings[0])", - "result": 1 - }, - { - "expression": "length(str)", - "result": 3 - }, - { - "expression": "length(array)", - "result": 6 - }, - { - "expression": "length(objects)", - "result": 2 - }, - { - "expression": "length(`false`)", - "error": "invalid-type" - }, - { - "expression": "length(foo)", - "error": "invalid-type" - }, - { - "expression": "length(strings[0])", - "result": 1 - }, - { - "expression": "max(numbers)", - "result": 5 - }, - { - "expression": "max(decimals)", - "result": 1.2 - }, - { - "expression": "max(strings)", - "result": "c" - }, - { - "expression": "max(abc)", - "error": "invalid-type" - }, - { - "expression": "max(array)", - "error": "invalid-type" - }, - { - "expression": "max(decimals)", - "result": 1.2 - }, - { - "expression": "max(empty_list)", - "result": null - }, - { - "expression": "merge(`{}`)", - "result": {} - }, - { - "expression": "merge(`{}`, `{}`)", - "result": {} - }, - { - "expression": "merge(`{\"a\": 1}`, `{\"b\": 2}`)", - "result": {"a": 1, "b": 2} - }, - { - "expression": "merge(`{\"a\": 1}`, `{\"a\": 2}`)", - "result": {"a": 2} - }, - { - "expression": "merge(`{\"a\": 1, \"b\": 2}`, `{\"a\": 2, \"c\": 3}`, `{\"d\": 4}`)", - "result": {"a": 2, "b": 2, "c": 3, "d": 4} - }, - { - "expression": "min(numbers)", - "result": -1 - }, - { - "expression": "min(decimals)", - "result": -1.5 - }, - { - "expression": "min(abc)", - "error": "invalid-type" - }, - { - "expression": "min(array)", - "error": "invalid-type" - }, - { - "expression": "min(empty_list)", - "result": null - }, - { - "expression": "min(decimals)", - "result": -1.5 - }, - { - "expression": "min(strings)", - "result": "a" - }, - { - "expression": "type('abc')", - "result": "string" - }, - { - "expression": "type(`1.0`)", - "result": "number" - }, - { - "expression": "type(`2`)", - "result": "number" - }, - { - "expression": "type(`true`)", - "result": "boolean" - }, - { - "expression": "type(`false`)", - "result": "boolean" - }, - { - "expression": "type(`null`)", - "result": "null" - }, - { - "expression": "type(`[0]`)", - "result": "array" - }, - { - "expression": "type(`{\"a\": \"b\"}`)", - "result": "object" - }, - { - "expression": "type(@)", - "result": "object" - }, - { - "expression": "sort(keys(objects))", - "result": ["bar", "foo"] - }, - { - "expression": "keys(foo)", - "error": "invalid-type" - }, - { - "expression": "keys(strings)", - "error": "invalid-type" - }, - { - "expression": "keys(`false`)", - "error": "invalid-type" - }, - { - "expression": "sort(values(objects))", - "result": ["bar", "baz"] - }, - { - "expression": "keys(empty_hash)", - "result": [] - }, - { - "expression": "values(foo)", - "error": "invalid-type" - }, - { - "expression": "join(', ', strings)", - "result": "a, b, c" - }, - { - "expression": "join(', ', strings)", - "result": "a, b, c" - }, - { - "expression": "join(',', `[\"a\", \"b\"]`)", - "result": "a,b" - }, - { - "expression": "join(',', `[\"a\", 0]`)", - "error": "invalid-type" - }, - { - "expression": "join(', ', str)", - "error": "invalid-type" - }, - { - "expression": "join('|', strings)", - "result": "a|b|c" - }, - { - "expression": "join(`2`, strings)", - "error": "invalid-type" - }, - { - "expression": "join('|', decimals)", - "error": "invalid-type" - }, - { - "expression": "join('|', decimals[].to_string(@))", - "result": "1.01|1.2|-1.5" - }, - { - "expression": "join('|', empty_list)", - "result": "" - }, - { - "expression": "reverse(numbers)", - "result": [5, 4, 3, -1] - }, - { - "expression": "reverse(array)", - "result": ["100", "a", 5, 4, 3, -1] - }, - { - "expression": "reverse(`[]`)", - "result": [] - }, - { - "expression": "reverse('')", - "result": "" - }, - { - "expression": "reverse('hello world')", - "result": "dlrow olleh" - }, - { - "expression": "starts_with(str, 'S')", - "result": true - }, - { - "expression": "starts_with(str, 'St')", - "result": true - }, - { - "expression": "starts_with(str, 'Str')", - "result": true - }, - { - "expression": "starts_with(str, 'String')", - "result": false - }, - { - "expression": "starts_with(str, `0`)", - "error": "invalid-type" - }, - { - "expression": "sum(numbers)", - "result": 11 - }, - { - "expression": "sum(decimals)", - "result": 0.71 - }, - { - "expression": "sum(array)", - "error": "invalid-type" - }, - { - "expression": "sum(array[].to_number(@))", - "result": 111 - }, - { - "expression": "sum(`[]`)", - "result": 0 - }, - { - "expression": "to_array('foo')", - "result": ["foo"] - }, - { - "expression": "to_array(`0`)", - "result": [0] - }, - { - "expression": "to_array(objects)", - "result": [{"foo": "bar", "bar": "baz"}] - }, - { - "expression": "to_array(`[1, 2, 3]`)", - "result": [1, 2, 3] - }, - { - "expression": "to_array(false)", - "result": [false] - }, - { - "expression": "to_string('foo')", - "result": "foo" - }, - { - "expression": "to_string(`1.2`)", - "result": "1.2" - }, - { - "expression": "to_string(`[0, 1]`)", - "result": "[0,1]" - }, - { - "expression": "to_number('1.0')", - "result": 1.0 - }, - { - "expression": "to_number('1.1')", - "result": 1.1 - }, - { - "expression": "to_number('4')", - "result": 4 - }, - { - "expression": "to_number('notanumber')", - "result": null - }, - { - "expression": "to_number(`false`)", - "result": null - }, - { - "expression": "to_number(`null`)", - "result": null - }, - { - "expression": "to_number(`[0]`)", - "result": null - }, - { - "expression": "to_number(`{\"foo\": 0}`)", - "result": null - }, - { - "expression": "\"to_string\"(`1.0`)", - "error": "syntax" - }, - { - "expression": "sort(numbers)", - "result": [-1, 3, 4, 5] - }, - { - "expression": "sort(strings)", - "result": ["a", "b", "c"] - }, - { - "expression": "sort(decimals)", - "result": [-1.5, 1.01, 1.2] - }, - { - "expression": "sort(array)", - "error": "invalid-type" - }, - { - "expression": "sort(abc)", - "error": "invalid-type" - }, - { - "expression": "sort(empty_list)", - "result": [] - }, - { - "expression": "sort(@)", - "error": "invalid-type" - }, - { - "expression": "not_null(unknown_key, str)", - "result": "Str" - }, - { - "expression": "not_null(unknown_key, foo.bar, empty_list, str)", - "result": [] - }, - { - "expression": "not_null(unknown_key, null_key, empty_list, str)", - "result": [] - }, - { - "expression": "not_null(all, expressions, are_null)", - "result": null - }, - { - "expression": "not_null()", - "error": "invalid-arity" - }, - { - "description": "function projection on single arg function", - "expression": "numbers[].to_string(@)", - "result": ["-1", "3", "4", "5"] - }, - { - "description": "function projection on single arg function", - "expression": "array[].to_number(@)", - "result": [-1, 3, 4, 5, 100] - } - ] -}, { - "given": - { - "foo": [ - {"b": "b", "a": "a"}, - {"c": "c", "b": "b"}, - {"d": "d", "c": "c"}, - {"e": "e", "d": "d"}, - {"f": "f", "e": "e"} - ] - }, - "cases": [ - { - "description": "function projection on variadic function", - "expression": "foo[].not_null(f, e, d, c, b, a)", - "result": ["b", "c", "d", "e", "f"] - } - ] -}, { - "given": - { - "people": [ - {"age": 20, "age_str": "20", "bool": true, "name": "a", "extra": "foo"}, - {"age": 40, "age_str": "40", "bool": false, "name": "b", "extra": "bar"}, - {"age": 30, "age_str": "30", "bool": true, "name": "c"}, - {"age": 50, "age_str": "50", "bool": false, "name": "d"}, - {"age": 10, "age_str": "10", "bool": true, "name": 3} - ] - }, - "cases": [ - { - "description": "sort by field expression", - "expression": "sort_by(people, &age)", - "result": [ - {"age": 10, "age_str": "10", "bool": true, "name": 3}, - {"age": 20, "age_str": "20", "bool": true, "name": "a", "extra": "foo"}, - {"age": 30, "age_str": "30", "bool": true, "name": "c"}, - {"age": 40, "age_str": "40", "bool": false, "name": "b", "extra": "bar"}, - {"age": 50, "age_str": "50", "bool": false, "name": "d"} - ] - }, - { - "expression": "sort_by(people, &age_str)", - "result": [ - {"age": 10, "age_str": "10", "bool": true, "name": 3}, - {"age": 20, "age_str": "20", "bool": true, "name": "a", "extra": "foo"}, - {"age": 30, "age_str": "30", "bool": true, "name": "c"}, - {"age": 40, "age_str": "40", "bool": false, "name": "b", "extra": "bar"}, - {"age": 50, "age_str": "50", "bool": false, "name": "d"} - ] - }, - { - "description": "sort by function expression", - "expression": "sort_by(people, &to_number(age_str))", - "result": [ - {"age": 10, "age_str": "10", "bool": true, "name": 3}, - {"age": 20, "age_str": "20", "bool": true, "name": "a", "extra": "foo"}, - {"age": 30, "age_str": "30", "bool": true, "name": "c"}, - {"age": 40, "age_str": "40", "bool": false, "name": "b", "extra": "bar"}, - {"age": 50, "age_str": "50", "bool": false, "name": "d"} - ] - }, - { - "description": "function projection on sort_by function", - "expression": "sort_by(people, &age)[].name", - "result": [3, "a", "c", "b", "d"] - }, - { - "expression": "sort_by(people, &extra)", - "error": "invalid-type" - }, - { - "expression": "sort_by(people, &bool)", - "error": "invalid-type" - }, - { - "expression": "sort_by(people, &name)", - "error": "invalid-type" - }, - { - "expression": "sort_by(people, name)", - "error": "invalid-type" - }, - { - "expression": "sort_by(people, &age)[].extra", - "result": ["foo", "bar"] - }, - { - "expression": "sort_by(`[]`, &age)", - "result": [] - }, - { - "expression": "max_by(people, &age)", - "result": {"age": 50, "age_str": "50", "bool": false, "name": "d"} - }, - { - "expression": "max_by(people, &age_str)", - "result": {"age": 50, "age_str": "50", "bool": false, "name": "d"} - }, - { - "expression": "max_by(people, &bool)", - "error": "invalid-type" - }, - { - "expression": "max_by(people, &extra)", - "error": "invalid-type" - }, - { - "expression": "max_by(people, &to_number(age_str))", - "result": {"age": 50, "age_str": "50", "bool": false, "name": "d"} - }, - { - "expression": "min_by(people, &age)", - "result": {"age": 10, "age_str": "10", "bool": true, "name": 3} - }, - { - "expression": "min_by(people, &age_str)", - "result": {"age": 10, "age_str": "10", "bool": true, "name": 3} - }, - { - "expression": "min_by(people, &bool)", - "error": "invalid-type" - }, - { - "expression": "min_by(people, &extra)", - "error": "invalid-type" - }, - { - "expression": "min_by(people, &to_number(age_str))", - "result": {"age": 10, "age_str": "10", "bool": true, "name": 3} - } - ] -}, { - "given": - { - "people": [ - {"age": 10, "order": "1"}, - {"age": 10, "order": "2"}, - {"age": 10, "order": "3"}, - {"age": 10, "order": "4"}, - {"age": 10, "order": "5"}, - {"age": 10, "order": "6"}, - {"age": 10, "order": "7"}, - {"age": 10, "order": "8"}, - {"age": 10, "order": "9"}, - {"age": 10, "order": "10"}, - {"age": 10, "order": "11"} - ] - }, - "cases": [ - { - "description": "stable sort order", - "expression": "sort_by(people, &age)", - "result": [ - {"age": 10, "order": "1"}, - {"age": 10, "order": "2"}, - {"age": 10, "order": "3"}, - {"age": 10, "order": "4"}, - {"age": 10, "order": "5"}, - {"age": 10, "order": "6"}, - {"age": 10, "order": "7"}, - {"age": 10, "order": "8"}, - {"age": 10, "order": "9"}, - {"age": 10, "order": "10"}, - {"age": 10, "order": "11"} - ] - } - ] -}, { - "given": - { - "people": [ - {"a": 10, "b": 1, "c": "z"}, - {"a": 10, "b": 2, "c": null}, - {"a": 10, "b": 3}, - {"a": 10, "b": 4, "c": "z"}, - {"a": 10, "b": 5, "c": null}, - {"a": 10, "b": 6}, - {"a": 10, "b": 7, "c": "z"}, - {"a": 10, "b": 8, "c": null}, - {"a": 10, "b": 9} - ], - "empty": [] - }, - "cases": [ - { - "expression": "map(&a, people)", - "result": [10, 10, 10, 10, 10, 10, 10, 10, 10] - }, - { - "expression": "map(&c, people)", - "result": ["z", null, null, "z", null, null, "z", null, null] - }, - { - "expression": "map(&a, badkey)", - "error": "invalid-type" - }, - { - "expression": "map(&foo, empty)", - "result": [] - } - ] -}, { - "given": { - "array": [ - { - "foo": {"bar": "yes1"} - }, - { - "foo": {"bar": "yes2"} - }, - { - "foo1": {"bar": "no"} - } - ]}, - "cases": [ - { - "expression": "map(&foo.bar, array)", - "result": ["yes1", "yes2", null] - }, - { - "expression": "map(&foo1.bar, array)", - "result": [null, null, "no"] - }, - { - "expression": "map(&foo.bar.baz, array)", - "result": [null, null, null] - } - ] -}, { - "given": { - "array": [[1, 2, 3, [4]], [5, 6, 7, [8, 9]]] - }, - "cases": [ - { - "expression": "map(&[], array)", - "result": [[1, 2, 3, 4], [5, 6, 7, 8, 9]] - } - ] -} -] diff --git a/vendor/github.com/jmespath/go-jmespath/compliance/identifiers.json b/vendor/github.com/jmespath/go-jmespath/compliance/identifiers.json deleted file mode 100644 index 7998a41..0000000 --- a/vendor/github.com/jmespath/go-jmespath/compliance/identifiers.json +++ /dev/null @@ -1,1377 +0,0 @@ -[ - { - "given": { - "__L": true - }, - "cases": [ - { - "expression": "__L", - "result": true - } - ] - }, - { - "given": { - "!\r": true - }, - "cases": [ - { - "expression": "\"!\\r\"", - "result": true - } - ] - }, - { - "given": { - "Y_1623": true - }, - "cases": [ - { - "expression": "Y_1623", - "result": true - } - ] - }, - { - "given": { - "x": true - }, - "cases": [ - { - "expression": "x", - "result": true - } - ] - }, - { - "given": { - "\tF\uCebb": true - }, - "cases": [ - { - "expression": "\"\\tF\\uCebb\"", - "result": true - } - ] - }, - { - "given": { - " \t": true - }, - "cases": [ - { - "expression": "\" \\t\"", - "result": true - } - ] - }, - { - "given": { - " ": true - }, - "cases": [ - { - "expression": "\" \"", - "result": true - } - ] - }, - { - "given": { - "v2": true - }, - "cases": [ - { - "expression": "v2", - "result": true - } - ] - }, - { - "given": { - "\t": true - }, - "cases": [ - { - "expression": "\"\\t\"", - "result": true - } - ] - }, - { - "given": { - "_X": true - }, - "cases": [ - { - "expression": "_X", - "result": true - } - ] - }, - { - "given": { - "\t4\ud9da\udd15": true - }, - "cases": [ - { - "expression": "\"\\t4\\ud9da\\udd15\"", - "result": true - } - ] - }, - { - "given": { - "v24_W": true - }, - "cases": [ - { - "expression": "v24_W", - "result": true - } - ] - }, - { - "given": { - "H": true - }, - "cases": [ - { - "expression": "\"H\"", - "result": true - } - ] - }, - { - "given": { - "\f": true - }, - "cases": [ - { - "expression": "\"\\f\"", - "result": true - } - ] - }, - { - "given": { - "E4": true - }, - "cases": [ - { - "expression": "\"E4\"", - "result": true - } - ] - }, - { - "given": { - "!": true - }, - "cases": [ - { - "expression": "\"!\"", - "result": true - } - ] - }, - { - "given": { - "tM": true - }, - "cases": [ - { - "expression": "tM", - "result": true - } - ] - }, - { - "given": { - " [": true - }, - "cases": [ - { - "expression": "\" [\"", - "result": true - } - ] - }, - { - "given": { - "R!": true - }, - "cases": [ - { - "expression": "\"R!\"", - "result": true - } - ] - }, - { - "given": { - "_6W": true - }, - "cases": [ - { - "expression": "_6W", - "result": true - } - ] - }, - { - "given": { - "\uaBA1\r": true - }, - "cases": [ - { - "expression": "\"\\uaBA1\\r\"", - "result": true - } - ] - }, - { - "given": { - "tL7": true - }, - "cases": [ - { - "expression": "tL7", - "result": true - } - ] - }, - { - "given": { - "<": true - }, - "cases": [ - { - "expression": "\">\"", - "result": true - } - ] - }, - { - "given": { - "hvu": true - }, - "cases": [ - { - "expression": "hvu", - "result": true - } - ] - }, - { - "given": { - "; !": true - }, - "cases": [ - { - "expression": "\"; !\"", - "result": true - } - ] - }, - { - "given": { - "hU": true - }, - "cases": [ - { - "expression": "hU", - "result": true - } - ] - }, - { - "given": { - "!I\n\/": true - }, - "cases": [ - { - "expression": "\"!I\\n\\/\"", - "result": true - } - ] - }, - { - "given": { - "\uEEbF": true - }, - "cases": [ - { - "expression": "\"\\uEEbF\"", - "result": true - } - ] - }, - { - "given": { - "U)\t": true - }, - "cases": [ - { - "expression": "\"U)\\t\"", - "result": true - } - ] - }, - { - "given": { - "fa0_9": true - }, - "cases": [ - { - "expression": "fa0_9", - "result": true - } - ] - }, - { - "given": { - "/": true - }, - "cases": [ - { - "expression": "\"/\"", - "result": true - } - ] - }, - { - "given": { - "Gy": true - }, - "cases": [ - { - "expression": "Gy", - "result": true - } - ] - }, - { - "given": { - "\b": true - }, - "cases": [ - { - "expression": "\"\\b\"", - "result": true - } - ] - }, - { - "given": { - "<": true - }, - "cases": [ - { - "expression": "\"<\"", - "result": true - } - ] - }, - { - "given": { - "\t": true - }, - "cases": [ - { - "expression": "\"\\t\"", - "result": true - } - ] - }, - { - "given": { - "\t&\\\r": true - }, - "cases": [ - { - "expression": "\"\\t&\\\\\\r\"", - "result": true - } - ] - }, - { - "given": { - "#": true - }, - "cases": [ - { - "expression": "\"#\"", - "result": true - } - ] - }, - { - "given": { - "B__": true - }, - "cases": [ - { - "expression": "B__", - "result": true - } - ] - }, - { - "given": { - "\nS \n": true - }, - "cases": [ - { - "expression": "\"\\nS \\n\"", - "result": true - } - ] - }, - { - "given": { - "Bp": true - }, - "cases": [ - { - "expression": "Bp", - "result": true - } - ] - }, - { - "given": { - ",\t;": true - }, - "cases": [ - { - "expression": "\",\\t;\"", - "result": true - } - ] - }, - { - "given": { - "B_q": true - }, - "cases": [ - { - "expression": "B_q", - "result": true - } - ] - }, - { - "given": { - "\/+\t\n\b!Z": true - }, - "cases": [ - { - "expression": "\"\\/+\\t\\n\\b!Z\"", - "result": true - } - ] - }, - { - "given": { - "\udadd\udfc7\\ueFAc": true - }, - "cases": [ - { - "expression": "\"\udadd\udfc7\\\\ueFAc\"", - "result": true - } - ] - }, - { - "given": { - ":\f": true - }, - "cases": [ - { - "expression": "\":\\f\"", - "result": true - } - ] - }, - { - "given": { - "\/": true - }, - "cases": [ - { - "expression": "\"\\/\"", - "result": true - } - ] - }, - { - "given": { - "_BW_6Hg_Gl": true - }, - "cases": [ - { - "expression": "_BW_6Hg_Gl", - "result": true - } - ] - }, - { - "given": { - "\udbcf\udc02": true - }, - "cases": [ - { - "expression": "\"\udbcf\udc02\"", - "result": true - } - ] - }, - { - "given": { - "zs1DC": true - }, - "cases": [ - { - "expression": "zs1DC", - "result": true - } - ] - }, - { - "given": { - "__434": true - }, - "cases": [ - { - "expression": "__434", - "result": true - } - ] - }, - { - "given": { - "\udb94\udd41": true - }, - "cases": [ - { - "expression": "\"\udb94\udd41\"", - "result": true - } - ] - }, - { - "given": { - "Z_5": true - }, - "cases": [ - { - "expression": "Z_5", - "result": true - } - ] - }, - { - "given": { - "z_M_": true - }, - "cases": [ - { - "expression": "z_M_", - "result": true - } - ] - }, - { - "given": { - "YU_2": true - }, - "cases": [ - { - "expression": "YU_2", - "result": true - } - ] - }, - { - "given": { - "_0": true - }, - "cases": [ - { - "expression": "_0", - "result": true - } - ] - }, - { - "given": { - "\b+": true - }, - "cases": [ - { - "expression": "\"\\b+\"", - "result": true - } - ] - }, - { - "given": { - "\"": true - }, - "cases": [ - { - "expression": "\"\\\"\"", - "result": true - } - ] - }, - { - "given": { - "D7": true - }, - "cases": [ - { - "expression": "D7", - "result": true - } - ] - }, - { - "given": { - "_62L": true - }, - "cases": [ - { - "expression": "_62L", - "result": true - } - ] - }, - { - "given": { - "\tK\t": true - }, - "cases": [ - { - "expression": "\"\\tK\\t\"", - "result": true - } - ] - }, - { - "given": { - "\n\\\f": true - }, - "cases": [ - { - "expression": "\"\\n\\\\\\f\"", - "result": true - } - ] - }, - { - "given": { - "I_": true - }, - "cases": [ - { - "expression": "I_", - "result": true - } - ] - }, - { - "given": { - "W_a0_": true - }, - "cases": [ - { - "expression": "W_a0_", - "result": true - } - ] - }, - { - "given": { - "BQ": true - }, - "cases": [ - { - "expression": "BQ", - "result": true - } - ] - }, - { - "given": { - "\tX$\uABBb": true - }, - "cases": [ - { - "expression": "\"\\tX$\\uABBb\"", - "result": true - } - ] - }, - { - "given": { - "Z9": true - }, - "cases": [ - { - "expression": "Z9", - "result": true - } - ] - }, - { - "given": { - "\b%\"\uda38\udd0f": true - }, - "cases": [ - { - "expression": "\"\\b%\\\"\uda38\udd0f\"", - "result": true - } - ] - }, - { - "given": { - "_F": true - }, - "cases": [ - { - "expression": "_F", - "result": true - } - ] - }, - { - "given": { - "!,": true - }, - "cases": [ - { - "expression": "\"!,\"", - "result": true - } - ] - }, - { - "given": { - "\"!": true - }, - "cases": [ - { - "expression": "\"\\\"!\"", - "result": true - } - ] - }, - { - "given": { - "Hh": true - }, - "cases": [ - { - "expression": "Hh", - "result": true - } - ] - }, - { - "given": { - "&": true - }, - "cases": [ - { - "expression": "\"&\"", - "result": true - } - ] - }, - { - "given": { - "9\r\\R": true - }, - "cases": [ - { - "expression": "\"9\\r\\\\R\"", - "result": true - } - ] - }, - { - "given": { - "M_k": true - }, - "cases": [ - { - "expression": "M_k", - "result": true - } - ] - }, - { - "given": { - "!\b\n\udb06\ude52\"\"": true - }, - "cases": [ - { - "expression": "\"!\\b\\n\udb06\ude52\\\"\\\"\"", - "result": true - } - ] - }, - { - "given": { - "6": true - }, - "cases": [ - { - "expression": "\"6\"", - "result": true - } - ] - }, - { - "given": { - "_7": true - }, - "cases": [ - { - "expression": "_7", - "result": true - } - ] - }, - { - "given": { - "0": true - }, - "cases": [ - { - "expression": "\"0\"", - "result": true - } - ] - }, - { - "given": { - "\\8\\": true - }, - "cases": [ - { - "expression": "\"\\\\8\\\\\"", - "result": true - } - ] - }, - { - "given": { - "b7eo": true - }, - "cases": [ - { - "expression": "b7eo", - "result": true - } - ] - }, - { - "given": { - "xIUo9": true - }, - "cases": [ - { - "expression": "xIUo9", - "result": true - } - ] - }, - { - "given": { - "5": true - }, - "cases": [ - { - "expression": "\"5\"", - "result": true - } - ] - }, - { - "given": { - "?": true - }, - "cases": [ - { - "expression": "\"?\"", - "result": true - } - ] - }, - { - "given": { - "sU": true - }, - "cases": [ - { - "expression": "sU", - "result": true - } - ] - }, - { - "given": { - "VH2&H\\\/": true - }, - "cases": [ - { - "expression": "\"VH2&H\\\\\\/\"", - "result": true - } - ] - }, - { - "given": { - "_C": true - }, - "cases": [ - { - "expression": "_C", - "result": true - } - ] - }, - { - "given": { - "_": true - }, - "cases": [ - { - "expression": "_", - "result": true - } - ] - }, - { - "given": { - "<\t": true - }, - "cases": [ - { - "expression": "\"<\\t\"", - "result": true - } - ] - }, - { - "given": { - "\uD834\uDD1E": true - }, - "cases": [ - { - "expression": "\"\\uD834\\uDD1E\"", - "result": true - } - ] - } -] diff --git a/vendor/github.com/jmespath/go-jmespath/compliance/indices.json b/vendor/github.com/jmespath/go-jmespath/compliance/indices.json deleted file mode 100644 index aa03b35..0000000 --- a/vendor/github.com/jmespath/go-jmespath/compliance/indices.json +++ /dev/null @@ -1,346 +0,0 @@ -[{ - "given": - {"foo": {"bar": ["zero", "one", "two"]}}, - "cases": [ - { - "expression": "foo.bar[0]", - "result": "zero" - }, - { - "expression": "foo.bar[1]", - "result": "one" - }, - { - "expression": "foo.bar[2]", - "result": "two" - }, - { - "expression": "foo.bar[3]", - "result": null - }, - { - "expression": "foo.bar[-1]", - "result": "two" - }, - { - "expression": "foo.bar[-2]", - "result": "one" - }, - { - "expression": "foo.bar[-3]", - "result": "zero" - }, - { - "expression": "foo.bar[-4]", - "result": null - } - ] -}, -{ - "given": - {"foo": [{"bar": "one"}, {"bar": "two"}, {"bar": "three"}, {"notbar": "four"}]}, - "cases": [ - { - "expression": "foo.bar", - "result": null - }, - { - "expression": "foo[0].bar", - "result": "one" - }, - { - "expression": "foo[1].bar", - "result": "two" - }, - { - "expression": "foo[2].bar", - "result": "three" - }, - { - "expression": "foo[3].notbar", - "result": "four" - }, - { - "expression": "foo[3].bar", - "result": null - }, - { - "expression": "foo[0]", - "result": {"bar": "one"} - }, - { - "expression": "foo[1]", - "result": {"bar": "two"} - }, - { - "expression": "foo[2]", - "result": {"bar": "three"} - }, - { - "expression": "foo[3]", - "result": {"notbar": "four"} - }, - { - "expression": "foo[4]", - "result": null - } - ] -}, -{ - "given": [ - "one", "two", "three" - ], - "cases": [ - { - "expression": "[0]", - "result": "one" - }, - { - "expression": "[1]", - "result": "two" - }, - { - "expression": "[2]", - "result": "three" - }, - { - "expression": "[-1]", - "result": "three" - }, - { - "expression": "[-2]", - "result": "two" - }, - { - "expression": "[-3]", - "result": "one" - } - ] -}, -{ - "given": {"reservations": [ - {"instances": [{"foo": 1}, {"foo": 2}]} - ]}, - "cases": [ - { - "expression": "reservations[].instances[].foo", - "result": [1, 2] - }, - { - "expression": "reservations[].instances[].bar", - "result": [] - }, - { - "expression": "reservations[].notinstances[].foo", - "result": [] - }, - { - "expression": "reservations[].notinstances[].foo", - "result": [] - } - ] -}, -{ - "given": {"reservations": [{ - "instances": [ - {"foo": [{"bar": 1}, {"bar": 2}, {"notbar": 3}, {"bar": 4}]}, - {"foo": [{"bar": 5}, {"bar": 6}, {"notbar": [7]}, {"bar": 8}]}, - {"foo": "bar"}, - {"notfoo": [{"bar": 20}, {"bar": 21}, {"notbar": [7]}, {"bar": 22}]}, - {"bar": [{"baz": [1]}, {"baz": [2]}, {"baz": [3]}, {"baz": [4]}]}, - {"baz": [{"baz": [1, 2]}, {"baz": []}, {"baz": []}, {"baz": [3, 4]}]}, - {"qux": [{"baz": []}, {"baz": [1, 2, 3]}, {"baz": [4]}, {"baz": []}]} - ], - "otherkey": {"foo": [{"bar": 1}, {"bar": 2}, {"notbar": 3}, {"bar": 4}]} - }, { - "instances": [ - {"a": [{"bar": 1}, {"bar": 2}, {"notbar": 3}, {"bar": 4}]}, - {"b": [{"bar": 5}, {"bar": 6}, {"notbar": [7]}, {"bar": 8}]}, - {"c": "bar"}, - {"notfoo": [{"bar": 23}, {"bar": 24}, {"notbar": [7]}, {"bar": 25}]}, - {"qux": [{"baz": []}, {"baz": [1, 2, 3]}, {"baz": [4]}, {"baz": []}]} - ], - "otherkey": {"foo": [{"bar": 1}, {"bar": 2}, {"notbar": 3}, {"bar": 4}]} - } - ]}, - "cases": [ - { - "expression": "reservations[].instances[].foo[].bar", - "result": [1, 2, 4, 5, 6, 8] - }, - { - "expression": "reservations[].instances[].foo[].baz", - "result": [] - }, - { - "expression": "reservations[].instances[].notfoo[].bar", - "result": [20, 21, 22, 23, 24, 25] - }, - { - "expression": "reservations[].instances[].notfoo[].notbar", - "result": [[7], [7]] - }, - { - "expression": "reservations[].notinstances[].foo", - "result": [] - }, - { - "expression": "reservations[].instances[].foo[].notbar", - "result": [3, [7]] - }, - { - "expression": "reservations[].instances[].bar[].baz", - "result": [[1], [2], [3], [4]] - }, - { - "expression": "reservations[].instances[].baz[].baz", - "result": [[1, 2], [], [], [3, 4]] - }, - { - "expression": "reservations[].instances[].qux[].baz", - "result": [[], [1, 2, 3], [4], [], [], [1, 2, 3], [4], []] - }, - { - "expression": "reservations[].instances[].qux[].baz[]", - "result": [1, 2, 3, 4, 1, 2, 3, 4] - } - ] -}, -{ - "given": { - "foo": [ - [["one", "two"], ["three", "four"]], - [["five", "six"], ["seven", "eight"]], - [["nine"], ["ten"]] - ] - }, - "cases": [ - { - "expression": "foo[]", - "result": [["one", "two"], ["three", "four"], ["five", "six"], - ["seven", "eight"], ["nine"], ["ten"]] - }, - { - "expression": "foo[][0]", - "result": ["one", "three", "five", "seven", "nine", "ten"] - }, - { - "expression": "foo[][1]", - "result": ["two", "four", "six", "eight"] - }, - { - "expression": "foo[][0][0]", - "result": [] - }, - { - "expression": "foo[][2][2]", - "result": [] - }, - { - "expression": "foo[][0][0][100]", - "result": [] - } - ] -}, -{ - "given": { - "foo": [{ - "bar": [ - { - "qux": 2, - "baz": 1 - }, - { - "qux": 4, - "baz": 3 - } - ] - }, - { - "bar": [ - { - "qux": 6, - "baz": 5 - }, - { - "qux": 8, - "baz": 7 - } - ] - } - ] - }, - "cases": [ - { - "expression": "foo", - "result": [{"bar": [{"qux": 2, "baz": 1}, {"qux": 4, "baz": 3}]}, - {"bar": [{"qux": 6, "baz": 5}, {"qux": 8, "baz": 7}]}] - }, - { - "expression": "foo[]", - "result": [{"bar": [{"qux": 2, "baz": 1}, {"qux": 4, "baz": 3}]}, - {"bar": [{"qux": 6, "baz": 5}, {"qux": 8, "baz": 7}]}] - }, - { - "expression": "foo[].bar", - "result": [[{"qux": 2, "baz": 1}, {"qux": 4, "baz": 3}], - [{"qux": 6, "baz": 5}, {"qux": 8, "baz": 7}]] - }, - { - "expression": "foo[].bar[]", - "result": [{"qux": 2, "baz": 1}, {"qux": 4, "baz": 3}, - {"qux": 6, "baz": 5}, {"qux": 8, "baz": 7}] - }, - { - "expression": "foo[].bar[].baz", - "result": [1, 3, 5, 7] - } - ] -}, -{ - "given": { - "string": "string", - "hash": {"foo": "bar", "bar": "baz"}, - "number": 23, - "nullvalue": null - }, - "cases": [ - { - "expression": "string[]", - "result": null - }, - { - "expression": "hash[]", - "result": null - }, - { - "expression": "number[]", - "result": null - }, - { - "expression": "nullvalue[]", - "result": null - }, - { - "expression": "string[].foo", - "result": null - }, - { - "expression": "hash[].foo", - "result": null - }, - { - "expression": "number[].foo", - "result": null - }, - { - "expression": "nullvalue[].foo", - "result": null - }, - { - "expression": "nullvalue[].foo[].bar", - "result": null - } - ] -} -] diff --git a/vendor/github.com/jmespath/go-jmespath/compliance/literal.json b/vendor/github.com/jmespath/go-jmespath/compliance/literal.json deleted file mode 100644 index c6706b9..0000000 --- a/vendor/github.com/jmespath/go-jmespath/compliance/literal.json +++ /dev/null @@ -1,185 +0,0 @@ -[ - { - "given": { - "foo": [{"name": "a"}, {"name": "b"}], - "bar": {"baz": "qux"} - }, - "cases": [ - { - "expression": "`\"foo\"`", - "result": "foo" - }, - { - "comment": "Interpret escaped unicode.", - "expression": "`\"\\u03a6\"`", - "result": "Φ" - }, - { - "expression": "`\"✓\"`", - "result": "✓" - }, - { - "expression": "`[1, 2, 3]`", - "result": [1, 2, 3] - }, - { - "expression": "`{\"a\": \"b\"}`", - "result": {"a": "b"} - }, - { - "expression": "`true`", - "result": true - }, - { - "expression": "`false`", - "result": false - }, - { - "expression": "`null`", - "result": null - }, - { - "expression": "`0`", - "result": 0 - }, - { - "expression": "`1`", - "result": 1 - }, - { - "expression": "`2`", - "result": 2 - }, - { - "expression": "`3`", - "result": 3 - }, - { - "expression": "`4`", - "result": 4 - }, - { - "expression": "`5`", - "result": 5 - }, - { - "expression": "`6`", - "result": 6 - }, - { - "expression": "`7`", - "result": 7 - }, - { - "expression": "`8`", - "result": 8 - }, - { - "expression": "`9`", - "result": 9 - }, - { - "comment": "Escaping a backtick in quotes", - "expression": "`\"foo\\`bar\"`", - "result": "foo`bar" - }, - { - "comment": "Double quote in literal", - "expression": "`\"foo\\\"bar\"`", - "result": "foo\"bar" - }, - { - "expression": "`\"1\\`\"`", - "result": "1`" - }, - { - "comment": "Multiple literal expressions with escapes", - "expression": "`\"\\\\\"`.{a:`\"b\"`}", - "result": {"a": "b"} - }, - { - "comment": "literal . identifier", - "expression": "`{\"a\": \"b\"}`.a", - "result": "b" - }, - { - "comment": "literal . identifier . identifier", - "expression": "`{\"a\": {\"b\": \"c\"}}`.a.b", - "result": "c" - }, - { - "comment": "literal . identifier bracket-expr", - "expression": "`[0, 1, 2]`[1]", - "result": 1 - } - ] - }, - { - "comment": "Literals", - "given": {"type": "object"}, - "cases": [ - { - "comment": "Literal with leading whitespace", - "expression": "` {\"foo\": true}`", - "result": {"foo": true} - }, - { - "comment": "Literal with trailing whitespace", - "expression": "`{\"foo\": true} `", - "result": {"foo": true} - }, - { - "comment": "Literal on RHS of subexpr not allowed", - "expression": "foo.`\"bar\"`", - "error": "syntax" - } - ] - }, - { - "comment": "Raw String Literals", - "given": {}, - "cases": [ - { - "expression": "'foo'", - "result": "foo" - }, - { - "expression": "' foo '", - "result": " foo " - }, - { - "expression": "'0'", - "result": "0" - }, - { - "expression": "'newline\n'", - "result": "newline\n" - }, - { - "expression": "'\n'", - "result": "\n" - }, - { - "expression": "'✓'", - "result": "✓" - }, - { - "expression": "'𝄞'", - "result": "𝄞" - }, - { - "expression": "' [foo] '", - "result": " [foo] " - }, - { - "expression": "'[foo]'", - "result": "[foo]" - }, - { - "comment": "Do not interpret escaped unicode.", - "expression": "'\\u03a6'", - "result": "\\u03a6" - } - ] - } -] diff --git a/vendor/github.com/jmespath/go-jmespath/compliance/multiselect.json b/vendor/github.com/jmespath/go-jmespath/compliance/multiselect.json deleted file mode 100644 index 8f2a481..0000000 --- a/vendor/github.com/jmespath/go-jmespath/compliance/multiselect.json +++ /dev/null @@ -1,393 +0,0 @@ -[{ - "given": { - "foo": { - "bar": "bar", - "baz": "baz", - "qux": "qux", - "nested": { - "one": { - "a": "first", - "b": "second", - "c": "third" - }, - "two": { - "a": "first", - "b": "second", - "c": "third" - }, - "three": { - "a": "first", - "b": "second", - "c": {"inner": "third"} - } - } - }, - "bar": 1, - "baz": 2, - "qux\"": 3 - }, - "cases": [ - { - "expression": "foo.{bar: bar}", - "result": {"bar": "bar"} - }, - { - "expression": "foo.{\"bar\": bar}", - "result": {"bar": "bar"} - }, - { - "expression": "foo.{\"foo.bar\": bar}", - "result": {"foo.bar": "bar"} - }, - { - "expression": "foo.{bar: bar, baz: baz}", - "result": {"bar": "bar", "baz": "baz"} - }, - { - "expression": "foo.{\"bar\": bar, \"baz\": baz}", - "result": {"bar": "bar", "baz": "baz"} - }, - { - "expression": "{\"baz\": baz, \"qux\\\"\": \"qux\\\"\"}", - "result": {"baz": 2, "qux\"": 3} - }, - { - "expression": "foo.{bar:bar,baz:baz}", - "result": {"bar": "bar", "baz": "baz"} - }, - { - "expression": "foo.{bar: bar,qux: qux}", - "result": {"bar": "bar", "qux": "qux"} - }, - { - "expression": "foo.{bar: bar, noexist: noexist}", - "result": {"bar": "bar", "noexist": null} - }, - { - "expression": "foo.{noexist: noexist, alsonoexist: alsonoexist}", - "result": {"noexist": null, "alsonoexist": null} - }, - { - "expression": "foo.badkey.{nokey: nokey, alsonokey: alsonokey}", - "result": null - }, - { - "expression": "foo.nested.*.{a: a,b: b}", - "result": [{"a": "first", "b": "second"}, - {"a": "first", "b": "second"}, - {"a": "first", "b": "second"}] - }, - { - "expression": "foo.nested.three.{a: a, cinner: c.inner}", - "result": {"a": "first", "cinner": "third"} - }, - { - "expression": "foo.nested.three.{a: a, c: c.inner.bad.key}", - "result": {"a": "first", "c": null} - }, - { - "expression": "foo.{a: nested.one.a, b: nested.two.b}", - "result": {"a": "first", "b": "second"} - }, - { - "expression": "{bar: bar, baz: baz}", - "result": {"bar": 1, "baz": 2} - }, - { - "expression": "{bar: bar}", - "result": {"bar": 1} - }, - { - "expression": "{otherkey: bar}", - "result": {"otherkey": 1} - }, - { - "expression": "{no: no, exist: exist}", - "result": {"no": null, "exist": null} - }, - { - "expression": "foo.[bar]", - "result": ["bar"] - }, - { - "expression": "foo.[bar,baz]", - "result": ["bar", "baz"] - }, - { - "expression": "foo.[bar,qux]", - "result": ["bar", "qux"] - }, - { - "expression": "foo.[bar,noexist]", - "result": ["bar", null] - }, - { - "expression": "foo.[noexist,alsonoexist]", - "result": [null, null] - } - ] -}, { - "given": { - "foo": {"bar": 1, "baz": [2, 3, 4]} - }, - "cases": [ - { - "expression": "foo.{bar:bar,baz:baz}", - "result": {"bar": 1, "baz": [2, 3, 4]} - }, - { - "expression": "foo.[bar,baz[0]]", - "result": [1, 2] - }, - { - "expression": "foo.[bar,baz[1]]", - "result": [1, 3] - }, - { - "expression": "foo.[bar,baz[2]]", - "result": [1, 4] - }, - { - "expression": "foo.[bar,baz[3]]", - "result": [1, null] - }, - { - "expression": "foo.[bar[0],baz[3]]", - "result": [null, null] - } - ] -}, { - "given": { - "foo": {"bar": 1, "baz": 2} - }, - "cases": [ - { - "expression": "foo.{bar: bar, baz: baz}", - "result": {"bar": 1, "baz": 2} - }, - { - "expression": "foo.[bar,baz]", - "result": [1, 2] - } - ] -}, { - "given": { - "foo": { - "bar": {"baz": [{"common": "first", "one": 1}, - {"common": "second", "two": 2}]}, - "ignoreme": 1, - "includeme": true - } - }, - "cases": [ - { - "expression": "foo.{bar: bar.baz[1],includeme: includeme}", - "result": {"bar": {"common": "second", "two": 2}, "includeme": true} - }, - { - "expression": "foo.{\"bar.baz.two\": bar.baz[1].two, includeme: includeme}", - "result": {"bar.baz.two": 2, "includeme": true} - }, - { - "expression": "foo.[includeme, bar.baz[*].common]", - "result": [true, ["first", "second"]] - }, - { - "expression": "foo.[includeme, bar.baz[*].none]", - "result": [true, []] - }, - { - "expression": "foo.[includeme, bar.baz[].common]", - "result": [true, ["first", "second"]] - } - ] -}, { - "given": { - "reservations": [{ - "instances": [ - {"id": "id1", - "name": "first"}, - {"id": "id2", - "name": "second"} - ]}, { - "instances": [ - {"id": "id3", - "name": "third"}, - {"id": "id4", - "name": "fourth"} - ]} - ]}, - "cases": [ - { - "expression": "reservations[*].instances[*].{id: id, name: name}", - "result": [[{"id": "id1", "name": "first"}, {"id": "id2", "name": "second"}], - [{"id": "id3", "name": "third"}, {"id": "id4", "name": "fourth"}]] - }, - { - "expression": "reservations[].instances[].{id: id, name: name}", - "result": [{"id": "id1", "name": "first"}, - {"id": "id2", "name": "second"}, - {"id": "id3", "name": "third"}, - {"id": "id4", "name": "fourth"}] - }, - { - "expression": "reservations[].instances[].[id, name]", - "result": [["id1", "first"], - ["id2", "second"], - ["id3", "third"], - ["id4", "fourth"]] - } - ] -}, -{ - "given": { - "foo": [{ - "bar": [ - { - "qux": 2, - "baz": 1 - }, - { - "qux": 4, - "baz": 3 - } - ] - }, - { - "bar": [ - { - "qux": 6, - "baz": 5 - }, - { - "qux": 8, - "baz": 7 - } - ] - } - ] - }, - "cases": [ - { - "expression": "foo", - "result": [{"bar": [{"qux": 2, "baz": 1}, {"qux": 4, "baz": 3}]}, - {"bar": [{"qux": 6, "baz": 5}, {"qux": 8, "baz": 7}]}] - }, - { - "expression": "foo[]", - "result": [{"bar": [{"qux": 2, "baz": 1}, {"qux": 4, "baz": 3}]}, - {"bar": [{"qux": 6, "baz": 5}, {"qux": 8, "baz": 7}]}] - }, - { - "expression": "foo[].bar", - "result": [[{"qux": 2, "baz": 1}, {"qux": 4, "baz": 3}], - [{"qux": 6, "baz": 5}, {"qux": 8, "baz": 7}]] - }, - { - "expression": "foo[].bar[]", - "result": [{"qux": 2, "baz": 1}, {"qux": 4, "baz": 3}, - {"qux": 6, "baz": 5}, {"qux": 8, "baz": 7}] - }, - { - "expression": "foo[].bar[].[baz, qux]", - "result": [[1, 2], [3, 4], [5, 6], [7, 8]] - }, - { - "expression": "foo[].bar[].[baz]", - "result": [[1], [3], [5], [7]] - }, - { - "expression": "foo[].bar[].[baz, qux][]", - "result": [1, 2, 3, 4, 5, 6, 7, 8] - } - ] -}, -{ - "given": { - "foo": { - "baz": [ - { - "bar": "abc" - }, { - "bar": "def" - } - ], - "qux": ["zero"] - } - }, - "cases": [ - { - "expression": "foo.[baz[*].bar, qux[0]]", - "result": [["abc", "def"], "zero"] - } - ] -}, -{ - "given": { - "foo": { - "baz": [ - { - "bar": "a", - "bam": "b", - "boo": "c" - }, { - "bar": "d", - "bam": "e", - "boo": "f" - } - ], - "qux": ["zero"] - } - }, - "cases": [ - { - "expression": "foo.[baz[*].[bar, boo], qux[0]]", - "result": [[["a", "c" ], ["d", "f" ]], "zero"] - } - ] -}, -{ - "given": { - "foo": { - "baz": [ - { - "bar": "a", - "bam": "b", - "boo": "c" - }, { - "bar": "d", - "bam": "e", - "boo": "f" - } - ], - "qux": ["zero"] - } - }, - "cases": [ - { - "expression": "foo.[baz[*].not_there || baz[*].bar, qux[0]]", - "result": [["a", "d"], "zero"] - } - ] -}, -{ - "given": {"type": "object"}, - "cases": [ - { - "comment": "Nested multiselect", - "expression": "[[*],*]", - "result": [null, ["object"]] - } - ] -}, -{ - "given": [], - "cases": [ - { - "comment": "Nested multiselect", - "expression": "[[*]]", - "result": [[]] - } - ] -} -] diff --git a/vendor/github.com/jmespath/go-jmespath/compliance/ormatch.json b/vendor/github.com/jmespath/go-jmespath/compliance/ormatch.json deleted file mode 100644 index 2127cf4..0000000 --- a/vendor/github.com/jmespath/go-jmespath/compliance/ormatch.json +++ /dev/null @@ -1,59 +0,0 @@ -[{ - "given": - {"outer": {"foo": "foo", "bar": "bar", "baz": "baz"}}, - "cases": [ - { - "expression": "outer.foo || outer.bar", - "result": "foo" - }, - { - "expression": "outer.foo||outer.bar", - "result": "foo" - }, - { - "expression": "outer.bar || outer.baz", - "result": "bar" - }, - { - "expression": "outer.bar||outer.baz", - "result": "bar" - }, - { - "expression": "outer.bad || outer.foo", - "result": "foo" - }, - { - "expression": "outer.bad||outer.foo", - "result": "foo" - }, - { - "expression": "outer.foo || outer.bad", - "result": "foo" - }, - { - "expression": "outer.foo||outer.bad", - "result": "foo" - }, - { - "expression": "outer.bad || outer.alsobad", - "result": null - }, - { - "expression": "outer.bad||outer.alsobad", - "result": null - } - ] -}, { - "given": - {"outer": {"foo": "foo", "bool": false, "empty_list": [], "empty_string": ""}}, - "cases": [ - { - "expression": "outer.empty_string || outer.foo", - "result": "foo" - }, - { - "expression": "outer.nokey || outer.bool || outer.empty_list || outer.empty_string || outer.foo", - "result": "foo" - } - ] -}] diff --git a/vendor/github.com/jmespath/go-jmespath/compliance/pipe.json b/vendor/github.com/jmespath/go-jmespath/compliance/pipe.json deleted file mode 100644 index b10c0a4..0000000 --- a/vendor/github.com/jmespath/go-jmespath/compliance/pipe.json +++ /dev/null @@ -1,131 +0,0 @@ -[{ - "given": { - "foo": { - "bar": { - "baz": "subkey" - }, - "other": { - "baz": "subkey" - }, - "other2": { - "baz": "subkey" - }, - "other3": { - "notbaz": ["a", "b", "c"] - }, - "other4": { - "notbaz": ["a", "b", "c"] - } - } - }, - "cases": [ - { - "expression": "foo.*.baz | [0]", - "result": "subkey" - }, - { - "expression": "foo.*.baz | [1]", - "result": "subkey" - }, - { - "expression": "foo.*.baz | [2]", - "result": "subkey" - }, - { - "expression": "foo.bar.* | [0]", - "result": "subkey" - }, - { - "expression": "foo.*.notbaz | [*]", - "result": [["a", "b", "c"], ["a", "b", "c"]] - }, - { - "expression": "{\"a\": foo.bar, \"b\": foo.other} | *.baz", - "result": ["subkey", "subkey"] - } - ] -}, { - "given": { - "foo": { - "bar": { - "baz": "one" - }, - "other": { - "baz": "two" - }, - "other2": { - "baz": "three" - }, - "other3": { - "notbaz": ["a", "b", "c"] - }, - "other4": { - "notbaz": ["d", "e", "f"] - } - } - }, - "cases": [ - { - "expression": "foo | bar", - "result": {"baz": "one"} - }, - { - "expression": "foo | bar | baz", - "result": "one" - }, - { - "expression": "foo|bar| baz", - "result": "one" - }, - { - "expression": "not_there | [0]", - "result": null - }, - { - "expression": "not_there | [0]", - "result": null - }, - { - "expression": "[foo.bar, foo.other] | [0]", - "result": {"baz": "one"} - }, - { - "expression": "{\"a\": foo.bar, \"b\": foo.other} | a", - "result": {"baz": "one"} - }, - { - "expression": "{\"a\": foo.bar, \"b\": foo.other} | b", - "result": {"baz": "two"} - }, - { - "expression": "foo.bam || foo.bar | baz", - "result": "one" - }, - { - "expression": "foo | not_there || bar", - "result": {"baz": "one"} - } - ] -}, { - "given": { - "foo": [{ - "bar": [{ - "baz": "one" - }, { - "baz": "two" - }] - }, { - "bar": [{ - "baz": "three" - }, { - "baz": "four" - }] - }] - }, - "cases": [ - { - "expression": "foo[*].bar[*] | [0][0]", - "result": {"baz": "one"} - } - ] -}] diff --git a/vendor/github.com/jmespath/go-jmespath/compliance/slice.json b/vendor/github.com/jmespath/go-jmespath/compliance/slice.json deleted file mode 100644 index 3594772..0000000 --- a/vendor/github.com/jmespath/go-jmespath/compliance/slice.json +++ /dev/null @@ -1,187 +0,0 @@ -[{ - "given": { - "foo": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], - "bar": { - "baz": 1 - } - }, - "cases": [ - { - "expression": "bar[0:10]", - "result": null - }, - { - "expression": "foo[0:10:1]", - "result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] - }, - { - "expression": "foo[0:10]", - "result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] - }, - { - "expression": "foo[0:10:]", - "result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] - }, - { - "expression": "foo[0::1]", - "result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] - }, - { - "expression": "foo[0::]", - "result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] - }, - { - "expression": "foo[0:]", - "result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] - }, - { - "expression": "foo[:10:1]", - "result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] - }, - { - "expression": "foo[::1]", - "result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] - }, - { - "expression": "foo[:10:]", - "result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] - }, - { - "expression": "foo[::]", - "result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] - }, - { - "expression": "foo[:]", - "result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] - }, - { - "expression": "foo[1:9]", - "result": [1, 2, 3, 4, 5, 6, 7, 8] - }, - { - "expression": "foo[0:10:2]", - "result": [0, 2, 4, 6, 8] - }, - { - "expression": "foo[5:]", - "result": [5, 6, 7, 8, 9] - }, - { - "expression": "foo[5::2]", - "result": [5, 7, 9] - }, - { - "expression": "foo[::2]", - "result": [0, 2, 4, 6, 8] - }, - { - "expression": "foo[::-1]", - "result": [9, 8, 7, 6, 5, 4, 3, 2, 1, 0] - }, - { - "expression": "foo[1::2]", - "result": [1, 3, 5, 7, 9] - }, - { - "expression": "foo[10:0:-1]", - "result": [9, 8, 7, 6, 5, 4, 3, 2, 1] - }, - { - "expression": "foo[10:5:-1]", - "result": [9, 8, 7, 6] - }, - { - "expression": "foo[8:2:-2]", - "result": [8, 6, 4] - }, - { - "expression": "foo[0:20]", - "result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] - }, - { - "expression": "foo[10:-20:-1]", - "result": [9, 8, 7, 6, 5, 4, 3, 2, 1, 0] - }, - { - "expression": "foo[10:-20]", - "result": [] - }, - { - "expression": "foo[-4:-1]", - "result": [6, 7, 8] - }, - { - "expression": "foo[:-5:-1]", - "result": [9, 8, 7, 6] - }, - { - "expression": "foo[8:2:0]", - "error": "invalid-value" - }, - { - "expression": "foo[8:2:0:1]", - "error": "syntax" - }, - { - "expression": "foo[8:2&]", - "error": "syntax" - }, - { - "expression": "foo[2:a:3]", - "error": "syntax" - } - ] -}, { - "given": { - "foo": [{"a": 1}, {"a": 2}, {"a": 3}], - "bar": [{"a": {"b": 1}}, {"a": {"b": 2}}, - {"a": {"b": 3}}], - "baz": 50 - }, - "cases": [ - { - "expression": "foo[:2].a", - "result": [1, 2] - }, - { - "expression": "foo[:2].b", - "result": [] - }, - { - "expression": "foo[:2].a.b", - "result": [] - }, - { - "expression": "bar[::-1].a.b", - "result": [3, 2, 1] - }, - { - "expression": "bar[:2].a.b", - "result": [1, 2] - }, - { - "expression": "baz[:2].a", - "result": null - } - ] -}, { - "given": [{"a": 1}, {"a": 2}, {"a": 3}], - "cases": [ - { - "expression": "[:]", - "result": [{"a": 1}, {"a": 2}, {"a": 3}] - }, - { - "expression": "[:2].a", - "result": [1, 2] - }, - { - "expression": "[::-1].a", - "result": [3, 2, 1] - }, - { - "expression": "[:2].b", - "result": [] - } - ] -}] diff --git a/vendor/github.com/jmespath/go-jmespath/compliance/syntax.json b/vendor/github.com/jmespath/go-jmespath/compliance/syntax.json deleted file mode 100644 index 003c294..0000000 --- a/vendor/github.com/jmespath/go-jmespath/compliance/syntax.json +++ /dev/null @@ -1,616 +0,0 @@ -[{ - "comment": "Dot syntax", - "given": {"type": "object"}, - "cases": [ - { - "expression": "foo.bar", - "result": null - }, - { - "expression": "foo.1", - "error": "syntax" - }, - { - "expression": "foo.-11", - "error": "syntax" - }, - { - "expression": "foo", - "result": null - }, - { - "expression": "foo.", - "error": "syntax" - }, - { - "expression": "foo.", - "error": "syntax" - }, - { - "expression": ".foo", - "error": "syntax" - }, - { - "expression": "foo..bar", - "error": "syntax" - }, - { - "expression": "foo.bar.", - "error": "syntax" - }, - { - "expression": "foo[.]", - "error": "syntax" - } - ] -}, - { - "comment": "Simple token errors", - "given": {"type": "object"}, - "cases": [ - { - "expression": ".", - "error": "syntax" - }, - { - "expression": ":", - "error": "syntax" - }, - { - "expression": ",", - "error": "syntax" - }, - { - "expression": "]", - "error": "syntax" - }, - { - "expression": "[", - "error": "syntax" - }, - { - "expression": "}", - "error": "syntax" - }, - { - "expression": "{", - "error": "syntax" - }, - { - "expression": ")", - "error": "syntax" - }, - { - "expression": "(", - "error": "syntax" - }, - { - "expression": "((&", - "error": "syntax" - }, - { - "expression": "a[", - "error": "syntax" - }, - { - "expression": "a]", - "error": "syntax" - }, - { - "expression": "a][", - "error": "syntax" - }, - { - "expression": "!", - "error": "syntax" - } - ] - }, - { - "comment": "Boolean syntax errors", - "given": {"type": "object"}, - "cases": [ - { - "expression": "![!(!", - "error": "syntax" - } - ] - }, - { - "comment": "Wildcard syntax", - "given": {"type": "object"}, - "cases": [ - { - "expression": "*", - "result": ["object"] - }, - { - "expression": "*.*", - "result": [] - }, - { - "expression": "*.foo", - "result": [] - }, - { - "expression": "*[0]", - "result": [] - }, - { - "expression": ".*", - "error": "syntax" - }, - { - "expression": "*foo", - "error": "syntax" - }, - { - "expression": "*0", - "error": "syntax" - }, - { - "expression": "foo[*]bar", - "error": "syntax" - }, - { - "expression": "foo[*]*", - "error": "syntax" - } - ] - }, - { - "comment": "Flatten syntax", - "given": {"type": "object"}, - "cases": [ - { - "expression": "[]", - "result": null - } - ] - }, - { - "comment": "Simple bracket syntax", - "given": {"type": "object"}, - "cases": [ - { - "expression": "[0]", - "result": null - }, - { - "expression": "[*]", - "result": null - }, - { - "expression": "*.[0]", - "error": "syntax" - }, - { - "expression": "*.[\"0\"]", - "result": [[null]] - }, - { - "expression": "[*].bar", - "result": null - }, - { - "expression": "[*][0]", - "result": null - }, - { - "expression": "foo[#]", - "error": "syntax" - } - ] - }, - { - "comment": "Multi-select list syntax", - "given": {"type": "object"}, - "cases": [ - { - "expression": "foo[0]", - "result": null - }, - { - "comment": "Valid multi-select of a list", - "expression": "foo[0, 1]", - "error": "syntax" - }, - { - "expression": "foo.[0]", - "error": "syntax" - }, - { - "expression": "foo.[*]", - "result": null - }, - { - "comment": "Multi-select of a list with trailing comma", - "expression": "foo[0, ]", - "error": "syntax" - }, - { - "comment": "Multi-select of a list with trailing comma and no close", - "expression": "foo[0,", - "error": "syntax" - }, - { - "comment": "Multi-select of a list with trailing comma and no close", - "expression": "foo.[a", - "error": "syntax" - }, - { - "comment": "Multi-select of a list with extra comma", - "expression": "foo[0,, 1]", - "error": "syntax" - }, - { - "comment": "Multi-select of a list using an identifier index", - "expression": "foo[abc]", - "error": "syntax" - }, - { - "comment": "Multi-select of a list using identifier indices", - "expression": "foo[abc, def]", - "error": "syntax" - }, - { - "comment": "Multi-select of a list using an identifier index", - "expression": "foo[abc, 1]", - "error": "syntax" - }, - { - "comment": "Multi-select of a list using an identifier index with trailing comma", - "expression": "foo[abc, ]", - "error": "syntax" - }, - { - "comment": "Valid multi-select of a hash using an identifier index", - "expression": "foo.[abc]", - "result": null - }, - { - "comment": "Valid multi-select of a hash", - "expression": "foo.[abc, def]", - "result": null - }, - { - "comment": "Multi-select of a hash using a numeric index", - "expression": "foo.[abc, 1]", - "error": "syntax" - }, - { - "comment": "Multi-select of a hash with a trailing comma", - "expression": "foo.[abc, ]", - "error": "syntax" - }, - { - "comment": "Multi-select of a hash with extra commas", - "expression": "foo.[abc,, def]", - "error": "syntax" - }, - { - "comment": "Multi-select of a hash using number indices", - "expression": "foo.[0, 1]", - "error": "syntax" - } - ] - }, - { - "comment": "Multi-select hash syntax", - "given": {"type": "object"}, - "cases": [ - { - "comment": "No key or value", - "expression": "a{}", - "error": "syntax" - }, - { - "comment": "No closing token", - "expression": "a{", - "error": "syntax" - }, - { - "comment": "Not a key value pair", - "expression": "a{foo}", - "error": "syntax" - }, - { - "comment": "Missing value and closing character", - "expression": "a{foo:", - "error": "syntax" - }, - { - "comment": "Missing closing character", - "expression": "a{foo: 0", - "error": "syntax" - }, - { - "comment": "Missing value", - "expression": "a{foo:}", - "error": "syntax" - }, - { - "comment": "Trailing comma and no closing character", - "expression": "a{foo: 0, ", - "error": "syntax" - }, - { - "comment": "Missing value with trailing comma", - "expression": "a{foo: ,}", - "error": "syntax" - }, - { - "comment": "Accessing Array using an identifier", - "expression": "a{foo: bar}", - "error": "syntax" - }, - { - "expression": "a{foo: 0}", - "error": "syntax" - }, - { - "comment": "Missing key-value pair", - "expression": "a.{}", - "error": "syntax" - }, - { - "comment": "Not a key-value pair", - "expression": "a.{foo}", - "error": "syntax" - }, - { - "comment": "Missing value", - "expression": "a.{foo:}", - "error": "syntax" - }, - { - "comment": "Missing value with trailing comma", - "expression": "a.{foo: ,}", - "error": "syntax" - }, - { - "comment": "Valid multi-select hash extraction", - "expression": "a.{foo: bar}", - "result": null - }, - { - "comment": "Valid multi-select hash extraction", - "expression": "a.{foo: bar, baz: bam}", - "result": null - }, - { - "comment": "Trailing comma", - "expression": "a.{foo: bar, }", - "error": "syntax" - }, - { - "comment": "Missing key in second key-value pair", - "expression": "a.{foo: bar, baz}", - "error": "syntax" - }, - { - "comment": "Missing value in second key-value pair", - "expression": "a.{foo: bar, baz:}", - "error": "syntax" - }, - { - "comment": "Trailing comma", - "expression": "a.{foo: bar, baz: bam, }", - "error": "syntax" - }, - { - "comment": "Nested multi select", - "expression": "{\"\\\\\":{\" \":*}}", - "result": {"\\": {" ": ["object"]}} - } - ] - }, - { - "comment": "Or expressions", - "given": {"type": "object"}, - "cases": [ - { - "expression": "foo || bar", - "result": null - }, - { - "expression": "foo ||", - "error": "syntax" - }, - { - "expression": "foo.|| bar", - "error": "syntax" - }, - { - "expression": " || foo", - "error": "syntax" - }, - { - "expression": "foo || || foo", - "error": "syntax" - }, - { - "expression": "foo.[a || b]", - "result": null - }, - { - "expression": "foo.[a ||]", - "error": "syntax" - }, - { - "expression": "\"foo", - "error": "syntax" - } - ] - }, - { - "comment": "Filter expressions", - "given": {"type": "object"}, - "cases": [ - { - "expression": "foo[?bar==`\"baz\"`]", - "result": null - }, - { - "expression": "foo[? bar == `\"baz\"` ]", - "result": null - }, - { - "expression": "foo[ ?bar==`\"baz\"`]", - "error": "syntax" - }, - { - "expression": "foo[?bar==]", - "error": "syntax" - }, - { - "expression": "foo[?==]", - "error": "syntax" - }, - { - "expression": "foo[?==bar]", - "error": "syntax" - }, - { - "expression": "foo[?bar==baz?]", - "error": "syntax" - }, - { - "expression": "foo[?a.b.c==d.e.f]", - "result": null - }, - { - "expression": "foo[?bar==`[0, 1, 2]`]", - "result": null - }, - { - "expression": "foo[?bar==`[\"a\", \"b\", \"c\"]`]", - "result": null - }, - { - "comment": "Literal char not escaped", - "expression": "foo[?bar==`[\"foo`bar\"]`]", - "error": "syntax" - }, - { - "comment": "Literal char escaped", - "expression": "foo[?bar==`[\"foo\\`bar\"]`]", - "result": null - }, - { - "comment": "Unknown comparator", - "expression": "foo[?bar<>baz]", - "error": "syntax" - }, - { - "comment": "Unknown comparator", - "expression": "foo[?bar^baz]", - "error": "syntax" - }, - { - "expression": "foo[bar==baz]", - "error": "syntax" - }, - { - "comment": "Quoted identifier in filter expression no spaces", - "expression": "[?\"\\\\\">`\"foo\"`]", - "result": null - }, - { - "comment": "Quoted identifier in filter expression with spaces", - "expression": "[?\"\\\\\" > `\"foo\"`]", - "result": null - } - ] - }, - { - "comment": "Filter expression errors", - "given": {"type": "object"}, - "cases": [ - { - "expression": "bar.`\"anything\"`", - "error": "syntax" - }, - { - "expression": "bar.baz.noexists.`\"literal\"`", - "error": "syntax" - }, - { - "comment": "Literal wildcard projection", - "expression": "foo[*].`\"literal\"`", - "error": "syntax" - }, - { - "expression": "foo[*].name.`\"literal\"`", - "error": "syntax" - }, - { - "expression": "foo[].name.`\"literal\"`", - "error": "syntax" - }, - { - "expression": "foo[].name.`\"literal\"`.`\"subliteral\"`", - "error": "syntax" - }, - { - "comment": "Projecting a literal onto an empty list", - "expression": "foo[*].name.noexist.`\"literal\"`", - "error": "syntax" - }, - { - "expression": "foo[].name.noexist.`\"literal\"`", - "error": "syntax" - }, - { - "expression": "twolen[*].`\"foo\"`", - "error": "syntax" - }, - { - "comment": "Two level projection of a literal", - "expression": "twolen[*].threelen[*].`\"bar\"`", - "error": "syntax" - }, - { - "comment": "Two level flattened projection of a literal", - "expression": "twolen[].threelen[].`\"bar\"`", - "error": "syntax" - } - ] - }, - { - "comment": "Identifiers", - "given": {"type": "object"}, - "cases": [ - { - "expression": "foo", - "result": null - }, - { - "expression": "\"foo\"", - "result": null - }, - { - "expression": "\"\\\\\"", - "result": null - } - ] - }, - { - "comment": "Combined syntax", - "given": [], - "cases": [ - { - "expression": "*||*|*|*", - "result": null - }, - { - "expression": "*[]||[*]", - "result": [] - }, - { - "expression": "[*.*]", - "result": [null] - } - ] - } -] diff --git a/vendor/github.com/jmespath/go-jmespath/compliance/unicode.json b/vendor/github.com/jmespath/go-jmespath/compliance/unicode.json deleted file mode 100644 index 6b07b0b..0000000 --- a/vendor/github.com/jmespath/go-jmespath/compliance/unicode.json +++ /dev/null @@ -1,38 +0,0 @@ -[ - { - "given": {"foo": [{"✓": "✓"}, {"✓": "✗"}]}, - "cases": [ - { - "expression": "foo[].\"✓\"", - "result": ["✓", "✗"] - } - ] - }, - { - "given": {"☯": true}, - "cases": [ - { - "expression": "\"☯\"", - "result": true - } - ] - }, - { - "given": {"♪♫•*¨*•.¸¸❤¸¸.•*¨*•♫♪": true}, - "cases": [ - { - "expression": "\"♪♫•*¨*•.¸¸❤¸¸.•*¨*•♫♪\"", - "result": true - } - ] - }, - { - "given": {"☃": true}, - "cases": [ - { - "expression": "\"☃\"", - "result": true - } - ] - } -] diff --git a/vendor/github.com/jmespath/go-jmespath/compliance/wildcard.json b/vendor/github.com/jmespath/go-jmespath/compliance/wildcard.json deleted file mode 100644 index 3bcec30..0000000 --- a/vendor/github.com/jmespath/go-jmespath/compliance/wildcard.json +++ /dev/null @@ -1,460 +0,0 @@ -[{ - "given": { - "foo": { - "bar": { - "baz": "val" - }, - "other": { - "baz": "val" - }, - "other2": { - "baz": "val" - }, - "other3": { - "notbaz": ["a", "b", "c"] - }, - "other4": { - "notbaz": ["a", "b", "c"] - }, - "other5": { - "other": { - "a": 1, - "b": 1, - "c": 1 - } - } - } - }, - "cases": [ - { - "expression": "foo.*.baz", - "result": ["val", "val", "val"] - }, - { - "expression": "foo.bar.*", - "result": ["val"] - }, - { - "expression": "foo.*.notbaz", - "result": [["a", "b", "c"], ["a", "b", "c"]] - }, - { - "expression": "foo.*.notbaz[0]", - "result": ["a", "a"] - }, - { - "expression": "foo.*.notbaz[-1]", - "result": ["c", "c"] - } - ] -}, { - "given": { - "foo": { - "first-1": { - "second-1": "val" - }, - "first-2": { - "second-1": "val" - }, - "first-3": { - "second-1": "val" - } - } - }, - "cases": [ - { - "expression": "foo.*", - "result": [{"second-1": "val"}, {"second-1": "val"}, - {"second-1": "val"}] - }, - { - "expression": "foo.*.*", - "result": [["val"], ["val"], ["val"]] - }, - { - "expression": "foo.*.*.*", - "result": [[], [], []] - }, - { - "expression": "foo.*.*.*.*", - "result": [[], [], []] - } - ] -}, { - "given": { - "foo": { - "bar": "one" - }, - "other": { - "bar": "one" - }, - "nomatch": { - "notbar": "three" - } - }, - "cases": [ - { - "expression": "*.bar", - "result": ["one", "one"] - } - ] -}, { - "given": { - "top1": { - "sub1": {"foo": "one"} - }, - "top2": { - "sub1": {"foo": "one"} - } - }, - "cases": [ - { - "expression": "*", - "result": [{"sub1": {"foo": "one"}}, - {"sub1": {"foo": "one"}}] - }, - { - "expression": "*.sub1", - "result": [{"foo": "one"}, - {"foo": "one"}] - }, - { - "expression": "*.*", - "result": [[{"foo": "one"}], - [{"foo": "one"}]] - }, - { - "expression": "*.*.foo[]", - "result": ["one", "one"] - }, - { - "expression": "*.sub1.foo", - "result": ["one", "one"] - } - ] -}, -{ - "given": - {"foo": [{"bar": "one"}, {"bar": "two"}, {"bar": "three"}, {"notbar": "four"}]}, - "cases": [ - { - "expression": "foo[*].bar", - "result": ["one", "two", "three"] - }, - { - "expression": "foo[*].notbar", - "result": ["four"] - } - ] -}, -{ - "given": - [{"bar": "one"}, {"bar": "two"}, {"bar": "three"}, {"notbar": "four"}], - "cases": [ - { - "expression": "[*]", - "result": [{"bar": "one"}, {"bar": "two"}, {"bar": "three"}, {"notbar": "four"}] - }, - { - "expression": "[*].bar", - "result": ["one", "two", "three"] - }, - { - "expression": "[*].notbar", - "result": ["four"] - } - ] -}, -{ - "given": { - "foo": { - "bar": [ - {"baz": ["one", "two", "three"]}, - {"baz": ["four", "five", "six"]}, - {"baz": ["seven", "eight", "nine"]} - ] - } - }, - "cases": [ - { - "expression": "foo.bar[*].baz", - "result": [["one", "two", "three"], ["four", "five", "six"], ["seven", "eight", "nine"]] - }, - { - "expression": "foo.bar[*].baz[0]", - "result": ["one", "four", "seven"] - }, - { - "expression": "foo.bar[*].baz[1]", - "result": ["two", "five", "eight"] - }, - { - "expression": "foo.bar[*].baz[2]", - "result": ["three", "six", "nine"] - }, - { - "expression": "foo.bar[*].baz[3]", - "result": [] - } - ] -}, -{ - "given": { - "foo": { - "bar": [["one", "two"], ["three", "four"]] - } - }, - "cases": [ - { - "expression": "foo.bar[*]", - "result": [["one", "two"], ["three", "four"]] - }, - { - "expression": "foo.bar[0]", - "result": ["one", "two"] - }, - { - "expression": "foo.bar[0][0]", - "result": "one" - }, - { - "expression": "foo.bar[0][0][0]", - "result": null - }, - { - "expression": "foo.bar[0][0][0][0]", - "result": null - }, - { - "expression": "foo[0][0]", - "result": null - } - ] -}, -{ - "given": { - "foo": [ - {"bar": [{"kind": "basic"}, {"kind": "intermediate"}]}, - {"bar": [{"kind": "advanced"}, {"kind": "expert"}]}, - {"bar": "string"} - ] - - }, - "cases": [ - { - "expression": "foo[*].bar[*].kind", - "result": [["basic", "intermediate"], ["advanced", "expert"]] - }, - { - "expression": "foo[*].bar[0].kind", - "result": ["basic", "advanced"] - } - ] -}, -{ - "given": { - "foo": [ - {"bar": {"kind": "basic"}}, - {"bar": {"kind": "intermediate"}}, - {"bar": {"kind": "advanced"}}, - {"bar": {"kind": "expert"}}, - {"bar": "string"} - ] - }, - "cases": [ - { - "expression": "foo[*].bar.kind", - "result": ["basic", "intermediate", "advanced", "expert"] - } - ] -}, -{ - "given": { - "foo": [{"bar": ["one", "two"]}, {"bar": ["three", "four"]}, {"bar": ["five"]}] - }, - "cases": [ - { - "expression": "foo[*].bar[0]", - "result": ["one", "three", "five"] - }, - { - "expression": "foo[*].bar[1]", - "result": ["two", "four"] - }, - { - "expression": "foo[*].bar[2]", - "result": [] - } - ] -}, -{ - "given": { - "foo": [{"bar": []}, {"bar": []}, {"bar": []}] - }, - "cases": [ - { - "expression": "foo[*].bar[0]", - "result": [] - } - ] -}, -{ - "given": { - "foo": [["one", "two"], ["three", "four"], ["five"]] - }, - "cases": [ - { - "expression": "foo[*][0]", - "result": ["one", "three", "five"] - }, - { - "expression": "foo[*][1]", - "result": ["two", "four"] - } - ] -}, -{ - "given": { - "foo": [ - [ - ["one", "two"], ["three", "four"] - ], [ - ["five", "six"], ["seven", "eight"] - ], [ - ["nine"], ["ten"] - ] - ] - }, - "cases": [ - { - "expression": "foo[*][0]", - "result": [["one", "two"], ["five", "six"], ["nine"]] - }, - { - "expression": "foo[*][1]", - "result": [["three", "four"], ["seven", "eight"], ["ten"]] - }, - { - "expression": "foo[*][0][0]", - "result": ["one", "five", "nine"] - }, - { - "expression": "foo[*][1][0]", - "result": ["three", "seven", "ten"] - }, - { - "expression": "foo[*][0][1]", - "result": ["two", "six"] - }, - { - "expression": "foo[*][1][1]", - "result": ["four", "eight"] - }, - { - "expression": "foo[*][2]", - "result": [] - }, - { - "expression": "foo[*][2][2]", - "result": [] - }, - { - "expression": "bar[*]", - "result": null - }, - { - "expression": "bar[*].baz[*]", - "result": null - } - ] -}, -{ - "given": { - "string": "string", - "hash": {"foo": "bar", "bar": "baz"}, - "number": 23, - "nullvalue": null - }, - "cases": [ - { - "expression": "string[*]", - "result": null - }, - { - "expression": "hash[*]", - "result": null - }, - { - "expression": "number[*]", - "result": null - }, - { - "expression": "nullvalue[*]", - "result": null - }, - { - "expression": "string[*].foo", - "result": null - }, - { - "expression": "hash[*].foo", - "result": null - }, - { - "expression": "number[*].foo", - "result": null - }, - { - "expression": "nullvalue[*].foo", - "result": null - }, - { - "expression": "nullvalue[*].foo[*].bar", - "result": null - } - ] -}, -{ - "given": { - "string": "string", - "hash": {"foo": "val", "bar": "val"}, - "number": 23, - "array": [1, 2, 3], - "nullvalue": null - }, - "cases": [ - { - "expression": "string.*", - "result": null - }, - { - "expression": "hash.*", - "result": ["val", "val"] - }, - { - "expression": "number.*", - "result": null - }, - { - "expression": "array.*", - "result": null - }, - { - "expression": "nullvalue.*", - "result": null - } - ] -}, -{ - "given": { - "a": [0, 1, 2], - "b": [0, 1, 2] - }, - "cases": [ - { - "expression": "*[0]", - "result": [0, 0] - } - ] -} -] diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/jmespath.go b/vendor/github.com/jmespath/go-jmespath/fuzz/jmespath.go deleted file mode 100644 index c7df087..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/jmespath.go +++ /dev/null @@ -1,13 +0,0 @@ -package jmespath - -import "github.com/jmespath/go-jmespath" - -// Fuzz will fuzz test the JMESPath parser. -func Fuzz(data []byte) int { - p := jmespath.NewParser() - _, err := p.Parse(string(data)) - if err != nil { - return 1 - } - return 0 -} diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-1 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-1 deleted file mode 100644 index 1910281..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-1 +++ /dev/null @@ -1 +0,0 @@ -foo \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-10 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-10 deleted file mode 100644 index 4d5f975..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-10 +++ /dev/null @@ -1 +0,0 @@ -foo.bar \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-100 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-100 deleted file mode 100644 index bc4f6a3..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-100 +++ /dev/null @@ -1 +0,0 @@ -ends_with(str, 'SStr') \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-101 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-101 deleted file mode 100644 index 81bf07a..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-101 +++ /dev/null @@ -1 +0,0 @@ -ends_with(str, 'foo') \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-102 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-102 deleted file mode 100644 index 3225de9..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-102 +++ /dev/null @@ -1 +0,0 @@ -floor(`1.2`) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-103 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-103 deleted file mode 100644 index 8cac959..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-103 +++ /dev/null @@ -1 +0,0 @@ -floor(decimals[0]) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-104 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-104 deleted file mode 100644 index bd76f47..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-104 +++ /dev/null @@ -1 +0,0 @@ -floor(foo) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-105 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-105 deleted file mode 100644 index c719add..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-105 +++ /dev/null @@ -1 +0,0 @@ -length('abc') \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-106 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-106 deleted file mode 100644 index ff12f04..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-106 +++ /dev/null @@ -1 +0,0 @@ -length('') \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-107 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-107 deleted file mode 100644 index 0eccba1..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-107 +++ /dev/null @@ -1 +0,0 @@ -length(@) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-108 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-108 deleted file mode 100644 index ab14b0f..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-108 +++ /dev/null @@ -1 +0,0 @@ -length(strings[0]) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-109 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-109 deleted file mode 100644 index f1514bb..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-109 +++ /dev/null @@ -1 +0,0 @@ -length(str) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-110 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-110 deleted file mode 100644 index 0927605..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-110 +++ /dev/null @@ -1 +0,0 @@ -length(array) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-112 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-112 deleted file mode 100644 index ab14b0f..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-112 +++ /dev/null @@ -1 +0,0 @@ -length(strings[0]) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-115 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-115 deleted file mode 100644 index bfb41ae..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-115 +++ /dev/null @@ -1 +0,0 @@ -max(strings) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-118 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-118 deleted file mode 100644 index 915ec17..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-118 +++ /dev/null @@ -1 +0,0 @@ -merge(`{}`) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-119 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-119 deleted file mode 100644 index 5b74e9b..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-119 +++ /dev/null @@ -1 +0,0 @@ -merge(`{}`, `{}`) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-12 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-12 deleted file mode 100644 index 64c5e58..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-12 +++ /dev/null @@ -1 +0,0 @@ -two \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-120 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-120 deleted file mode 100644 index f34dcd8..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-120 +++ /dev/null @@ -1 +0,0 @@ -merge(`{"a": 1}`, `{"b": 2}`) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-121 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-121 deleted file mode 100644 index e335dc9..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-121 +++ /dev/null @@ -1 +0,0 @@ -merge(`{"a": 1}`, `{"a": 2}`) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-122 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-122 deleted file mode 100644 index aac28ff..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-122 +++ /dev/null @@ -1 +0,0 @@ -merge(`{"a": 1, "b": 2}`, `{"a": 2, "c": 3}`, `{"d": 4}`) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-123 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-123 deleted file mode 100644 index 1c6fd67..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-123 +++ /dev/null @@ -1 +0,0 @@ -min(numbers) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-126 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-126 deleted file mode 100644 index 93e68db..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-126 +++ /dev/null @@ -1 +0,0 @@ -min(decimals) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-128 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-128 deleted file mode 100644 index 554601e..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-128 +++ /dev/null @@ -1 +0,0 @@ -type('abc') \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-129 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-129 deleted file mode 100644 index 1ab2d98..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-129 +++ /dev/null @@ -1 +0,0 @@ -type(`1.0`) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-13 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-13 deleted file mode 100644 index 1d19714..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-13 +++ /dev/null @@ -1 +0,0 @@ -three \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-130 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-130 deleted file mode 100644 index 3cee2f5..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-130 +++ /dev/null @@ -1 +0,0 @@ -type(`2`) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-131 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-131 deleted file mode 100644 index 4821f9a..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-131 +++ /dev/null @@ -1 +0,0 @@ -type(`true`) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-132 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-132 deleted file mode 100644 index 40b6913..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-132 +++ /dev/null @@ -1 +0,0 @@ -type(`false`) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-133 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-133 deleted file mode 100644 index c711252..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-133 +++ /dev/null @@ -1 +0,0 @@ -type(`null`) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-134 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-134 deleted file mode 100644 index ec5d07e..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-134 +++ /dev/null @@ -1 +0,0 @@ -type(`[0]`) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-135 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-135 deleted file mode 100644 index 2080401..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-135 +++ /dev/null @@ -1 +0,0 @@ -type(`{"a": "b"}`) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-136 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-136 deleted file mode 100644 index c5ee2ba..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-136 +++ /dev/null @@ -1 +0,0 @@ -type(@) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-137 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-137 deleted file mode 100644 index 1814ca1..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-137 +++ /dev/null @@ -1 +0,0 @@ -keys(objects) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-138 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-138 deleted file mode 100644 index e03cdb0..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-138 +++ /dev/null @@ -1 +0,0 @@ -values(objects) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-139 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-139 deleted file mode 100644 index 7fea8d2..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-139 +++ /dev/null @@ -1 +0,0 @@ -keys(empty_hash) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-14 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-14 deleted file mode 100644 index a17c92f..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-14 +++ /dev/null @@ -1 +0,0 @@ -one.two \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-140 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-140 deleted file mode 100644 index 4f1d882..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-140 +++ /dev/null @@ -1 +0,0 @@ -join(', ', strings) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-141 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-141 deleted file mode 100644 index 4f1d882..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-141 +++ /dev/null @@ -1 +0,0 @@ -join(', ', strings) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-142 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-142 deleted file mode 100644 index 19ec1fe..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-142 +++ /dev/null @@ -1 +0,0 @@ -join(',', `["a", "b"]`) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-143 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-143 deleted file mode 100644 index 761c68a..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-143 +++ /dev/null @@ -1 +0,0 @@ -join('|', strings) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-144 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-144 deleted file mode 100644 index a0dd68e..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-144 +++ /dev/null @@ -1 +0,0 @@ -join('|', decimals[].to_string(@)) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-145 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-145 deleted file mode 100644 index a4190b2..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-145 +++ /dev/null @@ -1 +0,0 @@ -join('|', empty_list) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-146 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-146 deleted file mode 100644 index f5033c3..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-146 +++ /dev/null @@ -1 +0,0 @@ -reverse(numbers) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-147 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-147 deleted file mode 100644 index 822f054..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-147 +++ /dev/null @@ -1 +0,0 @@ -reverse(array) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-148 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-148 deleted file mode 100644 index a584adc..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-148 +++ /dev/null @@ -1 +0,0 @@ -reverse(`[]`) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-149 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-149 deleted file mode 100644 index fb4cc5d..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-149 +++ /dev/null @@ -1 +0,0 @@ -reverse('') \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-15 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-15 deleted file mode 100644 index 693f954..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-15 +++ /dev/null @@ -1 +0,0 @@ -foo."1" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-150 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-150 deleted file mode 100644 index aa260fa..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-150 +++ /dev/null @@ -1 +0,0 @@ -reverse('hello world') \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-151 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-151 deleted file mode 100644 index d8c5882..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-151 +++ /dev/null @@ -1 +0,0 @@ -starts_with(str, 'S') \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-152 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-152 deleted file mode 100644 index 32e16b7..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-152 +++ /dev/null @@ -1 +0,0 @@ -starts_with(str, 'St') \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-153 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-153 deleted file mode 100644 index 5f575ae..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-153 +++ /dev/null @@ -1 +0,0 @@ -starts_with(str, 'Str') \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-155 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-155 deleted file mode 100644 index f31551c..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-155 +++ /dev/null @@ -1 +0,0 @@ -sum(numbers) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-156 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-156 deleted file mode 100644 index 18b9044..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-156 +++ /dev/null @@ -1 +0,0 @@ -sum(decimals) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-157 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-157 deleted file mode 100644 index def4d0b..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-157 +++ /dev/null @@ -1 +0,0 @@ -sum(array[].to_number(@)) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-158 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-158 deleted file mode 100644 index 48e4a77..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-158 +++ /dev/null @@ -1 +0,0 @@ -sum(`[]`) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-159 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-159 deleted file mode 100644 index 9fb939a..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-159 +++ /dev/null @@ -1 +0,0 @@ -to_array('foo') \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-16 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-16 deleted file mode 100644 index 86155ed..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-16 +++ /dev/null @@ -1 +0,0 @@ -foo."1"[0] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-160 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-160 deleted file mode 100644 index 74ba7cc..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-160 +++ /dev/null @@ -1 +0,0 @@ -to_array(`0`) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-161 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-161 deleted file mode 100644 index 57f8b98..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-161 +++ /dev/null @@ -1 +0,0 @@ -to_array(objects) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-162 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-162 deleted file mode 100644 index d17c734..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-162 +++ /dev/null @@ -1 +0,0 @@ -to_array(`[1, 2, 3]`) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-163 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-163 deleted file mode 100644 index 15f70f7..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-163 +++ /dev/null @@ -1 +0,0 @@ -to_array(false) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-164 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-164 deleted file mode 100644 index 9b22752..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-164 +++ /dev/null @@ -1 +0,0 @@ -to_string('foo') \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-165 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-165 deleted file mode 100644 index 489a429..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-165 +++ /dev/null @@ -1 +0,0 @@ -to_string(`1.2`) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-166 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-166 deleted file mode 100644 index d17106a..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-166 +++ /dev/null @@ -1 +0,0 @@ -to_string(`[0, 1]`) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-167 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-167 deleted file mode 100644 index 4f4ae9e..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-167 +++ /dev/null @@ -1 +0,0 @@ -to_number('1.0') \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-168 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-168 deleted file mode 100644 index ce932e2..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-168 +++ /dev/null @@ -1 +0,0 @@ -to_number('1.1') \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-169 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-169 deleted file mode 100644 index e246fa4..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-169 +++ /dev/null @@ -1 +0,0 @@ -to_number('4') \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-17 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-17 deleted file mode 100644 index de0b4c3..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-17 +++ /dev/null @@ -1 +0,0 @@ -foo."-1" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-170 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-170 deleted file mode 100644 index f8c2647..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-170 +++ /dev/null @@ -1 +0,0 @@ -to_number('notanumber') \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-171 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-171 deleted file mode 100644 index 7d423b1..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-171 +++ /dev/null @@ -1 +0,0 @@ -to_number(`false`) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-172 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-172 deleted file mode 100644 index 503716b..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-172 +++ /dev/null @@ -1 +0,0 @@ -to_number(`null`) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-173 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-173 deleted file mode 100644 index 7f61dfa..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-173 +++ /dev/null @@ -1 +0,0 @@ -to_number(`[0]`) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-174 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-174 deleted file mode 100644 index ee72a8c..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-174 +++ /dev/null @@ -1 +0,0 @@ -to_number(`{"foo": 0}`) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-175 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-175 deleted file mode 100644 index 8d8f1f7..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-175 +++ /dev/null @@ -1 +0,0 @@ -sort(numbers) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-178 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-178 deleted file mode 100644 index 8cb54ba..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-178 +++ /dev/null @@ -1 +0,0 @@ -sort(empty_list) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-179 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-179 deleted file mode 100644 index cf2c9b1..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-179 +++ /dev/null @@ -1 +0,0 @@ -not_null(unknown_key, str) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-18 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-18 deleted file mode 100644 index b516b2c..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-18 +++ /dev/null @@ -1 +0,0 @@ -@ \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-180 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-180 deleted file mode 100644 index e047d48..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-180 +++ /dev/null @@ -1 +0,0 @@ -not_null(unknown_key, foo.bar, empty_list, str) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-181 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-181 deleted file mode 100644 index c4cc87b..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-181 +++ /dev/null @@ -1 +0,0 @@ -not_null(unknown_key, null_key, empty_list, str) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-182 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-182 deleted file mode 100644 index 2c7fa0a..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-182 +++ /dev/null @@ -1 +0,0 @@ -not_null(all, expressions, are_null) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-183 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-183 deleted file mode 100644 index eb096e6..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-183 +++ /dev/null @@ -1 +0,0 @@ -numbers[].to_string(@) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-184 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-184 deleted file mode 100644 index 4958aba..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-184 +++ /dev/null @@ -1 +0,0 @@ -array[].to_number(@) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-185 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-185 deleted file mode 100644 index 1027084..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-185 +++ /dev/null @@ -1 +0,0 @@ -foo[].not_null(f, e, d, c, b, a) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-186 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-186 deleted file mode 100644 index 83cb916..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-186 +++ /dev/null @@ -1 +0,0 @@ -sort_by(people, &age) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-187 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-187 deleted file mode 100644 index a494d6c..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-187 +++ /dev/null @@ -1 +0,0 @@ -sort_by(people, &to_number(age_str)) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-188 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-188 deleted file mode 100644 index 2294fc5..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-188 +++ /dev/null @@ -1 +0,0 @@ -sort_by(people, &age)[].name \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-189 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-189 deleted file mode 100644 index bb8c2b4..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-189 +++ /dev/null @@ -1 +0,0 @@ -sort_by(people, &age)[].extra \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-19 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-19 deleted file mode 100644 index e3ed49a..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-19 +++ /dev/null @@ -1 +0,0 @@ -@.bar \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-190 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-190 deleted file mode 100644 index 3ab0290..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-190 +++ /dev/null @@ -1 +0,0 @@ -sort_by(`[]`, &age) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-191 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-191 deleted file mode 100644 index 97db56f..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-191 +++ /dev/null @@ -1 +0,0 @@ -max_by(people, &age) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-192 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-192 deleted file mode 100644 index a7e648d..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-192 +++ /dev/null @@ -1 +0,0 @@ -max_by(people, &age_str) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-193 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-193 deleted file mode 100644 index be4348d..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-193 +++ /dev/null @@ -1 +0,0 @@ -max_by(people, &to_number(age_str)) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-194 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-194 deleted file mode 100644 index a707283..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-194 +++ /dev/null @@ -1 +0,0 @@ -min_by(people, &age) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-195 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-195 deleted file mode 100644 index 2cd6618..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-195 +++ /dev/null @@ -1 +0,0 @@ -min_by(people, &age_str) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-196 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-196 deleted file mode 100644 index 833e683..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-196 +++ /dev/null @@ -1 +0,0 @@ -min_by(people, &to_number(age_str)) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-198 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-198 deleted file mode 100644 index 706dbda..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-198 +++ /dev/null @@ -1 +0,0 @@ -__L \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-199 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-199 deleted file mode 100644 index ca593ca..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-199 +++ /dev/null @@ -1 +0,0 @@ -"!\r" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-2 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-2 deleted file mode 100644 index 4d5f975..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-2 +++ /dev/null @@ -1 +0,0 @@ -foo.bar \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-20 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-20 deleted file mode 100644 index f300ab9..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-20 +++ /dev/null @@ -1 +0,0 @@ -@.foo[0] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-200 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-200 deleted file mode 100644 index 9c93843..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-200 +++ /dev/null @@ -1 +0,0 @@ -Y_1623 \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-201 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-201 deleted file mode 100644 index c1b0730..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-201 +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-202 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-202 deleted file mode 100644 index 1552ec6..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-202 +++ /dev/null @@ -1 +0,0 @@ -"\tF\uCebb" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-203 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-203 deleted file mode 100644 index 0470412..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-203 +++ /dev/null @@ -1 +0,0 @@ -" \t" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-204 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-204 deleted file mode 100644 index efd782c..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-204 +++ /dev/null @@ -1 +0,0 @@ -" " \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-205 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-205 deleted file mode 100644 index 8494ac2..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-205 +++ /dev/null @@ -1 +0,0 @@ -v2 \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-206 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-206 deleted file mode 100644 index c61f7f7..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-206 +++ /dev/null @@ -1 +0,0 @@ -"\t" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-207 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-207 deleted file mode 100644 index f6055f1..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-207 +++ /dev/null @@ -1 +0,0 @@ -_X \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-208 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-208 deleted file mode 100644 index 4f58e0e..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-208 +++ /dev/null @@ -1 +0,0 @@ -"\t4\ud9da\udd15" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-209 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-209 deleted file mode 100644 index f536bfb..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-209 +++ /dev/null @@ -1 +0,0 @@ -v24_W \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-21 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-21 deleted file mode 100644 index ef47ff2..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-21 +++ /dev/null @@ -1 +0,0 @@ -"foo.bar" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-210 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-210 deleted file mode 100644 index 6975928..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-210 +++ /dev/null @@ -1 +0,0 @@ -"H" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-211 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-211 deleted file mode 100644 index c3e8b59..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-211 +++ /dev/null @@ -1 +0,0 @@ -"\f" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-212 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-212 deleted file mode 100644 index 24ecc22..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-212 +++ /dev/null @@ -1 +0,0 @@ -"E4" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-213 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-213 deleted file mode 100644 index 5693009..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-213 +++ /dev/null @@ -1 +0,0 @@ -"!" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-214 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-214 deleted file mode 100644 index 62dd220..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-214 +++ /dev/null @@ -1 +0,0 @@ -tM \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-215 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-215 deleted file mode 100644 index 3c1e81f..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-215 +++ /dev/null @@ -1 +0,0 @@ -" [" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-216 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-216 deleted file mode 100644 index 493daa6..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-216 +++ /dev/null @@ -1 +0,0 @@ -"R!" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-217 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-217 deleted file mode 100644 index 116b50a..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-217 +++ /dev/null @@ -1 +0,0 @@ -_6W \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-218 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-218 deleted file mode 100644 index 0073fac..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-218 +++ /dev/null @@ -1 +0,0 @@ -"\uaBA1\r" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-219 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-219 deleted file mode 100644 index 00d8fa3..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-219 +++ /dev/null @@ -1 +0,0 @@ -tL7 \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-22 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-22 deleted file mode 100644 index 661ebcf..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-22 +++ /dev/null @@ -1 +0,0 @@ -"foo bar" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-220 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-220 deleted file mode 100644 index c14f16e..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-220 +++ /dev/null @@ -1 +0,0 @@ -"<" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-257 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-257 deleted file mode 100644 index 8a2443e..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-257 +++ /dev/null @@ -1 +0,0 @@ -hvu \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-258 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-258 deleted file mode 100644 index c9ddacb..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-258 +++ /dev/null @@ -1 +0,0 @@ -"; !" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-259 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-259 deleted file mode 100644 index d0209c6..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-259 +++ /dev/null @@ -1 +0,0 @@ -hU \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-26 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-26 deleted file mode 100644 index 82649bd..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-26 +++ /dev/null @@ -1 +0,0 @@ -"/unix/path" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-260 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-260 deleted file mode 100644 index c07242a..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-260 +++ /dev/null @@ -1 +0,0 @@ -"!I\n\/" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-261 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-261 deleted file mode 100644 index 7aae4ef..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-261 +++ /dev/null @@ -1 +0,0 @@ -"\uEEbF" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-262 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-262 deleted file mode 100644 index c1574f3..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-262 +++ /dev/null @@ -1 +0,0 @@ -"U)\t" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-263 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-263 deleted file mode 100644 index 5197e3a..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-263 +++ /dev/null @@ -1 +0,0 @@ -fa0_9 \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-264 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-264 deleted file mode 100644 index 320558b..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-264 +++ /dev/null @@ -1 +0,0 @@ -"/" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-265 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-265 deleted file mode 100644 index 4a2cb08..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-265 +++ /dev/null @@ -1 +0,0 @@ -Gy \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-266 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-266 deleted file mode 100644 index 9524c83..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-266 +++ /dev/null @@ -1 +0,0 @@ -"\b" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-267 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-267 deleted file mode 100644 index 066b8d9..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-267 +++ /dev/null @@ -1 +0,0 @@ -"<" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-268 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-268 deleted file mode 100644 index c61f7f7..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-268 +++ /dev/null @@ -1 +0,0 @@ -"\t" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-269 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-269 deleted file mode 100644 index a582f62..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-269 +++ /dev/null @@ -1 +0,0 @@ -"\t&\\\r" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-27 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-27 deleted file mode 100644 index a1d5073..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-27 +++ /dev/null @@ -1 +0,0 @@ -"\"\"\"" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-270 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-270 deleted file mode 100644 index e3c5eed..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-270 +++ /dev/null @@ -1 +0,0 @@ -"#" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-271 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-271 deleted file mode 100644 index e75309a..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-271 +++ /dev/null @@ -1 +0,0 @@ -B__ \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-272 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-272 deleted file mode 100644 index 0271772..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-272 +++ /dev/null @@ -1 +0,0 @@ -"\nS \n" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-273 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-273 deleted file mode 100644 index 9943227..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-273 +++ /dev/null @@ -1 +0,0 @@ -Bp \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-274 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-274 deleted file mode 100644 index d4f8a78..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-274 +++ /dev/null @@ -1 +0,0 @@ -",\t;" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-275 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-275 deleted file mode 100644 index 56c384f..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-275 +++ /dev/null @@ -1 +0,0 @@ -B_q \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-276 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-276 deleted file mode 100644 index f093d2a..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-276 +++ /dev/null @@ -1 +0,0 @@ -"\/+\t\n\b!Z" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-277 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-277 deleted file mode 100644 index 11e1229..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-277 +++ /dev/null @@ -1 +0,0 @@ -"󇟇\\ueFAc" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-278 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-278 deleted file mode 100644 index 90dbfcf..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-278 +++ /dev/null @@ -1 +0,0 @@ -":\f" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-279 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-279 deleted file mode 100644 index b06b830..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-279 +++ /dev/null @@ -1 +0,0 @@ -"\/" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-28 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-28 deleted file mode 100644 index 5f55d73..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-28 +++ /dev/null @@ -1 +0,0 @@ -"bar"."baz" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-280 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-280 deleted file mode 100644 index 0e4bf7c..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-280 +++ /dev/null @@ -1 +0,0 @@ -_BW_6Hg_Gl \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-281 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-281 deleted file mode 100644 index 81bb45f..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-281 +++ /dev/null @@ -1 +0,0 @@ -"􃰂" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-282 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-282 deleted file mode 100644 index d0b4de1..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-282 +++ /dev/null @@ -1 +0,0 @@ -zs1DC \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-283 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-283 deleted file mode 100644 index 6879758..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-283 +++ /dev/null @@ -1 +0,0 @@ -__434 \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-284 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-284 deleted file mode 100644 index e61be91..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-284 +++ /dev/null @@ -1 +0,0 @@ -"󵅁" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-285 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-285 deleted file mode 100644 index 026cb9c..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-285 +++ /dev/null @@ -1 +0,0 @@ -Z_5 \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-286 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-286 deleted file mode 100644 index ca9587d..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-286 +++ /dev/null @@ -1 +0,0 @@ -z_M_ \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-287 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-287 deleted file mode 100644 index 67f6d9c..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-287 +++ /dev/null @@ -1 +0,0 @@ -YU_2 \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-288 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-288 deleted file mode 100644 index 927ab65..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-288 +++ /dev/null @@ -1 +0,0 @@ -_0 \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-289 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-289 deleted file mode 100644 index 39307ab..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-289 +++ /dev/null @@ -1 +0,0 @@ -"\b+" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-29 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-29 deleted file mode 100644 index 8b0c5b4..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-29 +++ /dev/null @@ -1 +0,0 @@ -foo[?name == 'a'] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-290 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-290 deleted file mode 100644 index a3ec2ed..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-290 +++ /dev/null @@ -1 +0,0 @@ -"\"" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-291 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-291 deleted file mode 100644 index 26bf7e1..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-291 +++ /dev/null @@ -1 +0,0 @@ -D7 \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-292 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-292 deleted file mode 100644 index d595c9f..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-292 +++ /dev/null @@ -1 +0,0 @@ -_62L \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-293 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-293 deleted file mode 100644 index f686969..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-293 +++ /dev/null @@ -1 +0,0 @@ -"\tK\t" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-294 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-294 deleted file mode 100644 index f3a9b7e..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-294 +++ /dev/null @@ -1 +0,0 @@ -"\n\\\f" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-295 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-295 deleted file mode 100644 index 455f00f..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-295 +++ /dev/null @@ -1 +0,0 @@ -I_ \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-296 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-296 deleted file mode 100644 index ccd5968..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-296 +++ /dev/null @@ -1 +0,0 @@ -W_a0_ \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-297 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-297 deleted file mode 100644 index ee55c16..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-297 +++ /dev/null @@ -1 +0,0 @@ -BQ \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-298 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-298 deleted file mode 100644 index 0d1a169..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-298 +++ /dev/null @@ -1 +0,0 @@ -"\tX$\uABBb" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-299 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-299 deleted file mode 100644 index 0573cfd..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-299 +++ /dev/null @@ -1 +0,0 @@ -Z9 \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-3 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-3 deleted file mode 100644 index f0fcbd8..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-3 +++ /dev/null @@ -1 +0,0 @@ -foo.bar.baz \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-30 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-30 deleted file mode 100644 index 4f8e6a1..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-30 +++ /dev/null @@ -1 +0,0 @@ -*[?[0] == `0`] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-300 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-300 deleted file mode 100644 index a0db02b..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-300 +++ /dev/null @@ -1 +0,0 @@ -"\b%\"򞄏" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-301 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-301 deleted file mode 100644 index 56032f7..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-301 +++ /dev/null @@ -1 +0,0 @@ -_F \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-302 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-302 deleted file mode 100644 index 4a8a3cf..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-302 +++ /dev/null @@ -1 +0,0 @@ -"!," \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-303 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-303 deleted file mode 100644 index 7c1efac..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-303 +++ /dev/null @@ -1 +0,0 @@ -"\"!" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-304 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-304 deleted file mode 100644 index a0f489d..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-304 +++ /dev/null @@ -1 +0,0 @@ -Hh \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-305 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-305 deleted file mode 100644 index c64e8d5..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-305 +++ /dev/null @@ -1 +0,0 @@ -"&" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-306 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-306 deleted file mode 100644 index 0567e99..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-306 +++ /dev/null @@ -1 +0,0 @@ -"9\r\\R" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-307 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-307 deleted file mode 100644 index ce8245c..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-307 +++ /dev/null @@ -1 +0,0 @@ -M_k \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-308 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-308 deleted file mode 100644 index 8f16a5a..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-308 +++ /dev/null @@ -1 +0,0 @@ -"!\b\n󑩒\"\"" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-309 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-309 deleted file mode 100644 index 504ff5a..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-309 +++ /dev/null @@ -1 +0,0 @@ -"6" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-31 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-31 deleted file mode 100644 index 07fb572..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-31 +++ /dev/null @@ -1 +0,0 @@ -foo[?first == last] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-310 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-310 deleted file mode 100644 index 533dd8e..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-310 +++ /dev/null @@ -1 +0,0 @@ -_7 \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-311 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-311 deleted file mode 100644 index 1e4a3a3..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-311 +++ /dev/null @@ -1 +0,0 @@ -"0" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-312 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-312 deleted file mode 100644 index 37961f6..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-312 +++ /dev/null @@ -1 +0,0 @@ -"\\8\\" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-313 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-313 deleted file mode 100644 index 23480cf..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-313 +++ /dev/null @@ -1 +0,0 @@ -b7eo \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-314 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-314 deleted file mode 100644 index e609f81..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-314 +++ /dev/null @@ -1 +0,0 @@ -xIUo9 \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-315 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-315 deleted file mode 100644 index d89a25f..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-315 +++ /dev/null @@ -1 +0,0 @@ -"5" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-316 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-316 deleted file mode 100644 index 5adcf5e..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-316 +++ /dev/null @@ -1 +0,0 @@ -"?" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-317 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-317 deleted file mode 100644 index ace4a89..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-317 +++ /dev/null @@ -1 +0,0 @@ -sU \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-318 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-318 deleted file mode 100644 index feffb70..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-318 +++ /dev/null @@ -1 +0,0 @@ -"VH2&H\\\/" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-319 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-319 deleted file mode 100644 index 8223f1e..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-319 +++ /dev/null @@ -1 +0,0 @@ -_C \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-32 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-32 deleted file mode 100644 index 7e85c4b..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-32 +++ /dev/null @@ -1 +0,0 @@ -foo[?first == last].first \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-320 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-320 deleted file mode 100644 index c9cdc63..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-320 +++ /dev/null @@ -1 +0,0 @@ -_ \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-321 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-321 deleted file mode 100644 index c82f798..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-321 +++ /dev/null @@ -1 +0,0 @@ -"<\t" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-322 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-322 deleted file mode 100644 index dae65c5..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-322 +++ /dev/null @@ -1 +0,0 @@ -"\uD834\uDD1E" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-323 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-323 deleted file mode 100644 index b6b3695..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-323 +++ /dev/null @@ -1 +0,0 @@ -foo.bar[0] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-324 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-324 deleted file mode 100644 index bf06e67..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-324 +++ /dev/null @@ -1 +0,0 @@ -foo.bar[1] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-325 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-325 deleted file mode 100644 index 5d48e02..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-325 +++ /dev/null @@ -1 +0,0 @@ -foo.bar[2] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-326 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-326 deleted file mode 100644 index de3af72..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-326 +++ /dev/null @@ -1 +0,0 @@ -foo.bar[3] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-327 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-327 deleted file mode 100644 index a1c3335..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-327 +++ /dev/null @@ -1 +0,0 @@ -foo.bar[-1] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-328 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-328 deleted file mode 100644 index ad0fef9..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-328 +++ /dev/null @@ -1 +0,0 @@ -foo.bar[-2] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-329 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-329 deleted file mode 100644 index 3e83c6f..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-329 +++ /dev/null @@ -1 +0,0 @@ -foo.bar[-3] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-33 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-33 deleted file mode 100644 index 72fc0a5..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-33 +++ /dev/null @@ -1 +0,0 @@ -foo[?age > `25`] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-330 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-330 deleted file mode 100644 index 433a737..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-330 +++ /dev/null @@ -1 +0,0 @@ -foo.bar[-4] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-331 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-331 deleted file mode 100644 index 4d5f975..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-331 +++ /dev/null @@ -1 +0,0 @@ -foo.bar \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-332 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-332 deleted file mode 100644 index 5e0d9b7..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-332 +++ /dev/null @@ -1 +0,0 @@ -foo[0].bar \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-333 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-333 deleted file mode 100644 index 3cd7e94..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-333 +++ /dev/null @@ -1 +0,0 @@ -foo[1].bar \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-334 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-334 deleted file mode 100644 index 74cb176..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-334 +++ /dev/null @@ -1 +0,0 @@ -foo[2].bar \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-335 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-335 deleted file mode 100644 index 3cf2007..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-335 +++ /dev/null @@ -1 +0,0 @@ -foo[3].notbar \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-336 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-336 deleted file mode 100644 index 9674d88..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-336 +++ /dev/null @@ -1 +0,0 @@ -foo[3].bar \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-337 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-337 deleted file mode 100644 index 9b0b2f8..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-337 +++ /dev/null @@ -1 +0,0 @@ -foo[0] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-338 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-338 deleted file mode 100644 index 83c639a..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-338 +++ /dev/null @@ -1 +0,0 @@ -foo[1] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-339 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-339 deleted file mode 100644 index 3b76c9f..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-339 +++ /dev/null @@ -1 +0,0 @@ -foo[2] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-34 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-34 deleted file mode 100644 index 9a2b018..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-34 +++ /dev/null @@ -1 +0,0 @@ -foo[?age >= `25`] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-340 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-340 deleted file mode 100644 index ff99e04..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-340 +++ /dev/null @@ -1 +0,0 @@ -foo[3] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-341 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-341 deleted file mode 100644 index 040ecb2..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-341 +++ /dev/null @@ -1 +0,0 @@ -foo[4] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-342 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-342 deleted file mode 100644 index 6e7ea63..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-342 +++ /dev/null @@ -1 +0,0 @@ -[0] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-343 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-343 deleted file mode 100644 index bace2a0..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-343 +++ /dev/null @@ -1 +0,0 @@ -[1] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-344 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-344 deleted file mode 100644 index 5d50c80..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-344 +++ /dev/null @@ -1 +0,0 @@ -[2] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-345 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-345 deleted file mode 100644 index 99d21a2..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-345 +++ /dev/null @@ -1 +0,0 @@ -[-1] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-346 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-346 deleted file mode 100644 index 133a9c6..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-346 +++ /dev/null @@ -1 +0,0 @@ -[-2] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-347 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-347 deleted file mode 100644 index b7f78c5..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-347 +++ /dev/null @@ -1 +0,0 @@ -[-3] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-348 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-348 deleted file mode 100644 index bd9de81..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-348 +++ /dev/null @@ -1 +0,0 @@ -reservations[].instances[].foo \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-349 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-349 deleted file mode 100644 index 55e6257..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-349 +++ /dev/null @@ -1 +0,0 @@ -reservations[].instances[].bar \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-35 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-35 deleted file mode 100644 index fa83f1d..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-35 +++ /dev/null @@ -1 +0,0 @@ -foo[?age > `30`] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-350 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-350 deleted file mode 100644 index 1661747..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-350 +++ /dev/null @@ -1 +0,0 @@ -reservations[].notinstances[].foo \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-351 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-351 deleted file mode 100644 index 1661747..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-351 +++ /dev/null @@ -1 +0,0 @@ -reservations[].notinstances[].foo \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-352 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-352 deleted file mode 100644 index 3debc70..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-352 +++ /dev/null @@ -1 +0,0 @@ -reservations[].instances[].foo[].bar \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-353 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-353 deleted file mode 100644 index 75af2fd..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-353 +++ /dev/null @@ -1 +0,0 @@ -reservations[].instances[].foo[].baz \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-354 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-354 deleted file mode 100644 index 4a70cd8..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-354 +++ /dev/null @@ -1 +0,0 @@ -reservations[].instances[].notfoo[].bar \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-355 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-355 deleted file mode 100644 index 987985b..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-355 +++ /dev/null @@ -1 +0,0 @@ -reservations[].instances[].notfoo[].notbar \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-356 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-356 deleted file mode 100644 index 1661747..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-356 +++ /dev/null @@ -1 +0,0 @@ -reservations[].notinstances[].foo \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-357 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-357 deleted file mode 100644 index 634f937..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-357 +++ /dev/null @@ -1 +0,0 @@ -reservations[].instances[].foo[].notbar \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-358 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-358 deleted file mode 100644 index 09cb7b8..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-358 +++ /dev/null @@ -1 +0,0 @@ -reservations[].instances[].bar[].baz \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-359 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-359 deleted file mode 100644 index f5d9ac5..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-359 +++ /dev/null @@ -1 +0,0 @@ -reservations[].instances[].baz[].baz \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-36 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-36 deleted file mode 100644 index 463a2a5..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-36 +++ /dev/null @@ -1 +0,0 @@ -foo[?age < `25`] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-360 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-360 deleted file mode 100644 index d1016d6..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-360 +++ /dev/null @@ -1 +0,0 @@ -reservations[].instances[].qux[].baz \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-361 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-361 deleted file mode 100644 index ef54cf5..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-361 +++ /dev/null @@ -1 +0,0 @@ -reservations[].instances[].qux[].baz[] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-362 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-362 deleted file mode 100644 index bea506f..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-362 +++ /dev/null @@ -1 +0,0 @@ -foo[] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-363 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-363 deleted file mode 100644 index 20dd081..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-363 +++ /dev/null @@ -1 +0,0 @@ -foo[][0] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-364 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-364 deleted file mode 100644 index 4803734..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-364 +++ /dev/null @@ -1 +0,0 @@ -foo[][1] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-365 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-365 deleted file mode 100644 index 1be5659..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-365 +++ /dev/null @@ -1 +0,0 @@ -foo[][0][0] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-366 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-366 deleted file mode 100644 index d2cf6da..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-366 +++ /dev/null @@ -1 +0,0 @@ -foo[][2][2] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-367 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-367 deleted file mode 100644 index c609ca6..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-367 +++ /dev/null @@ -1 +0,0 @@ -foo[][0][0][100] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-368 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-368 deleted file mode 100644 index 1910281..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-368 +++ /dev/null @@ -1 +0,0 @@ -foo \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-369 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-369 deleted file mode 100644 index bea506f..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-369 +++ /dev/null @@ -1 +0,0 @@ -foo[] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-37 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-37 deleted file mode 100644 index 10ed5d3..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-37 +++ /dev/null @@ -1 +0,0 @@ -foo[?age <= `25`] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-370 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-370 deleted file mode 100644 index 13f2c4a..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-370 +++ /dev/null @@ -1 +0,0 @@ -foo[].bar \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-371 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-371 deleted file mode 100644 index edf3d92..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-371 +++ /dev/null @@ -1 +0,0 @@ -foo[].bar[] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-372 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-372 deleted file mode 100644 index 2a3b993..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-372 +++ /dev/null @@ -1 +0,0 @@ -foo[].bar[].baz \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-373 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-373 deleted file mode 100644 index d5ca878..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-373 +++ /dev/null @@ -1 +0,0 @@ -string[] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-374 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-374 deleted file mode 100644 index fcd255f..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-374 +++ /dev/null @@ -1 +0,0 @@ -hash[] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-375 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-375 deleted file mode 100644 index 2d53bd7..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-375 +++ /dev/null @@ -1 +0,0 @@ -number[] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-376 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-376 deleted file mode 100644 index cb10d24..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-376 +++ /dev/null @@ -1 +0,0 @@ -nullvalue[] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-377 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-377 deleted file mode 100644 index f6c79ca..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-377 +++ /dev/null @@ -1 +0,0 @@ -string[].foo \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-378 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-378 deleted file mode 100644 index 09bf36e..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-378 +++ /dev/null @@ -1 +0,0 @@ -hash[].foo \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-379 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-379 deleted file mode 100644 index 4c35781..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-379 +++ /dev/null @@ -1 +0,0 @@ -number[].foo \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-38 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-38 deleted file mode 100644 index 16a4c36..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-38 +++ /dev/null @@ -1 +0,0 @@ -foo[?age < `20`] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-380 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-380 deleted file mode 100644 index 2dd8ae2..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-380 +++ /dev/null @@ -1 +0,0 @@ -nullvalue[].foo \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-381 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-381 deleted file mode 100644 index dfed816..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-381 +++ /dev/null @@ -1 +0,0 @@ -nullvalue[].foo[].bar \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-382 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-382 deleted file mode 100644 index d7628e6..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-382 +++ /dev/null @@ -1 +0,0 @@ -`"foo"` \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-383 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-383 deleted file mode 100644 index 49c5269..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-383 +++ /dev/null @@ -1 +0,0 @@ -`"\u03a6"` \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-384 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-384 deleted file mode 100644 index d5db721..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-384 +++ /dev/null @@ -1 +0,0 @@ -`"✓"` \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-385 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-385 deleted file mode 100644 index a2b6e4e..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-385 +++ /dev/null @@ -1 +0,0 @@ -`[1, 2, 3]` \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-386 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-386 deleted file mode 100644 index f5801bd..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-386 +++ /dev/null @@ -1 +0,0 @@ -`{"a": "b"}` \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-387 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-387 deleted file mode 100644 index f87db59..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-387 +++ /dev/null @@ -1 +0,0 @@ -`true` \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-388 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-388 deleted file mode 100644 index 3b20d90..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-388 +++ /dev/null @@ -1 +0,0 @@ -`false` \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-389 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-389 deleted file mode 100644 index 70bcd29..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-389 +++ /dev/null @@ -1 +0,0 @@ -`null` \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-39 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-39 deleted file mode 100644 index 351054d..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-39 +++ /dev/null @@ -1 +0,0 @@ -foo[?age == `20`] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-390 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-390 deleted file mode 100644 index 0918d41..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-390 +++ /dev/null @@ -1 +0,0 @@ -`0` \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-391 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-391 deleted file mode 100644 index ef70c4c..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-391 +++ /dev/null @@ -1 +0,0 @@ -`1` \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-392 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-392 deleted file mode 100644 index b39a922..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-392 +++ /dev/null @@ -1 +0,0 @@ -`2` \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-393 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-393 deleted file mode 100644 index 7e65687..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-393 +++ /dev/null @@ -1 +0,0 @@ -`3` \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-394 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-394 deleted file mode 100644 index 770d1ec..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-394 +++ /dev/null @@ -1 +0,0 @@ -`4` \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-395 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-395 deleted file mode 100644 index a8b8198..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-395 +++ /dev/null @@ -1 +0,0 @@ -`5` \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-396 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-396 deleted file mode 100644 index 7f08610..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-396 +++ /dev/null @@ -1 +0,0 @@ -`6` \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-397 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-397 deleted file mode 100644 index 495114d..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-397 +++ /dev/null @@ -1 +0,0 @@ -`7` \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-398 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-398 deleted file mode 100644 index 94f355c..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-398 +++ /dev/null @@ -1 +0,0 @@ -`8` \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-399 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-399 deleted file mode 100644 index 600d2aa..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-399 +++ /dev/null @@ -1 +0,0 @@ -`9` \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-4 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-4 deleted file mode 100644 index 3148522..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-4 +++ /dev/null @@ -1 +0,0 @@ -foo.bar.baz.bad \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-40 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-40 deleted file mode 100644 index 99d9258..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-40 +++ /dev/null @@ -1 +0,0 @@ -foo[?age != `20`] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-400 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-400 deleted file mode 100644 index 637015b..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-400 +++ /dev/null @@ -1 +0,0 @@ -`"foo\`bar"` \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-401 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-401 deleted file mode 100644 index 6fa7557..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-401 +++ /dev/null @@ -1 +0,0 @@ -`"foo\"bar"` \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-402 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-402 deleted file mode 100644 index 5aabeec..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-402 +++ /dev/null @@ -1 +0,0 @@ -`"1\`"` \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-403 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-403 deleted file mode 100644 index 8302ea1..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-403 +++ /dev/null @@ -1 +0,0 @@ -`"\\"`.{a:`"b"`} \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-404 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-404 deleted file mode 100644 index d88d014..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-404 +++ /dev/null @@ -1 +0,0 @@ -`{"a": "b"}`.a \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-405 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-405 deleted file mode 100644 index 47152dd..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-405 +++ /dev/null @@ -1 +0,0 @@ -`{"a": {"b": "c"}}`.a.b \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-406 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-406 deleted file mode 100644 index 895d429..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-406 +++ /dev/null @@ -1 +0,0 @@ -`[0, 1, 2]`[1] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-407 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-407 deleted file mode 100644 index 42500a3..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-407 +++ /dev/null @@ -1 +0,0 @@ -` {"foo": true}` \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-408 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-408 deleted file mode 100644 index 08b944d..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-408 +++ /dev/null @@ -1 +0,0 @@ -`{"foo": true} ` \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-409 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-409 deleted file mode 100644 index 6de163f..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-409 +++ /dev/null @@ -1 +0,0 @@ -'foo' \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-41 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-41 deleted file mode 100644 index 5bc357d..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-41 +++ /dev/null @@ -1 +0,0 @@ -foo[?top.name == 'a'] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-410 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-410 deleted file mode 100644 index b84bbdb..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-410 +++ /dev/null @@ -1 +0,0 @@ -' foo ' \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-411 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-411 deleted file mode 100644 index bf6a07a..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-411 +++ /dev/null @@ -1 +0,0 @@ -'0' \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-412 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-412 deleted file mode 100644 index c742f5b..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-412 +++ /dev/null @@ -1,2 +0,0 @@ -'newline -' \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-413 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-413 deleted file mode 100644 index 04e9b3a..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-413 +++ /dev/null @@ -1,2 +0,0 @@ -' -' \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-414 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-414 deleted file mode 100644 index ebdaf12..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-414 +++ /dev/null @@ -1 +0,0 @@ -'✓' \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-415 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-415 deleted file mode 100644 index d0ba5d7..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-415 +++ /dev/null @@ -1 +0,0 @@ -'𝄞' \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-416 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-416 deleted file mode 100644 index 19c2e2e..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-416 +++ /dev/null @@ -1 +0,0 @@ -' [foo] ' \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-417 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-417 deleted file mode 100644 index 5faa483..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-417 +++ /dev/null @@ -1 +0,0 @@ -'[foo]' \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-418 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-418 deleted file mode 100644 index e3c05c1..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-418 +++ /dev/null @@ -1 +0,0 @@ -'\u03a6' \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-419 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-419 deleted file mode 100644 index 7c13861..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-419 +++ /dev/null @@ -1 +0,0 @@ -foo.{bar: bar} \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-42 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-42 deleted file mode 100644 index d037a0a..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-42 +++ /dev/null @@ -1 +0,0 @@ -foo[?top.first == top.last] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-420 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-420 deleted file mode 100644 index f795c25..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-420 +++ /dev/null @@ -1 +0,0 @@ -foo.{"bar": bar} \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-421 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-421 deleted file mode 100644 index 772c456..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-421 +++ /dev/null @@ -1 +0,0 @@ -foo.{"foo.bar": bar} \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-422 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-422 deleted file mode 100644 index 8808e92..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-422 +++ /dev/null @@ -1 +0,0 @@ -foo.{bar: bar, baz: baz} \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-423 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-423 deleted file mode 100644 index 3f13757..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-423 +++ /dev/null @@ -1 +0,0 @@ -foo.{"bar": bar, "baz": baz} \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-424 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-424 deleted file mode 100644 index 23cd890..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-424 +++ /dev/null @@ -1 +0,0 @@ -{"baz": baz, "qux\"": "qux\""} \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-425 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-425 deleted file mode 100644 index fabb6da..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-425 +++ /dev/null @@ -1 +0,0 @@ -foo.{bar:bar,baz:baz} \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-426 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-426 deleted file mode 100644 index 4c3f615..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-426 +++ /dev/null @@ -1 +0,0 @@ -foo.{bar: bar,qux: qux} \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-427 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-427 deleted file mode 100644 index 8bc4653..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-427 +++ /dev/null @@ -1 +0,0 @@ -foo.{bar: bar, noexist: noexist} \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-428 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-428 deleted file mode 100644 index 2024b6f..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-428 +++ /dev/null @@ -1 +0,0 @@ -foo.{noexist: noexist, alsonoexist: alsonoexist} \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-429 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-429 deleted file mode 100644 index b52191d..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-429 +++ /dev/null @@ -1 +0,0 @@ -foo.badkey.{nokey: nokey, alsonokey: alsonokey} \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-43 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-43 deleted file mode 100644 index 8534a5c..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-43 +++ /dev/null @@ -1 +0,0 @@ -foo[?top == `{"first": "foo", "last": "bar"}`] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-430 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-430 deleted file mode 100644 index 5cd310b..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-430 +++ /dev/null @@ -1 +0,0 @@ -foo.nested.*.{a: a,b: b} \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-431 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-431 deleted file mode 100644 index 0b24ef5..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-431 +++ /dev/null @@ -1 +0,0 @@ -foo.nested.three.{a: a, cinner: c.inner} \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-432 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-432 deleted file mode 100644 index 473c1c3..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-432 +++ /dev/null @@ -1 +0,0 @@ -foo.nested.three.{a: a, c: c.inner.bad.key} \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-433 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-433 deleted file mode 100644 index 44ba735..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-433 +++ /dev/null @@ -1 +0,0 @@ -foo.{a: nested.one.a, b: nested.two.b} \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-434 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-434 deleted file mode 100644 index f5f89b1..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-434 +++ /dev/null @@ -1 +0,0 @@ -{bar: bar, baz: baz} \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-435 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-435 deleted file mode 100644 index 697764c..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-435 +++ /dev/null @@ -1 +0,0 @@ -{bar: bar} \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-436 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-436 deleted file mode 100644 index 20447fb..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-436 +++ /dev/null @@ -1 +0,0 @@ -{otherkey: bar} \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-437 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-437 deleted file mode 100644 index 310b9b1..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-437 +++ /dev/null @@ -1 +0,0 @@ -{no: no, exist: exist} \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-438 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-438 deleted file mode 100644 index c79b2e2..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-438 +++ /dev/null @@ -1 +0,0 @@ -foo.[bar] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-439 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-439 deleted file mode 100644 index ab498ef..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-439 +++ /dev/null @@ -1 +0,0 @@ -foo.[bar,baz] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-44 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-44 deleted file mode 100644 index 71307c4..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-44 +++ /dev/null @@ -1 +0,0 @@ -foo[?key == `true`] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-440 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-440 deleted file mode 100644 index 4b8f39a..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-440 +++ /dev/null @@ -1 +0,0 @@ -foo.[bar,qux] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-441 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-441 deleted file mode 100644 index b8f9020..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-441 +++ /dev/null @@ -1 +0,0 @@ -foo.[bar,noexist] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-442 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-442 deleted file mode 100644 index b7c7b3f..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-442 +++ /dev/null @@ -1 +0,0 @@ -foo.[noexist,alsonoexist] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-443 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-443 deleted file mode 100644 index fabb6da..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-443 +++ /dev/null @@ -1 +0,0 @@ -foo.{bar:bar,baz:baz} \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-444 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-444 deleted file mode 100644 index c15c39f..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-444 +++ /dev/null @@ -1 +0,0 @@ -foo.[bar,baz[0]] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-445 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-445 deleted file mode 100644 index 9cebd89..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-445 +++ /dev/null @@ -1 +0,0 @@ -foo.[bar,baz[1]] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-446 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-446 deleted file mode 100644 index c5bbfbf..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-446 +++ /dev/null @@ -1 +0,0 @@ -foo.[bar,baz[2]] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-447 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-447 deleted file mode 100644 index d81cb2b..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-447 +++ /dev/null @@ -1 +0,0 @@ -foo.[bar,baz[3]] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-448 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-448 deleted file mode 100644 index 3a65aa7..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-448 +++ /dev/null @@ -1 +0,0 @@ -foo.[bar[0],baz[3]] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-449 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-449 deleted file mode 100644 index 8808e92..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-449 +++ /dev/null @@ -1 +0,0 @@ -foo.{bar: bar, baz: baz} \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-45 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-45 deleted file mode 100644 index e142b22..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-45 +++ /dev/null @@ -1 +0,0 @@ -foo[?key == `false`] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-450 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-450 deleted file mode 100644 index ab498ef..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-450 +++ /dev/null @@ -1 +0,0 @@ -foo.[bar,baz] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-451 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-451 deleted file mode 100644 index 8e3d22d..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-451 +++ /dev/null @@ -1 +0,0 @@ -foo.{bar: bar.baz[1],includeme: includeme} \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-452 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-452 deleted file mode 100644 index 398c7f8..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-452 +++ /dev/null @@ -1 +0,0 @@ -foo.{"bar.baz.two": bar.baz[1].two, includeme: includeme} \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-453 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-453 deleted file mode 100644 index a176444..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-453 +++ /dev/null @@ -1 +0,0 @@ -foo.[includeme, bar.baz[*].common] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-454 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-454 deleted file mode 100644 index da5225d..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-454 +++ /dev/null @@ -1 +0,0 @@ -foo.[includeme, bar.baz[*].none] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-455 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-455 deleted file mode 100644 index a8870b2..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-455 +++ /dev/null @@ -1 +0,0 @@ -foo.[includeme, bar.baz[].common] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-456 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-456 deleted file mode 100644 index 420b1a5..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-456 +++ /dev/null @@ -1 +0,0 @@ -reservations[*].instances[*].{id: id, name: name} \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-457 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-457 deleted file mode 100644 index 0761ee1..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-457 +++ /dev/null @@ -1 +0,0 @@ -reservations[].instances[].{id: id, name: name} \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-458 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-458 deleted file mode 100644 index aa1191a..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-458 +++ /dev/null @@ -1 +0,0 @@ -reservations[].instances[].[id, name] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-459 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-459 deleted file mode 100644 index 1910281..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-459 +++ /dev/null @@ -1 +0,0 @@ -foo \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-46 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-46 deleted file mode 100644 index 9a24a46..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-46 +++ /dev/null @@ -1 +0,0 @@ -foo[?key == `0`] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-460 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-460 deleted file mode 100644 index bea506f..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-460 +++ /dev/null @@ -1 +0,0 @@ -foo[] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-461 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-461 deleted file mode 100644 index 13f2c4a..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-461 +++ /dev/null @@ -1 +0,0 @@ -foo[].bar \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-462 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-462 deleted file mode 100644 index edf3d92..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-462 +++ /dev/null @@ -1 +0,0 @@ -foo[].bar[] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-463 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-463 deleted file mode 100644 index d965466..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-463 +++ /dev/null @@ -1 +0,0 @@ -foo[].bar[].[baz, qux] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-464 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-464 deleted file mode 100644 index f1822a1..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-464 +++ /dev/null @@ -1 +0,0 @@ -foo[].bar[].[baz] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-465 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-465 deleted file mode 100644 index c6f77b8..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-465 +++ /dev/null @@ -1 +0,0 @@ -foo[].bar[].[baz, qux][] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-466 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-466 deleted file mode 100644 index db56262..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-466 +++ /dev/null @@ -1 +0,0 @@ -foo.[baz[*].bar, qux[0]] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-467 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-467 deleted file mode 100644 index b901067..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-467 +++ /dev/null @@ -1 +0,0 @@ -foo.[baz[*].[bar, boo], qux[0]] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-468 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-468 deleted file mode 100644 index 738479f..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-468 +++ /dev/null @@ -1 +0,0 @@ -foo.[baz[*].not_there || baz[*].bar, qux[0]] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-469 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-469 deleted file mode 100644 index 6926996..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-469 +++ /dev/null @@ -1 +0,0 @@ -[[*],*] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-47 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-47 deleted file mode 100644 index 6d33cc7..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-47 +++ /dev/null @@ -1 +0,0 @@ -foo[?key == `1`] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-470 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-470 deleted file mode 100644 index 736be0a..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-470 +++ /dev/null @@ -1 +0,0 @@ -[[*]] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-471 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-471 deleted file mode 100644 index 29e1fb2..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-471 +++ /dev/null @@ -1 +0,0 @@ -outer.foo || outer.bar \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-472 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-472 deleted file mode 100644 index c0070ba..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-472 +++ /dev/null @@ -1 +0,0 @@ -outer.foo||outer.bar \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-473 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-473 deleted file mode 100644 index 661b0be..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-473 +++ /dev/null @@ -1 +0,0 @@ -outer.bar || outer.baz \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-474 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-474 deleted file mode 100644 index 296d5ae..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-474 +++ /dev/null @@ -1 +0,0 @@ -outer.bar||outer.baz \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-475 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-475 deleted file mode 100644 index ca140f8..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-475 +++ /dev/null @@ -1 +0,0 @@ -outer.bad || outer.foo \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-476 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-476 deleted file mode 100644 index 15d3092..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-476 +++ /dev/null @@ -1 +0,0 @@ -outer.bad||outer.foo \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-477 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-477 deleted file mode 100644 index 56148d9..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-477 +++ /dev/null @@ -1 +0,0 @@ -outer.foo || outer.bad \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-478 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-478 deleted file mode 100644 index 6d3cf6d..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-478 +++ /dev/null @@ -1 +0,0 @@ -outer.foo||outer.bad \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-479 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-479 deleted file mode 100644 index 100fa83..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-479 +++ /dev/null @@ -1 +0,0 @@ -outer.bad || outer.alsobad \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-48 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-48 deleted file mode 100644 index de56fc0..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-48 +++ /dev/null @@ -1 +0,0 @@ -foo[?key == `[0]`] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-480 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-480 deleted file mode 100644 index 6449035..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-480 +++ /dev/null @@ -1 +0,0 @@ -outer.bad||outer.alsobad \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-481 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-481 deleted file mode 100644 index af901bd..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-481 +++ /dev/null @@ -1 +0,0 @@ -outer.empty_string || outer.foo \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-482 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-482 deleted file mode 100644 index 36b63e4..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-482 +++ /dev/null @@ -1 +0,0 @@ -outer.nokey || outer.bool || outer.empty_list || outer.empty_string || outer.foo \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-483 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-483 deleted file mode 100644 index aba584f..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-483 +++ /dev/null @@ -1 +0,0 @@ -foo.*.baz | [0] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-484 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-484 deleted file mode 100644 index 4234ac0..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-484 +++ /dev/null @@ -1 +0,0 @@ -foo.*.baz | [1] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-485 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-485 deleted file mode 100644 index 12330d9..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-485 +++ /dev/null @@ -1 +0,0 @@ -foo.*.baz | [2] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-486 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-486 deleted file mode 100644 index 1b2d93e..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-486 +++ /dev/null @@ -1 +0,0 @@ -foo.bar.* | [0] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-487 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-487 deleted file mode 100644 index c371fc6..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-487 +++ /dev/null @@ -1 +0,0 @@ -foo.*.notbaz | [*] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-488 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-488 deleted file mode 100644 index 3c83564..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-488 +++ /dev/null @@ -1 +0,0 @@ -foo | bar \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-489 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-489 deleted file mode 100644 index decaa04..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-489 +++ /dev/null @@ -1 +0,0 @@ -foo | bar | baz \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-49 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-49 deleted file mode 100644 index 49d9c63..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-49 +++ /dev/null @@ -1 +0,0 @@ -foo[?key == `{"bar": [0]}`] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-490 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-490 deleted file mode 100644 index b910680..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-490 +++ /dev/null @@ -1 +0,0 @@ -foo|bar| baz \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-491 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-491 deleted file mode 100644 index 11df74d..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-491 +++ /dev/null @@ -1 +0,0 @@ -not_there | [0] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-492 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-492 deleted file mode 100644 index 11df74d..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-492 +++ /dev/null @@ -1 +0,0 @@ -not_there | [0] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-493 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-493 deleted file mode 100644 index 37da9fc..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-493 +++ /dev/null @@ -1 +0,0 @@ -[foo.bar, foo.other] | [0] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-494 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-494 deleted file mode 100644 index 1f4fc94..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-494 +++ /dev/null @@ -1 +0,0 @@ -{"a": foo.bar, "b": foo.other} | a \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-495 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-495 deleted file mode 100644 index 67c7ea9..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-495 +++ /dev/null @@ -1 +0,0 @@ -{"a": foo.bar, "b": foo.other} | b \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-496 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-496 deleted file mode 100644 index d87f9bb..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-496 +++ /dev/null @@ -1 +0,0 @@ -{"a": foo.bar, "b": foo.other} | *.baz \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-497 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-497 deleted file mode 100644 index ebf8e27..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-497 +++ /dev/null @@ -1 +0,0 @@ -foo.bam || foo.bar | baz \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-498 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-498 deleted file mode 100644 index f32bc6d..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-498 +++ /dev/null @@ -1 +0,0 @@ -foo | not_there || bar \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-499 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-499 deleted file mode 100644 index d04459d..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-499 +++ /dev/null @@ -1 +0,0 @@ -foo[*].bar[*] | [0][0] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-5 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-5 deleted file mode 100644 index b537264..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-5 +++ /dev/null @@ -1 +0,0 @@ -foo.bar.bad \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-50 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-50 deleted file mode 100644 index c17c1df..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-50 +++ /dev/null @@ -1 +0,0 @@ -foo[?key == `null`] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-500 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-500 deleted file mode 100644 index 3eb869f..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-500 +++ /dev/null @@ -1 +0,0 @@ -bar[0:10] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-501 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-501 deleted file mode 100644 index aa5d6be..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-501 +++ /dev/null @@ -1 +0,0 @@ -foo[0:10:1] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-502 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-502 deleted file mode 100644 index 1a4d168..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-502 +++ /dev/null @@ -1 +0,0 @@ -foo[0:10] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-503 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-503 deleted file mode 100644 index 5925a57..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-503 +++ /dev/null @@ -1 +0,0 @@ -foo[0:10:] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-504 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-504 deleted file mode 100644 index 081e93a..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-504 +++ /dev/null @@ -1 +0,0 @@ -foo[0::1] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-505 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-505 deleted file mode 100644 index 9227001..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-505 +++ /dev/null @@ -1 +0,0 @@ -foo[0::] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-506 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-506 deleted file mode 100644 index fd2294d..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-506 +++ /dev/null @@ -1 +0,0 @@ -foo[0:] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-507 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-507 deleted file mode 100644 index c6b551d..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-507 +++ /dev/null @@ -1 +0,0 @@ -foo[:10:1] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-508 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-508 deleted file mode 100644 index 503f58d..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-508 +++ /dev/null @@ -1 +0,0 @@ -foo[::1] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-509 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-509 deleted file mode 100644 index f78bb77..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-509 +++ /dev/null @@ -1 +0,0 @@ -foo[:10:] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-51 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-51 deleted file mode 100644 index 589a214..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-51 +++ /dev/null @@ -1 +0,0 @@ -foo[?key == `[1]`] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-510 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-510 deleted file mode 100644 index eb9d2ba..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-510 +++ /dev/null @@ -1 +0,0 @@ -foo[::] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-511 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-511 deleted file mode 100644 index 1921a3d..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-511 +++ /dev/null @@ -1 +0,0 @@ -foo[:] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-512 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-512 deleted file mode 100644 index a87afcb..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-512 +++ /dev/null @@ -1 +0,0 @@ -foo[1:9] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-513 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-513 deleted file mode 100644 index dbf51d8..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-513 +++ /dev/null @@ -1 +0,0 @@ -foo[0:10:2] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-514 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-514 deleted file mode 100644 index f728876..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-514 +++ /dev/null @@ -1 +0,0 @@ -foo[5:] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-515 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-515 deleted file mode 100644 index 6439576..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-515 +++ /dev/null @@ -1 +0,0 @@ -foo[5::2] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-516 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-516 deleted file mode 100644 index 706bb14..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-516 +++ /dev/null @@ -1 +0,0 @@ -foo[::2] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-517 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-517 deleted file mode 100644 index 8fcfaee..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-517 +++ /dev/null @@ -1 +0,0 @@ -foo[::-1] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-518 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-518 deleted file mode 100644 index f6a00bf..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-518 +++ /dev/null @@ -1 +0,0 @@ -foo[1::2] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-519 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-519 deleted file mode 100644 index ea068ee..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-519 +++ /dev/null @@ -1 +0,0 @@ -foo[10:0:-1] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-52 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-52 deleted file mode 100644 index 214917a..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-52 +++ /dev/null @@ -1 +0,0 @@ -foo[?key == `{"a":2}`] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-520 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-520 deleted file mode 100644 index 1fe1425..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-520 +++ /dev/null @@ -1 +0,0 @@ -foo[10:5:-1] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-521 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-521 deleted file mode 100644 index 4ba0e13..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-521 +++ /dev/null @@ -1 +0,0 @@ -foo[8:2:-2] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-522 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-522 deleted file mode 100644 index 25db439..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-522 +++ /dev/null @@ -1 +0,0 @@ -foo[0:20] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-523 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-523 deleted file mode 100644 index 8a96592..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-523 +++ /dev/null @@ -1 +0,0 @@ -foo[10:-20:-1] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-524 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-524 deleted file mode 100644 index b1e5ba3..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-524 +++ /dev/null @@ -1 +0,0 @@ -foo[10:-20] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-525 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-525 deleted file mode 100644 index 0625311..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-525 +++ /dev/null @@ -1 +0,0 @@ -foo[-4:-1] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-526 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-526 deleted file mode 100644 index 1e14a6a..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-526 +++ /dev/null @@ -1 +0,0 @@ -foo[:-5:-1] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-527 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-527 deleted file mode 100644 index aef5c27..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-527 +++ /dev/null @@ -1 +0,0 @@ -foo[:2].a \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-528 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-528 deleted file mode 100644 index 93c95fc..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-528 +++ /dev/null @@ -1 +0,0 @@ -foo[:2].b \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-529 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-529 deleted file mode 100644 index 7e0733e..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-529 +++ /dev/null @@ -1 +0,0 @@ -foo[:2].a.b \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-53 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-53 deleted file mode 100644 index 4c002ed..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-53 +++ /dev/null @@ -1 +0,0 @@ -foo[?`true` == key] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-530 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-530 deleted file mode 100644 index 2438b25..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-530 +++ /dev/null @@ -1 +0,0 @@ -bar[::-1].a.b \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-531 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-531 deleted file mode 100644 index 549994b..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-531 +++ /dev/null @@ -1 +0,0 @@ -bar[:2].a.b \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-532 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-532 deleted file mode 100644 index ab98292..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-532 +++ /dev/null @@ -1 +0,0 @@ -baz[:2].a \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-533 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-533 deleted file mode 100644 index 65fca96..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-533 +++ /dev/null @@ -1 +0,0 @@ -[:] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-534 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-534 deleted file mode 100644 index 18c5daf..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-534 +++ /dev/null @@ -1 +0,0 @@ -[:2].a \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-535 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-535 deleted file mode 100644 index 1bb84f7..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-535 +++ /dev/null @@ -1 +0,0 @@ -[::-1].a \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-536 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-536 deleted file mode 100644 index 7a0416f..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-536 +++ /dev/null @@ -1 +0,0 @@ -[:2].b \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-537 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-537 deleted file mode 100644 index 4d5f975..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-537 +++ /dev/null @@ -1 +0,0 @@ -foo.bar \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-538 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-538 deleted file mode 100644 index 1910281..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-538 +++ /dev/null @@ -1 +0,0 @@ -foo \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-539 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-539 deleted file mode 100644 index f59ec20..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-539 +++ /dev/null @@ -1 +0,0 @@ -* \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-54 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-54 deleted file mode 100644 index 23d2707..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-54 +++ /dev/null @@ -1 +0,0 @@ -foo[?`false` == key] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-540 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-540 deleted file mode 100644 index dee5695..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-540 +++ /dev/null @@ -1 +0,0 @@ -*.* \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-541 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-541 deleted file mode 100644 index 1a16f74..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-541 +++ /dev/null @@ -1 +0,0 @@ -*.foo \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-542 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-542 deleted file mode 100644 index 7e8066d..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-542 +++ /dev/null @@ -1 +0,0 @@ -*[0] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-543 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-543 deleted file mode 100644 index 0637a08..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-543 +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-544 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-544 deleted file mode 100644 index 6e7ea63..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-544 +++ /dev/null @@ -1 +0,0 @@ -[0] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-545 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-545 deleted file mode 100644 index 5a51946..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-545 +++ /dev/null @@ -1 +0,0 @@ -[*] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-546 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-546 deleted file mode 100644 index 4161274..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-546 +++ /dev/null @@ -1 +0,0 @@ -*.["0"] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-547 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-547 deleted file mode 100644 index cd9fb6b..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-547 +++ /dev/null @@ -1 +0,0 @@ -[*].bar \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-548 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-548 deleted file mode 100644 index 9f3ada4..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-548 +++ /dev/null @@ -1 +0,0 @@ -[*][0] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-549 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-549 deleted file mode 100644 index 9b0b2f8..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-549 +++ /dev/null @@ -1 +0,0 @@ -foo[0] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-55 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-55 deleted file mode 100644 index 6d840ee..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-55 +++ /dev/null @@ -1 +0,0 @@ -foo[?`0` == key] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-550 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-550 deleted file mode 100644 index b23413b..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-550 +++ /dev/null @@ -1 +0,0 @@ -foo.[*] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-551 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-551 deleted file mode 100644 index 08ab2e1..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-551 +++ /dev/null @@ -1 +0,0 @@ -foo.[abc] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-552 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-552 deleted file mode 100644 index 78b05a5..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-552 +++ /dev/null @@ -1 +0,0 @@ -foo.[abc, def] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-553 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-553 deleted file mode 100644 index 1e7b886..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-553 +++ /dev/null @@ -1 +0,0 @@ -a.{foo: bar} \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-554 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-554 deleted file mode 100644 index 91b4c98..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-554 +++ /dev/null @@ -1 +0,0 @@ -a.{foo: bar, baz: bam} \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-555 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-555 deleted file mode 100644 index 8301ef9..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-555 +++ /dev/null @@ -1 +0,0 @@ -{"\\":{" ":*}} \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-556 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-556 deleted file mode 100644 index 8f75cc9..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-556 +++ /dev/null @@ -1 +0,0 @@ -foo || bar \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-557 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-557 deleted file mode 100644 index e5f122c..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-557 +++ /dev/null @@ -1 +0,0 @@ -foo.[a || b] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-558 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-558 deleted file mode 100644 index 39d1914..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-558 +++ /dev/null @@ -1 +0,0 @@ -foo[?bar==`"baz"`] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-559 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-559 deleted file mode 100644 index d08bbe2..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-559 +++ /dev/null @@ -1 +0,0 @@ -foo[? bar == `"baz"` ] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-56 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-56 deleted file mode 100644 index addaf20..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-56 +++ /dev/null @@ -1 +0,0 @@ -foo[?`1` == key] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-560 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-560 deleted file mode 100644 index a77f355..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-560 +++ /dev/null @@ -1 +0,0 @@ -foo[?a.b.c==d.e.f] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-561 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-561 deleted file mode 100644 index c9697aa..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-561 +++ /dev/null @@ -1 +0,0 @@ -foo[?bar==`[0, 1, 2]`] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-562 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-562 deleted file mode 100644 index fd7064a..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-562 +++ /dev/null @@ -1 +0,0 @@ -foo[?bar==`["a", "b", "c"]`] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-563 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-563 deleted file mode 100644 index 61e5e1b..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-563 +++ /dev/null @@ -1 +0,0 @@ -foo[?bar==`["foo\`bar"]`] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-564 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-564 deleted file mode 100644 index bc9d8af..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-564 +++ /dev/null @@ -1 +0,0 @@ -[?"\\">`"foo"`] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-565 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-565 deleted file mode 100644 index 2dd54dc..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-565 +++ /dev/null @@ -1 +0,0 @@ -[?"\\" > `"foo"`] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-566 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-566 deleted file mode 100644 index 1910281..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-566 +++ /dev/null @@ -1 +0,0 @@ -foo \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-567 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-567 deleted file mode 100644 index 7e9668e..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-567 +++ /dev/null @@ -1 +0,0 @@ -"foo" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-568 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-568 deleted file mode 100644 index d58ac16..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-568 +++ /dev/null @@ -1 +0,0 @@ -"\\" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-569 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-569 deleted file mode 100644 index 33ac9fb..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-569 +++ /dev/null @@ -1 +0,0 @@ -*||*|*|* \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-57 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-57 deleted file mode 100644 index acf2435..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-57 +++ /dev/null @@ -1 +0,0 @@ -foo[?`[0]` == key] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-570 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-570 deleted file mode 100644 index 99e1963..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-570 +++ /dev/null @@ -1 +0,0 @@ -*[]||[*] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-571 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-571 deleted file mode 100644 index be08450..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-571 +++ /dev/null @@ -1 +0,0 @@ -[*.*] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-572 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-572 deleted file mode 100644 index a84b51e..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-572 +++ /dev/null @@ -1 +0,0 @@ -foo[]."✓" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-573 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-573 deleted file mode 100644 index c2de558..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-573 +++ /dev/null @@ -1 +0,0 @@ -"☯" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-574 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-574 deleted file mode 100644 index dc2dda0..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-574 +++ /dev/null @@ -1 +0,0 @@ -"♪♫•*¨*•.¸¸❤¸¸.•*¨*•♫♪" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-575 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-575 deleted file mode 100644 index a2d3d5f..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-575 +++ /dev/null @@ -1 +0,0 @@ -"☃" \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-576 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-576 deleted file mode 100644 index 0971c37..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-576 +++ /dev/null @@ -1 +0,0 @@ -foo.*.baz \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-577 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-577 deleted file mode 100644 index 0e39dfd..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-577 +++ /dev/null @@ -1 +0,0 @@ -foo.bar.* \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-578 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-578 deleted file mode 100644 index 89c1ce2..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-578 +++ /dev/null @@ -1 +0,0 @@ -foo.*.notbaz \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-579 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-579 deleted file mode 100644 index 5199b9f..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-579 +++ /dev/null @@ -1 +0,0 @@ -foo.*.notbaz[0] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-58 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-58 deleted file mode 100644 index 99fe382..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-58 +++ /dev/null @@ -1 +0,0 @@ -foo[?`{"bar": [0]}` == key] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-580 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-580 deleted file mode 100644 index 5bb6d4a..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-580 +++ /dev/null @@ -1 +0,0 @@ -foo.*.notbaz[-1] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-581 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-581 deleted file mode 100644 index edac731..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-581 +++ /dev/null @@ -1 +0,0 @@ -foo.* \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-582 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-582 deleted file mode 100644 index 458d0a6..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-582 +++ /dev/null @@ -1 +0,0 @@ -foo.*.* \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-583 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-583 deleted file mode 100644 index f757fd5..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-583 +++ /dev/null @@ -1 +0,0 @@ -foo.*.*.* \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-584 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-584 deleted file mode 100644 index 670049d..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-584 +++ /dev/null @@ -1 +0,0 @@ -foo.*.*.*.* \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-585 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-585 deleted file mode 100644 index 3c88caa..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-585 +++ /dev/null @@ -1 +0,0 @@ -*.bar \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-586 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-586 deleted file mode 100644 index f59ec20..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-586 +++ /dev/null @@ -1 +0,0 @@ -* \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-587 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-587 deleted file mode 100644 index 0852fcc..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-587 +++ /dev/null @@ -1 +0,0 @@ -*.sub1 \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-588 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-588 deleted file mode 100644 index dee5695..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-588 +++ /dev/null @@ -1 +0,0 @@ -*.* \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-589 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-589 deleted file mode 100644 index 66781bb..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-589 +++ /dev/null @@ -1 +0,0 @@ -*.*.foo \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-59 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-59 deleted file mode 100644 index 4aad20a..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-59 +++ /dev/null @@ -1 +0,0 @@ -foo[?`null` == key] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-590 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-590 deleted file mode 100644 index 0db15d9..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-590 +++ /dev/null @@ -1 +0,0 @@ -*.sub1.foo \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-591 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-591 deleted file mode 100644 index b24be9d..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-591 +++ /dev/null @@ -1 +0,0 @@ -foo[*].bar \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-592 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-592 deleted file mode 100644 index e6efe13..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-592 +++ /dev/null @@ -1 +0,0 @@ -foo[*].notbar \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-593 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-593 deleted file mode 100644 index 5a51946..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-593 +++ /dev/null @@ -1 +0,0 @@ -[*] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-594 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-594 deleted file mode 100644 index cd9fb6b..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-594 +++ /dev/null @@ -1 +0,0 @@ -[*].bar \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-595 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-595 deleted file mode 100644 index cbf1a5d..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-595 +++ /dev/null @@ -1 +0,0 @@ -[*].notbar \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-596 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-596 deleted file mode 100644 index 8bd13b7..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-596 +++ /dev/null @@ -1 +0,0 @@ -foo.bar[*].baz \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-597 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-597 deleted file mode 100644 index 7239f3e..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-597 +++ /dev/null @@ -1 +0,0 @@ -foo.bar[*].baz[0] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-598 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-598 deleted file mode 100644 index f5e431d..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-598 +++ /dev/null @@ -1 +0,0 @@ -foo.bar[*].baz[1] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-599 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-599 deleted file mode 100644 index d0c2595..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-599 +++ /dev/null @@ -1 +0,0 @@ -foo.bar[*].baz[2] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-6 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-6 deleted file mode 100644 index b9749b7..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-6 +++ /dev/null @@ -1 +0,0 @@ -foo.bad \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-60 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-60 deleted file mode 100644 index dac6750..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-60 +++ /dev/null @@ -1 +0,0 @@ -foo[?`[1]` == key] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-600 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-600 deleted file mode 100644 index a638827..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-600 +++ /dev/null @@ -1 +0,0 @@ -foo.bar[*].baz[3] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-601 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-601 deleted file mode 100644 index 2a66ffe..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-601 +++ /dev/null @@ -1 +0,0 @@ -foo.bar[*] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-602 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-602 deleted file mode 100644 index b6b3695..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-602 +++ /dev/null @@ -1 +0,0 @@ -foo.bar[0] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-603 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-603 deleted file mode 100644 index 7e57f9e..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-603 +++ /dev/null @@ -1 +0,0 @@ -foo.bar[0][0] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-604 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-604 deleted file mode 100644 index c5f8bef..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-604 +++ /dev/null @@ -1 +0,0 @@ -foo.bar[0][0][0] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-605 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-605 deleted file mode 100644 index 3decf08..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-605 +++ /dev/null @@ -1 +0,0 @@ -foo.bar[0][0][0][0] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-606 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-606 deleted file mode 100644 index 655e295..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-606 +++ /dev/null @@ -1 +0,0 @@ -foo[0][0] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-607 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-607 deleted file mode 100644 index 2aa1597..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-607 +++ /dev/null @@ -1 +0,0 @@ -foo[*].bar[*].kind \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-608 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-608 deleted file mode 100644 index 556b380..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-608 +++ /dev/null @@ -1 +0,0 @@ -foo[*].bar[0].kind \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-609 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-609 deleted file mode 100644 index 0de3229..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-609 +++ /dev/null @@ -1 +0,0 @@ -foo[*].bar.kind \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-61 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-61 deleted file mode 100644 index 130ed3b..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-61 +++ /dev/null @@ -1 +0,0 @@ -foo[?`{"a":2}` == key] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-610 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-610 deleted file mode 100644 index 3b511f1..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-610 +++ /dev/null @@ -1 +0,0 @@ -foo[*].bar[0] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-611 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-611 deleted file mode 100644 index c8dfa16..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-611 +++ /dev/null @@ -1 +0,0 @@ -foo[*].bar[1] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-612 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-612 deleted file mode 100644 index 69f04ee..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-612 +++ /dev/null @@ -1 +0,0 @@ -foo[*].bar[2] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-613 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-613 deleted file mode 100644 index 3b511f1..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-613 +++ /dev/null @@ -1 +0,0 @@ -foo[*].bar[0] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-614 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-614 deleted file mode 100644 index 03e0c0c..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-614 +++ /dev/null @@ -1 +0,0 @@ -foo[*][0] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-615 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-615 deleted file mode 100644 index ac1c896..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-615 +++ /dev/null @@ -1 +0,0 @@ -foo[*][1] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-616 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-616 deleted file mode 100644 index 03e0c0c..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-616 +++ /dev/null @@ -1 +0,0 @@ -foo[*][0] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-617 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-617 deleted file mode 100644 index ac1c896..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-617 +++ /dev/null @@ -1 +0,0 @@ -foo[*][1] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-618 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-618 deleted file mode 100644 index 6494cf1..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-618 +++ /dev/null @@ -1 +0,0 @@ -foo[*][0][0] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-619 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-619 deleted file mode 100644 index 1406be5..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-619 +++ /dev/null @@ -1 +0,0 @@ -foo[*][1][0] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-62 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-62 deleted file mode 100644 index 3d15fcc..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-62 +++ /dev/null @@ -1 +0,0 @@ -foo[?key != `true`] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-620 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-620 deleted file mode 100644 index 72b5aa2..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-620 +++ /dev/null @@ -1 +0,0 @@ -foo[*][0][1] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-621 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-621 deleted file mode 100644 index 02a2649..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-621 +++ /dev/null @@ -1 +0,0 @@ -foo[*][1][1] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-622 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-622 deleted file mode 100644 index cb08037..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-622 +++ /dev/null @@ -1 +0,0 @@ -foo[*][2] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-623 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-623 deleted file mode 100644 index 91d6959..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-623 +++ /dev/null @@ -1 +0,0 @@ -foo[*][2][2] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-624 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-624 deleted file mode 100644 index f40f261..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-624 +++ /dev/null @@ -1 +0,0 @@ -bar[*] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-625 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-625 deleted file mode 100644 index 03904b1..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-625 +++ /dev/null @@ -1 +0,0 @@ -bar[*].baz[*] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-626 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-626 deleted file mode 100644 index fd7c21c..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-626 +++ /dev/null @@ -1 +0,0 @@ -string[*] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-627 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-627 deleted file mode 100644 index d7ca471..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-627 +++ /dev/null @@ -1 +0,0 @@ -hash[*] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-628 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-628 deleted file mode 100644 index b3ddffe..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-628 +++ /dev/null @@ -1 +0,0 @@ -number[*] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-629 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-629 deleted file mode 100644 index c03cd39..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-629 +++ /dev/null @@ -1 +0,0 @@ -nullvalue[*] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-63 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-63 deleted file mode 100644 index 08731af..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-63 +++ /dev/null @@ -1 +0,0 @@ -foo[?key != `false`] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-630 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-630 deleted file mode 100644 index b3c40cd..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-630 +++ /dev/null @@ -1 +0,0 @@ -string[*].foo \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-631 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-631 deleted file mode 100644 index c5930d5..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-631 +++ /dev/null @@ -1 +0,0 @@ -hash[*].foo \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-632 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-632 deleted file mode 100644 index cc0b1a4..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-632 +++ /dev/null @@ -1 +0,0 @@ -number[*].foo \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-633 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-633 deleted file mode 100644 index d677b96..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-633 +++ /dev/null @@ -1 +0,0 @@ -nullvalue[*].foo \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-634 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-634 deleted file mode 100644 index c116664..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-634 +++ /dev/null @@ -1 +0,0 @@ -nullvalue[*].foo[*].bar \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-635 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-635 deleted file mode 100644 index e339977..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-635 +++ /dev/null @@ -1 +0,0 @@ -string.* \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-636 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-636 deleted file mode 100644 index 76f5345..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-636 +++ /dev/null @@ -1 +0,0 @@ -hash.* \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-637 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-637 deleted file mode 100644 index dd48507..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-637 +++ /dev/null @@ -1 +0,0 @@ -number.* \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-638 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-638 deleted file mode 100644 index 16000c0..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-638 +++ /dev/null @@ -1 +0,0 @@ -array.* \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-639 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-639 deleted file mode 100644 index 1d0d03e..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-639 +++ /dev/null @@ -1 +0,0 @@ -nullvalue.* \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-64 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-64 deleted file mode 100644 index b67aebe..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-64 +++ /dev/null @@ -1 +0,0 @@ -foo[?key != `0`] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-640 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-640 deleted file mode 100644 index 7e8066d..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-640 +++ /dev/null @@ -1 +0,0 @@ -*[0] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-641 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-641 deleted file mode 100644 index 41ebe5b..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-641 +++ /dev/null @@ -1 +0,0 @@ -`foo` \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-642 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-642 deleted file mode 100644 index fe03979..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-642 +++ /dev/null @@ -1 +0,0 @@ -`foo\"quote` \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-643 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-643 deleted file mode 100644 index 1a27fd8..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-643 +++ /dev/null @@ -1 +0,0 @@ -`✓` \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-644 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-644 deleted file mode 100644 index 559a134..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-644 +++ /dev/null @@ -1 +0,0 @@ -`foo\"bar` \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-645 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-645 deleted file mode 100644 index e31621b..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-645 +++ /dev/null @@ -1 +0,0 @@ -`1\`` \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-646 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-646 deleted file mode 100644 index 6bf7a10..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-646 +++ /dev/null @@ -1 +0,0 @@ -`\\`.{a:`b`} \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-647 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-647 deleted file mode 100644 index 41ebe5b..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-647 +++ /dev/null @@ -1 +0,0 @@ -`foo` \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-648 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-648 deleted file mode 100644 index 28b9bcb..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-648 +++ /dev/null @@ -1 +0,0 @@ -` foo` \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-649 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-649 deleted file mode 100644 index 41ebe5b..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-649 +++ /dev/null @@ -1 +0,0 @@ -`foo` \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-65 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-65 deleted file mode 100644 index d3ac793..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-65 +++ /dev/null @@ -1 +0,0 @@ -foo[?key != `1`] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-650 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-650 deleted file mode 100644 index fe03979..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-650 +++ /dev/null @@ -1 +0,0 @@ -`foo\"quote` \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-651 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-651 deleted file mode 100644 index 1a27fd8..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-651 +++ /dev/null @@ -1 +0,0 @@ -`✓` \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-652 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-652 deleted file mode 100644 index 559a134..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-652 +++ /dev/null @@ -1 +0,0 @@ -`foo\"bar` \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-653 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-653 deleted file mode 100644 index e31621b..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-653 +++ /dev/null @@ -1 +0,0 @@ -`1\`` \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-654 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-654 deleted file mode 100644 index 6bf7a10..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-654 +++ /dev/null @@ -1 +0,0 @@ -`\\`.{a:`b`} \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-655 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-655 deleted file mode 100644 index 41ebe5b..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-655 +++ /dev/null @@ -1 +0,0 @@ -`foo` \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-656 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-656 deleted file mode 100644 index 28b9bcb..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-656 +++ /dev/null @@ -1 +0,0 @@ -` foo` \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-66 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-66 deleted file mode 100644 index 065295b..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-66 +++ /dev/null @@ -1 +0,0 @@ -foo[?key != `null`] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-67 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-67 deleted file mode 100644 index 43d1649..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-67 +++ /dev/null @@ -1 +0,0 @@ -foo[?key != `[1]`] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-68 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-68 deleted file mode 100644 index 6b884fa..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-68 +++ /dev/null @@ -1 +0,0 @@ -foo[?key != `{"a":2}`] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-69 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-69 deleted file mode 100644 index d85c779..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-69 +++ /dev/null @@ -1 +0,0 @@ -foo[?`true` != key] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-7 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-7 deleted file mode 100644 index 44d6628..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-7 +++ /dev/null @@ -1 +0,0 @@ -bad \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-70 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-70 deleted file mode 100644 index 3e6dcf3..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-70 +++ /dev/null @@ -1 +0,0 @@ -foo[?`false` != key] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-71 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-71 deleted file mode 100644 index bdb820b..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-71 +++ /dev/null @@ -1 +0,0 @@ -foo[?`0` != key] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-72 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-72 deleted file mode 100644 index 3f3048a..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-72 +++ /dev/null @@ -1 +0,0 @@ -foo[?`1` != key] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-73 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-73 deleted file mode 100644 index dacc257..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-73 +++ /dev/null @@ -1 +0,0 @@ -foo[?`null` != key] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-74 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-74 deleted file mode 100644 index 32ebae8..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-74 +++ /dev/null @@ -1 +0,0 @@ -foo[?`[1]` != key] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-75 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-75 deleted file mode 100644 index dcd023e..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-75 +++ /dev/null @@ -1 +0,0 @@ -foo[?`{"a":2}` != key] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-76 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-76 deleted file mode 100644 index e08cc13..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-76 +++ /dev/null @@ -1 +0,0 @@ -reservations[].instances[?bar==`1`] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-77 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-77 deleted file mode 100644 index 1ec43f4..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-77 +++ /dev/null @@ -1 +0,0 @@ -reservations[*].instances[?bar==`1`] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-78 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-78 deleted file mode 100644 index 3038711..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-78 +++ /dev/null @@ -1 +0,0 @@ -reservations[].instances[?bar==`1`][] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-79 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-79 deleted file mode 100644 index e387574..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-79 +++ /dev/null @@ -1 +0,0 @@ -foo[?bar==`1`].bar[0] \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-8 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-8 deleted file mode 100644 index da7bc1c..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-8 +++ /dev/null @@ -1 +0,0 @@ -bad.morebad.morebad \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-80 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-80 deleted file mode 100644 index 5c3d683..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-80 +++ /dev/null @@ -1 +0,0 @@ -foo[?a==`1`].b.c \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-81 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-81 deleted file mode 100644 index 6232808..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-81 +++ /dev/null @@ -1 +0,0 @@ -abs(foo) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-82 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-82 deleted file mode 100644 index 6232808..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-82 +++ /dev/null @@ -1 +0,0 @@ -abs(foo) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-83 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-83 deleted file mode 100644 index 29497f4..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-83 +++ /dev/null @@ -1 +0,0 @@ -abs(array[1]) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-84 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-84 deleted file mode 100644 index 29497f4..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-84 +++ /dev/null @@ -1 +0,0 @@ -abs(array[1]) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-85 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-85 deleted file mode 100644 index 3466965..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-85 +++ /dev/null @@ -1 +0,0 @@ -abs(`-24`) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-86 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-86 deleted file mode 100644 index 3466965..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-86 +++ /dev/null @@ -1 +0,0 @@ -abs(`-24`) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-87 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-87 deleted file mode 100644 index c6268f8..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-87 +++ /dev/null @@ -1 +0,0 @@ -avg(numbers) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-88 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-88 deleted file mode 100644 index 7ce7036..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-88 +++ /dev/null @@ -1 +0,0 @@ -ceil(`1.2`) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-89 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-89 deleted file mode 100644 index 0561bc2..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-89 +++ /dev/null @@ -1 +0,0 @@ -ceil(decimals[0]) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-9 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-9 deleted file mode 100644 index 1910281..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-9 +++ /dev/null @@ -1 +0,0 @@ -foo \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-90 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-90 deleted file mode 100644 index c78c1fc..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-90 +++ /dev/null @@ -1 +0,0 @@ -ceil(decimals[1]) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-91 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-91 deleted file mode 100644 index ebcb4bb..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-91 +++ /dev/null @@ -1 +0,0 @@ -ceil(decimals[2]) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-92 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-92 deleted file mode 100644 index 6edbf1a..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-92 +++ /dev/null @@ -1 +0,0 @@ -contains('abc', 'a') \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-93 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-93 deleted file mode 100644 index d2b2f07..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-93 +++ /dev/null @@ -1 +0,0 @@ -contains('abc', 'd') \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-94 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-94 deleted file mode 100644 index 3535da2..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-94 +++ /dev/null @@ -1 +0,0 @@ -contains(strings, 'a') \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-95 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-95 deleted file mode 100644 index ba839fe..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-95 +++ /dev/null @@ -1 +0,0 @@ -contains(decimals, `1.2`) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-96 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-96 deleted file mode 100644 index f435818..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-96 +++ /dev/null @@ -1 +0,0 @@ -contains(decimals, `false`) \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-97 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-97 deleted file mode 100644 index adb65fc..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-97 +++ /dev/null @@ -1 +0,0 @@ -ends_with(str, 'r') \ No newline at end of file diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-98 b/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-98 deleted file mode 100644 index 93d6901..0000000 --- a/vendor/github.com/jmespath/go-jmespath/fuzz/testdata/expr-98 +++ /dev/null @@ -1 +0,0 @@ -ends_with(str, 'tr') \ No newline at end of file