Browse Source

Merge branch 'master' into cli_db_commands

bergquist 9 years ago
parent
commit
cd85e1f651
100 changed files with 110 additions and 16058 deletions
  1. 1 1
      .editorconfig
  2. 3 3
      .github/CONTRIBUTING.md
  3. 6 5
      .github/ISSUE_TEMPLATE.md
  4. 2 1
      .gitignore
  5. 1 1
      .hooks/pre-commit
  6. 97 3
      CHANGELOG.md
  7. 0 372
      Godeps/Godeps.json
  8. 0 5
      Godeps/Readme
  9. 0 2
      Godeps/_workspace/.gitignore
  10. 0 11
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/.gitignore
  11. 0 14
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/.godoc_config
  12. 0 23
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/.travis.yml
  13. 0 7
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/.yardopts
  14. 0 152
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/Makefile
  15. 0 116
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/README.md
  16. 0 100
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/awsutil/copy.go
  17. 0 233
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/awsutil/copy_test.go
  18. 0 29
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/awsutil/equal_test.go
  19. 0 222
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/awsutil/path_value.go
  20. 0 142
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/awsutil/path_value_test.go
  21. 0 107
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/awsutil/prettify.go
  22. 0 120
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/client/client.go
  23. 0 422
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/config.go
  24. 0 86
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/config_test.go
  25. 0 437
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/convert_types_test.go
  26. 0 152
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/corehandlers/handlers.go
  27. 0 192
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/corehandlers/handlers_test.go
  28. 0 254
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/corehandlers/param_validator_test.go
  29. 0 100
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/chain_provider.go
  30. 0 154
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/chain_provider_test.go
  31. 0 73
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/credentials_test.go
  32. 0 178
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds/ec2_role_provider.go
  33. 0 159
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds/ec2_role_provider_test.go
  34. 0 111
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/endpointcreds/provider_test.go
  35. 0 70
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/env_provider_test.go
  36. 0 116
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/shared_credentials_provider_test.go
  37. 0 34
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/static_provider_test.go
  38. 0 56
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/stscreds/assume_role_provider_test.go
  39. 0 129
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/defaults/defaults.go
  40. 0 39
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/defaults/defaults_test.go
  41. 0 140
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/ec2metadata/api.go
  42. 0 195
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/ec2metadata/api_test.go
  43. 0 78
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/ec2metadata/service_test.go
  44. 0 87
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request/handlers_test.go
  45. 0 33
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request/http_request.go
  46. 0 31
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request/http_request_1_4.go
  47. 0 34
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request/http_request_copy_test.go
  48. 0 37
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request/http_request_retry_test.go
  49. 0 49
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request/offset_reader.go
  50. 0 122
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request/offset_reader_test.go
  51. 0 326
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request/request.go
  52. 0 33
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request/request_1_6_test.go
  53. 0 455
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request/request_pagination_test.go
  54. 0 380
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request/request_test.go
  55. 0 16
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request/retryer_test.go
  56. 0 229
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/session/doc.go
  57. 0 276
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/session/env_config_test.go
  58. 0 388
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/session/session.go
  59. 0 344
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/session/session_test.go
  60. 0 294
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/session/shared_config.go
  61. 0 264
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/session/shared_config_test.go
  62. 0 77
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/signer/v4/functional_test.go
  63. 0 57
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/signer/v4/header_rules_test.go
  64. 0 644
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go
  65. 0 353
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/signer/v4/v4_test.go
  66. 0 75
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/types_test.go
  67. 0 8
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/version.go
  68. 0 19
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/Godeps/Godeps.json
  69. 0 5
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/Godeps/Readme
  70. 0 200
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/gen/gen.go
  71. 0 116
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/rename/rename.go
  72. 0 2120
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/rename/renames.go
  73. 0 45
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/renamer.go
  74. 0 624
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/ast/astutil/enclosing.go
  75. 0 400
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/ast/astutil/imports.go
  76. 0 14
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/ast/astutil/util.go
  77. 0 195
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/buildutil/allpackages.go
  78. 0 108
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/buildutil/fakecontext.go
  79. 0 75
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/buildutil/tags.go
  80. 0 167
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/buildutil/util.go
  81. 0 209
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/loader/cgo.go
  82. 0 39
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/loader/cgo_pkgconfig.go
  83. 0 205
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/loader/doc.go
  84. 0 13
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/loader/go16.go
  85. 0 1059
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/loader/loader.go
  86. 0 124
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/loader/util.go
  87. 0 163
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/awstesting/assert.go
  88. 0 64
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/awstesting/assert_test.go
  89. 0 20
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/awstesting/client.go
  90. 0 124
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/integration_test.go
  91. 0 29
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/s3crypto/client.go
  92. 0 18
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/s3crypto/s3_crypto.feature
  93. 0 192
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/s3crypto/stepdef.go
  94. 0 163
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/s3manager/integration_test.go
  95. 0 1
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/s3manager/stub.go
  96. 0 1
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/stub.go
  97. 0 44
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/awstesting/integration/integration.go
  98. 0 14
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/awstesting/integration/smoke/acm/acm.feature
  99. 0 16
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/awstesting/integration/smoke/acm/client.go
  100. 0 16
      Godeps/_workspace/src/github.com/aws/aws-sdk-go/awstesting/integration/smoke/apigateway/apigateway.feature

+ 1 - 1
.editorconfig

@@ -2,7 +2,7 @@
 root = true
 
 [*.go]
-indent_style = tabs
+indent_style = tab
 indent_size = 2
 charset = utf-8
 trim_trailing_whitespace = true

+ 3 - 3
.github/CONTRIBUTING.md

@@ -12,11 +12,11 @@ grunt karma:dev
 
 ### Run tests for backend assets before commit
 ```
-test -z "$(gofmt -s -l . | grep -v Godeps/_workspace/src/ | tee /dev/stderr)"
+test -z "$(gofmt -s -l . | grep -v -E 'vendor/(github.com|golang.org|gopkg.in)' | tee /dev/stderr)"
 ```
 
 ### Run tests for frontend assets before commit
 ```
-grunt test
-godep go test -v ./pkg/...
+npm test
+go test -v ./pkg/...
 ```

+ 6 - 5
.github/ISSUE_TEMPLATE.md

@@ -1,7 +1,5 @@
-* **I'm submitting a ...**
-- [ ] Bug report
-- [ ] Feature request
-- [ ] Question / Support request: **Please do not** open a github issue. [Support Options](http://grafana.org/support/)
+Please prefix your title with [Bug] or [Feature request]
+For question please check [Support Options](http://grafana.org/support/). **Do not** open a github issue
 
 Please include this information:
 - What Grafana version are you using?
@@ -11,7 +9,10 @@ Please include this information:
 - What was the expected result?
 - What happened instead?
 
-**IMPORTANT** If it relates to metric data viz:
+**IMPORTANT** 
+If it relates to *metric data viz*:
 - An image or text representation of your metric query
 - The raw query and response for the network request (check this in chrome dev tools network tab, here you can see metric requests and other request, please include the request body and request response)
 
+If it relates to *alerting*
+- An image of the test execution data fully expanded.

+ 2 - 1
.gitignore

@@ -25,6 +25,7 @@ public/css/*.min.css
 *.swp
 .idea/
 *.iml
+.vscode/
 
 /data/*
 /bin/*
@@ -37,4 +38,4 @@ profile.cov
 .notouch
 /pkg/cmd/grafana-cli/grafana-cli
 /pkg/cmd/grafana-server/grafana-server
-/examples/*/dist
+/examples/*/dist

+ 1 - 1
.hooks/pre-commit

@@ -1,6 +1,6 @@
 #!/usr/bin/env bash
 
-test -z "$(gofmt -s -l . | grep -v Godeps/_workspace/src/ | tee /dev/stderr)"
+test -z "$(gofmt -s -l . | grep -v vendor/src/ | tee /dev/stderr)"
 if [ $? -gt 0 ]; then
     echo "Some files aren't formatted, please run 'go fmt ./pkg/...' to format your source code before committing"
     exit 1

+ 97 - 3
CHANGELOG.md

@@ -1,20 +1,115 @@
-# 4.0-pre (unreleased)
+# 4.1-beta (unreleased)
+
+### Enhancements
+* **Postgres**: Add support for Certs for Postgres database [#6655](https://github.com/grafana/grafana/issues/6655)
+* **Victorops**: Add VictorOps notification integration [#6411](https://github.com/grafana/grafana/issues/6411), thx [@ichekrygin](https://github.com/ichekrygin)
+* **Opsgenie**: Add OpsGenie notification integratiion [#6687](https://github.com/grafana/grafana/issues/6687), thx [@kylemcc](https://github.com/kylemcc)
+* **Singlestat**: New aggregation on singlestat panel [#6740](https://github.com/grafana/grafana/pull/6740), thx [@dirk-leroux](https://github.com/dirk-leroux)
+* **Cloudwatch**: Make it possible to specify access and secret key on the data source config page [#6697](https://github.com/grafana/grafana/issues/6697)
+* **Table**: Added Hidden Column Style for Table Panel [#5677](https://github.com/grafana/grafana/pull/5677), thx [@bmundt](https://github.com/bmundt)
+* **Graph**: Shared crosshair option renamed to shared tooltip, shows tooltip on all graphs as you hover over one graph. [#1578](https://github.com/grafana/grafana/pull/1578), [#6274](https://github.com/grafana/grafana/pull/6274)
+* **Elasticsearch**: Added support for Missing option (bucket) for terms aggregation [#4244](https://github.com/grafana/grafana/pull/4244), thx [@shanielh](https://github.com/shanielh)
+* **Elasticsearch**: Added support for Elasticsearch 5.x [#6356](https://github.com/grafana/grafana/pull/6356), thx [@lpic10](https://github.com/lpic10)
+
+### Bugfixes
+* **API**: HTTP API for deleting org returning incorrect message for a non-existing org [#6679](https://github.com/grafana/grafana/issues/6679)
+* **Dashboard**: Posting empty dashboard result in corrupted dashboard [#5443](https://github.com/grafana/grafana/issues/5443)
+
+# 4.0.2 (2016-12-08)
+
+### Enhancements
+* **Playlist**: Add support for kiosk mode [#6727](https://github.com/grafana/grafana/issues/6727)
+
+### Bugfixes
+* **Alerting**: Add alert message to webhook notifications [#6807](https://github.com/grafana/grafana/issues/6807)
+* **Alerting**: Fixes a bug where avg() reducer treated null as zero. [#6879](https://github.com/grafana/grafana/issues/6879)
+* **PNG Rendering**: Fix for server side rendering when using non default http addr bind and domain setting [#6813](https://github.com/grafana/grafana/issues/6813)
+* **PNG Rendering**: Fix for server side rendering when setting enforce_domain to true [#6769](https://github.com/grafana/grafana/issues/6769)
+* **Webhooks**: Add content type json to outgoing webhooks [#6822](https://github.com/grafana/grafana/issues/6822)
+* **Keyboard shortcut**: Fixed zoom out shortcut [#6837](https://github.com/grafana/grafana/issues/6837)
+* **Webdav**: Adds basic auth headers to webdav uploader [#6779](https://github.com/grafana/grafana/issues/6779)
+
+# 4.0.1 (2016-12-02)
+
+> **Notice**
+4.0.0 had serious connection pooling issue when using a data source in proxy access. This bug caused lots of resource issues
+due to too many connections/file handles on the data source backend. This problem is fixed in this release.
+
+### Bugfixes
+* **Metrics**: Fixes nil pointer dereference on my arm build [#6749](https://github.com/grafana/grafana/issues/6749)
+* **Data proxy**: Fixes a tcp pooling issue in the datasource reverse proxy [#6759](https://github.com/grafana/grafana/issues/6759)
+
+# 4.0-stable (2016-11-29)
+
+### Bugfixes
+* **Server-side rendering**: Fixed address used when rendering panel via phantomjs and using non default http_addr config [#6660](https://github.com/grafana/grafana/issues/6660)
+* **Graph panel**: Fixed graph panel tooltip sort order issue [#6648](https://github.com/grafana/grafana/issues/6648)
+* **Unsaved changes**: You now navigate to the intended page after saving in the unsaved changes dialog [#6675](https://github.com/grafana/grafana/issues/6675)
+* **TLS Client Auth**: Support for TLS client authentication for datasource proxies [#2316](https://github.com/grafana/grafana/issues/2316)
+* **Alerts out of sync**: Saving dashboards with broken alerts causes sync problem[#6576](https://github.com/grafana/grafana/issues/6576)
+* **Alerting**: Saving an alert with condition "HAS NO DATA" throws an error[#6701](https://github.com/grafana/grafana/issues/6701)
+* **Config**: Improve error message when parsing broken config file [#6731](https://github.com/grafana/grafana/issues/6731)
+* **Table**: Render empty dates as - instead of current date [#6728](https://github.com/grafana/grafana/issues/6728)
+
+# 4.0-beta2 (2016-11-21)
+
+### Bugfixes
+* **Graph Panel**: Log base scale on right Y-axis had no effect, max value calc was not applied, [#6534](https://github.com/grafana/grafana/issues/6534)
+* **Graph Panel**: Bar width if bars was only used in series override, [#6528](https://github.com/grafana/grafana/issues/6528)
+* **UI/Browser**: Fixed issue with page/view header gradient border not showing in Safari, [#6530](https://github.com/grafana/grafana/issues/6530)
+* **Cloudwatch**: Fixed cloudwatch datasource requesting to many datapoints, [#6544](https://github.com/grafana/grafana/issues/6544)
+* **UX**: Panel Drop zone visible after duplicating panel, and when entering fullscreen/edit view, [#6598](https://github.com/grafana/grafana/issues/6598)
+* **Templating**: Newly added variable was not visible directly only after dashboard reload, [#6622](https://github.com/grafana/grafana/issues/6622)
+
+### Enhancements
+* **Singlestat**: Support repeated template variables in prefix/postfix [#6595](https://github.com/grafana/grafana/issues/6595)
+* **Templating**: Don't persist variable options with refresh option [#6586](https://github.com/grafana/grafana/issues/6586)
+* **Alerting**: Add ability to have OR conditions (and mixing AND & OR) [#6579](https://github.com/grafana/grafana/issues/6579)
+* **InfluxDB**: Fix for Ad-Hoc Filters variable & changing dashboards [#6821](https://github.com/grafana/grafana/issues/6821)
+
+# 4.0-beta1 (2016-11-09)
 
 ### Enhancements
 * **Login**: Adds option to disable username/password logins, closes [#4674](https://github.com/grafana/grafana/issues/4674)
 * **SingleStat**: Add seriename as option in singlestat panel, closes [#4740](https://github.com/grafana/grafana/issues/4740)
 * **Localization**: Week start day now dependant on browser locale setting, closes [#3003](https://github.com/grafana/grafana/issues/3003)
 * **Templating**: Update panel repeats for variables that change on time refresh, closes [#5021](https://github.com/grafana/grafana/issues/5021)
+* **Templating**: Add support for numeric and alphabetical sorting of variable values, closes [#2839](https://github.com/grafana/grafana/issues/2839)
 * **Elasticsearch**: Support to set Precision Threshold for Unique Count metric, closes [#4689](https://github.com/grafana/grafana/issues/4689)
 * **Navigation**: Add search to org swithcer, closes [#2609](https://github.com/grafana/grafana/issues/2609)
 * **Database**: Allow database config using one propertie, closes [#5456](https://github.com/grafana/grafana/pull/5456)
-* **Graphite**: Add support for groupByNode, closes [#5613](https://github.com/grafana/grafana/pull/5613)
+* **Graphite**: Add support for groupByNodes, closes [#5613](https://github.com/grafana/grafana/pull/5613)
+* **Influxdb**: Add support for elapsed(), closes [#5827](https://github.com/grafana/grafana/pull/5827)
+* **OpenTSDB**: Add support for explicitTags for OpenTSDB>=2.3, closes [#6360](https://github.com/grafana/grafana/pull/6361)
+* **OAuth**: Add support for generic oauth, closes [#4718](https://github.com/grafana/grafana/pull/4718)
+* **Cloudwatch**: Add support to expand multi select template variable, closes [#5003](https://github.com/grafana/grafana/pull/5003)
+* **Background Tasks**: Now support automatic purging of old snapshots, closes [#4087](https://github.com/grafana/grafana/issues/4087)
+* **Background Tasks**: Now support automatic purging of old rendered images, closes [#2172](https://github.com/grafana/grafana/issues/2172)
+* **Dashboard**: After inactivity hide nav/row actions, fade to nice clean view, can be toggled with `d v`, also added kiosk mode, toggled via `d k` [#6476](https://github.com/grafana/grafana/issues/6476)
+* **Dashboard**: Improved dashboard row menu & add panel UX [#6442](https://github.com/grafana/grafana/issues/6442)
+* **Graph Panel**: Support for stacking null values [#2912](https://github.com/grafana/grafana/issues/2912), [#6287](https://github.com/grafana/grafana/issues/6287), thanks @benrubson!
+
+### Breaking changes
+* **SystemD**: Change systemd description, closes [#5971](https://github.com/grafana/grafana/pull/5971)
+* **lodash upgrade**: Upgraded lodash from 2.4.2 to 4.15.0, this contains a number of breaking changes that could effect plugins. closes [#6021](https://github.com/grafana/grafana/pull/6021)
+
+### Bug fixes
+* **Table Panel**: Fixed problem when switching to Mixed datasource in metrics tab, fixes [#5999](https://github.com/grafana/grafana/pull/5999)
+* **Playlist**: Fixed problem with play order not matching order defined in playlist, fixes [#5467](https://github.com/grafana/grafana/pull/5467)
+* **Graph panel**: Fixed problem with auto decimals on y axis when datamin=datamax, fixes [#6070](https://github.com/grafana/grafana/pull/6070)
+* **Snapshot**: Can view embedded panels/png rendered panels in snapshots without login, fixes [#3769](https://github.com/grafana/grafana/pull/3769)
+* **Elasticsearch**: Fix for query template variable when looking up terms without query, no longer relies on elasticsearch default field, fixes [#3887](https://github.com/grafana/grafana/pull/3887)
+* **Elasticsearch**: Fix for displaying IP address used in terms aggregations, fixes [#4393](https://github.com/grafana/grafana/pull/4393)
+* **PNG Rendering**: Fix for server side rendering when using auth proxy, fixes [#5906](https://github.com/grafana/grafana/pull/5906)
+* **OpenTSDB**: Fixed multi-value nested templating for opentsdb, fixes [#6455](https://github.com/grafana/grafana/pull/6455)
+* **Playlist**: Remove playlist items when dashboard is removed, fixes [#6292](https://github.com/grafana/grafana/issues/6292)
 
 # 3.1.2 (unreleased)
 * **Templating**: Fixed issue when combining row & panel repeats, fixes [#5790](https://github.com/grafana/grafana/issues/5790)
 * **Drag&Drop**: Fixed issue with drag and drop in latest Chrome(51+), fixes [#5767](https://github.com/grafana/grafana/issues/5767)
 * **Internal Metrics**: Fixed issue with dots in instance_name when sending internal metrics to Graphite, fixes [#5739](https://github.com/grafana/grafana/issues/5739)
 * **Grafana-CLI**: Add default plugin path for MAC OS, fixes [#5806](https://github.com/grafana/grafana/issues/5806)
+* **Grafana-CLI**: Improve error message for upgrade-all command, fixes [#5885](https://github.com/grafana/grafana/issues/5885)
 
 # 3.1.1 (2016-08-01)
 * **IFrame embedding**: Fixed issue of using full iframe height, fixes [#5605](https://github.com/grafana/grafana/issues/5606)
@@ -24,7 +119,6 @@
 * **Graphite**: Fixed issue with mixed data sources and Graphite, fixes [#5617](https://github.com/grafana/grafana/issues/5617)
 * **Templating**: Fixed issue with template variable query was issued multiple times during dashboard load, fixes [#5637](https://github.com/grafana/grafana/issues/5637)
 * **Zoom**: Fixed issues with zoom in and out on embedded (iframed) panel, fixes [#4489](https://github.com/grafana/grafana/issues/4489), [#5666](https://github.com/grafana/grafana/issues/5666)
-* **Templating**: Row/Panel repeat issue when saving dashboard caused dupes to appear, fixes [#5591](https://github.com/grafana/grafana/issues/5591)
 
 # 3.1.0 stable (2016-07-12)
 

+ 0 - 372
Godeps/Godeps.json

@@ -1,372 +0,0 @@
-{
-	"ImportPath": "github.com/grafana/grafana",
-	"GoVersion": "go1.5.1",
-	"GodepVersion": "v60",
-	"Packages": [
-		"./pkg/..."
-	],
-	"Deps": [
-		{
-			"ImportPath": "github.com/BurntSushi/toml",
-			"Comment": "v0.1.0-21-g056c9bc",
-			"Rev": "056c9bc7be7190eaa7715723883caffa5f8fa3e4"
-		},
-		{
-			"ImportPath": "github.com/Unknwon/com",
-			"Rev": "d9bcf409c8a368d06c9b347705c381e7c12d54df"
-		},
-		{
-			"ImportPath": "github.com/aws/aws-sdk-go/aws",
-			"Comment": "v1.4.1",
-			"Rev": "f80e7d0182a463dff0c0da6bbed57f21369d4346"
-		},
-		{
-			"ImportPath": "github.com/aws/aws-sdk-go/aws/awserr",
-			"Comment": "v1.4.1",
-			"Rev": "f80e7d0182a463dff0c0da6bbed57f21369d4346"
-		},
-		{
-			"ImportPath": "github.com/aws/aws-sdk-go/aws/awsutil",
-			"Comment": "v1.4.1",
-			"Rev": "f80e7d0182a463dff0c0da6bbed57f21369d4346"
-		},
-		{
-			"ImportPath": "github.com/aws/aws-sdk-go/aws/client",
-			"Comment": "v1.4.1",
-			"Rev": "f80e7d0182a463dff0c0da6bbed57f21369d4346"
-		},
-		{
-			"ImportPath": "github.com/aws/aws-sdk-go/aws/client/metadata",
-			"Comment": "v1.4.1",
-			"Rev": "f80e7d0182a463dff0c0da6bbed57f21369d4346"
-		},
-		{
-			"ImportPath": "github.com/aws/aws-sdk-go/aws/corehandlers",
-			"Comment": "v1.4.1",
-			"Rev": "f80e7d0182a463dff0c0da6bbed57f21369d4346"
-		},
-		{
-			"ImportPath": "github.com/aws/aws-sdk-go/aws/credentials",
-			"Comment": "v1.4.1",
-			"Rev": "f80e7d0182a463dff0c0da6bbed57f21369d4346"
-		},
-		{
-			"ImportPath": "github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds",
-			"Comment": "v1.4.1",
-			"Rev": "f80e7d0182a463dff0c0da6bbed57f21369d4346"
-		},
-		{
-			"ImportPath": "github.com/aws/aws-sdk-go/aws/defaults",
-			"Comment": "v1.4.1",
-			"Rev": "f80e7d0182a463dff0c0da6bbed57f21369d4346"
-		},
-		{
-			"ImportPath": "github.com/aws/aws-sdk-go/aws/ec2metadata",
-			"Comment": "v1.4.1",
-			"Rev": "f80e7d0182a463dff0c0da6bbed57f21369d4346"
-		},
-		{
-			"ImportPath": "github.com/aws/aws-sdk-go/aws/request",
-			"Comment": "v1.4.1",
-			"Rev": "f80e7d0182a463dff0c0da6bbed57f21369d4346"
-		},
-		{
-			"ImportPath": "github.com/aws/aws-sdk-go/aws/session",
-			"Comment": "v1.4.1",
-			"Rev": "f80e7d0182a463dff0c0da6bbed57f21369d4346"
-		},
-		{
-			"ImportPath": "github.com/aws/aws-sdk-go/private/endpoints",
-			"Comment": "v1.4.1",
-			"Rev": "f80e7d0182a463dff0c0da6bbed57f21369d4346"
-		},
-		{
-			"ImportPath": "github.com/aws/aws-sdk-go/private/protocol/ec2query",
-			"Comment": "v1.4.1",
-			"Rev": "f80e7d0182a463dff0c0da6bbed57f21369d4346"
-		},
-		{
-			"ImportPath": "github.com/aws/aws-sdk-go/private/protocol/query",
-			"Comment": "v1.4.1",
-			"Rev": "f80e7d0182a463dff0c0da6bbed57f21369d4346"
-		},
-		{
-			"ImportPath": "github.com/aws/aws-sdk-go/private/protocol/query/queryutil",
-			"Comment": "v1.4.1",
-			"Rev": "f80e7d0182a463dff0c0da6bbed57f21369d4346"
-		},
-		{
-			"ImportPath": "github.com/aws/aws-sdk-go/private/protocol/rest",
-			"Comment": "v1.4.1",
-			"Rev": "f80e7d0182a463dff0c0da6bbed57f21369d4346"
-		},
-		{
-			"ImportPath": "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil",
-			"Comment": "v1.4.1",
-			"Rev": "f80e7d0182a463dff0c0da6bbed57f21369d4346"
-		},
-		{
-			"ImportPath": "github.com/aws/aws-sdk-go/aws/signer/v4",
-			"Comment": "v1.4.1",
-			"Rev": "f80e7d0182a463dff0c0da6bbed57f21369d4346"
-		},
-		{
-			"ImportPath": "github.com/aws/aws-sdk-go/private/waiter",
-			"Comment": "v1.4.1",
-			"Rev": "f80e7d0182a463dff0c0da6bbed57f21369d4346"
-		},
-		{
-			"ImportPath": "github.com/aws/aws-sdk-go/service/cloudwatch",
-			"Comment": "v1.4.1",
-			"Rev": "f80e7d0182a463dff0c0da6bbed57f21369d4346"
-		},
-		{
-			"ImportPath": "github.com/aws/aws-sdk-go/service/ec2",
-			"Comment": "v1.4.1",
-			"Rev": "f80e7d0182a463dff0c0da6bbed57f21369d4346"
-		},
-		{
-			"ImportPath": "github.com/aws/aws-sdk-go/service/sts",
-			"Comment": "v1.4.1",
-			"Rev": "f80e7d0182a463dff0c0da6bbed57f21369d4346"
-		},
-		{
-			"ImportPath": "github.com/bmizerany/assert",
-			"Comment": "release.r60-6-ge17e998",
-			"Rev": "e17e99893cb6509f428e1728281c2ad60a6b31e3"
-		},
-		{
-			"ImportPath": "github.com/bradfitz/gomemcache/memcache",
-			"Comment": "release.r60-40-g72a6864",
-			"Rev": "72a68649ba712ee7c4b5b4a943a626bcd7d90eb8"
-		},
-		{
-			"ImportPath": "github.com/codegangsta/cli",
-			"Comment": "1.2.0-187-gc31a797",
-			"Rev": "c31a7975863e7810c92e2e288a9ab074f9a88f29"
-		},
-		{
-			"ImportPath": "github.com/davecgh/go-spew/spew",
-			"Rev": "2df174808ee097f90d259e432cc04442cf60be21"
-		},
-		{
-			"ImportPath": "github.com/fatih/color",
-			"Comment": "v0.1-16-g4f7bcef",
-			"Rev": "4f7bcef27eec7925456d0c30c5e7b0408b3339be"
-		},
-		{
-			"ImportPath": "github.com/franela/goreq",
-			"Rev": "3ddeded65be21dacb5a2e2d0b95af9ff6862a2b5"
-		},
-		{
-			"ImportPath": "github.com/go-ini/ini",
-			"Comment": "v0-48-g060d7da",
-			"Rev": "060d7da055ba6ec5ea7a31f116332fe5efa04ce0"
-		},
-		{
-			"ImportPath": "github.com/go-ldap/ldap",
-			"Comment": "v2.2.1",
-			"Rev": "07a7330929b9ee80495c88a4439657d89c7dbd87"
-		},
-		{
-			"ImportPath": "github.com/go-macaron/binding",
-			"Rev": "2502aaf4bce3a4e6451b4610847bfb8dffdb6266"
-		},
-		{
-			"ImportPath": "github.com/go-macaron/gzip",
-			"Rev": "4938e9be6b279d8426cb1c89a6bcf7af70b0c21d"
-		},
-		{
-			"ImportPath": "github.com/go-macaron/inject",
-			"Rev": "c5ab7bf3a307593cd44cb272d1a5beea473dd072"
-		},
-		{
-			"ImportPath": "github.com/go-macaron/session",
-			"Rev": "66031fcb37a0fff002a1f028eb0b3a815c78306b"
-		},
-		{
-			"ImportPath": "github.com/go-macaron/session/memcache",
-			"Rev": "66031fcb37a0fff002a1f028eb0b3a815c78306b"
-		},
-		{
-			"ImportPath": "github.com/go-macaron/session/mysql",
-			"Rev": "66031fcb37a0fff002a1f028eb0b3a815c78306b"
-		},
-		{
-			"ImportPath": "github.com/go-macaron/session/postgres",
-			"Rev": "66031fcb37a0fff002a1f028eb0b3a815c78306b"
-		},
-		{
-			"ImportPath": "github.com/go-macaron/session/redis",
-			"Rev": "66031fcb37a0fff002a1f028eb0b3a815c78306b"
-		},
-		{
-			"ImportPath": "github.com/go-sql-driver/mysql",
-			"Comment": "v1.2-171-g267b128",
-			"Rev": "267b128680c46286b9ca13475c3cca5de8f79bd7"
-		},
-		{
-			"ImportPath": "github.com/go-stack/stack",
-			"Comment": "v1.5.2",
-			"Rev": "100eb0c0a9c5b306ca2fb4f165df21d80ada4b82"
-		},
-		{
-			"ImportPath": "github.com/go-xorm/core",
-			"Comment": "v0.4.4-7-g9e608f7",
-			"Rev": "9e608f7330b9d16fe2818cfe731128b3f156cb9a"
-		},
-		{
-			"ImportPath": "github.com/go-xorm/xorm",
-			"Comment": "v0.4.4-44-gf561133",
-			"Rev": "f56113384f2c63dfe4cd8e768e349f1c35122b58"
-		},
-		{
-			"ImportPath": "github.com/gorilla/websocket",
-			"Rev": "c45a635370221f34fea2d5163fd156fcb4e38e8a"
-		},
-		{
-			"ImportPath": "github.com/gosimple/slug",
-			"Rev": "8d258463b4459f161f51d6a357edacd3eef9d663"
-		},
-		{
-			"ImportPath": "github.com/hashicorp/go-version",
-			"Rev": "7e3c02b30806fa5779d3bdfc152ce4c6f40e7b38"
-		},
-		{
-			"ImportPath": "github.com/inconshreveable/log15",
-			"Comment": "v2.3-61-g20bca5a",
-			"Rev": "20bca5a7a57282e241fac83ec9ea42538027f1c1"
-		},
-		{
-			"ImportPath": "github.com/inconshreveable/log15/term",
-			"Comment": "v2.3-61-g20bca5a",
-			"Rev": "20bca5a7a57282e241fac83ec9ea42538027f1c1"
-		},
-		{
-			"ImportPath": "github.com/jmespath/go-jmespath",
-			"Comment": "0.2.2",
-			"Rev": "3433f3ea46d9f8019119e7dd41274e112a2359a9"
-		},
-		{
-			"ImportPath": "github.com/jtolds/gls",
-			"Rev": "f1ac7f4f24f50328e6bc838ca4437d1612a0243c"
-		},
-		{
-			"ImportPath": "github.com/klauspost/compress/flate",
-			"Rev": "7b02889a2005228347aef0e76beeaee564d82f8c"
-		},
-		{
-			"ImportPath": "github.com/klauspost/compress/gzip",
-			"Rev": "7b02889a2005228347aef0e76beeaee564d82f8c"
-		},
-		{
-			"ImportPath": "github.com/klauspost/cpuid",
-			"Rev": "349c675778172472f5e8f3a3e0fe187e302e5a10"
-		},
-		{
-			"ImportPath": "github.com/klauspost/crc32",
-			"Rev": "6834731faf32e62a2dd809d99fb24d1e4ae5a92d"
-		},
-		{
-			"ImportPath": "github.com/kr/pretty",
-			"Comment": "go.weekly.2011-12-22-27-ge6ac2fc",
-			"Rev": "e6ac2fc51e89a3249e82157fa0bb7a18ef9dd5bb"
-		},
-		{
-			"ImportPath": "github.com/kr/text",
-			"Rev": "bb797dc4fb8320488f47bf11de07a733d7233e1f"
-		},
-		{
-			"ImportPath": "github.com/lib/pq",
-			"Comment": "go1.0-cutoff-13-g19eeca3",
-			"Rev": "19eeca3e30d2577b1761db471ec130810e67f532"
-		},
-		{
-			"ImportPath": "github.com/lib/pq/oid",
-			"Comment": "go1.0-cutoff-13-g19eeca3",
-			"Rev": "19eeca3e30d2577b1761db471ec130810e67f532"
-		},
-		{
-			"ImportPath": "github.com/mattn/go-colorable",
-			"Rev": "9cbef7c35391cca05f15f8181dc0b18bc9736dbb"
-		},
-		{
-			"ImportPath": "github.com/mattn/go-isatty",
-			"Rev": "56b76bdf51f7708750eac80fa38b952bb9f32639"
-		},
-		{
-			"ImportPath": "github.com/mattn/go-sqlite3",
-			"Comment": "v1.1.0-67-g7204887",
-			"Rev": "7204887cf3a42df1cfaa5505dc3a3427f6dded8b"
-		},
-		{
-			"ImportPath": "github.com/rainycape/unidecode",
-			"Rev": "836ef0a715aedf08a12d595ed73ec8ed5b288cac"
-		},
-		{
-			"ImportPath": "github.com/smartystreets/goconvey/convey",
-			"Comment": "1.5.0-356-gfbc0a1c",
-			"Rev": "fbc0a1c888f9f96263f9a559d1769905245f1123"
-		},
-		{
-			"ImportPath": "github.com/smartystreets/goconvey/convey/assertions",
-			"Comment": "1.5.0-356-gfbc0a1c",
-			"Rev": "fbc0a1c888f9f96263f9a559d1769905245f1123"
-		},
-		{
-			"ImportPath": "github.com/smartystreets/goconvey/convey/assertions/oglematchers",
-			"Comment": "1.5.0-356-gfbc0a1c",
-			"Rev": "fbc0a1c888f9f96263f9a559d1769905245f1123"
-		},
-		{
-			"ImportPath": "github.com/smartystreets/goconvey/convey/gotest",
-			"Comment": "1.5.0-356-gfbc0a1c",
-			"Rev": "fbc0a1c888f9f96263f9a559d1769905245f1123"
-		},
-		{
-			"ImportPath": "github.com/smartystreets/goconvey/convey/reporting",
-			"Comment": "1.5.0-356-gfbc0a1c",
-			"Rev": "fbc0a1c888f9f96263f9a559d1769905245f1123"
-		},
-		{
-			"ImportPath": "github.com/streadway/amqp",
-			"Rev": "150b7f24d6ad507e6026c13d85ce1f1391ac7400"
-		},
-		{
-			"ImportPath": "golang.org/x/net/context",
-			"Rev": "972f0c5fbe4ae29e666c3f78c3ed42ae7a448b0a"
-		},
-		{
-			"ImportPath": "golang.org/x/oauth2",
-			"Rev": "c58fcf0ffc1c772aa2e1ee4894bc19f2649263b2"
-		},
-		{
-			"ImportPath": "golang.org/x/sys/unix",
-			"Rev": "7a56174f0086b32866ebd746a794417edbc678a1"
-		},
-		{
-			"ImportPath": "gopkg.in/asn1-ber.v1",
-			"Comment": "v1",
-			"Rev": "9eae18c3681ae3d3c677ac2b80a8fe57de45fc09"
-		},
-		{
-			"ImportPath": "gopkg.in/bufio.v1",
-			"Comment": "v1",
-			"Rev": "567b2bfa514e796916c4747494d6ff5132a1dfce"
-		},
-		{
-			"ImportPath": "gopkg.in/ini.v1",
-			"Comment": "v0-16-g1772191",
-			"Rev": "177219109c97e7920c933e21c9b25f874357b237"
-		},
-		{
-			"ImportPath": "gopkg.in/macaron.v1",
-			"Rev": "1c6dd87797ae9319b4658cbd48d1d0420b279fd5"
-		},
-		{
-			"ImportPath": "gopkg.in/redis.v2",
-			"Comment": "v2.3.2",
-			"Rev": "e6179049628164864e6e84e973cfb56335748dea"
-		}
-	]
-}

+ 0 - 5
Godeps/Readme

@@ -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.

+ 0 - 2
Godeps/_workspace/.gitignore

@@ -1,2 +0,0 @@
-/pkg
-/bin

+ 0 - 11
Godeps/_workspace/src/github.com/aws/aws-sdk-go/.gitignore

@@ -1,11 +0,0 @@
-dist
-/doc
-/doc-staging
-.yardoc
-Gemfile.lock
-awstesting/integration/smoke/**/importmarker__.go
-awstesting/integration/smoke/_test/
-/vendor/bin/
-/vendor/pkg/
-/vendor/src/
-/private/model/cli/gen-api/gen-api

+ 0 - 14
Godeps/_workspace/src/github.com/aws/aws-sdk-go/.godoc_config

@@ -1,14 +0,0 @@
-{
-	"PkgHandler": {
-		"Pattern":          "/sdk-for-go/api/",
-		"StripPrefix":     "/sdk-for-go/api",
-		"Include":         ["/src/github.com/aws/aws-sdk-go/aws", "/src/github.com/aws/aws-sdk-go/service"],
-		"Exclude":         ["/src/cmd", "/src/github.com/aws/aws-sdk-go/awstesting", "/src/github.com/aws/aws-sdk-go/awsmigrate"],
-		"IgnoredSuffixes": ["iface"]
-	},
-	"Github": {
-		"Tag": "master",
-		"Repo": "/aws/aws-sdk-go",
-		"UseGithub": true
-	}
-}

+ 0 - 23
Godeps/_workspace/src/github.com/aws/aws-sdk-go/.travis.yml

@@ -1,23 +0,0 @@
-language: go
-
-sudo: false
-
-go:
-  - 1.4
-  - 1.5
-  - 1.6
-  - tip
-    
-# Use Go 1.5's vendoring experiment for 1.5 tests. 1.4 tests will use the tip of the dependencies repo.
-env:
-  - GO15VENDOREXPERIMENT=1
-
-install:
-  - make get-deps
-
-script:
-  - make unit-with-race-cover
-
-matrix:
-  allow_failures:
-    - go: tip

+ 0 - 7
Godeps/_workspace/src/github.com/aws/aws-sdk-go/.yardopts

@@ -1,7 +0,0 @@
---plugin go
--e doc-src/plugin/plugin.rb
--m markdown
--o doc/api
---title "AWS SDK for Go"
-aws/**/*.go
-service/**/*.go

+ 0 - 152
Godeps/_workspace/src/github.com/aws/aws-sdk-go/Makefile

@@ -1,152 +0,0 @@
-LINTIGNOREDOT='awstesting/integration.+should not use dot imports'
-LINTIGNOREDOC='service/[^/]+/(api|service|waiters)\.go:.+(comment on exported|should have comment or be unexported)'
-LINTIGNORECONST='service/[^/]+/(api|service|waiters)\.go:.+(type|struct field|const|func) ([^ ]+) should be ([^ ]+)'
-LINTIGNORESTUTTER='service/[^/]+/(api|service)\.go:.+(and that stutters)'
-LINTIGNOREINFLECT='service/[^/]+/(api|service)\.go:.+method .+ should be '
-LINTIGNOREINFLECTS3UPLOAD='service/s3/s3manager/upload\.go:.+struct field SSEKMSKeyId should be '
-LINTIGNOREDEPS='vendor/.+\.go'
-
-SDK_WITH_VENDOR_PKGS=$(shell go list ./... | grep -v "/vendor/src")
-SDK_ONLY_PKGS=$(shell go list ./... | grep -v "/vendor/")
-SDK_GO_1_4=$(shell go version | grep "go1.4")
-SDK_GO_VERSION=$(shell go version | awk '''{print $$3}''' | tr -d '''\n''')
-
-all: get-deps generate unit
-
-help:
-	@echo "Please use \`make <target>' where <target> is one of"
-	@echo "  api_info                to print a list of services and versions"
-	@echo "  docs                    to build SDK documentation"
-	@echo "  build                   to go build the SDK"
-	@echo "  unit                    to run unit tests"
-	@echo "  integration             to run integration tests"
-	@echo "  performance             to run performance tests"
-	@echo "  verify                  to verify tests"
-	@echo "  lint                    to lint the SDK"
-	@echo "  vet                     to vet the SDK"
-	@echo "  generate                to go generate and make services"
-	@echo "  gen-test                to generate protocol tests"
-	@echo "  gen-services            to generate services"
-	@echo "  get-deps                to go get the SDK dependencies"
-	@echo "  get-deps-tests          to get the SDK's test dependencies"
-	@echo "  get-deps-verify         to get the SDK's verification dependencies"
-
-generate: gen-test gen-endpoints gen-services
-
-gen-test: gen-protocol-test
-
-gen-services:
-	go generate ./service
-
-gen-protocol-test:
-	go generate ./private/protocol/...
-
-gen-endpoints:
-	go generate ./private/endpoints
-
-build:
-	@echo "go build SDK and vendor packages"
-	@go build ${SDK_ONLY_PKGS}
-
-unit: get-deps-tests build verify
-	@echo "go test SDK and vendor packages"
-	@go test -tags $(SDK_ONLY_PKGS)
-
-unit-with-race-cover: get-deps-tests build verify
-	@echo "go test SDK and vendor packages"
-	@go test -tags -race -cpu=1,2,4 $(SDK_ONLY_PKGS)
-
-integration: get-deps-tests integ-custom smoke-tests performance
-
-integ-custom:
-	go test -tags "integration" ./awstesting/integration/customizations/...
-
-smoke-tests: get-deps-tests
-	gucumber -go-tags "integration" ./awstesting/integration/smoke
-
-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-go14 sandbox-test-go15 sandbox-test-go15-novendorexp sandbox-test-go16 sandbox-test-go17 sandbox-test-gotip
-
-sandbox-test-go14:
-	docker build -f ./awstesting/sandbox/Dockerfile.test.go1.4 -t "aws-sdk-go-1.4" .
-	docker run -t aws-sdk-go-1.4
-
-sandbox-test-go15:
-	docker build -f ./awstesting/sandbox/Dockerfile.test.go1.5 -t "aws-sdk-go-1.5" .
-	docker run -t aws-sdk-go-1.5
-
-sandbox-test-go15-novendorexp:
-	docker build -f ./awstesting/sandbox/Dockerfile.test.go1.5-novendorexp -t "aws-sdk-go-1.5-novendorexp" .
-	docker run -t aws-sdk-go-1.5-novendorexp
-
-sandbox-test-go16:
-	docker build -f ./awstesting/sandbox/Dockerfile.test.go1.6 -t "aws-sdk-go-1.6" .
-	docker run -t aws-sdk-go-1.6
-
-sandbox-test-go17:
-	docker build -f ./awstesting/sandbox/Dockerfile.test.go1.7 -t "aws-sdk-go-1.7" .
-	docker run -t aws-sdk-go-1.7
-
-sandbox-test-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" .
-	docker run -t aws-sdk-go-tip
-
-update-aws-golang-tip:
-	docker build -f ./awstesting/sandbox/Dockerfile.golang-tip -t "aws-golang:tip" .
-
-verify: get-deps-verify lint vet
-
-lint:
-	@echo "go lint SDK and vendor packages"
-	@lint=`if [ -z "${SDK_GO_1_4}" ]; 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}`; \
-	echo "$$lint"; \
-	if [ "$$lint" != "" ] && [ "$$lint" != "skipping golint" ]; then exit 1; fi
-
-SDK_BASE_FOLDERS=$(shell ls -d */ | grep -v vendor | grep -v awsmigrate)
-ifneq (,$(findstring go1.5, ${SDK_GO_VERSION}))
-	GO_VET_CMD=go tool vet --all -shadow
-else ifneq (,$(findstring go1.6, ${SDK_GO_VERSION}))
-	GO_VET_CMD=go tool vet --all -shadow -example=false
-else ifneq (,$(findstring devel, ${SDK_GO_VERSION}))
-	GO_VET_CMD=go tool vet --all -shadow -tests=false
-else
-	GO_VET_CMD=echo skipping go vet, ${SDK_GO_VERSION}
-endif
-
-vet:
-	${GO_VET_CMD} ${SDK_BASE_FOLDERS}
-
-get-deps: get-deps-tests get-deps-verify
-	@echo "go get SDK dependencies"
-	@go get -v $(SDK_ONLY_PKGS)
-
-get-deps-tests:
-	@echo "go get SDK testing dependencies"
-	go get github.com/gucumber/gucumber/cmd/gucumber
-	go get github.com/stretchr/testify
-	go get github.com/smartystreets/goconvey
-
-get-deps-verify:
-	@echo "go get SDK verification utilities"
-	@if [ -z "${SDK_GO_1_4}" ]; then  go get github.com/golang/lint/golint; else echo "skipped getting golint"; fi
-
-bench:
-	@echo "go bench SDK packages"
-	@go test -run NONE -bench . -benchmem -tags 'bench' $(SDK_ONLY_PKGS)
-
-bench-protocol:
-	@echo "go bench SDK protocol marshallers"
-	@go test -run NONE -bench . -benchmem -tags 'bench' ./private/protocol/...
-
-docs:
-	@echo "generate SDK docs"
-	rm -rf doc && bundle install && bundle exec yard
-	@# This env variable, DOCS, is for internal use
-	@if [ -n "$(AWS_DOC_GEN_TOOL)" ]; then echo "For internal use. Subject to change."; $(AWS_DOC_GEN_TOOL) `pwd`; fi
-
-api_info:
-	@go run private/model/cli/api-info/api-info.go

+ 0 - 116
Godeps/_workspace/src/github.com/aws/aws-sdk-go/README.md

@@ -1,116 +0,0 @@
-# AWS SDK for Go
-
-<span style="display: inline-block;">
-[![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)
-</span>
-
-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.
-
-## 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.
-
-    go get -u github.com/aws/aws-sdk-go
-
-Otherwise if your Go environment does not have vendoring support enabled, or you do not want to include the vendored SDK's dependencies you can use the following command to retrieve the SDK and its non-testing dependencies using `go get`. 
-
-    go get -u github.com/aws/aws-sdk-go/aws/...
-    go get -u github.com/aws/aws-sdk-go/service/...
-
-If you're looking to retrieve just the SDK without any dependencies use the following command.
-
-    go get -d github.com/aws/aws-sdk-go/
- 
-These two processes will still include the `vendor` folder and it should be deleted if its not going to be used by your environment.
-
-    rm -rf $GOPATH/src/github.com/aws/aws-sdk-go/vendor
-
-## Reference Documentation
-[`Getting Started Guide`](https://aws.amazon.com/sdk-for-go/) - This document is a general introduction how to configure and make requests with the SDK. If this is your first time using the SDK, this documentation and the API documentation will help you get started. This document focuses on the syntax and behavior of the SDK. The [Service Developer Guide](https://aws.amazon.com/documentation/) will help you get started using specific AWS services.
-
-[`SDK API Reference Documentation`](https://docs.aws.amazon.com/sdk-for-go/api/) - Use this document to look up all API operation input and output parameters for AWS services supported by the SDK. The API reference also includes documentation of the SDK, and examples how to using the SDK, service client API operations, and API operation require parameters.
-
-[`Service Developer Guide`](https://aws.amazon.com/documentation/) - Use this documentation to learn how to interface with an AWS service. These are great guides both, if you're getting started with a service, or looking for more information on a service. You should not need this document for coding, though in some cases, services may supply helpful samples that you might want to look out for.
-
-[`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
-
-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](http://blogs.aws.amazon.com/security/post/Tx3D6U6WSFGOK2H/A-New-and-Standardized-Way-to-Manage-Credentials-in-the-AWS-SDKs).
-
-Alternatively, you can set the following environment variables:
-
-```
-AWS_ACCESS_KEY_ID=AKID1234567890
-AWS_SECRET_ACCESS_KEY=MY-SECRET-KEY
-```
-
-### 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://github.com/aws/aws-sdk-go/wiki/sessions) wiki for more information about this feature.
-
-## 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:
-
-```go
-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)
-		}
-	}
-}
-```
-
-You can find more information and operations in our
-[API documentation](http://docs.aws.amazon.com/sdk-for-go/api/).
-
-## License
-
-This SDK is distributed under the
-[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0),
-see LICENSE.txt and NOTICE.txt for more information.

+ 0 - 100
Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/awsutil/copy.go

@@ -1,100 +0,0 @@
-package awsutil
-
-import (
-	"io"
-	"reflect"
-)
-
-// Copy deeply copies a src structure to dst. Useful for copying request and
-// response structures.
-//
-// Can copy between structs of different type, but will only copy fields which
-// are assignable, and exist in both structs. Fields which are not assignable,
-// or do not exist in both structs are ignored.
-func Copy(dst, src interface{}) {
-	dstval := reflect.ValueOf(dst)
-	if !dstval.IsValid() {
-		panic("Copy dst cannot be nil")
-	}
-
-	rcopy(dstval, reflect.ValueOf(src), true)
-}
-
-// CopyOf returns a copy of src while also allocating the memory for dst.
-// src must be a pointer type or this operation will fail.
-func CopyOf(src interface{}) (dst interface{}) {
-	dsti := reflect.New(reflect.TypeOf(src).Elem())
-	dst = dsti.Interface()
-	rcopy(dsti, reflect.ValueOf(src), true)
-	return
-}
-
-// rcopy performs a recursive copy of values from the source to destination.
-//
-// root is used to skip certain aspects of the copy which are not valid
-// for the root node of a object.
-func rcopy(dst, src reflect.Value, root bool) {
-	if !src.IsValid() {
-		return
-	}
-
-	switch src.Kind() {
-	case reflect.Ptr:
-		if _, ok := src.Interface().(io.Reader); ok {
-			if dst.Kind() == reflect.Ptr && dst.Elem().CanSet() {
-				dst.Elem().Set(src)
-			} else if dst.CanSet() {
-				dst.Set(src)
-			}
-		} else {
-			e := src.Type().Elem()
-			if dst.CanSet() && !src.IsNil() {
-				dst.Set(reflect.New(e))
-			}
-			if src.Elem().IsValid() {
-				// Keep the current root state since the depth hasn't changed
-				rcopy(dst.Elem(), src.Elem(), root)
-			}
-		}
-	case reflect.Struct:
-		t := dst.Type()
-		for i := 0; i < t.NumField(); i++ {
-			name := t.Field(i).Name
-			srcVal := src.FieldByName(name)
-			dstVal := dst.FieldByName(name)
-			if srcVal.IsValid() && dstVal.CanSet() {
-				rcopy(dstVal, srcVal, false)
-			}
-		}
-	case reflect.Slice:
-		if src.IsNil() {
-			break
-		}
-
-		s := reflect.MakeSlice(src.Type(), src.Len(), src.Cap())
-		dst.Set(s)
-		for i := 0; i < src.Len(); i++ {
-			rcopy(dst.Index(i), src.Index(i), false)
-		}
-	case reflect.Map:
-		if src.IsNil() {
-			break
-		}
-
-		s := reflect.MakeMap(src.Type())
-		dst.Set(s)
-		for _, k := range src.MapKeys() {
-			v := src.MapIndex(k)
-			v2 := reflect.New(v.Type()).Elem()
-			rcopy(v2, v, false)
-			dst.SetMapIndex(k, v2)
-		}
-	default:
-		// Assign the value if possible. If its not assignable, the value would
-		// need to be converted and the impact of that may be unexpected, or is
-		// not compatible with the dst type.
-		if src.Type().AssignableTo(dst.Type()) {
-			dst.Set(src)
-		}
-	}
-}

+ 0 - 233
Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/awsutil/copy_test.go

@@ -1,233 +0,0 @@
-package awsutil_test
-
-import (
-	"bytes"
-	"fmt"
-	"io"
-	"io/ioutil"
-	"testing"
-
-	"github.com/aws/aws-sdk-go/aws/awsutil"
-	"github.com/stretchr/testify/assert"
-)
-
-func ExampleCopy() {
-	type Foo struct {
-		A int
-		B []*string
-	}
-
-	// Create the initial value
-	str1 := "hello"
-	str2 := "bye bye"
-	f1 := &Foo{A: 1, B: []*string{&str1, &str2}}
-
-	// Do the copy
-	var f2 Foo
-	awsutil.Copy(&f2, f1)
-
-	// Print the result
-	fmt.Println(awsutil.Prettify(f2))
-
-	// Output:
-	// {
-	//   A: 1,
-	//   B: ["hello","bye bye"]
-	// }
-}
-
-func TestCopy(t *testing.T) {
-	type Foo struct {
-		A int
-		B []*string
-		C map[string]*int
-	}
-
-	// Create the initial value
-	str1 := "hello"
-	str2 := "bye bye"
-	int1 := 1
-	int2 := 2
-	f1 := &Foo{
-		A: 1,
-		B: []*string{&str1, &str2},
-		C: map[string]*int{
-			"A": &int1,
-			"B": &int2,
-		},
-	}
-
-	// Do the copy
-	var f2 Foo
-	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)
-
-	// But pointers are not!
-	str3 := "nothello"
-	int3 := 57
-	f2.A = 100
-	f2.B[0] = &str3
-	f2.C["B"] = &int3
-	assert.NotEqual(t, f2.A, f1.A)
-	assert.NotEqual(t, f2.B, f1.B)
-	assert.NotEqual(t, f2.C, f1.C)
-}
-
-func TestCopyNestedWithUnexported(t *testing.T) {
-	type Bar struct {
-		a int
-		B int
-	}
-	type Foo struct {
-		A string
-		B Bar
-	}
-
-	f1 := &Foo{A: "string", B: Bar{a: 1, B: 2}}
-
-	var f2 Foo
-	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)
-}
-
-func TestCopyIgnoreNilMembers(t *testing.T) {
-	type Foo struct {
-		A *string
-		B []string
-		C map[string]string
-	}
-
-	f := &Foo{}
-	assert.Nil(t, f.A)
-	assert.Nil(t, f.B)
-	assert.Nil(t, f.C)
-
-	var f2 Foo
-	awsutil.Copy(&f2, f)
-	assert.Nil(t, f2.A)
-	assert.Nil(t, f2.B)
-	assert.Nil(t, f2.C)
-
-	fcopy := awsutil.CopyOf(f)
-	f3 := fcopy.(*Foo)
-	assert.Nil(t, f3.A)
-	assert.Nil(t, f3.B)
-	assert.Nil(t, f3.C)
-}
-
-func TestCopyPrimitive(t *testing.T) {
-	str := "hello"
-	var s string
-	awsutil.Copy(&s, &str)
-	assert.Equal(t, "hello", s)
-}
-
-func TestCopyNil(t *testing.T) {
-	var s string
-	awsutil.Copy(&s, nil)
-	assert.Equal(t, "", s)
-}
-
-func TestCopyReader(t *testing.T) {
-	var buf io.Reader = bytes.NewReader([]byte("hello world"))
-	var r io.Reader
-	awsutil.Copy(&r, buf)
-	b, err := ioutil.ReadAll(r)
-	assert.NoError(t, err)
-	assert.Equal(t, []byte("hello world"), b)
-
-	// empty bytes because this is not a deep copy
-	b, err = ioutil.ReadAll(buf)
-	assert.NoError(t, err)
-	assert.Equal(t, []byte(""), b)
-}
-
-func TestCopyDifferentStructs(t *testing.T) {
-	type SrcFoo struct {
-		A                int
-		B                []*string
-		C                map[string]*int
-		SrcUnique        string
-		SameNameDiffType int
-		unexportedPtr    *int
-		ExportedPtr      *int
-	}
-	type DstFoo struct {
-		A                int
-		B                []*string
-		C                map[string]*int
-		DstUnique        int
-		SameNameDiffType string
-		unexportedPtr    *int
-		ExportedPtr      *int
-	}
-
-	// Create the initial value
-	str1 := "hello"
-	str2 := "bye bye"
-	int1 := 1
-	int2 := 2
-	f1 := &SrcFoo{
-		A: 1,
-		B: []*string{&str1, &str2},
-		C: map[string]*int{
-			"A": &int1,
-			"B": &int2,
-		},
-		SrcUnique:        "unique",
-		SameNameDiffType: 1,
-		unexportedPtr:    &int1,
-		ExportedPtr:      &int2,
-	}
-
-	// Do the copy
-	var f2 DstFoo
-	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)
-}
-
-func ExampleCopyOf() {
-	type Foo struct {
-		A int
-		B []*string
-	}
-
-	// Create the initial value
-	str1 := "hello"
-	str2 := "bye bye"
-	f1 := &Foo{A: 1, B: []*string{&str1, &str2}}
-
-	// Do the copy
-	v := awsutil.CopyOf(f1)
-	var f2 *Foo = v.(*Foo)
-
-	// Print the result
-	fmt.Println(awsutil.Prettify(f2))
-
-	// Output:
-	// {
-	//   A: 1,
-	//   B: ["hello","bye bye"]
-	// }
-}

+ 0 - 29
Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/awsutil/equal_test.go

@@ -1,29 +0,0 @@
-package awsutil_test
-
-import (
-	"testing"
-
-	"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) {
-	cases := []struct {
-		a, b  interface{}
-		equal bool
-	}{
-		{"a", "a", true},
-		{"a", "b", false},
-		{"a", aws.String(""), false},
-		{"a", nil, false},
-		{"a", aws.String("a"), true},
-		{(*bool)(nil), (*bool)(nil), true},
-		{(*bool)(nil), (*string)(nil), false},
-		{nil, nil, true},
-	}
-
-	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)
-	}
-}

+ 0 - 222
Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/awsutil/path_value.go

@@ -1,222 +0,0 @@
-package awsutil
-
-import (
-	"reflect"
-	"regexp"
-	"strconv"
-	"strings"
-
-	"github.com/jmespath/go-jmespath"
-)
-
-var indexRe = regexp.MustCompile(`(.+)\[(-?\d+)?\]$`)
-
-// rValuesAtPath returns a slice of values found in value v. The values
-// in v are explored recursively so all nested values are collected.
-func rValuesAtPath(v interface{}, path string, createPath, caseSensitive, nilTerm bool) []reflect.Value {
-	pathparts := strings.Split(path, "||")
-	if len(pathparts) > 1 {
-		for _, pathpart := range pathparts {
-			vals := rValuesAtPath(v, pathpart, createPath, caseSensitive, nilTerm)
-			if len(vals) > 0 {
-				return vals
-			}
-		}
-		return nil
-	}
-
-	values := []reflect.Value{reflect.Indirect(reflect.ValueOf(v))}
-	components := strings.Split(path, ".")
-	for len(values) > 0 && len(components) > 0 {
-		var index *int64
-		var indexStar bool
-		c := strings.TrimSpace(components[0])
-		if c == "" { // no actual component, illegal syntax
-			return nil
-		} else if caseSensitive && c != "*" && strings.ToLower(c[0:1]) == c[0:1] {
-			// TODO normalize case for user
-			return nil // don't support unexported fields
-		}
-
-		// parse this component
-		if m := indexRe.FindStringSubmatch(c); m != nil {
-			c = m[1]
-			if m[2] == "" {
-				index = nil
-				indexStar = true
-			} else {
-				i, _ := strconv.ParseInt(m[2], 10, 32)
-				index = &i
-				indexStar = false
-			}
-		}
-
-		nextvals := []reflect.Value{}
-		for _, value := range values {
-			// pull component name out of struct member
-			if value.Kind() != reflect.Struct {
-				continue
-			}
-
-			if c == "*" { // pull all members
-				for i := 0; i < value.NumField(); i++ {
-					if f := reflect.Indirect(value.Field(i)); f.IsValid() {
-						nextvals = append(nextvals, f)
-					}
-				}
-				continue
-			}
-
-			value = value.FieldByNameFunc(func(name string) bool {
-				if c == name {
-					return true
-				} else if !caseSensitive && strings.ToLower(name) == strings.ToLower(c) {
-					return true
-				}
-				return false
-			})
-
-			if nilTerm && value.Kind() == reflect.Ptr && len(components[1:]) == 0 {
-				if !value.IsNil() {
-					value.Set(reflect.Zero(value.Type()))
-				}
-				return []reflect.Value{value}
-			}
-
-			if createPath && value.Kind() == reflect.Ptr && value.IsNil() {
-				// TODO if the value is the terminus it should not be created
-				// if the value to be set to its position is nil.
-				value.Set(reflect.New(value.Type().Elem()))
-				value = value.Elem()
-			} else {
-				value = reflect.Indirect(value)
-			}
-
-			if value.Kind() == reflect.Slice || value.Kind() == reflect.Map {
-				if !createPath && value.IsNil() {
-					value = reflect.ValueOf(nil)
-				}
-			}
-
-			if value.IsValid() {
-				nextvals = append(nextvals, value)
-			}
-		}
-		values = nextvals
-
-		if indexStar || index != nil {
-			nextvals = []reflect.Value{}
-			for _, value := range values {
-				value := reflect.Indirect(value)
-				if value.Kind() != reflect.Slice {
-					continue
-				}
-
-				if indexStar { // grab all indices
-					for i := 0; i < value.Len(); i++ {
-						idx := reflect.Indirect(value.Index(i))
-						if idx.IsValid() {
-							nextvals = append(nextvals, idx)
-						}
-					}
-					continue
-				}
-
-				// pull out index
-				i := int(*index)
-				if i >= value.Len() { // check out of bounds
-					if createPath {
-						// TODO resize slice
-					} else {
-						continue
-					}
-				} else if i < 0 { // support negative indexing
-					i = value.Len() + i
-				}
-				value = reflect.Indirect(value.Index(i))
-
-				if value.Kind() == reflect.Slice || value.Kind() == reflect.Map {
-					if !createPath && value.IsNil() {
-						value = reflect.ValueOf(nil)
-					}
-				}
-
-				if value.IsValid() {
-					nextvals = append(nextvals, value)
-				}
-			}
-			values = nextvals
-		}
-
-		components = components[1:]
-	}
-	return values
-}
-
-// ValuesAtPath returns a list of values at the case insensitive lexical
-// path inside of a structure.
-func ValuesAtPath(i interface{}, path string) ([]interface{}, error) {
-	result, err := jmespath.Search(path, i)
-	if err != nil {
-		return nil, err
-	}
-
-	v := reflect.ValueOf(result)
-	if !v.IsValid() || (v.Kind() == reflect.Ptr && v.IsNil()) {
-		return nil, nil
-	}
-	if s, ok := result.([]interface{}); ok {
-		return s, err
-	}
-	if v.Kind() == reflect.Map && v.Len() == 0 {
-		return nil, nil
-	}
-	if v.Kind() == reflect.Slice {
-		out := make([]interface{}, v.Len())
-		for i := 0; i < v.Len(); i++ {
-			out[i] = v.Index(i).Interface()
-		}
-		return out, nil
-	}
-
-	return []interface{}{result}, nil
-}
-
-// SetValueAtPath sets a value at the case insensitive lexical path inside
-// of a structure.
-func SetValueAtPath(i interface{}, path string, v interface{}) {
-	if rvals := rValuesAtPath(i, path, true, false, v == nil); rvals != nil {
-		for _, rval := range rvals {
-			if rval.Kind() == reflect.Ptr && rval.IsNil() {
-				continue
-			}
-			setValue(rval, v)
-		}
-	}
-}
-
-func setValue(dstVal reflect.Value, src interface{}) {
-	if dstVal.Kind() == reflect.Ptr {
-		dstVal = reflect.Indirect(dstVal)
-	}
-	srcVal := reflect.ValueOf(src)
-
-	if !srcVal.IsValid() { // src is literal nil
-		if dstVal.CanAddr() {
-			// Convert to pointer so that pointer's value can be nil'ed
-			//                     dstVal = dstVal.Addr()
-		}
-		dstVal.Set(reflect.Zero(dstVal.Type()))
-
-	} else if srcVal.Kind() == reflect.Ptr {
-		if srcVal.IsNil() {
-			srcVal = reflect.Zero(dstVal.Type())
-		} else {
-			srcVal = reflect.ValueOf(src).Elem()
-		}
-		dstVal.Set(srcVal)
-	} else {
-		dstVal.Set(srcVal)
-	}
-
-}

+ 0 - 142
Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/awsutil/path_value_test.go

@@ -1,142 +0,0 @@
-package awsutil_test
-
-import (
-	"testing"
-
-	"github.com/aws/aws-sdk-go/aws/awsutil"
-	"github.com/stretchr/testify/assert"
-)
-
-type Struct struct {
-	A []Struct
-	z []Struct
-	B *Struct
-	D *Struct
-	C string
-	E map[string]string
-}
-
-var data = Struct{
-	A: []Struct{{C: "value1"}, {C: "value2"}, {C: "value3"}},
-	z: []Struct{{C: "value1"}, {C: "value2"}, {C: "value3"}},
-	B: &Struct{B: &Struct{C: "terminal"}, D: &Struct{C: "terminal2"}},
-	C: "initial",
-}
-var data2 = Struct{A: []Struct{
-	{A: []Struct{{C: "1"}, {C: "1"}, {C: "1"}, {C: "1"}, {C: "1"}}},
-	{A: []Struct{{C: "2"}, {C: "2"}, {C: "2"}, {C: "2"}, {C: "2"}}},
-}}
-
-func TestValueAtPathSuccess(t *testing.T) {
-	var testCases = []struct {
-		expect []interface{}
-		data   interface{}
-		path   string
-	}{
-		{[]interface{}{"initial"}, data, "C"},
-		{[]interface{}{"value1"}, data, "A[0].C"},
-		{[]interface{}{"value2"}, data, "A[1].C"},
-		{[]interface{}{"value3"}, data, "A[2].C"},
-		{[]interface{}{"value3"}, data, "a[2].c"},
-		{[]interface{}{"value3"}, data, "A[-1].C"},
-		{[]interface{}{"value1", "value2", "value3"}, data, "A[].C"},
-		{[]interface{}{"terminal"}, data, "B . B . C"},
-		{[]interface{}{"initial"}, data, "A.D.X || C"},
-		{[]interface{}{"initial"}, data, "A[0].B || C"},
-		{[]interface{}{
-			Struct{A: []Struct{{C: "1"}, {C: "1"}, {C: "1"}, {C: "1"}, {C: "1"}}},
-			Struct{A: []Struct{{C: "2"}, {C: "2"}, {C: "2"}, {C: "2"}, {C: "2"}}},
-		}, data2, "A"},
-	}
-	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)
-	}
-}
-
-func TestValueAtPathFailure(t *testing.T) {
-	var testCases = []struct {
-		expect      []interface{}
-		errContains string
-		data        interface{}
-		path        string
-	}{
-		{nil, "", data, "C.x"},
-		{nil, "SyntaxError: Invalid token: tDot", data, ".x"},
-		{nil, "", data, "X.Y.Z"},
-		{nil, "", data, "A[100].C"},
-		{nil, "", data, "A[3].C"},
-		{nil, "", data, "B.B.C.Z"},
-		{nil, "", data, "z[-1].C"},
-		{nil, "", nil, "A.B.C"},
-		{[]interface{}{}, "", Struct{}, "A"},
-		{nil, "", data, "A[0].B.C"},
-		{nil, "", data, "D"},
-	}
-
-	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)
-			continue
-		} else {
-			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)
-	}
-}
-
-func TestSetValueAtPathSuccess(t *testing.T) {
-	var s Struct
-	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)
-
-	awsutil.SetValueAtPath(&s, "B.*.C", "test0")
-	assert.Equal(t, "test0", s.B.B.C)
-	assert.Equal(t, "test0", s.B.D.C)
-
-	var s2 Struct
-	awsutil.SetValueAtPath(&s2, "b.b.c", "test0")
-	assert.Equal(t, "test0", s2.B.B.C)
-	awsutil.SetValueAtPath(&s2, "A", []Struct{{}})
-	assert.Equal(t, []Struct{{}}, s2.A)
-
-	str := "foo"
-
-	s3 := Struct{}
-	awsutil.SetValueAtPath(&s3, "b.b.c", str)
-	assert.Equal(t, "foo", s3.B.B.C)
-
-	s3 = Struct{B: &Struct{B: &Struct{C: str}}}
-	awsutil.SetValueAtPath(&s3, "b.b.c", nil)
-	assert.Equal(t, "", s3.B.B.C)
-
-	s3 = Struct{}
-	awsutil.SetValueAtPath(&s3, "b.b.c", nil)
-	assert.Equal(t, "", s3.B.B.C)
-
-	s3 = Struct{}
-	awsutil.SetValueAtPath(&s3, "b.b.c", &str)
-	assert.Equal(t, "foo", s3.B.B.C)
-
-	var s4 struct{ Name *string }
-	awsutil.SetValueAtPath(&s4, "Name", str)
-	assert.Equal(t, str, *s4.Name)
-
-	s4 = struct{ Name *string }{}
-	awsutil.SetValueAtPath(&s4, "Name", nil)
-	assert.Equal(t, (*string)(nil), s4.Name)
-
-	s4 = struct{ Name *string }{Name: &str}
-	awsutil.SetValueAtPath(&s4, "Name", nil)
-	assert.Equal(t, (*string)(nil), s4.Name)
-
-	s4 = struct{ Name *string }{}
-	awsutil.SetValueAtPath(&s4, "Name", &str)
-	assert.Equal(t, str, *s4.Name)
-}

+ 0 - 107
Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/awsutil/prettify.go

@@ -1,107 +0,0 @@
-package awsutil
-
-import (
-	"bytes"
-	"fmt"
-	"io"
-	"reflect"
-	"strings"
-)
-
-// Prettify returns the string representation of a value.
-func Prettify(i interface{}) string {
-	var buf bytes.Buffer
-	prettify(reflect.ValueOf(i), 0, &buf)
-	return buf.String()
-}
-
-// prettify will recursively walk value v to build a textual
-// representation of the value.
-func prettify(v reflect.Value, indent int, buf *bytes.Buffer) {
-	for v.Kind() == reflect.Ptr {
-		v = v.Elem()
-	}
-
-	switch v.Kind() {
-	case reflect.Struct:
-		strtype := v.Type().String()
-		if strtype == "time.Time" {
-			fmt.Fprintf(buf, "%s", v.Interface())
-			break
-		} else if strings.HasPrefix(strtype, "io.") {
-			buf.WriteString("<buffer>")
-			break
-		}
-
-		buf.WriteString("{\n")
-
-		names := []string{}
-		for i := 0; i < v.Type().NumField(); i++ {
-			name := v.Type().Field(i).Name
-			f := v.Field(i)
-			if name[0:1] == strings.ToLower(name[0:1]) {
-				continue // ignore unexported fields
-			}
-			if (f.Kind() == reflect.Ptr || f.Kind() == reflect.Slice || f.Kind() == reflect.Map) && f.IsNil() {
-				continue // ignore unset fields
-			}
-			names = append(names, name)
-		}
-
-		for i, n := range names {
-			val := v.FieldByName(n)
-			buf.WriteString(strings.Repeat(" ", indent+2))
-			buf.WriteString(n + ": ")
-			prettify(val, indent+2, buf)
-
-			if i < len(names)-1 {
-				buf.WriteString(",\n")
-			}
-		}
-
-		buf.WriteString("\n" + strings.Repeat(" ", indent) + "}")
-	case reflect.Slice:
-		nl, id, id2 := "", "", ""
-		if v.Len() > 3 {
-			nl, id, id2 = "\n", strings.Repeat(" ", indent), strings.Repeat(" ", indent+2)
-		}
-		buf.WriteString("[" + nl)
-		for i := 0; i < v.Len(); i++ {
-			buf.WriteString(id2)
-			prettify(v.Index(i), indent+2, buf)
-
-			if i < v.Len()-1 {
-				buf.WriteString("," + nl)
-			}
-		}
-
-		buf.WriteString(nl + id + "]")
-	case reflect.Map:
-		buf.WriteString("{\n")
-
-		for i, k := range v.MapKeys() {
-			buf.WriteString(strings.Repeat(" ", indent+2))
-			buf.WriteString(k.String() + ": ")
-			prettify(v.MapIndex(k), indent+2, buf)
-
-			if i < v.Len()-1 {
-				buf.WriteString(",\n")
-			}
-		}
-
-		buf.WriteString("\n" + strings.Repeat(" ", indent) + "}")
-	default:
-		if !v.IsValid() {
-			fmt.Fprint(buf, "<invalid value>")
-			return
-		}
-		format := "%v"
-		switch v.Interface().(type) {
-		case string:
-			format = "%q"
-		case io.ReadSeeker, io.Reader:
-			format = "buffer(%p)"
-		}
-		fmt.Fprintf(buf, format, v.Interface())
-	}
-}

+ 0 - 120
Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/client/client.go

@@ -1,120 +0,0 @@
-package client
-
-import (
-	"fmt"
-	"io/ioutil"
-	"net/http/httputil"
-
-	"github.com/aws/aws-sdk-go/aws"
-	"github.com/aws/aws-sdk-go/aws/client/metadata"
-	"github.com/aws/aws-sdk-go/aws/request"
-)
-
-// A Config provides configuration to a service client instance.
-type Config struct {
-	Config                  *aws.Config
-	Handlers                request.Handlers
-	Endpoint, SigningRegion string
-}
-
-// ConfigProvider provides a generic way for a service client to receive
-// the ClientConfig without circular dependencies.
-type ConfigProvider interface {
-	ClientConfig(serviceName string, cfgs ...*aws.Config) Config
-}
-
-// A Client implements the base client request and response handling
-// used by all service clients.
-type Client struct {
-	request.Retryer
-	metadata.ClientInfo
-
-	Config   aws.Config
-	Handlers request.Handlers
-}
-
-// New will return a pointer to a new initialized service client.
-func New(cfg aws.Config, info metadata.ClientInfo, handlers request.Handlers, options ...func(*Client)) *Client {
-	svc := &Client{
-		Config:     cfg,
-		ClientInfo: info,
-		Handlers:   handlers,
-	}
-
-	switch retryer, ok := cfg.Retryer.(request.Retryer); {
-	case ok:
-		svc.Retryer = retryer
-	case cfg.Retryer != nil && cfg.Logger != nil:
-		s := fmt.Sprintf("WARNING: %T does not implement request.Retryer; using DefaultRetryer instead", cfg.Retryer)
-		cfg.Logger.Log(s)
-		fallthrough
-	default:
-		maxRetries := aws.IntValue(cfg.MaxRetries)
-		if cfg.MaxRetries == nil || maxRetries == aws.UseServiceDefaultRetries {
-			maxRetries = 3
-		}
-		svc.Retryer = DefaultRetryer{NumMaxRetries: maxRetries}
-	}
-
-	svc.AddDebugHandlers()
-
-	for _, option := range options {
-		option(svc)
-	}
-
-	return svc
-}
-
-// NewRequest returns a new Request pointer for the service API
-// operation and parameters.
-func (c *Client) NewRequest(operation *request.Operation, params interface{}, data interface{}) *request.Request {
-	return request.New(c.Config, c.ClientInfo, c.Handlers, c.Retryer, operation, params, data)
-}
-
-// AddDebugHandlers injects debug logging handlers into the service to log request
-// debug information.
-func (c *Client) AddDebugHandlers() {
-	if !c.Config.LogLevel.AtLeast(aws.LogDebug) {
-		return
-	}
-
-	c.Handlers.Send.PushFront(logRequest)
-	c.Handlers.Send.PushBack(logResponse)
-}
-
-const logReqMsg = `DEBUG: Request %s/%s Details:
----[ REQUEST POST-SIGN ]-----------------------------
-%s
------------------------------------------------------`
-
-func logRequest(r *request.Request) {
-	logBody := r.Config.LogLevel.Matches(aws.LogDebugWithHTTPBody)
-	dumpedBody, _ := httputil.DumpRequestOut(r.HTTPRequest, logBody)
-
-	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.Body.Seek(r.BodyStart, 0)
-		r.HTTPRequest.Body = ioutil.NopCloser(r.Body)
-	}
-
-	r.Config.Logger.Log(fmt.Sprintf(logReqMsg, r.ClientInfo.ServiceName, r.Operation.Name, string(dumpedBody)))
-}
-
-const logRespMsg = `DEBUG: Response %s/%s Details:
----[ RESPONSE ]--------------------------------------
-%s
------------------------------------------------------`
-
-func logResponse(r *request.Request) {
-	var msg = "no response data"
-	if r.HTTPResponse != nil {
-		logBody := r.Config.LogLevel.Matches(aws.LogDebugWithHTTPBody)
-		dumpedBody, _ := httputil.DumpResponse(r.HTTPResponse, logBody)
-		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))
-}

+ 0 - 422
Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/config.go

@@ -1,422 +0,0 @@
-package aws
-
-import (
-	"net/http"
-	"time"
-
-	"github.com/aws/aws-sdk-go/aws/credentials"
-)
-
-// UseServiceDefaultRetries instructs the config to use the service's own
-// default number of retries. This will be the default action if
-// Config.MaxRetries is nil also.
-const UseServiceDefaultRetries = -1
-
-// RequestRetryer is an alias for a type that implements the request.Retryer
-// interface.
-type RequestRetryer interface{}
-
-// A Config provides service configuration for service clients. By default,
-// all clients will use the defaults.DefaultConfig tructure.
-//
-//     // Create Session with MaxRetry configuration to be shared by multiple
-//     // service clients.
-//     sess, err := session.NewSession(&aws.Config{
-//         MaxRetries: aws.Int(3),
-//     })
-//
-//     // Create S3 service client with a specific Region.
-//     svc := s3.New(sess, &aws.Config{
-//         Region: aws.String("us-west-2"),
-//     })
-type Config struct {
-	// Enables verbose error printing of all credential chain errors.
-	// Should be used when wanting to see all errors while attempting to
-	// retrieve credentials.
-	CredentialsChainVerboseErrors *bool
-
-	// The credentials object to use when signing requests. Defaults to a
-	// chain of credential providers to search for credentials in environment
-	// variables, shared credential file, and EC2 Instance Roles.
-	Credentials *credentials.Credentials
-
-	// An optional endpoint URL (hostname only or fully qualified URI)
-	// that overrides the default generated endpoint for a client. Set this
-	// to `""` to use the default generated endpoint.
-	//
-	// @note You must still provide a `Region` value when specifying an
-	//   endpoint for a client.
-	Endpoint *string
-
-	// The region to send requests to. This parameter is required and must
-	// be configured globally or on a per-client basis unless otherwise
-	// noted. A full list of regions is found in the "Regions and Endpoints"
-	// document.
-	//
-	// @see http://docs.aws.amazon.com/general/latest/gr/rande.html
-	//   AWS Regions and Endpoints
-	Region *string
-
-	// Set this to `true` to disable SSL when sending requests. Defaults
-	// to `false`.
-	DisableSSL *bool
-
-	// The HTTP client to use when sending requests. Defaults to
-	// `http.DefaultClient`.
-	HTTPClient *http.Client
-
-	// An integer value representing the logging level. The default log level
-	// is zero (LogOff), which represents no logging. To enable logging set
-	// to a LogLevel Value.
-	LogLevel *LogLevelType
-
-	// The logger writer interface to write logging messages to. Defaults to
-	// standard out.
-	Logger Logger
-
-	// The maximum number of times that a request will be retried for failures.
-	// Defaults to -1, which defers the max retry setting to the service
-	// specific configuration.
-	MaxRetries *int
-
-	// Retryer guides how HTTP requests should be retried in case of
-	// recoverable failures.
-	//
-	// When nil or the value does not implement the request.Retryer interface,
-	// the request.DefaultRetryer will be used.
-	//
-	// When both Retryer and MaxRetries are non-nil, the former is used and
-	// the latter ignored.
-	//
-	// To set the Retryer field in a type-safe manner and with chaining, use
-	// the request.WithRetryer helper function:
-	//
-	//   cfg := request.WithRetryer(aws.NewConfig(), myRetryer)
-	//
-	Retryer RequestRetryer
-
-	// Disables semantic parameter validation, which validates input for
-	// missing required fields and/or other semantic request input errors.
-	DisableParamValidation *bool
-
-	// Disables the computation of request and response checksums, e.g.,
-	// CRC32 checksums in Amazon DynamoDB.
-	DisableComputeChecksums *bool
-
-	// Set this to `true` to force the request to use path-style addressing,
-	// i.e., `http://s3.amazonaws.com/BUCKET/KEY`. By default, the S3 client
-	// will use virtual hosted bucket addressing when possible
-	// (`http://BUCKET.s3.amazonaws.com/KEY`).
-	//
-	// @note This configuration option is specific to the Amazon S3 service.
-	// @see http://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html
-	//   Amazon S3: Virtual Hosting of Buckets
-	S3ForcePathStyle *bool
-
-	// Set this to `true` to disable the SDK adding the `Expect: 100-Continue`
-	// header to PUT requests over 2MB of content. 100-Continue instructs the
-	// HTTP client not to send the body until the service responds with a
-	// `continue` status. This is useful to prevent sending the request body
-	// until after the request is authenticated, and validated.
-	//
-	// http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPUT.html
-	//
-	// 100-Continue is only enabled for Go 1.6 and above. See `http.Transport`'s
-	// `ExpectContinueTimeout` for information on adjusting the continue wait
-	// timeout. https://golang.org/pkg/net/http/#Transport
-	//
-	// You should use this flag to disble 100-Continue if you experience issues
-	// with proxies or third party S3 compatible services.
-	S3Disable100Continue *bool
-
-	// Set this to `true` to enable S3 Accelerate feature. For all operations
-	// compatible with S3 Accelerate will use the accelerate endpoint for
-	// requests. Requests not compatible will fall back to normal S3 requests.
-	//
-	// The bucket must be enable for accelerate to be used with S3 client with
-	// accelerate enabled. If the bucket is not enabled for accelerate an error
-	// will be returned. The bucket name must be DNS compatible to also work
-	// with accelerate.
-	//
-	// Not compatible with UseDualStack requests will fail if both flags are
-	// specified.
-	S3UseAccelerate *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
-	// meaningful if you're not already using a custom HTTP client with the
-	// SDK. Enabled by default.
-	//
-	// Must be set and provided to the session.NewSession() in order to disable
-	// the EC2Metadata overriding the timeout for default credentials chain.
-	//
-	// Example:
-	//    sess, err := session.NewSession(aws.NewConfig().WithEC2MetadataDiableTimeoutOverride(true))
-	//
-	//    svc := s3.New(sess)
-	//
-	EC2MetadataDisableTimeoutOverride *bool
-
-	// Instructs the endpiont to be generated for a service client to
-	// be the dual stack endpoint. The dual stack endpoint will support
-	// both IPv4 and IPv6 addressing.
-	//
-	// Setting this for a service which does not support dual stack will fail
-	// to make requets. It is not recommended to set this value on the session
-	// as it will apply to all service clients created with the session. Even
-	// services which don't support dual stack endpoints.
-	//
-	// If the Endpoint config value is also provided the UseDualStack flag
-	// will be ignored.
-	//
-	// Only supported with.
-	//
-	//     sess, err := session.NewSession()
-	//
-	//     svc := s3.New(sess, &aws.Config{
-	//         UseDualStack: aws.Bool(true),
-	//     })
-	UseDualStack *bool
-
-	// SleepDelay is an override for the func the SDK will call when sleeping
-	// during the lifecycle of a request. Specifically this will be used for
-	// request delays. This value should only be used for testing. To adjust
-	// the delay of a request see the aws/client.DefaultRetryer and
-	// aws/request.Retryer.
-	SleepDelay func(time.Duration)
-}
-
-// NewConfig returns a new Config pointer that can be chained with builder
-// methods to set multiple configuration values inline without using pointers.
-//
-//     // Create Session with MaxRetry configuration to be shared by multiple
-//     // service clients.
-//     sess, err := session.NewSession(aws.NewConfig().
-//         WithMaxRetries(3),
-//     )
-//
-//     // Create S3 service client with a specific Region.
-//     svc := s3.New(sess, aws.NewConfig().
-//         WithRegion("us-west-2"),
-//     )
-func NewConfig() *Config {
-	return &Config{}
-}
-
-// WithCredentialsChainVerboseErrors sets a config verbose errors boolean and returning
-// a Config pointer.
-func (c *Config) WithCredentialsChainVerboseErrors(verboseErrs bool) *Config {
-	c.CredentialsChainVerboseErrors = &verboseErrs
-	return c
-}
-
-// WithCredentials sets a config Credentials value returning a Config pointer
-// for chaining.
-func (c *Config) WithCredentials(creds *credentials.Credentials) *Config {
-	c.Credentials = creds
-	return c
-}
-
-// WithEndpoint sets a config Endpoint value returning a Config pointer for
-// chaining.
-func (c *Config) WithEndpoint(endpoint string) *Config {
-	c.Endpoint = &endpoint
-	return c
-}
-
-// WithRegion sets a config Region value returning a Config pointer for
-// chaining.
-func (c *Config) WithRegion(region string) *Config {
-	c.Region = &region
-	return c
-}
-
-// WithDisableSSL sets a config DisableSSL value returning a Config pointer
-// for chaining.
-func (c *Config) WithDisableSSL(disable bool) *Config {
-	c.DisableSSL = &disable
-	return c
-}
-
-// WithHTTPClient sets a config HTTPClient value returning a Config pointer
-// for chaining.
-func (c *Config) WithHTTPClient(client *http.Client) *Config {
-	c.HTTPClient = client
-	return c
-}
-
-// WithMaxRetries sets a config MaxRetries value returning a Config pointer
-// for chaining.
-func (c *Config) WithMaxRetries(max int) *Config {
-	c.MaxRetries = &max
-	return c
-}
-
-// WithDisableParamValidation sets a config DisableParamValidation value
-// returning a Config pointer for chaining.
-func (c *Config) WithDisableParamValidation(disable bool) *Config {
-	c.DisableParamValidation = &disable
-	return c
-}
-
-// WithDisableComputeChecksums sets a config DisableComputeChecksums value
-// returning a Config pointer for chaining.
-func (c *Config) WithDisableComputeChecksums(disable bool) *Config {
-	c.DisableComputeChecksums = &disable
-	return c
-}
-
-// WithLogLevel sets a config LogLevel value returning a Config pointer for
-// chaining.
-func (c *Config) WithLogLevel(level LogLevelType) *Config {
-	c.LogLevel = &level
-	return c
-}
-
-// WithLogger sets a config Logger value returning a Config pointer for
-// chaining.
-func (c *Config) WithLogger(logger Logger) *Config {
-	c.Logger = logger
-	return c
-}
-
-// WithS3ForcePathStyle sets a config S3ForcePathStyle value returning a Config
-// pointer for chaining.
-func (c *Config) WithS3ForcePathStyle(force bool) *Config {
-	c.S3ForcePathStyle = &force
-	return c
-}
-
-// WithS3Disable100Continue sets a config S3Disable100Continue value returning
-// a Config pointer for chaining.
-func (c *Config) WithS3Disable100Continue(disable bool) *Config {
-	c.S3Disable100Continue = &disable
-	return c
-}
-
-// WithS3UseAccelerate sets a config S3UseAccelerate value returning a Config
-// pointer for chaining.
-func (c *Config) WithS3UseAccelerate(enable bool) *Config {
-	c.S3UseAccelerate = &enable
-	return c
-}
-
-// WithUseDualStack sets a config UseDualStack value returning a Config
-// pointer for chaining.
-func (c *Config) WithUseDualStack(enable bool) *Config {
-	c.UseDualStack = &enable
-	return c
-}
-
-// WithEC2MetadataDisableTimeoutOverride sets a config EC2MetadataDisableTimeoutOverride value
-// returning a Config pointer for chaining.
-func (c *Config) WithEC2MetadataDisableTimeoutOverride(enable bool) *Config {
-	c.EC2MetadataDisableTimeoutOverride = &enable
-	return c
-}
-
-// WithSleepDelay overrides the function used to sleep while waiting for the
-// next retry. Defaults to time.Sleep.
-func (c *Config) WithSleepDelay(fn func(time.Duration)) *Config {
-	c.SleepDelay = fn
-	return c
-}
-
-// MergeIn merges the passed in configs into the existing config object.
-func (c *Config) MergeIn(cfgs ...*Config) {
-	for _, other := range cfgs {
-		mergeInConfig(c, other)
-	}
-}
-
-func mergeInConfig(dst *Config, other *Config) {
-	if other == nil {
-		return
-	}
-
-	if other.CredentialsChainVerboseErrors != nil {
-		dst.CredentialsChainVerboseErrors = other.CredentialsChainVerboseErrors
-	}
-
-	if other.Credentials != nil {
-		dst.Credentials = other.Credentials
-	}
-
-	if other.Endpoint != nil {
-		dst.Endpoint = other.Endpoint
-	}
-
-	if other.Region != nil {
-		dst.Region = other.Region
-	}
-
-	if other.DisableSSL != nil {
-		dst.DisableSSL = other.DisableSSL
-	}
-
-	if other.HTTPClient != nil {
-		dst.HTTPClient = other.HTTPClient
-	}
-
-	if other.LogLevel != nil {
-		dst.LogLevel = other.LogLevel
-	}
-
-	if other.Logger != nil {
-		dst.Logger = other.Logger
-	}
-
-	if other.MaxRetries != nil {
-		dst.MaxRetries = other.MaxRetries
-	}
-
-	if other.Retryer != nil {
-		dst.Retryer = other.Retryer
-	}
-
-	if other.DisableParamValidation != nil {
-		dst.DisableParamValidation = other.DisableParamValidation
-	}
-
-	if other.DisableComputeChecksums != nil {
-		dst.DisableComputeChecksums = other.DisableComputeChecksums
-	}
-
-	if other.S3ForcePathStyle != nil {
-		dst.S3ForcePathStyle = other.S3ForcePathStyle
-	}
-
-	if other.S3Disable100Continue != nil {
-		dst.S3Disable100Continue = other.S3Disable100Continue
-	}
-
-	if other.S3UseAccelerate != nil {
-		dst.S3UseAccelerate = other.S3UseAccelerate
-	}
-
-	if other.UseDualStack != nil {
-		dst.UseDualStack = other.UseDualStack
-	}
-
-	if other.EC2MetadataDisableTimeoutOverride != nil {
-		dst.EC2MetadataDisableTimeoutOverride = other.EC2MetadataDisableTimeoutOverride
-	}
-
-	if other.SleepDelay != nil {
-		dst.SleepDelay = other.SleepDelay
-	}
-}
-
-// Copy will return a shallow copy of the Config object. If any additional
-// configurations are provided they will be merged into the new config returned.
-func (c *Config) Copy(cfgs ...*Config) *Config {
-	dst := &Config{}
-	dst.MergeIn(c)
-
-	for _, cfg := range cfgs {
-		dst.MergeIn(cfg)
-	}
-
-	return dst
-}

+ 0 - 86
Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/config_test.go

@@ -1,86 +0,0 @@
-package aws
-
-import (
-	"net/http"
-	"reflect"
-	"testing"
-
-	"github.com/aws/aws-sdk-go/aws/credentials"
-)
-
-var testCredentials = credentials.NewStaticCredentials("AKID", "SECRET", "SESSION")
-
-var copyTestConfig = Config{
-	Credentials:             testCredentials,
-	Endpoint:                String("CopyTestEndpoint"),
-	Region:                  String("COPY_TEST_AWS_REGION"),
-	DisableSSL:              Bool(true),
-	HTTPClient:              http.DefaultClient,
-	LogLevel:                LogLevel(LogDebug),
-	Logger:                  NewDefaultLogger(),
-	MaxRetries:              Int(3),
-	DisableParamValidation:  Bool(true),
-	DisableComputeChecksums: Bool(true),
-	S3ForcePathStyle:        Bool(true),
-}
-
-func TestCopy(t *testing.T) {
-	want := copyTestConfig
-	got := copyTestConfig.Copy()
-	if !reflect.DeepEqual(*got, want) {
-		t.Errorf("Copy() = %+v", got)
-		t.Errorf("    want %+v", want)
-	}
-
-	got.Region = String("other")
-	if got.Region == want.Region {
-		t.Errorf("Expect setting copy values not not reflect in source")
-	}
-}
-
-func TestCopyReturnsNewInstance(t *testing.T) {
-	want := copyTestConfig
-	got := copyTestConfig.Copy()
-	if got == &want {
-		t.Errorf("Copy() = %p; want different instance as source %p", got, &want)
-	}
-}
-
-var mergeTestZeroValueConfig = Config{}
-
-var mergeTestConfig = Config{
-	Credentials:             testCredentials,
-	Endpoint:                String("MergeTestEndpoint"),
-	Region:                  String("MERGE_TEST_AWS_REGION"),
-	DisableSSL:              Bool(true),
-	HTTPClient:              http.DefaultClient,
-	LogLevel:                LogLevel(LogDebug),
-	Logger:                  NewDefaultLogger(),
-	MaxRetries:              Int(10),
-	DisableParamValidation:  Bool(true),
-	DisableComputeChecksums: Bool(true),
-	S3ForcePathStyle:        Bool(true),
-}
-
-var mergeTests = []struct {
-	cfg  *Config
-	in   *Config
-	want *Config
-}{
-	{&Config{}, nil, &Config{}},
-	{&Config{}, &mergeTestZeroValueConfig, &Config{}},
-	{&Config{}, &mergeTestConfig, &mergeTestConfig},
-}
-
-func TestMerge(t *testing.T) {
-	for i, tt := range mergeTests {
-		got := tt.cfg.Copy()
-		got.MergeIn(tt.in)
-		if !reflect.DeepEqual(got, tt.want) {
-			t.Errorf("Config %d %+v", i, tt.cfg)
-			t.Errorf("   Merge(%+v)", tt.in)
-			t.Errorf("     got %+v", got)
-			t.Errorf("    want %+v", tt.want)
-		}
-	}
-}

+ 0 - 437
Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/convert_types_test.go

@@ -1,437 +0,0 @@
-package aws
-
-import (
-	"testing"
-	"time"
-
-	"github.com/stretchr/testify/assert"
-)
-
-var testCasesStringSlice = [][]string{
-	{"a", "b", "c", "d", "e"},
-	{"a", "b", "", "", "e"},
-}
-
-func TestStringSlice(t *testing.T) {
-	for idx, in := range testCasesStringSlice {
-		if in == nil {
-			continue
-		}
-		out := StringSlice(in)
-		assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
-		for i := range out {
-			assert.Equal(t, in[i], *(out[i]), "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)
-	}
-}
-
-var testCasesStringValueSlice = [][]*string{
-	{String("a"), String("b"), nil, String("c")},
-}
-
-func TestStringValueSlice(t *testing.T) {
-	for idx, in := range testCasesStringValueSlice {
-		if in == nil {
-			continue
-		}
-		out := StringValueSlice(in)
-		assert.Len(t, out, len(in), "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)
-			} else {
-				assert.Equal(t, *(in[i]), out[i], "Unexpected value at idx %d", idx)
-			}
-		}
-
-		out2 := StringSlice(out)
-		assert.Len(t, out2, len(in), "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)
-			} else {
-				assert.Equal(t, in[i], out2[i], "Unexpected value at idx %d", idx)
-			}
-		}
-	}
-}
-
-var testCasesStringMap = []map[string]string{
-	{"a": "1", "b": "2", "c": "3"},
-}
-
-func TestStringMap(t *testing.T) {
-	for idx, in := range testCasesStringMap {
-		if in == nil {
-			continue
-		}
-		out := StringMap(in)
-		assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
-		for i := range out {
-			assert.Equal(t, in[i], *(out[i]), "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)
-	}
-}
-
-var testCasesBoolSlice = [][]bool{
-	{true, true, false, false},
-}
-
-func TestBoolSlice(t *testing.T) {
-	for idx, in := range testCasesBoolSlice {
-		if in == nil {
-			continue
-		}
-		out := BoolSlice(in)
-		assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
-		for i := range out {
-			assert.Equal(t, in[i], *(out[i]), "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)
-	}
-}
-
-var testCasesBoolValueSlice = [][]*bool{}
-
-func TestBoolValueSlice(t *testing.T) {
-	for idx, in := range testCasesBoolValueSlice {
-		if in == nil {
-			continue
-		}
-		out := BoolValueSlice(in)
-		assert.Len(t, out, len(in), "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)
-			} else {
-				assert.Equal(t, *(in[i]), out[i], "Unexpected value at idx %d", idx)
-			}
-		}
-
-		out2 := BoolSlice(out)
-		assert.Len(t, out2, len(in), "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)
-			} else {
-				assert.Equal(t, in[i], out2[i], "Unexpected value at idx %d", idx)
-			}
-		}
-	}
-}
-
-var testCasesBoolMap = []map[string]bool{
-	{"a": true, "b": false, "c": true},
-}
-
-func TestBoolMap(t *testing.T) {
-	for idx, in := range testCasesBoolMap {
-		if in == nil {
-			continue
-		}
-		out := BoolMap(in)
-		assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
-		for i := range out {
-			assert.Equal(t, in[i], *(out[i]), "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)
-	}
-}
-
-var testCasesIntSlice = [][]int{
-	{1, 2, 3, 4},
-}
-
-func TestIntSlice(t *testing.T) {
-	for idx, in := range testCasesIntSlice {
-		if in == nil {
-			continue
-		}
-		out := IntSlice(in)
-		assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
-		for i := range out {
-			assert.Equal(t, in[i], *(out[i]), "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)
-	}
-}
-
-var testCasesIntValueSlice = [][]*int{}
-
-func TestIntValueSlice(t *testing.T) {
-	for idx, in := range testCasesIntValueSlice {
-		if in == nil {
-			continue
-		}
-		out := IntValueSlice(in)
-		assert.Len(t, out, len(in), "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)
-			} else {
-				assert.Equal(t, *(in[i]), out[i], "Unexpected value at idx %d", idx)
-			}
-		}
-
-		out2 := IntSlice(out)
-		assert.Len(t, out2, len(in), "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)
-			} else {
-				assert.Equal(t, in[i], out2[i], "Unexpected value at idx %d", idx)
-			}
-		}
-	}
-}
-
-var testCasesIntMap = []map[string]int{
-	{"a": 3, "b": 2, "c": 1},
-}
-
-func TestIntMap(t *testing.T) {
-	for idx, in := range testCasesIntMap {
-		if in == nil {
-			continue
-		}
-		out := IntMap(in)
-		assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
-		for i := range out {
-			assert.Equal(t, in[i], *(out[i]), "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)
-	}
-}
-
-var testCasesInt64Slice = [][]int64{
-	{1, 2, 3, 4},
-}
-
-func TestInt64Slice(t *testing.T) {
-	for idx, in := range testCasesInt64Slice {
-		if in == nil {
-			continue
-		}
-		out := Int64Slice(in)
-		assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
-		for i := range out {
-			assert.Equal(t, in[i], *(out[i]), "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)
-	}
-}
-
-var testCasesInt64ValueSlice = [][]*int64{}
-
-func TestInt64ValueSlice(t *testing.T) {
-	for idx, in := range testCasesInt64ValueSlice {
-		if in == nil {
-			continue
-		}
-		out := Int64ValueSlice(in)
-		assert.Len(t, out, len(in), "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)
-			} else {
-				assert.Equal(t, *(in[i]), out[i], "Unexpected value at idx %d", idx)
-			}
-		}
-
-		out2 := Int64Slice(out)
-		assert.Len(t, out2, len(in), "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)
-			} else {
-				assert.Equal(t, in[i], out2[i], "Unexpected value at idx %d", idx)
-			}
-		}
-	}
-}
-
-var testCasesInt64Map = []map[string]int64{
-	{"a": 3, "b": 2, "c": 1},
-}
-
-func TestInt64Map(t *testing.T) {
-	for idx, in := range testCasesInt64Map {
-		if in == nil {
-			continue
-		}
-		out := Int64Map(in)
-		assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
-		for i := range out {
-			assert.Equal(t, in[i], *(out[i]), "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)
-	}
-}
-
-var testCasesFloat64Slice = [][]float64{
-	{1, 2, 3, 4},
-}
-
-func TestFloat64Slice(t *testing.T) {
-	for idx, in := range testCasesFloat64Slice {
-		if in == nil {
-			continue
-		}
-		out := Float64Slice(in)
-		assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
-		for i := range out {
-			assert.Equal(t, in[i], *(out[i]), "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)
-	}
-}
-
-var testCasesFloat64ValueSlice = [][]*float64{}
-
-func TestFloat64ValueSlice(t *testing.T) {
-	for idx, in := range testCasesFloat64ValueSlice {
-		if in == nil {
-			continue
-		}
-		out := Float64ValueSlice(in)
-		assert.Len(t, out, len(in), "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)
-			} else {
-				assert.Equal(t, *(in[i]), out[i], "Unexpected value at idx %d", idx)
-			}
-		}
-
-		out2 := Float64Slice(out)
-		assert.Len(t, out2, len(in), "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)
-			} else {
-				assert.Equal(t, in[i], out2[i], "Unexpected value at idx %d", idx)
-			}
-		}
-	}
-}
-
-var testCasesFloat64Map = []map[string]float64{
-	{"a": 3, "b": 2, "c": 1},
-}
-
-func TestFloat64Map(t *testing.T) {
-	for idx, in := range testCasesFloat64Map {
-		if in == nil {
-			continue
-		}
-		out := Float64Map(in)
-		assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
-		for i := range out {
-			assert.Equal(t, in[i], *(out[i]), "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)
-	}
-}
-
-var testCasesTimeSlice = [][]time.Time{
-	{time.Now(), time.Now().AddDate(100, 0, 0)},
-}
-
-func TestTimeSlice(t *testing.T) {
-	for idx, in := range testCasesTimeSlice {
-		if in == nil {
-			continue
-		}
-		out := TimeSlice(in)
-		assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
-		for i := range out {
-			assert.Equal(t, in[i], *(out[i]), "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)
-	}
-}
-
-var testCasesTimeValueSlice = [][]*time.Time{}
-
-func TestTimeValueSlice(t *testing.T) {
-	for idx, in := range testCasesTimeValueSlice {
-		if in == nil {
-			continue
-		}
-		out := TimeValueSlice(in)
-		assert.Len(t, out, len(in), "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)
-			} else {
-				assert.Equal(t, *(in[i]), out[i], "Unexpected value at idx %d", idx)
-			}
-		}
-
-		out2 := TimeSlice(out)
-		assert.Len(t, out2, len(in), "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)
-			} else {
-				assert.Equal(t, in[i], out2[i], "Unexpected value at idx %d", idx)
-			}
-		}
-	}
-}
-
-var testCasesTimeMap = []map[string]time.Time{
-	{"a": time.Now().AddDate(-100, 0, 0), "b": time.Now()},
-}
-
-func TestTimeMap(t *testing.T) {
-	for idx, in := range testCasesTimeMap {
-		if in == nil {
-			continue
-		}
-		out := TimeMap(in)
-		assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
-		for i := range out {
-			assert.Equal(t, in[i], *(out[i]), "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)
-	}
-}

+ 0 - 152
Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/corehandlers/handlers.go

@@ -1,152 +0,0 @@
-package corehandlers
-
-import (
-	"bytes"
-	"fmt"
-	"io"
-	"io/ioutil"
-	"net/http"
-	"net/url"
-	"regexp"
-	"runtime"
-	"strconv"
-
-	"github.com/aws/aws-sdk-go/aws"
-	"github.com/aws/aws-sdk-go/aws/awserr"
-	"github.com/aws/aws-sdk-go/aws/request"
-)
-
-// Interface for matching types which also have a Len method.
-type lener interface {
-	Len() int
-}
-
-// BuildContentLengthHandler builds the content length of a request based on the body,
-// or will use the HTTPRequest.Header's "Content-Length" if defined. If unable
-// to determine request body length and no "Content-Length" was specified it will panic.
-//
-// The Content-Length will only be aded to the request if the length of the body
-// is greater than 0. If the body is empty or the current `Content-Length`
-// header is <= 0, the header will also be stripped.
-var BuildContentLengthHandler = request.NamedHandler{Name: "core.BuildContentLengthHandler", Fn: func(r *request.Request) {
-	var length int64
-
-	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 length > 0 {
-		r.HTTPRequest.ContentLength = length
-		r.HTTPRequest.Header.Set("Content-Length", fmt.Sprintf("%d", length))
-	} else {
-		r.HTTPRequest.ContentLength = 0
-		r.HTTPRequest.Header.Del("Content-Length")
-	}
-}}
-
-// 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})`)
-
-// SendHandler is a request handler to send service request using HTTP client.
-var SendHandler = request.NamedHandler{Name: "core.SendHandler", Fn: func(r *request.Request) {
-	var err error
-	r.HTTPResponse, err = r.Config.HTTPClient.Do(r.HTTPRequest)
-	if err != nil {
-		// Prevent leaking if an HTTPResponse was returned. Clean up
-		// the body.
-		if r.HTTPResponse != nil {
-			r.HTTPResponse.Body.Close()
-		}
-		// Capture the case where url.Error is returned for error processing
-		// response. e.g. 301 without location header comes back as string
-		// error and r.HTTPResponse is nil. Other url redirect errors will
-		// comeback in a similar method.
-		if e, ok := err.(*url.Error); ok && e.Err != nil {
-			if s := reStatusCode.FindStringSubmatch(e.Err.Error()); s != nil {
-				code, _ := strconv.ParseInt(s[1], 10, 64)
-				r.HTTPResponse = &http.Response{
-					StatusCode: int(code),
-					Status:     http.StatusText(int(code)),
-					Body:       ioutil.NopCloser(bytes.NewReader([]byte{})),
-				}
-				return
-			}
-		}
-		if r.HTTPResponse == nil {
-			// Add a dummy request response object to ensure the HTTPResponse
-			// value is consistent.
-			r.HTTPResponse = &http.Response{
-				StatusCode: int(0),
-				Status:     http.StatusText(int(0)),
-				Body:       ioutil.NopCloser(bytes.NewReader([]byte{})),
-			}
-		}
-		// Catch all other request errors.
-		r.Error = awserr.New("RequestError", "send request failed", err)
-		r.Retryable = aws.Bool(true) // network errors are retryable
-	}
-}}
-
-// ValidateResponseHandler is a request handler to validate service response.
-var ValidateResponseHandler = request.NamedHandler{Name: "core.ValidateResponseHandler", Fn: func(r *request.Request) {
-	if r.HTTPResponse.StatusCode == 0 || r.HTTPResponse.StatusCode >= 300 {
-		// this may be replaced by an UnmarshalError handler
-		r.Error = awserr.New("UnknownError", "unknown error", nil)
-	}
-}}
-
-// AfterRetryHandler performs final checks to determine if the request should
-// be retried and how long to delay.
-var AfterRetryHandler = request.NamedHandler{Name: "core.AfterRetryHandler", Fn: func(r *request.Request) {
-	// If one of the other handlers already set the retry state
-	// we don't want to override it based on the service's state
-	if r.Retryable == nil {
-		r.Retryable = aws.Bool(r.ShouldRetry(r))
-	}
-
-	if r.WillRetry() {
-		r.RetryDelay = r.RetryRules(r)
-		r.Config.SleepDelay(r.RetryDelay)
-
-		// when the expired token exception occurs the credentials
-		// need to be expired locally so that the next request to
-		// get credentials will trigger a credentials refresh.
-		if r.IsErrorExpired() {
-			r.Config.Credentials.Expire()
-		}
-
-		r.RetryCount++
-		r.Error = nil
-	}
-}}
-
-// ValidateEndpointHandler is a request handler to validate a request had the
-// appropriate Region and Endpoint set. Will set r.Error if the endpoint or
-// region is not valid.
-var ValidateEndpointHandler = request.NamedHandler{Name: "core.ValidateEndpointHandler", Fn: func(r *request.Request) {
-	if r.ClientInfo.SigningRegion == "" && aws.StringValue(r.Config.Region) == "" {
-		r.Error = aws.ErrMissingRegion
-	} else if r.ClientInfo.Endpoint == "" {
-		r.Error = aws.ErrMissingEndpoint
-	}
-}}

+ 0 - 192
Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/corehandlers/handlers_test.go

@@ -1,192 +0,0 @@
-package corehandlers_test
-
-import (
-	"bytes"
-	"fmt"
-	"io/ioutil"
-	"net/http"
-	"net/http/httptest"
-	"os"
-	"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/corehandlers"
-	"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/aws/aws-sdk-go/awstesting/unit"
-	"github.com/aws/aws-sdk-go/service/s3"
-)
-
-func TestValidateEndpointHandler(t *testing.T) {
-	os.Clearenv()
-
-	svc := awstesting.NewClient(aws.NewConfig().WithRegion("us-west-2"))
-	svc.Handlers.Clear()
-	svc.Handlers.Validate.PushBackNamed(corehandlers.ValidateEndpointHandler)
-
-	req := svc.NewRequest(&request.Operation{Name: "Operation"}, nil, nil)
-	err := req.Build()
-
-	assert.NoError(t, err)
-}
-
-func TestValidateEndpointHandlerErrorRegion(t *testing.T) {
-	os.Clearenv()
-
-	svc := awstesting.NewClient()
-	svc.Handlers.Clear()
-	svc.Handlers.Validate.PushBackNamed(corehandlers.ValidateEndpointHandler)
-
-	req := svc.NewRequest(&request.Operation{Name: "Operation"}, nil, nil)
-	err := req.Build()
-
-	assert.Error(t, err)
-	assert.Equal(t, aws.ErrMissingRegion, err)
-}
-
-type mockCredsProvider struct {
-	expired        bool
-	retrieveCalled bool
-}
-
-func (m *mockCredsProvider) Retrieve() (credentials.Value, error) {
-	m.retrieveCalled = true
-	return credentials.Value{ProviderName: "mockCredsProvider"}, nil
-}
-
-func (m *mockCredsProvider) IsExpired() bool {
-	return m.expired
-}
-
-func TestAfterRetryRefreshCreds(t *testing.T) {
-	os.Clearenv()
-	credProvider := &mockCredsProvider{}
-
-	svc := awstesting.NewClient(&aws.Config{
-		Credentials: credentials.NewCredentials(credProvider),
-		MaxRetries:  aws.Int(1),
-	})
-
-	svc.Handlers.Clear()
-	svc.Handlers.ValidateResponse.PushBack(func(r *request.Request) {
-		r.Error = awserr.New("UnknownError", "", nil)
-		r.HTTPResponse = &http.Response{StatusCode: 400, Body: ioutil.NopCloser(bytes.NewBuffer([]byte{}))}
-	})
-	svc.Handlers.UnmarshalError.PushBack(func(r *request.Request) {
-		r.Error = awserr.New("ExpiredTokenException", "", nil)
-	})
-	svc.Handlers.AfterRetry.PushBackNamed(corehandlers.AfterRetryHandler)
-
-	assert.True(t, svc.Config.Credentials.IsExpired(), "Expect to start out expired")
-	assert.False(t, credProvider.retrieveCalled)
-
-	req := svc.NewRequest(&request.Operation{Name: "Operation"}, nil, nil)
-	req.Send()
-
-	assert.True(t, svc.Config.Credentials.IsExpired())
-	assert.False(t, credProvider.retrieveCalled)
-
-	_, err := svc.Config.Credentials.Get()
-	assert.NoError(t, err)
-	assert.True(t, credProvider.retrieveCalled)
-}
-
-type testSendHandlerTransport struct{}
-
-func (t *testSendHandlerTransport) RoundTrip(r *http.Request) (*http.Response, error) {
-	return nil, fmt.Errorf("mock error")
-}
-
-func TestSendHandlerError(t *testing.T) {
-	svc := awstesting.NewClient(&aws.Config{
-		HTTPClient: &http.Client{
-			Transport: &testSendHandlerTransport{},
-		},
-	})
-	svc.Handlers.Clear()
-	svc.Handlers.Send.PushBackNamed(corehandlers.SendHandler)
-	r := svc.NewRequest(&request.Operation{Name: "Operation"}, nil, nil)
-
-	r.Send()
-
-	assert.Error(t, r.Error)
-	assert.NotNil(t, r.HTTPResponse)
-}
-
-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)
-		assert.Equal(t, contentLength, r.ContentLength)
-
-		b, err := ioutil.ReadAll(r.Body)
-		assert.NoError(t, err)
-		r.Body.Close()
-
-		authHeader := r.Header.Get("Authorization")
-		if hasContentLength {
-			assert.Contains(t, authHeader, "content-length")
-		} else {
-			assert.NotContains(t, authHeader, "content-length")
-		}
-
-		assert.Equal(t, contentLength, int64(len(b)))
-	}))
-
-	return server
-}
-
-func TestBuildContentLength_ZeroBody(t *testing.T) {
-	server := setupContentLengthTestServer(t, false, 0)
-
-	svc := s3.New(unit.Session, &aws.Config{
-		Endpoint:         aws.String(server.URL),
-		S3ForcePathStyle: aws.Bool(true),
-		DisableSSL:       aws.Bool(true),
-	})
-	_, err := svc.GetObject(&s3.GetObjectInput{
-		Bucket: aws.String("bucketname"),
-		Key:    aws.String("keyname"),
-	})
-
-	assert.NoError(t, err)
-}
-
-func TestBuildContentLength_NegativeBody(t *testing.T) {
-	server := setupContentLengthTestServer(t, false, 0)
-
-	svc := s3.New(unit.Session, &aws.Config{
-		Endpoint:         aws.String(server.URL),
-		S3ForcePathStyle: aws.Bool(true),
-		DisableSSL:       aws.Bool(true),
-	})
-	req, _ := svc.GetObjectRequest(&s3.GetObjectInput{
-		Bucket: aws.String("bucketname"),
-		Key:    aws.String("keyname"),
-	})
-
-	req.HTTPRequest.Header.Set("Content-Length", "-1")
-
-	assert.NoError(t, req.Send())
-}
-
-func TestBuildContentLength_WithBody(t *testing.T) {
-	server := setupContentLengthTestServer(t, true, 1024)
-
-	svc := s3.New(unit.Session, &aws.Config{
-		Endpoint:         aws.String(server.URL),
-		S3ForcePathStyle: aws.Bool(true),
-		DisableSSL:       aws.Bool(true),
-	})
-	_, err := svc.PutObject(&s3.PutObjectInput{
-		Bucket: aws.String("bucketname"),
-		Key:    aws.String("keyname"),
-		Body:   bytes.NewReader(make([]byte, 1024)),
-	})
-
-	assert.NoError(t, err)
-}

+ 0 - 254
Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/corehandlers/param_validator_test.go

@@ -1,254 +0,0 @@
-package corehandlers_test
-
-import (
-	"fmt"
-	"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/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"
-	"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 {
-	s := &client.Client{
-		Config: aws.Config{},
-		ClientInfo: metadata.ClientInfo{
-			ServiceName: "mock-service",
-			APIVersion:  "2015-01-01",
-		},
-	}
-	return s
-}()
-
-type StructShape struct {
-	_ struct{} `type:"structure"`
-
-	RequiredList   []*ConditionalStructShape          `required:"true"`
-	RequiredMap    map[string]*ConditionalStructShape `required:"true"`
-	RequiredBool   *bool                              `required:"true"`
-	OptionalStruct *ConditionalStructShape
-
-	hiddenParameter *string
-}
-
-func (s *StructShape) Validate() error {
-	invalidParams := request.ErrInvalidParams{Context: "StructShape"}
-	if s.RequiredList == nil {
-		invalidParams.Add(request.NewErrParamRequired("RequiredList"))
-	}
-	if s.RequiredMap == nil {
-		invalidParams.Add(request.NewErrParamRequired("RequiredMap"))
-	}
-	if s.RequiredBool == nil {
-		invalidParams.Add(request.NewErrParamRequired("RequiredBool"))
-	}
-	if s.RequiredList != nil {
-		for i, v := range s.RequiredList {
-			if v == nil {
-				continue
-			}
-			if err := v.Validate(); err != nil {
-				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RequiredList", i), err.(request.ErrInvalidParams))
-			}
-		}
-	}
-	if s.RequiredMap != nil {
-		for i, v := range s.RequiredMap {
-			if v == nil {
-				continue
-			}
-			if err := v.Validate(); err != nil {
-				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RequiredMap", i), err.(request.ErrInvalidParams))
-			}
-		}
-	}
-	if s.OptionalStruct != nil {
-		if err := s.OptionalStruct.Validate(); err != nil {
-			invalidParams.AddNested("OptionalStruct", err.(request.ErrInvalidParams))
-		}
-	}
-
-	if invalidParams.Len() > 0 {
-		return invalidParams
-	}
-	return nil
-}
-
-type ConditionalStructShape struct {
-	_ struct{} `type:"structure"`
-
-	Name *string `required:"true"`
-}
-
-func (s *ConditionalStructShape) Validate() error {
-	invalidParams := request.ErrInvalidParams{Context: "ConditionalStructShape"}
-	if s.Name == nil {
-		invalidParams.Add(request.NewErrParamRequired("Name"))
-	}
-
-	if invalidParams.Len() > 0 {
-		return invalidParams
-	}
-	return nil
-}
-
-func TestNoErrors(t *testing.T) {
-	input := &StructShape{
-		RequiredList: []*ConditionalStructShape{},
-		RequiredMap: map[string]*ConditionalStructShape{
-			"key1": {Name: aws.String("Name")},
-			"key2": {Name: aws.String("Name")},
-		},
-		RequiredBool:   aws.Bool(true),
-		OptionalStruct: &ConditionalStructShape{Name: aws.String("Name")},
-	}
-
-	req := testSvc.NewRequest(&request.Operation{}, input, nil)
-	corehandlers.ValidateParametersHandler.Fn(req)
-	require.NoError(t, req.Error)
-}
-
-func TestMissingRequiredParameters(t *testing.T) {
-	input := &StructShape{}
-	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())
-
-	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())
-
-	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())
-}
-
-func TestNestedMissingRequiredParameters(t *testing.T) {
-	input := &StructShape{
-		RequiredList: []*ConditionalStructShape{{}},
-		RequiredMap: map[string]*ConditionalStructShape{
-			"key1": {Name: aws.String("Name")},
-			"key2": {},
-		},
-		RequiredBool:   aws.Bool(true),
-		OptionalStruct: &ConditionalStructShape{},
-	}
-
-	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())
-
-	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())
-}
-
-type testInput struct {
-	StringField *string           `min:"5"`
-	ListField   []string          `min:"3"`
-	MapField    map[string]string `min:"4"`
-}
-
-func (s testInput) Validate() error {
-	invalidParams := request.ErrInvalidParams{Context: "testInput"}
-	if s.StringField != nil && len(*s.StringField) < 5 {
-		invalidParams.Add(request.NewErrParamMinLen("StringField", 5))
-	}
-	if s.ListField != nil && len(s.ListField) < 3 {
-		invalidParams.Add(request.NewErrParamMinLen("ListField", 3))
-	}
-	if s.MapField != nil && len(s.MapField) < 4 {
-		invalidParams.Add(request.NewErrParamMinLen("MapField", 4))
-	}
-
-	if invalidParams.Len() > 0 {
-		return invalidParams
-	}
-	return nil
-}
-
-var testsFieldMin = []struct {
-	err awserr.Error
-	in  testInput
-}{
-	{
-		err: func() awserr.Error {
-			invalidParams := request.ErrInvalidParams{Context: "testInput"}
-			invalidParams.Add(request.NewErrParamMinLen("StringField", 5))
-			return invalidParams
-		}(),
-		in: testInput{StringField: aws.String("abcd")},
-	},
-	{
-		err: func() awserr.Error {
-			invalidParams := request.ErrInvalidParams{Context: "testInput"}
-			invalidParams.Add(request.NewErrParamMinLen("StringField", 5))
-			invalidParams.Add(request.NewErrParamMinLen("ListField", 3))
-			return invalidParams
-		}(),
-		in: testInput{StringField: aws.String("abcd"), ListField: []string{"a", "b"}},
-	},
-	{
-		err: func() awserr.Error {
-			invalidParams := request.ErrInvalidParams{Context: "testInput"}
-			invalidParams.Add(request.NewErrParamMinLen("StringField", 5))
-			invalidParams.Add(request.NewErrParamMinLen("ListField", 3))
-			invalidParams.Add(request.NewErrParamMinLen("MapField", 4))
-			return invalidParams
-		}(),
-		in: testInput{StringField: aws.String("abcd"), ListField: []string{"a", "b"}, MapField: map[string]string{"a": "a", "b": "b"}},
-	},
-	{
-		err: nil,
-		in: testInput{StringField: aws.String("abcde"),
-			ListField: []string{"a", "b", "c"}, MapField: map[string]string{"a": "a", "b": "b", "c": "c", "d": "d"}},
-	},
-}
-
-func TestValidateFieldMinParameter(t *testing.T) {
-	for i, c := range testsFieldMin {
-		req := testSvc.NewRequest(&request.Operation{}, &c.in, nil)
-		corehandlers.ValidateParametersHandler.Fn(req)
-
-		assert.Equal(t, c.err, req.Error, "%d case failed", i)
-	}
-}
-
-func BenchmarkValidateAny(b *testing.B) {
-	input := &kinesis.PutRecordsInput{
-		StreamName: aws.String("stream"),
-	}
-	for i := 0; i < 100; i++ {
-		record := &kinesis.PutRecordsRequestEntry{
-			Data:         make([]byte, 10000),
-			PartitionKey: aws.String("partition"),
-		}
-		input.Records = append(input.Records, record)
-	}
-
-	req, _ := kinesis.New(unit.Session).PutRecordsRequest(input)
-
-	b.ResetTimer()
-	for i := 0; i < b.N; i++ {
-		corehandlers.ValidateParametersHandler.Fn(req)
-		if err := req.Error; err != nil {
-			b.Fatalf("validation failed: %v", err)
-		}
-	}
-}

+ 0 - 100
Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/chain_provider.go

@@ -1,100 +0,0 @@
-package credentials
-
-import (
-	"github.com/aws/aws-sdk-go/aws/awserr"
-)
-
-var (
-	// ErrNoValidProvidersFoundInChain Is returned when there are no valid
-	// providers in the ChainProvider.
-	//
-	// This has been deprecated. For verbose error messaging set
-	// aws.Config.CredentialsChainVerboseErrors to true
-	//
-	// @readonly
-	ErrNoValidProvidersFoundInChain = awserr.New("NoCredentialProviders",
-		`no valid providers in chain. Deprecated. 
-	For verbose messaging see aws.Config.CredentialsChainVerboseErrors`,
-		nil)
-)
-
-// A ChainProvider will search for a provider which returns credentials
-// and cache that provider until Retrieve is called again.
-//
-// The ChainProvider provides a way of chaining multiple providers together
-// which will pick the first available using priority order of the Providers
-// in the list.
-//
-// If none of the Providers retrieve valid credentials Value, ChainProvider's
-// Retrieve() will return the error ErrNoValidProvidersFoundInChain.
-//
-// If a Provider is found which returns valid credentials Value ChainProvider
-// will cache that Provider for all calls to IsExpired(), until Retrieve is
-// called again.
-//
-// Example of ChainProvider to be used with an EnvProvider and EC2RoleProvider.
-// In this example EnvProvider will first check if any credentials are available
-// vai the environment variables. If there are none ChainProvider will check
-// the next Provider in the list, EC2RoleProvider in this case. If EC2RoleProvider
-// does not return any credentials ChainProvider will return the error
-// ErrNoValidProvidersFoundInChain
-//
-//     creds := NewChainCredentials(
-//         []Provider{
-//             &EnvProvider{},
-//             &EC2RoleProvider{
-//                 Client: ec2metadata.New(sess),
-//             },
-//         })
-//
-//     // Usage of ChainCredentials with aws.Config
-//     svc := ec2.New(&aws.Config{Credentials: creds})
-//
-type ChainProvider struct {
-	Providers     []Provider
-	curr          Provider
-	VerboseErrors bool
-}
-
-// NewChainCredentials returns a pointer to a new Credentials object
-// wrapping a chain of providers.
-func NewChainCredentials(providers []Provider) *Credentials {
-	return NewCredentials(&ChainProvider{
-		Providers: append([]Provider{}, providers...),
-	})
-}
-
-// Retrieve returns the credentials value or error if no provider returned
-// without error.
-//
-// If a provider is found it will be cached and any calls to IsExpired()
-// will return the expired state of the cached provider.
-func (c *ChainProvider) Retrieve() (Value, error) {
-	var errs []error
-	for _, p := range c.Providers {
-		creds, err := p.Retrieve()
-		if err == nil {
-			c.curr = p
-			return creds, nil
-		}
-		errs = append(errs, err)
-	}
-	c.curr = nil
-
-	var err error
-	err = ErrNoValidProvidersFoundInChain
-	if c.VerboseErrors {
-		err = awserr.NewBatchError("NoCredentialProviders", "no valid providers in chain", errs)
-	}
-	return Value{}, err
-}
-
-// IsExpired will returned the expired state of the currently cached provider
-// if there is one.  If there is no current provider, true will be returned.
-func (c *ChainProvider) IsExpired() bool {
-	if c.curr != nil {
-		return c.curr.IsExpired()
-	}
-
-	return true
-}

+ 0 - 154
Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/chain_provider_test.go

@@ -1,154 +0,0 @@
-package credentials
-
-import (
-	"testing"
-
-	"github.com/aws/aws-sdk-go/aws/awserr"
-	"github.com/stretchr/testify/assert"
-)
-
-type secondStubProvider struct {
-	creds   Value
-	expired bool
-	err     error
-}
-
-func (s *secondStubProvider) Retrieve() (Value, error) {
-	s.expired = false
-	s.creds.ProviderName = "secondStubProvider"
-	return s.creds, s.err
-}
-func (s *secondStubProvider) IsExpired() bool {
-	return s.expired
-}
-
-func TestChainProviderWithNames(t *testing.T) {
-	p := &ChainProvider{
-		Providers: []Provider{
-			&stubProvider{err: awserr.New("FirstError", "first provider error", nil)},
-			&stubProvider{err: awserr.New("SecondError", "second provider error", nil)},
-			&secondStubProvider{
-				creds: Value{
-					AccessKeyID:     "AKIF",
-					SecretAccessKey: "NOSECRET",
-					SessionToken:    "",
-				},
-			},
-			&stubProvider{
-				creds: Value{
-					AccessKeyID:     "AKID",
-					SecretAccessKey: "SECRET",
-					SessionToken:    "",
-				},
-			},
-		},
-	}
-
-	creds, err := p.Retrieve()
-	assert.Nil(t, err, "Expect no error")
-	assert.Equal(t, "secondStubProvider", creds.ProviderName, "Expect provider name to match")
-
-	// Also check credentials
-	assert.Equal(t, "AKIF", creds.AccessKeyID, "Expect access key ID to match")
-	assert.Equal(t, "NOSECRET", creds.SecretAccessKey, "Expect secret access key to match")
-	assert.Empty(t, creds.SessionToken, "Expect session token to be empty")
-
-}
-
-func TestChainProviderGet(t *testing.T) {
-	p := &ChainProvider{
-		Providers: []Provider{
-			&stubProvider{err: awserr.New("FirstError", "first provider error", nil)},
-			&stubProvider{err: awserr.New("SecondError", "second provider error", nil)},
-			&stubProvider{
-				creds: Value{
-					AccessKeyID:     "AKID",
-					SecretAccessKey: "SECRET",
-					SessionToken:    "",
-				},
-			},
-		},
-	}
-
-	creds, err := p.Retrieve()
-	assert.Nil(t, err, "Expect no error")
-	assert.Equal(t, "AKID", creds.AccessKeyID, "Expect access key ID to match")
-	assert.Equal(t, "SECRET", creds.SecretAccessKey, "Expect secret access key to match")
-	assert.Empty(t, creds.SessionToken, "Expect session token to be empty")
-}
-
-func TestChainProviderIsExpired(t *testing.T) {
-	stubProvider := &stubProvider{expired: true}
-	p := &ChainProvider{
-		Providers: []Provider{
-			stubProvider,
-		},
-	}
-
-	assert.True(t, p.IsExpired(), "Expect expired to be true before any Retrieve")
-	_, err := p.Retrieve()
-	assert.Nil(t, err, "Expect no error")
-	assert.False(t, p.IsExpired(), "Expect not expired after retrieve")
-
-	stubProvider.expired = true
-	assert.True(t, p.IsExpired(), "Expect return of expired provider")
-
-	_, err = p.Retrieve()
-	assert.False(t, p.IsExpired(), "Expect not expired after retrieve")
-}
-
-func TestChainProviderWithNoProvider(t *testing.T) {
-	p := &ChainProvider{
-		Providers: []Provider{},
-	}
-
-	assert.True(t, p.IsExpired(), "Expect expired with no providers")
-	_, err := p.Retrieve()
-	assert.Equal(t,
-		ErrNoValidProvidersFoundInChain,
-		err,
-		"Expect no providers error returned")
-}
-
-func TestChainProviderWithNoValidProvider(t *testing.T) {
-	errs := []error{
-		awserr.New("FirstError", "first provider error", nil),
-		awserr.New("SecondError", "second provider error", nil),
-	}
-	p := &ChainProvider{
-		Providers: []Provider{
-			&stubProvider{err: errs[0]},
-			&stubProvider{err: errs[1]},
-		},
-	}
-
-	assert.True(t, p.IsExpired(), "Expect expired with no providers")
-	_, err := p.Retrieve()
-
-	assert.Equal(t,
-		ErrNoValidProvidersFoundInChain,
-		err,
-		"Expect no providers error returned")
-}
-
-func TestChainProviderWithNoValidProviderWithVerboseEnabled(t *testing.T) {
-	errs := []error{
-		awserr.New("FirstError", "first provider error", nil),
-		awserr.New("SecondError", "second provider error", nil),
-	}
-	p := &ChainProvider{
-		VerboseErrors: true,
-		Providers: []Provider{
-			&stubProvider{err: errs[0]},
-			&stubProvider{err: errs[1]},
-		},
-	}
-
-	assert.True(t, p.IsExpired(), "Expect expired with no providers")
-	_, err := p.Retrieve()
-
-	assert.Equal(t,
-		awserr.NewBatchError("NoCredentialProviders", "no valid providers in chain", errs),
-		err,
-		"Expect no providers error returned")
-}

+ 0 - 73
Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/credentials_test.go

@@ -1,73 +0,0 @@
-package credentials
-
-import (
-	"testing"
-
-	"github.com/aws/aws-sdk-go/aws/awserr"
-	"github.com/stretchr/testify/assert"
-)
-
-type stubProvider struct {
-	creds   Value
-	expired bool
-	err     error
-}
-
-func (s *stubProvider) Retrieve() (Value, error) {
-	s.expired = false
-	s.creds.ProviderName = "stubProvider"
-	return s.creds, s.err
-}
-func (s *stubProvider) IsExpired() bool {
-	return s.expired
-}
-
-func TestCredentialsGet(t *testing.T) {
-	c := NewCredentials(&stubProvider{
-		creds: Value{
-			AccessKeyID:     "AKID",
-			SecretAccessKey: "SECRET",
-			SessionToken:    "",
-		},
-		expired: true,
-	})
-
-	creds, err := c.Get()
-	assert.Nil(t, err, "Expected no error")
-	assert.Equal(t, "AKID", creds.AccessKeyID, "Expect access key ID to match")
-	assert.Equal(t, "SECRET", creds.SecretAccessKey, "Expect secret access key to match")
-	assert.Empty(t, creds.SessionToken, "Expect session token to be empty")
-}
-
-func TestCredentialsGetWithError(t *testing.T) {
-	c := NewCredentials(&stubProvider{err: awserr.New("provider error", "", nil), expired: true})
-
-	_, err := c.Get()
-	assert.Equal(t, "provider error", err.(awserr.Error).Code(), "Expected provider error")
-}
-
-func TestCredentialsExpire(t *testing.T) {
-	stub := &stubProvider{}
-	c := NewCredentials(stub)
-
-	stub.expired = false
-	assert.True(t, c.IsExpired(), "Expected to start out expired")
-	c.Expire()
-	assert.True(t, c.IsExpired(), "Expected to be expired")
-
-	c.forceRefresh = false
-	assert.False(t, c.IsExpired(), "Expected not to be expired")
-
-	stub.expired = true
-	assert.True(t, c.IsExpired(), "Expected to be expired")
-}
-
-func TestCredentialsGetWithProviderName(t *testing.T) {
-	stub := &stubProvider{}
-
-	c := NewCredentials(stub)
-
-	creds, err := c.Get()
-	assert.Nil(t, err, "Expected no error")
-	assert.Equal(t, creds.ProviderName, "stubProvider", "Expected provider name to match")
-}

+ 0 - 178
Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds/ec2_role_provider.go

@@ -1,178 +0,0 @@
-package ec2rolecreds
-
-import (
-	"bufio"
-	"encoding/json"
-	"fmt"
-	"path"
-	"strings"
-	"time"
-
-	"github.com/aws/aws-sdk-go/aws/awserr"
-	"github.com/aws/aws-sdk-go/aws/client"
-	"github.com/aws/aws-sdk-go/aws/credentials"
-	"github.com/aws/aws-sdk-go/aws/ec2metadata"
-)
-
-// ProviderName provides a name of EC2Role provider
-const ProviderName = "EC2RoleProvider"
-
-// A EC2RoleProvider retrieves credentials from the EC2 service, and keeps track if
-// those credentials are expired.
-//
-// Example how to configure the EC2RoleProvider with custom http Client, Endpoint
-// or ExpiryWindow
-//
-//     p := &ec2rolecreds.EC2RoleProvider{
-//         // Pass in a custom timeout to be used when requesting
-//         // IAM EC2 Role credentials.
-//         Client: ec2metadata.New(sess, aws.Config{
-//             HTTPClient: &http.Client{Timeout: 10 * time.Second},
-//         }),
-//
-//         // Do not use early expiry of credentials. If a non zero value is
-//         // specified the credentials will be expired early
-//         ExpiryWindow: 0,
-//     }
-type EC2RoleProvider struct {
-	credentials.Expiry
-
-	// Required EC2Metadata client to use when connecting to EC2 metadata service.
-	Client *ec2metadata.EC2Metadata
-
-	// ExpiryWindow will allow the credentials to trigger refreshing prior to
-	// the credentials actually expiring. This is beneficial so race conditions
-	// with expiring credentials do not cause request to fail unexpectedly
-	// due to ExpiredTokenException exceptions.
-	//
-	// So a ExpiryWindow of 10s would cause calls to IsExpired() to return true
-	// 10 seconds before the credentials are actually expired.
-	//
-	// If ExpiryWindow is 0 or less it will be ignored.
-	ExpiryWindow time.Duration
-}
-
-// NewCredentials returns a pointer to a new Credentials object wrapping
-// the EC2RoleProvider. Takes a ConfigProvider to create a EC2Metadata client.
-// The ConfigProvider is satisfied by the session.Session type.
-func NewCredentials(c client.ConfigProvider, options ...func(*EC2RoleProvider)) *credentials.Credentials {
-	p := &EC2RoleProvider{
-		Client: ec2metadata.New(c),
-	}
-
-	for _, option := range options {
-		option(p)
-	}
-
-	return credentials.NewCredentials(p)
-}
-
-// NewCredentialsWithClient returns a pointer to a new Credentials object wrapping
-// the EC2RoleProvider. Takes a EC2Metadata client to use when connecting to EC2
-// metadata service.
-func NewCredentialsWithClient(client *ec2metadata.EC2Metadata, options ...func(*EC2RoleProvider)) *credentials.Credentials {
-	p := &EC2RoleProvider{
-		Client: client,
-	}
-
-	for _, option := range options {
-		option(p)
-	}
-
-	return credentials.NewCredentials(p)
-}
-
-// Retrieve retrieves credentials from the EC2 service.
-// Error will be returned if the request fails, or unable to extract
-// the desired credentials.
-func (m *EC2RoleProvider) Retrieve() (credentials.Value, error) {
-	credsList, err := requestCredList(m.Client)
-	if err != nil {
-		return credentials.Value{ProviderName: ProviderName}, err
-	}
-
-	if len(credsList) == 0 {
-		return credentials.Value{ProviderName: ProviderName}, awserr.New("EmptyEC2RoleList", "empty EC2 Role list", nil)
-	}
-	credsName := credsList[0]
-
-	roleCreds, err := requestCred(m.Client, credsName)
-	if err != nil {
-		return credentials.Value{ProviderName: ProviderName}, err
-	}
-
-	m.SetExpiration(roleCreds.Expiration, m.ExpiryWindow)
-
-	return credentials.Value{
-		AccessKeyID:     roleCreds.AccessKeyID,
-		SecretAccessKey: roleCreds.SecretAccessKey,
-		SessionToken:    roleCreds.Token,
-		ProviderName:    ProviderName,
-	}, nil
-}
-
-// A ec2RoleCredRespBody provides the shape for unmarshalling credential
-// request responses.
-type ec2RoleCredRespBody struct {
-	// Success State
-	Expiration      time.Time
-	AccessKeyID     string
-	SecretAccessKey string
-	Token           string
-
-	// Error state
-	Code    string
-	Message string
-}
-
-const iamSecurityCredsPath = "/iam/security-credentials"
-
-// requestCredList requests a list of credentials from the EC2 service.
-// If there are no credentials, or there is an error making or receiving the request
-func requestCredList(client *ec2metadata.EC2Metadata) ([]string, error) {
-	resp, err := client.GetMetadata(iamSecurityCredsPath)
-	if err != nil {
-		return nil, awserr.New("EC2RoleRequestError", "no EC2 instance role found", err)
-	}
-
-	credsList := []string{}
-	s := bufio.NewScanner(strings.NewReader(resp))
-	for s.Scan() {
-		credsList = append(credsList, s.Text())
-	}
-
-	if err := s.Err(); err != nil {
-		return nil, awserr.New("SerializationError", "failed to read EC2 instance role from metadata service", err)
-	}
-
-	return credsList, nil
-}
-
-// requestCred requests the credentials for a specific credentials from the EC2 service.
-//
-// If the credentials cannot be found, or there is an error reading the response
-// and error will be returned.
-func requestCred(client *ec2metadata.EC2Metadata, credsName string) (ec2RoleCredRespBody, error) {
-	resp, err := client.GetMetadata(path.Join(iamSecurityCredsPath, credsName))
-	if err != nil {
-		return ec2RoleCredRespBody{},
-			awserr.New("EC2RoleRequestError",
-				fmt.Sprintf("failed to get %s EC2 instance role credentials", credsName),
-				err)
-	}
-
-	respCreds := ec2RoleCredRespBody{}
-	if err := json.NewDecoder(strings.NewReader(resp)).Decode(&respCreds); err != nil {
-		return ec2RoleCredRespBody{},
-			awserr.New("SerializationError",
-				fmt.Sprintf("failed to decode %s EC2 instance role credentials", credsName),
-				err)
-	}
-
-	if respCreds.Code != "Success" {
-		// If an error code was returned something failed requesting the role.
-		return ec2RoleCredRespBody{}, awserr.New(respCreds.Code, respCreds.Message, nil)
-	}
-
-	return respCreds, nil
-}

+ 0 - 159
Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds/ec2_role_provider_test.go

@@ -1,159 +0,0 @@
-package ec2rolecreds_test
-
-import (
-	"fmt"
-	"net/http"
-	"net/http/httptest"
-	"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/credentials/ec2rolecreds"
-	"github.com/aws/aws-sdk-go/aws/ec2metadata"
-	"github.com/aws/aws-sdk-go/awstesting/unit"
-)
-
-const credsRespTmpl = `{
-  "Code": "Success",
-  "Type": "AWS-HMAC",
-  "AccessKeyId" : "accessKey",
-  "SecretAccessKey" : "secret",
-  "Token" : "token",
-  "Expiration" : "%s",
-  "LastUpdated" : "2009-11-23T0:00:00Z"
-}`
-
-const credsFailRespTmpl = `{
-  "Code": "ErrorCode",
-  "Message": "ErrorMsg",
-  "LastUpdated": "2009-11-23T0:00:00Z"
-}`
-
-func initTestServer(expireOn string, failAssume bool) *httptest.Server {
-	server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
-		if r.URL.Path == "/latest/meta-data/iam/security-credentials" {
-			fmt.Fprintln(w, "RoleName")
-		} else if r.URL.Path == "/latest/meta-data/iam/security-credentials/RoleName" {
-			if failAssume {
-				fmt.Fprintf(w, credsFailRespTmpl)
-			} else {
-				fmt.Fprintf(w, credsRespTmpl, expireOn)
-			}
-		} else {
-			http.Error(w, "bad request", http.StatusBadRequest)
-		}
-	}))
-
-	return server
-}
-
-func TestEC2RoleProvider(t *testing.T) {
-	server := initTestServer("2014-12-16T01:51:37Z", false)
-	defer server.Close()
-
-	p := &ec2rolecreds.EC2RoleProvider{
-		Client: ec2metadata.New(unit.Session, &aws.Config{Endpoint: aws.String(server.URL + "/latest")}),
-	}
-
-	creds, err := p.Retrieve()
-	assert.Nil(t, err, "Expect no error, %v", err)
-
-	assert.Equal(t, "accessKey", creds.AccessKeyID, "Expect access key ID to match")
-	assert.Equal(t, "secret", creds.SecretAccessKey, "Expect secret access key to match")
-	assert.Equal(t, "token", creds.SessionToken, "Expect session token to match")
-}
-
-func TestEC2RoleProviderFailAssume(t *testing.T) {
-	server := initTestServer("2014-12-16T01:51:37Z", true)
-	defer server.Close()
-
-	p := &ec2rolecreds.EC2RoleProvider{
-		Client: ec2metadata.New(unit.Session, &aws.Config{Endpoint: aws.String(server.URL + "/latest")}),
-	}
-
-	creds, err := p.Retrieve()
-	assert.Error(t, err, "Expect error")
-
-	e := err.(awserr.Error)
-	assert.Equal(t, "ErrorCode", e.Code())
-	assert.Equal(t, "ErrorMsg", e.Message())
-	assert.Nil(t, e.OrigErr())
-
-	assert.Equal(t, "", creds.AccessKeyID, "Expect access key ID to match")
-	assert.Equal(t, "", creds.SecretAccessKey, "Expect secret access key to match")
-	assert.Equal(t, "", creds.SessionToken, "Expect session token to match")
-}
-
-func TestEC2RoleProviderIsExpired(t *testing.T) {
-	server := initTestServer("2014-12-16T01:51:37Z", false)
-	defer server.Close()
-
-	p := &ec2rolecreds.EC2RoleProvider{
-		Client: ec2metadata.New(unit.Session, &aws.Config{Endpoint: aws.String(server.URL + "/latest")}),
-	}
-	p.CurrentTime = func() time.Time {
-		return time.Date(2014, 12, 15, 21, 26, 0, 0, time.UTC)
-	}
-
-	assert.True(t, p.IsExpired(), "Expect creds to be expired before retrieve.")
-
-	_, err := p.Retrieve()
-	assert.Nil(t, err, "Expect no error, %v", err)
-
-	assert.False(t, p.IsExpired(), "Expect creds to not be expired after retrieve.")
-
-	p.CurrentTime = func() time.Time {
-		return time.Date(3014, 12, 15, 21, 26, 0, 0, time.UTC)
-	}
-
-	assert.True(t, p.IsExpired(), "Expect creds to be expired.")
-}
-
-func TestEC2RoleProviderExpiryWindowIsExpired(t *testing.T) {
-	server := initTestServer("2014-12-16T01:51:37Z", false)
-	defer server.Close()
-
-	p := &ec2rolecreds.EC2RoleProvider{
-		Client:       ec2metadata.New(unit.Session, &aws.Config{Endpoint: aws.String(server.URL + "/latest")}),
-		ExpiryWindow: time.Hour * 1,
-	}
-	p.CurrentTime = func() time.Time {
-		return time.Date(2014, 12, 15, 0, 51, 37, 0, time.UTC)
-	}
-
-	assert.True(t, p.IsExpired(), "Expect creds to be expired before retrieve.")
-
-	_, err := p.Retrieve()
-	assert.Nil(t, err, "Expect no error, %v", err)
-
-	assert.False(t, p.IsExpired(), "Expect creds to not be expired after retrieve.")
-
-	p.CurrentTime = func() time.Time {
-		return time.Date(2014, 12, 16, 0, 55, 37, 0, time.UTC)
-	}
-
-	assert.True(t, p.IsExpired(), "Expect creds to be expired.")
-}
-
-func BenchmarkEC3RoleProvider(b *testing.B) {
-	server := initTestServer("2014-12-16T01:51:37Z", false)
-	defer server.Close()
-
-	p := &ec2rolecreds.EC2RoleProvider{
-		Client: ec2metadata.New(unit.Session, &aws.Config{Endpoint: aws.String(server.URL + "/latest")}),
-	}
-	_, err := p.Retrieve()
-	if err != nil {
-		b.Fatal(err)
-	}
-
-	b.ResetTimer()
-	for i := 0; i < b.N; i++ {
-		if _, err := p.Retrieve(); err != nil {
-			b.Fatal(err)
-		}
-	}
-}

+ 0 - 111
Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/endpointcreds/provider_test.go

@@ -1,111 +0,0 @@
-package endpointcreds_test
-
-import (
-	"encoding/json"
-	"fmt"
-	"net/http"
-	"net/http/httptest"
-	"testing"
-	"time"
-
-	"github.com/aws/aws-sdk-go/aws/awserr"
-	"github.com/aws/aws-sdk-go/aws/credentials/endpointcreds"
-	"github.com/aws/aws-sdk-go/awstesting/unit"
-	"github.com/stretchr/testify/assert"
-)
-
-func TestRetrieveRefreshableCredentials(t *testing.T) {
-	server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
-		assert.Equal(t, "/path/to/endpoint", r.URL.Path)
-		assert.Equal(t, "application/json", r.Header.Get("Accept"))
-		assert.Equal(t, "else", r.URL.Query().Get("something"))
-
-		encoder := json.NewEncoder(w)
-		err := encoder.Encode(map[string]interface{}{
-			"AccessKeyID":     "AKID",
-			"SecretAccessKey": "SECRET",
-			"Token":           "TOKEN",
-			"Expiration":      time.Now().Add(1 * time.Hour),
-		})
-
-		if err != nil {
-			fmt.Println("failed to write out creds", err)
-		}
-	}))
-
-	client := endpointcreds.NewProviderClient(*unit.Session.Config,
-		unit.Session.Handlers,
-		server.URL+"/path/to/endpoint?something=else",
-	)
-	creds, err := client.Retrieve()
-
-	assert.NoError(t, err)
-
-	assert.Equal(t, "AKID", creds.AccessKeyID)
-	assert.Equal(t, "SECRET", creds.SecretAccessKey)
-	assert.Equal(t, "TOKEN", creds.SessionToken)
-	assert.False(t, client.IsExpired())
-
-	client.(*endpointcreds.Provider).CurrentTime = func() time.Time {
-		return time.Now().Add(2 * time.Hour)
-	}
-
-	assert.True(t, client.IsExpired())
-}
-
-func TestRetrieveStaticCredentials(t *testing.T) {
-	server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
-		encoder := json.NewEncoder(w)
-		err := encoder.Encode(map[string]interface{}{
-			"AccessKeyID":     "AKID",
-			"SecretAccessKey": "SECRET",
-		})
-
-		if err != nil {
-			fmt.Println("failed to write out creds", err)
-		}
-	}))
-
-	client := endpointcreds.NewProviderClient(*unit.Session.Config, unit.Session.Handlers, server.URL)
-	creds, err := client.Retrieve()
-
-	assert.NoError(t, err)
-
-	assert.Equal(t, "AKID", creds.AccessKeyID)
-	assert.Equal(t, "SECRET", creds.SecretAccessKey)
-	assert.Empty(t, creds.SessionToken)
-	assert.False(t, client.IsExpired())
-}
-
-func TestFailedRetrieveCredentials(t *testing.T) {
-	server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
-		w.WriteHeader(400)
-		encoder := json.NewEncoder(w)
-		err := encoder.Encode(map[string]interface{}{
-			"Code":    "Error",
-			"Message": "Message",
-		})
-
-		if err != nil {
-			fmt.Println("failed to write error", err)
-		}
-	}))
-
-	client := endpointcreds.NewProviderClient(*unit.Session.Config, unit.Session.Handlers, server.URL)
-	creds, err := client.Retrieve()
-
-	assert.Error(t, err)
-	aerr := err.(awserr.Error)
-
-	assert.Equal(t, "CredentialsEndpointError", aerr.Code())
-	assert.Equal(t, "failed to load credentials", aerr.Message())
-
-	aerr = aerr.OrigErr().(awserr.Error)
-	assert.Equal(t, "Error", aerr.Code())
-	assert.Equal(t, "Message", aerr.Message())
-
-	assert.Empty(t, creds.AccessKeyID)
-	assert.Empty(t, creds.SecretAccessKey)
-	assert.Empty(t, creds.SessionToken)
-	assert.True(t, client.IsExpired())
-}

+ 0 - 70
Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/env_provider_test.go

@@ -1,70 +0,0 @@
-package credentials
-
-import (
-	"github.com/stretchr/testify/assert"
-	"os"
-	"testing"
-)
-
-func TestEnvProviderRetrieve(t *testing.T) {
-	os.Clearenv()
-	os.Setenv("AWS_ACCESS_KEY_ID", "access")
-	os.Setenv("AWS_SECRET_ACCESS_KEY", "secret")
-	os.Setenv("AWS_SESSION_TOKEN", "token")
-
-	e := EnvProvider{}
-	creds, err := e.Retrieve()
-	assert.Nil(t, err, "Expect no error")
-
-	assert.Equal(t, "access", creds.AccessKeyID, "Expect access key ID to match")
-	assert.Equal(t, "secret", creds.SecretAccessKey, "Expect secret access key to match")
-	assert.Equal(t, "token", creds.SessionToken, "Expect session token to match")
-}
-
-func TestEnvProviderIsExpired(t *testing.T) {
-	os.Clearenv()
-	os.Setenv("AWS_ACCESS_KEY_ID", "access")
-	os.Setenv("AWS_SECRET_ACCESS_KEY", "secret")
-	os.Setenv("AWS_SESSION_TOKEN", "token")
-
-	e := EnvProvider{}
-
-	assert.True(t, e.IsExpired(), "Expect creds to be expired before retrieve.")
-
-	_, err := e.Retrieve()
-	assert.Nil(t, err, "Expect no error")
-
-	assert.False(t, e.IsExpired(), "Expect creds to not be expired after retrieve.")
-}
-
-func TestEnvProviderNoAccessKeyID(t *testing.T) {
-	os.Clearenv()
-	os.Setenv("AWS_SECRET_ACCESS_KEY", "secret")
-
-	e := EnvProvider{}
-	creds, err := e.Retrieve()
-	assert.Equal(t, ErrAccessKeyIDNotFound, err, "ErrAccessKeyIDNotFound expected, but was %#v error: %#v", creds, err)
-}
-
-func TestEnvProviderNoSecretAccessKey(t *testing.T) {
-	os.Clearenv()
-	os.Setenv("AWS_ACCESS_KEY_ID", "access")
-
-	e := EnvProvider{}
-	creds, err := e.Retrieve()
-	assert.Equal(t, ErrSecretAccessKeyNotFound, err, "ErrSecretAccessKeyNotFound expected, but was %#v error: %#v", creds, err)
-}
-
-func TestEnvProviderAlternateNames(t *testing.T) {
-	os.Clearenv()
-	os.Setenv("AWS_ACCESS_KEY", "access")
-	os.Setenv("AWS_SECRET_KEY", "secret")
-
-	e := EnvProvider{}
-	creds, err := e.Retrieve()
-	assert.Nil(t, err, "Expect no error")
-
-	assert.Equal(t, "access", creds.AccessKeyID, "Expected access key ID")
-	assert.Equal(t, "secret", creds.SecretAccessKey, "Expected secret access key")
-	assert.Empty(t, creds.SessionToken, "Expected no token")
-}

+ 0 - 116
Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/shared_credentials_provider_test.go

@@ -1,116 +0,0 @@
-package credentials
-
-import (
-	"os"
-	"path/filepath"
-	"testing"
-
-	"github.com/stretchr/testify/assert"
-)
-
-func TestSharedCredentialsProvider(t *testing.T) {
-	os.Clearenv()
-
-	p := SharedCredentialsProvider{Filename: "example.ini", Profile: ""}
-	creds, err := p.Retrieve()
-	assert.Nil(t, err, "Expect no error")
-
-	assert.Equal(t, "accessKey", creds.AccessKeyID, "Expect access key ID to match")
-	assert.Equal(t, "secret", creds.SecretAccessKey, "Expect secret access key to match")
-	assert.Equal(t, "token", creds.SessionToken, "Expect session token to match")
-}
-
-func TestSharedCredentialsProviderIsExpired(t *testing.T) {
-	os.Clearenv()
-
-	p := SharedCredentialsProvider{Filename: "example.ini", Profile: ""}
-
-	assert.True(t, p.IsExpired(), "Expect creds to be expired before retrieve")
-
-	_, err := p.Retrieve()
-	assert.Nil(t, err, "Expect no error")
-
-	assert.False(t, p.IsExpired(), "Expect creds to not be expired after retrieve")
-}
-
-func TestSharedCredentialsProviderWithAWS_SHARED_CREDENTIALS_FILE(t *testing.T) {
-	os.Clearenv()
-	os.Setenv("AWS_SHARED_CREDENTIALS_FILE", "example.ini")
-	p := SharedCredentialsProvider{}
-	creds, err := p.Retrieve()
-
-	assert.Nil(t, err, "Expect no error")
-
-	assert.Equal(t, "accessKey", creds.AccessKeyID, "Expect access key ID to match")
-	assert.Equal(t, "secret", creds.SecretAccessKey, "Expect secret access key to match")
-	assert.Equal(t, "token", creds.SessionToken, "Expect session token to match")
-}
-
-func TestSharedCredentialsProviderWithAWS_SHARED_CREDENTIALS_FILEAbsPath(t *testing.T) {
-	os.Clearenv()
-	wd, err := os.Getwd()
-	assert.NoError(t, err)
-	os.Setenv("AWS_SHARED_CREDENTIALS_FILE", filepath.Join(wd, "example.ini"))
-	p := SharedCredentialsProvider{}
-	creds, err := p.Retrieve()
-	assert.Nil(t, err, "Expect no error")
-
-	assert.Equal(t, "accessKey", creds.AccessKeyID, "Expect access key ID to match")
-	assert.Equal(t, "secret", creds.SecretAccessKey, "Expect secret access key to match")
-	assert.Equal(t, "token", creds.SessionToken, "Expect session token to match")
-}
-
-func TestSharedCredentialsProviderWithAWS_PROFILE(t *testing.T) {
-	os.Clearenv()
-	os.Setenv("AWS_PROFILE", "no_token")
-
-	p := SharedCredentialsProvider{Filename: "example.ini", Profile: ""}
-	creds, err := p.Retrieve()
-	assert.Nil(t, err, "Expect no error")
-
-	assert.Equal(t, "accessKey", creds.AccessKeyID, "Expect access key ID to match")
-	assert.Equal(t, "secret", creds.SecretAccessKey, "Expect secret access key to match")
-	assert.Empty(t, creds.SessionToken, "Expect no token")
-}
-
-func TestSharedCredentialsProviderWithoutTokenFromProfile(t *testing.T) {
-	os.Clearenv()
-
-	p := SharedCredentialsProvider{Filename: "example.ini", Profile: "no_token"}
-	creds, err := p.Retrieve()
-	assert.Nil(t, err, "Expect no error")
-
-	assert.Equal(t, "accessKey", creds.AccessKeyID, "Expect access key ID to match")
-	assert.Equal(t, "secret", creds.SecretAccessKey, "Expect secret access key to match")
-	assert.Empty(t, creds.SessionToken, "Expect no token")
-}
-
-func TestSharedCredentialsProviderColonInCredFile(t *testing.T) {
-	os.Clearenv()
-
-	p := SharedCredentialsProvider{Filename: "example.ini", Profile: "with_colon"}
-	creds, err := p.Retrieve()
-	assert.Nil(t, err, "Expect no error")
-
-	assert.Equal(t, "accessKey", creds.AccessKeyID, "Expect access key ID to match")
-	assert.Equal(t, "secret", creds.SecretAccessKey, "Expect secret access key to match")
-	assert.Empty(t, creds.SessionToken, "Expect no token")
-}
-
-func BenchmarkSharedCredentialsProvider(b *testing.B) {
-	os.Clearenv()
-
-	p := SharedCredentialsProvider{Filename: "example.ini", Profile: ""}
-	_, err := p.Retrieve()
-	if err != nil {
-		b.Fatal(err)
-	}
-
-	b.ResetTimer()
-	for i := 0; i < b.N; i++ {
-		_, err := p.Retrieve()
-		if err != nil {
-			b.Fatal(err)
-		}
-	}
-}

+ 0 - 34
Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/static_provider_test.go

@@ -1,34 +0,0 @@
-package credentials
-
-import (
-	"github.com/stretchr/testify/assert"
-	"testing"
-)
-
-func TestStaticProviderGet(t *testing.T) {
-	s := StaticProvider{
-		Value: Value{
-			AccessKeyID:     "AKID",
-			SecretAccessKey: "SECRET",
-			SessionToken:    "",
-		},
-	}
-
-	creds, err := s.Retrieve()
-	assert.Nil(t, err, "Expect no error")
-	assert.Equal(t, "AKID", creds.AccessKeyID, "Expect access key ID to match")
-	assert.Equal(t, "SECRET", creds.SecretAccessKey, "Expect secret access key to match")
-	assert.Empty(t, creds.SessionToken, "Expect no session token")
-}
-
-func TestStaticProviderIsExpired(t *testing.T) {
-	s := StaticProvider{
-		Value: Value{
-			AccessKeyID:     "AKID",
-			SecretAccessKey: "SECRET",
-			SessionToken:    "",
-		},
-	}
-
-	assert.False(t, s.IsExpired(), "Expect static credentials to never expire")
-}

+ 0 - 56
Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/stscreds/assume_role_provider_test.go

@@ -1,56 +0,0 @@
-package stscreds
-
-import (
-	"testing"
-	"time"
-
-	"github.com/aws/aws-sdk-go/aws"
-	"github.com/aws/aws-sdk-go/service/sts"
-	"github.com/stretchr/testify/assert"
-)
-
-type stubSTS struct {
-}
-
-func (s *stubSTS) AssumeRole(input *sts.AssumeRoleInput) (*sts.AssumeRoleOutput, error) {
-	expiry := time.Now().Add(60 * time.Minute)
-	return &sts.AssumeRoleOutput{
-		Credentials: &sts.Credentials{
-			// Just reflect the role arn to the provider.
-			AccessKeyId:     input.RoleArn,
-			SecretAccessKey: aws.String("assumedSecretAccessKey"),
-			SessionToken:    aws.String("assumedSessionToken"),
-			Expiration:      &expiry,
-		},
-	}, nil
-}
-
-func TestAssumeRoleProvider(t *testing.T) {
-	stub := &stubSTS{}
-	p := &AssumeRoleProvider{
-		Client:  stub,
-		RoleARN: "roleARN",
-	}
-
-	creds, err := p.Retrieve()
-	assert.Nil(t, err, "Expect no error")
-
-	assert.Equal(t, "roleARN", creds.AccessKeyID, "Expect access key ID to be reflected role ARN")
-	assert.Equal(t, "assumedSecretAccessKey", creds.SecretAccessKey, "Expect secret access key to match")
-	assert.Equal(t, "assumedSessionToken", creds.SessionToken, "Expect session token to match")
-}
-
-func BenchmarkAssumeRoleProvider(b *testing.B) {
-	stub := &stubSTS{}
-	p := &AssumeRoleProvider{
-		Client:  stub,
-		RoleARN: "roleARN",
-	}
-
-	b.ResetTimer()
-	for i := 0; i < b.N; i++ {
-		if _, err := p.Retrieve(); err != nil {
-			b.Fatal(err)
-		}
-	}
-}

+ 0 - 129
Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/defaults/defaults.go

@@ -1,129 +0,0 @@
-// Package defaults is a collection of helpers to retrieve the SDK's default
-// configuration and handlers.
-//
-// Generally this package shouldn't be used directly, but session.Session
-// instead. This package is useful when you need to reset the defaults
-// of a session or service client to the SDK defaults before setting
-// additional parameters.
-package defaults
-
-import (
-	"fmt"
-	"net/http"
-	"os"
-	"time"
-
-	"github.com/aws/aws-sdk-go/aws"
-	"github.com/aws/aws-sdk-go/aws/corehandlers"
-	"github.com/aws/aws-sdk-go/aws/credentials"
-	"github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds"
-	"github.com/aws/aws-sdk-go/aws/credentials/endpointcreds"
-	"github.com/aws/aws-sdk-go/aws/ec2metadata"
-	"github.com/aws/aws-sdk-go/aws/request"
-	"github.com/aws/aws-sdk-go/private/endpoints"
-)
-
-// A Defaults provides a collection of default values for SDK clients.
-type Defaults struct {
-	Config   *aws.Config
-	Handlers request.Handlers
-}
-
-// Get returns the SDK's default values with Config and handlers pre-configured.
-func Get() Defaults {
-	cfg := Config()
-	handlers := Handlers()
-	cfg.Credentials = CredChain(cfg, handlers)
-
-	return Defaults{
-		Config:   cfg,
-		Handlers: handlers,
-	}
-}
-
-// Config returns the default configuration without credentials.
-// To retrieve a config with credentials also included use
-// `defaults.Get().Config` instead.
-//
-// Generally you shouldn't need to use this method directly, but
-// is available if you need to reset the configuration of an
-// existing service client or session.
-func Config() *aws.Config {
-	return aws.NewConfig().
-		WithCredentials(credentials.AnonymousCredentials).
-		WithRegion(os.Getenv("AWS_REGION")).
-		WithHTTPClient(http.DefaultClient).
-		WithMaxRetries(aws.UseServiceDefaultRetries).
-		WithLogger(aws.NewDefaultLogger()).
-		WithLogLevel(aws.LogOff).
-		WithSleepDelay(time.Sleep)
-}
-
-// Handlers returns the default request handlers.
-//
-// Generally you shouldn't need to use this method directly, but
-// is available if you need to reset the request handlers of an
-// existing service client or session.
-func Handlers() request.Handlers {
-	var handlers request.Handlers
-
-	handlers.Validate.PushBackNamed(corehandlers.ValidateEndpointHandler)
-	handlers.Validate.AfterEachFn = request.HandlerListStopOnError
-	handlers.Build.PushBackNamed(corehandlers.SDKVersionUserAgentHandler)
-	handlers.Build.AfterEachFn = request.HandlerListStopOnError
-	handlers.Sign.PushBackNamed(corehandlers.BuildContentLengthHandler)
-	handlers.Send.PushBackNamed(corehandlers.SendHandler)
-	handlers.AfterRetry.PushBackNamed(corehandlers.AfterRetryHandler)
-	handlers.ValidateResponse.PushBackNamed(corehandlers.ValidateResponseHandler)
-
-	return handlers
-}
-
-// CredChain returns the default credential chain.
-//
-// Generally you shouldn't need to use this method directly, but
-// is available if you need to reset the credentials of an
-// existing service client or session's Config.
-func CredChain(cfg *aws.Config, handlers request.Handlers) *credentials.Credentials {
-	return credentials.NewCredentials(&credentials.ChainProvider{
-		VerboseErrors: aws.BoolValue(cfg.CredentialsChainVerboseErrors),
-		Providers: []credentials.Provider{
-			&credentials.EnvProvider{},
-			&credentials.SharedCredentialsProvider{Filename: "", Profile: ""},
-			RemoteCredProvider(*cfg, handlers),
-		},
-	})
-}
-
-// RemoteCredProvider returns a credenitials provider for the default remote
-// endpoints such as EC2 or ECS Roles.
-func RemoteCredProvider(cfg aws.Config, handlers request.Handlers) credentials.Provider {
-	ecsCredURI := os.Getenv("AWS_CONTAINER_CREDENTIALS_RELATIVE_URI")
-
-	if len(ecsCredURI) > 0 {
-		return ecsCredProvider(cfg, handlers, ecsCredURI)
-	}
-
-	return ec2RoleProvider(cfg, handlers)
-}
-
-func ecsCredProvider(cfg aws.Config, handlers request.Handlers, uri string) credentials.Provider {
-	const host = `169.254.170.2`
-
-	return endpointcreds.NewProviderClient(cfg, handlers,
-		fmt.Sprintf("http://%s%s", host, uri),
-		func(p *endpointcreds.Provider) {
-			p.ExpiryWindow = 5 * time.Minute
-		},
-	)
-}
-
-func ec2RoleProvider(cfg aws.Config, handlers request.Handlers) credentials.Provider {
-	endpoint, signingRegion := endpoints.EndpointForRegion(ec2metadata.ServiceName,
-		aws.StringValue(cfg.Region), true, false)
-
-	return &ec2rolecreds.EC2RoleProvider{
-		Client:       ec2metadata.NewClient(cfg, handlers, endpoint, signingRegion),
-		ExpiryWindow: 5 * time.Minute,
-	}
-}

+ 0 - 39
Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/defaults/defaults_test.go

@@ -1,39 +0,0 @@
-package defaults
-
-import (
-	"fmt"
-	"os"
-	"testing"
-
-	"github.com/aws/aws-sdk-go/aws"
-	"github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds"
-	"github.com/aws/aws-sdk-go/aws/credentials/endpointcreds"
-	"github.com/aws/aws-sdk-go/aws/request"
-	"github.com/stretchr/testify/assert"
-)
-
-func TestECSCredProvider(t *testing.T) {
-	defer os.Clearenv()
-	os.Setenv("AWS_CONTAINER_CREDENTIALS_RELATIVE_URI", "/abc/123")
-
-	provider := RemoteCredProvider(aws.Config{}, request.Handlers{})
-
-	assert.NotNil(t, provider)
-
-	ecsProvider, ok := provider.(*endpointcreds.Provider)
-	assert.NotNil(t, ecsProvider)
-	assert.True(t, ok)
-
-	assert.Equal(t, fmt.Sprintf("http://169.254.170.2/abc/123"),
-		ecsProvider.Client.Endpoint)
-}
-
-func TestDefaultEC2RoleProvider(t *testing.T) {
-	provider := RemoteCredProvider(aws.Config{}, request.Handlers{})
-
-	assert.NotNil(t, provider)
-
-	ec2Provider, ok := provider.(*ec2rolecreds.EC2RoleProvider)
-	assert.NotNil(t, ec2Provider)
-	assert.True(t, ok)
-}

+ 0 - 140
Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/ec2metadata/api.go

@@ -1,140 +0,0 @@
-package ec2metadata
-
-import (
-	"encoding/json"
-	"fmt"
-	"path"
-	"strings"
-	"time"
-
-	"github.com/aws/aws-sdk-go/aws/awserr"
-	"github.com/aws/aws-sdk-go/aws/request"
-)
-
-// GetMetadata uses the path provided to request information from the EC2
-// instance metdata service. The content will be returned as a string, or
-// error if the request failed.
-func (c *EC2Metadata) GetMetadata(p string) (string, error) {
-	op := &request.Operation{
-		Name:       "GetMetadata",
-		HTTPMethod: "GET",
-		HTTPPath:   path.Join("/", "meta-data", p),
-	}
-
-	output := &metadataOutput{}
-	req := c.NewRequest(op, nil, output)
-
-	return output.Content, req.Send()
-}
-
-// GetDynamicData uses the path provided to request information from the EC2
-// instance metadata service for dynamic data. The content will be returned
-// as a string, or error if the request failed.
-func (c *EC2Metadata) GetDynamicData(p string) (string, error) {
-	op := &request.Operation{
-		Name:       "GetDynamicData",
-		HTTPMethod: "GET",
-		HTTPPath:   path.Join("/", "dynamic", p),
-	}
-
-	output := &metadataOutput{}
-	req := c.NewRequest(op, nil, output)
-
-	return output.Content, req.Send()
-}
-
-// GetInstanceIdentityDocument retrieves an identity document describing an
-// instance. Error is returned if the request fails or is unable to parse
-// the response.
-func (c *EC2Metadata) GetInstanceIdentityDocument() (EC2InstanceIdentityDocument, error) {
-	resp, err := c.GetDynamicData("instance-identity/document")
-	if err != nil {
-		return EC2InstanceIdentityDocument{},
-			awserr.New("EC2MetadataRequestError",
-				"failed to get EC2 instance identity document", err)
-	}
-
-	doc := EC2InstanceIdentityDocument{}
-	if err := json.NewDecoder(strings.NewReader(resp)).Decode(&doc); err != nil {
-		return EC2InstanceIdentityDocument{},
-			awserr.New("SerializationError",
-				"failed to decode EC2 instance identity document", err)
-	}
-
-	return doc, nil
-}
-
-// IAMInfo retrieves IAM info from the metadata API
-func (c *EC2Metadata) IAMInfo() (EC2IAMInfo, error) {
-	resp, err := c.GetMetadata("iam/info")
-	if err != nil {
-		return EC2IAMInfo{},
-			awserr.New("EC2MetadataRequestError",
-				"failed to get EC2 IAM info", err)
-	}
-
-	info := EC2IAMInfo{}
-	if err := json.NewDecoder(strings.NewReader(resp)).Decode(&info); err != nil {
-		return EC2IAMInfo{},
-			awserr.New("SerializationError",
-				"failed to decode EC2 IAM info", err)
-	}
-
-	if info.Code != "Success" {
-		errMsg := fmt.Sprintf("failed to get EC2 IAM Info (%s)", info.Code)
-		return EC2IAMInfo{},
-			awserr.New("EC2MetadataError", errMsg, nil)
-	}
-
-	return info, nil
-}
-
-// Region returns the region the instance is running in.
-func (c *EC2Metadata) Region() (string, error) {
-	resp, err := c.GetMetadata("placement/availability-zone")
-	if err != nil {
-		return "", err
-	}
-
-	// returns region without the suffix. Eg: us-west-2a becomes us-west-2
-	return resp[:len(resp)-1], nil
-}
-
-// Available returns if the application has access to the EC2 Metadata service.
-// Can be used to determine if application is running within an EC2 Instance and
-// the metadata service is available.
-func (c *EC2Metadata) Available() bool {
-	if _, err := c.GetMetadata("instance-id"); err != nil {
-		return false
-	}
-
-	return true
-}
-
-// An EC2IAMInfo provides the shape for unmarshalling
-// an IAM info from the metadata API
-type EC2IAMInfo struct {
-	Code               string
-	LastUpdated        time.Time
-	InstanceProfileArn string
-	InstanceProfileID  string
-}
-
-// An EC2InstanceIdentityDocument provides the shape for unmarshalling
-// an instance identity document
-type EC2InstanceIdentityDocument struct {
-	DevpayProductCodes []string  `json:"devpayProductCodes"`
-	AvailabilityZone   string    `json:"availabilityZone"`
-	PrivateIP          string    `json:"privateIp"`
-	Version            string    `json:"version"`
-	Region             string    `json:"region"`
-	InstanceID         string    `json:"instanceId"`
-	BillingProducts    []string  `json:"billingProducts"`
-	InstanceType       string    `json:"instanceType"`
-	AccountID          string    `json:"accountId"`
-	PendingTime        time.Time `json:"pendingTime"`
-	ImageID            string    `json:"imageId"`
-	KernelID           string    `json:"kernelId"`
-	RamdiskID          string    `json:"ramdiskId"`
-	Architecture       string    `json:"architecture"`
-}

+ 0 - 195
Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/ec2metadata/api_test.go

@@ -1,195 +0,0 @@
-package ec2metadata_test
-
-import (
-	"bytes"
-	"io/ioutil"
-	"net/http"
-	"net/http/httptest"
-	"path"
-	"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"
-	"github.com/aws/aws-sdk-go/aws/request"
-	"github.com/aws/aws-sdk-go/awstesting/unit"
-)
-
-const instanceIdentityDocument = `{
-  "devpayProductCodes" : null,
-  "availabilityZone" : "us-east-1d",
-  "privateIp" : "10.158.112.84",
-  "version" : "2010-08-31",
-  "region" : "us-east-1",
-  "instanceId" : "i-1234567890abcdef0",
-  "billingProducts" : null,
-  "instanceType" : "t1.micro",
-  "accountId" : "123456789012",
-  "pendingTime" : "2015-11-19T16:32:11Z",
-  "imageId" : "ami-5fb8c835",
-  "kernelId" : "aki-919dcaf8",
-  "ramdiskId" : null,
-  "architecture" : "x86_64"
-}`
-
-const validIamInfo = `{
-  "Code" : "Success",
-  "LastUpdated" : "2016-03-17T12:27:32Z",
-  "InstanceProfileArn" : "arn:aws:iam::123456789012:instance-profile/my-instance-profile",
-  "InstanceProfileId" : "AIPAABCDEFGHIJKLMN123"
-}`
-
-const unsuccessfulIamInfo = `{
-  "Code" : "Failed",
-  "LastUpdated" : "2016-03-17T12:27:32Z",
-  "InstanceProfileArn" : "arn:aws:iam::123456789012:instance-profile/my-instance-profile",
-  "InstanceProfileId" : "AIPAABCDEFGHIJKLMN123"
-}`
-
-func initTestServer(path string, resp string) *httptest.Server {
-	return httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
-		if r.RequestURI != path {
-			http.Error(w, "not found", http.StatusNotFound)
-			return
-		}
-
-		w.Write([]byte(resp))
-	}))
-}
-
-func TestEndpoint(t *testing.T) {
-	c := ec2metadata.New(unit.Session)
-	op := &request.Operation{
-		Name:       "GetMetadata",
-		HTTPMethod: "GET",
-		HTTPPath:   path.Join("/", "meta-data", "testpath"),
-	}
-
-	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())
-}
-
-func TestGetMetadata(t *testing.T) {
-	server := initTestServer(
-		"/latest/meta-data/some/path",
-		"success", // real response includes suffix
-	)
-	defer server.Close()
-	c := ec2metadata.New(unit.Session, &aws.Config{Endpoint: aws.String(server.URL + "/latest")})
-
-	resp, err := c.GetMetadata("some/path")
-
-	assert.NoError(t, err)
-	assert.Equal(t, "success", resp)
-}
-
-func TestGetRegion(t *testing.T) {
-	server := initTestServer(
-		"/latest/meta-data/placement/availability-zone",
-		"us-west-2a", // real response includes suffix
-	)
-	defer server.Close()
-	c := ec2metadata.New(unit.Session, &aws.Config{Endpoint: aws.String(server.URL + "/latest")})
-
-	region, err := c.Region()
-
-	assert.NoError(t, err)
-	assert.Equal(t, "us-west-2", region)
-}
-
-func TestMetadataAvailable(t *testing.T) {
-	server := initTestServer(
-		"/latest/meta-data/instance-id",
-		"instance-id",
-	)
-	defer server.Close()
-	c := ec2metadata.New(unit.Session, &aws.Config{Endpoint: aws.String(server.URL + "/latest")})
-
-	available := c.Available()
-
-	assert.True(t, available)
-}
-
-func TestMetadataIAMInfo_success(t *testing.T) {
-	server := initTestServer(
-		"/latest/meta-data/iam/info",
-		validIamInfo,
-	)
-	defer server.Close()
-	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)
-}
-
-func TestMetadataIAMInfo_failure(t *testing.T) {
-	server := initTestServer(
-		"/latest/meta-data/iam/info",
-		unsuccessfulIamInfo,
-	)
-	defer server.Close()
-	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)
-}
-
-func TestMetadataNotAvailable(t *testing.T) {
-	c := ec2metadata.New(unit.Session)
-	c.Handlers.Send.Clear()
-	c.Handlers.Send.PushBack(func(r *request.Request) {
-		r.HTTPResponse = &http.Response{
-			StatusCode: int(0),
-			Status:     http.StatusText(int(0)),
-			Body:       ioutil.NopCloser(bytes.NewReader([]byte{})),
-		}
-		r.Error = awserr.New("RequestError", "send request failed", nil)
-		r.Retryable = aws.Bool(true) // network errors are retryable
-	})
-
-	available := c.Available()
-
-	assert.False(t, available)
-}
-
-func TestMetadataErrorResponse(t *testing.T) {
-	c := ec2metadata.New(unit.Session)
-	c.Handlers.Send.Clear()
-	c.Handlers.Send.PushBack(func(r *request.Request) {
-		r.HTTPResponse = &http.Response{
-			StatusCode: http.StatusBadRequest,
-			Status:     http.StatusText(http.StatusBadRequest),
-			Body:       ioutil.NopCloser(strings.NewReader("error message text")),
-		}
-		r.Retryable = aws.Bool(false) // network errors are retryable
-	})
-
-	data, err := c.GetMetadata("uri/path")
-	assert.Empty(t, data)
-	assert.Contains(t, err.Error(), "error message text")
-}
-
-func TestEC2RoleProviderInstanceIdentity(t *testing.T) {
-	server := initTestServer(
-		"/latest/dynamic/instance-identity/document",
-		instanceIdentityDocument,
-	)
-	defer server.Close()
-	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")
-}

+ 0 - 78
Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/ec2metadata/service_test.go

@@ -1,78 +0,0 @@
-package ec2metadata_test
-
-import (
-	"net/http"
-	"net/http/httptest"
-	"sync"
-	"testing"
-	"time"
-
-	"github.com/aws/aws-sdk-go/aws"
-	"github.com/aws/aws-sdk-go/aws/ec2metadata"
-	"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)
-}
-
-func TestClientNotOverrideDefaultHTTPClientTimeout(t *testing.T) {
-	http.DefaultClient.Transport = &http.Transport{}
-	defer func() {
-		http.DefaultClient.Transport = nil
-	}()
-
-	svc := ec2metadata.New(unit.Session)
-
-	assert.Equal(t, http.DefaultClient, svc.Config.HTTPClient)
-
-	tr, ok := svc.Config.HTTPClient.Transport.(*http.Transport)
-	assert.True(t, ok)
-	assert.NotNil(t, tr)
-	assert.Nil(t, tr.Dial)
-}
-
-func TestClientDisableOverrideDefaultHTTPClientTimeout(t *testing.T) {
-	svc := ec2metadata.New(unit.Session, aws.NewConfig().WithEC2MetadataDisableTimeoutOverride(true))
-
-	assert.Equal(t, http.DefaultClient, svc.Config.HTTPClient)
-}
-
-func TestClientOverrideDefaultHTTPClientTimeoutRace(t *testing.T) {
-	server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
-		w.Write([]byte("us-east-1a"))
-	}))
-
-	cfg := aws.NewConfig().WithEndpoint(server.URL)
-	runEC2MetadataClients(t, cfg, 100)
-}
-
-func TestClientOverrideDefaultHTTPClientTimeoutRaceWithTransport(t *testing.T) {
-	server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
-		w.Write([]byte("us-east-1a"))
-	}))
-
-	cfg := aws.NewConfig().WithEndpoint(server.URL).WithHTTPClient(&http.Client{
-		Transport: http.DefaultTransport,
-	})
-
-	runEC2MetadataClients(t, cfg, 100)
-}
-
-func runEC2MetadataClients(t *testing.T, cfg *aws.Config, atOnce int) {
-	var wg sync.WaitGroup
-	wg.Add(atOnce)
-	for i := 0; i < atOnce; i++ {
-		go func() {
-			svc := ec2metadata.New(unit.Session, cfg)
-			_, err := svc.Region()
-			assert.NoError(t, err)
-			wg.Done()
-		}()
-	}
-	wg.Wait()
-}

+ 0 - 87
Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request/handlers_test.go

@@ -1,87 +0,0 @@
-package request_test
-
-import (
-	"testing"
-
-	"github.com/stretchr/testify/assert"
-
-	"github.com/aws/aws-sdk-go/aws"
-	"github.com/aws/aws-sdk-go/aws/request"
-)
-
-func TestHandlerList(t *testing.T) {
-	s := ""
-	r := &request.Request{}
-	l := request.HandlerList{}
-	l.PushBack(func(r *request.Request) {
-		s += "a"
-		r.Data = s
-	})
-	l.Run(r)
-	assert.Equal(t, "a", s)
-	assert.Equal(t, "a", r.Data)
-}
-
-func TestMultipleHandlers(t *testing.T) {
-	r := &request.Request{}
-	l := request.HandlerList{}
-	l.PushBack(func(r *request.Request) { r.Data = nil })
-	l.PushFront(func(r *request.Request) { r.Data = aws.Bool(true) })
-	l.Run(r)
-	if r.Data != nil {
-		t.Error("Expected handler to execute")
-	}
-}
-
-func TestNamedHandlers(t *testing.T) {
-	l := request.HandlerList{}
-	named := request.NamedHandler{Name: "Name", Fn: func(r *request.Request) {}}
-	named2 := request.NamedHandler{Name: "NotName", Fn: func(r *request.Request) {}}
-	l.PushBackNamed(named)
-	l.PushBackNamed(named)
-	l.PushBackNamed(named2)
-	l.PushBack(func(r *request.Request) {})
-	assert.Equal(t, 4, l.Len())
-	l.Remove(named)
-	assert.Equal(t, 2, l.Len())
-}
-
-func TestLoggedHandlers(t *testing.T) {
-	expectedHandlers := []string{"name1", "name2"}
-	l := request.HandlerList{}
-	loggedHandlers := []string{}
-	l.AfterEachFn = request.HandlerListLogItem
-	cfg := aws.Config{Logger: aws.LoggerFunc(func(args ...interface{}) {
-		loggedHandlers = append(loggedHandlers, args[2].(string))
-	})}
-
-	named1 := request.NamedHandler{Name: "name1", Fn: func(r *request.Request) {}}
-	named2 := request.NamedHandler{Name: "name2", Fn: func(r *request.Request) {}}
-	l.PushBackNamed(named1)
-	l.PushBackNamed(named2)
-	l.Run(&request.Request{Config: cfg})
-
-	assert.Equal(t, expectedHandlers, loggedHandlers)
-}
-
-func TestStopHandlers(t *testing.T) {
-	l := request.HandlerList{}
-	stopAt := 1
-	l.AfterEachFn = func(item request.HandlerListRunItem) bool {
-		return item.Index != stopAt
-	}
-
-	called := 0
-	l.PushBackNamed(request.NamedHandler{Name: "name1", Fn: func(r *request.Request) {
-		called++
-	}})
-	l.PushBackNamed(request.NamedHandler{Name: "name2", Fn: func(r *request.Request) {
-		called++
-	}})
-	l.PushBackNamed(request.NamedHandler{Name: "name3", Fn: func(r *request.Request) {
-		assert.Fail(t, "third handler should not be called")
-	}})
-	l.Run(&request.Request{})
-
-	assert.Equal(t, 2, called, "Expect only two handlers to be called")
-}

+ 0 - 33
Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request/http_request.go

@@ -1,33 +0,0 @@
-// +build go1.5
-
-package request
-
-import (
-	"io"
-	"net/http"
-	"net/url"
-)
-
-func copyHTTPRequest(r *http.Request, body io.ReadCloser) *http.Request {
-	req := &http.Request{
-		URL:           &url.URL{},
-		Header:        http.Header{},
-		Close:         r.Close,
-		Body:          body,
-		Host:          r.Host,
-		Method:        r.Method,
-		Proto:         r.Proto,
-		ContentLength: r.ContentLength,
-		// Cancel will be deprecated in 1.7 and will be replaced with Context
-		Cancel: r.Cancel,
-	}
-
-	*req.URL = *r.URL
-	for k, v := range r.Header {
-		for _, vv := range v {
-			req.Header.Add(k, vv)
-		}
-	}
-
-	return req
-}

+ 0 - 31
Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request/http_request_1_4.go

@@ -1,31 +0,0 @@
-// +build !go1.5
-
-package request
-
-import (
-	"io"
-	"net/http"
-	"net/url"
-)
-
-func copyHTTPRequest(r *http.Request, body io.ReadCloser) *http.Request {
-	req := &http.Request{
-		URL:           &url.URL{},
-		Header:        http.Header{},
-		Close:         r.Close,
-		Body:          body,
-		Host:          r.Host,
-		Method:        r.Method,
-		Proto:         r.Proto,
-		ContentLength: r.ContentLength,
-	}
-
-	*req.URL = *r.URL
-	for k, v := range r.Header {
-		for _, vv := range v {
-			req.Header.Add(k, vv)
-		}
-	}
-
-	return req
-}

+ 0 - 34
Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request/http_request_copy_test.go

@@ -1,34 +0,0 @@
-package request
-
-import (
-	"bytes"
-	"io/ioutil"
-	"net/http"
-	"net/url"
-	"sync"
-	"testing"
-)
-
-func TestRequestCopyRace(t *testing.T) {
-	origReq := &http.Request{URL: &url.URL{}, Header: http.Header{}}
-	origReq.Header.Set("Header", "OrigValue")
-
-	var wg sync.WaitGroup
-	for i := 0; i < 100; i++ {
-		wg.Add(1)
-		go func() {
-			req := copyHTTPRequest(origReq, ioutil.NopCloser(&bytes.Buffer{}))
-			req.Header.Set("Header", "Value")
-			go func() {
-				req2 := copyHTTPRequest(req, ioutil.NopCloser(&bytes.Buffer{}))
-				req2.Header.Add("Header", "Value2")
-			}()
-			_ = req.Header.Get("Header")
-			wg.Done()
-		}()
-		_ = origReq.Header.Get("Header")
-	}
-	origReq.Header.Get("Header")
-
-	wg.Wait()
-}

+ 0 - 37
Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request/http_request_retry_test.go

@@ -1,37 +0,0 @@
-// +build go1.5
-
-package request_test
-
-import (
-	"errors"
-	"strings"
-	"testing"
-
-	"github.com/aws/aws-sdk-go/aws"
-	"github.com/aws/aws-sdk-go/aws/request"
-	"github.com/aws/aws-sdk-go/awstesting/mock"
-	"github.com/stretchr/testify/assert"
-)
-
-func TestRequestCancelRetry(t *testing.T) {
-	c := make(chan struct{})
-
-	reqNum := 0
-	s := mock.NewMockClient(aws.NewConfig().WithMaxRetries(10))
-	s.Handlers.Validate.Clear()
-	s.Handlers.Unmarshal.Clear()
-	s.Handlers.UnmarshalMeta.Clear()
-	s.Handlers.UnmarshalError.Clear()
-	s.Handlers.Send.PushFront(func(r *request.Request) {
-		reqNum++
-		r.Error = errors.New("net/http: canceled")
-	})
-	out := &testData{}
-	r := s.NewRequest(&request.Operation{Name: "Operation"}, nil, out)
-	r.HTTPRequest.Cancel = c
-	close(c)
-
-	err := r.Send()
-	assert.True(t, strings.Contains(err.Error(), "canceled"))
-	assert.Equal(t, 1, reqNum)
-}

+ 0 - 49
Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request/offset_reader.go

@@ -1,49 +0,0 @@
-package request
-
-import (
-	"io"
-	"sync"
-)
-
-// offsetReader is a thread-safe io.ReadCloser to prevent racing
-// with retrying requests
-type offsetReader struct {
-	buf    io.ReadSeeker
-	lock   sync.RWMutex
-	closed bool
-}
-
-func newOffsetReader(buf io.ReadSeeker, offset int64) *offsetReader {
-	reader := &offsetReader{}
-	buf.Seek(offset, 0)
-
-	reader.buf = buf
-	return reader
-}
-
-// Close is a thread-safe close. Uses the write lock.
-func (o *offsetReader) Close() error {
-	o.lock.Lock()
-	defer o.lock.Unlock()
-	o.closed = true
-	return nil
-}
-
-// Read is a thread-safe read using a read lock.
-func (o *offsetReader) Read(p []byte) (int, error) {
-	o.lock.RLock()
-	defer o.lock.RUnlock()
-
-	if o.closed {
-		return 0, io.EOF
-	}
-
-	return o.buf.Read(p)
-}
-
-// CloseAndCopy will return a new offsetReader with a copy of the old buffer
-// and close the old buffer.
-func (o *offsetReader) CloseAndCopy(offset int64) *offsetReader {
-	o.Close()
-	return newOffsetReader(o.buf, offset)
-}

+ 0 - 122
Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request/offset_reader_test.go

@@ -1,122 +0,0 @@
-package request
-
-import (
-	"bytes"
-	"io"
-	"math/rand"
-	"sync"
-	"testing"
-	"time"
-
-	"github.com/stretchr/testify/assert"
-)
-
-func TestOffsetReaderRead(t *testing.T) {
-	buf := []byte("testData")
-	reader := &offsetReader{buf: bytes.NewReader(buf)}
-
-	tempBuf := make([]byte, len(buf))
-
-	n, err := reader.Read(tempBuf)
-
-	assert.Equal(t, n, len(buf))
-	assert.Nil(t, err)
-	assert.Equal(t, buf, tempBuf)
-}
-
-func TestOffsetReaderClose(t *testing.T) {
-	buf := []byte("testData")
-	reader := &offsetReader{buf: bytes.NewReader(buf)}
-
-	err := reader.Close()
-	assert.Nil(t, err)
-
-	tempBuf := make([]byte, len(buf))
-	n, err := reader.Read(tempBuf)
-	assert.Equal(t, n, 0)
-	assert.Equal(t, err, io.EOF)
-}
-
-func TestOffsetReaderCloseAndCopy(t *testing.T) {
-	buf := []byte("testData")
-	tempBuf := make([]byte, len(buf))
-	reader := &offsetReader{buf: bytes.NewReader(buf)}
-
-	newReader := reader.CloseAndCopy(0)
-
-	n, err := reader.Read(tempBuf)
-	assert.Equal(t, n, 0)
-	assert.Equal(t, err, io.EOF)
-
-	n, err = newReader.Read(tempBuf)
-	assert.Equal(t, n, len(buf))
-	assert.Nil(t, err)
-	assert.Equal(t, buf, tempBuf)
-}
-
-func TestOffsetReaderCloseAndCopyOffset(t *testing.T) {
-	buf := []byte("testData")
-	tempBuf := make([]byte, len(buf))
-	reader := &offsetReader{buf: bytes.NewReader(buf)}
-
-	newReader := reader.CloseAndCopy(4)
-	n, err := newReader.Read(tempBuf)
-	assert.Equal(t, n, len(buf)-4)
-	assert.Nil(t, err)
-
-	expected := []byte{'D', 'a', 't', 'a', 0, 0, 0, 0}
-	assert.Equal(t, expected, tempBuf)
-}
-
-func TestOffsetReaderRace(t *testing.T) {
-	wg := sync.WaitGroup{}
-
-	f := func(reader *offsetReader) {
-		defer wg.Done()
-		var err error
-		buf := make([]byte, 1)
-		_, err = reader.Read(buf)
-		for err != io.EOF {
-			_, err = reader.Read(buf)
-		}
-
-	}
-
-	closeFn := func(reader *offsetReader) {
-		defer wg.Done()
-		time.Sleep(time.Duration(rand.Intn(20)+1) * time.Millisecond)
-		reader.Close()
-	}
-	for i := 0; i < 50; i++ {
-		reader := &offsetReader{buf: bytes.NewReader(make([]byte, 1024*1024))}
-		wg.Add(1)
-		go f(reader)
-		wg.Add(1)
-		go closeFn(reader)
-	}
-	wg.Wait()
-}
-
-func BenchmarkOffsetReader(b *testing.B) {
-	bufSize := 1024 * 1024 * 100
-	buf := make([]byte, bufSize)
-	reader := &offsetReader{buf: bytes.NewReader(buf)}
-
-	tempBuf := make([]byte, 1024)
-
-	for i := 0; i < b.N; i++ {
-		reader.Read(tempBuf)
-	}
-}
-
-func BenchmarkBytesReader(b *testing.B) {
-	bufSize := 1024 * 1024 * 100
-	buf := make([]byte, bufSize)
-	reader := bytes.NewReader(buf)
-
-	tempBuf := make([]byte, 1024)
-
-	for i := 0; i < b.N; i++ {
-		reader.Read(tempBuf)
-	}
-}

+ 0 - 326
Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request/request.go

@@ -1,326 +0,0 @@
-package request
-
-import (
-	"bytes"
-	"fmt"
-	"io"
-	"io/ioutil"
-	"net/http"
-	"net/url"
-	"reflect"
-	"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/metadata"
-)
-
-// A Request is the service request to be made.
-type Request struct {
-	Config     aws.Config
-	ClientInfo metadata.ClientInfo
-	Handlers   Handlers
-
-	Retryer
-	Time             time.Time
-	ExpireTime       time.Duration
-	Operation        *Operation
-	HTTPRequest      *http.Request
-	HTTPResponse     *http.Response
-	Body             io.ReadSeeker
-	BodyStart        int64 // offset from beginning of Body that the request body starts
-	Params           interface{}
-	Error            error
-	Data             interface{}
-	RequestID        string
-	RetryCount       int
-	Retryable        *bool
-	RetryDelay       time.Duration
-	NotHoist         bool
-	SignedHeaderVals http.Header
-	LastSignedAt     time.Time
-
-	built bool
-}
-
-// An Operation is the service API operation to be made.
-type Operation struct {
-	Name       string
-	HTTPMethod string
-	HTTPPath   string
-	*Paginator
-}
-
-// Paginator keeps track of pagination configuration for an API operation.
-type Paginator struct {
-	InputTokens     []string
-	OutputTokens    []string
-	LimitToken      string
-	TruncationToken string
-}
-
-// New returns a new Request pointer for the service API
-// operation and parameters.
-//
-// Params is any value of input parameters to be the request payload.
-// Data is pointer value to an object which the request's response
-// payload will be deserialized to.
-func New(cfg aws.Config, clientInfo metadata.ClientInfo, handlers Handlers,
-	retryer Retryer, operation *Operation, params interface{}, data interface{}) *Request {
-
-	method := operation.HTTPMethod
-	if method == "" {
-		method = "POST"
-	}
-
-	httpReq, _ := http.NewRequest(method, "", nil)
-
-	var err error
-	httpReq.URL, err = url.Parse(clientInfo.Endpoint + operation.HTTPPath)
-	if err != nil {
-		httpReq.URL = &url.URL{}
-		err = awserr.New("InvalidEndpointURL", "invalid endpoint uri", err)
-	}
-
-	r := &Request{
-		Config:     cfg,
-		ClientInfo: clientInfo,
-		Handlers:   handlers.Copy(),
-
-		Retryer:     retryer,
-		Time:        time.Now(),
-		ExpireTime:  0,
-		Operation:   operation,
-		HTTPRequest: httpReq,
-		Body:        nil,
-		Params:      params,
-		Error:       err,
-		Data:        data,
-	}
-	r.SetBufferBody([]byte{})
-
-	return r
-}
-
-// WillRetry returns if the request's can be retried.
-func (r *Request) WillRetry() bool {
-	return r.Error != nil && aws.BoolValue(r.Retryable) && r.RetryCount < r.MaxRetries()
-}
-
-// ParamsFilled returns if the request's parameters have been populated
-// and the parameters are valid. False is returned if no parameters are
-// provided or invalid.
-func (r *Request) ParamsFilled() bool {
-	return r.Params != nil && reflect.ValueOf(r.Params).Elem().IsValid()
-}
-
-// DataFilled returns true if the request's data for response deserialization
-// target has been set and is a valid. False is returned if data is not
-// set, or is invalid.
-func (r *Request) DataFilled() bool {
-	return r.Data != nil && reflect.ValueOf(r.Data).Elem().IsValid()
-}
-
-// SetBufferBody will set the request's body bytes that will be sent to
-// the service API.
-func (r *Request) SetBufferBody(buf []byte) {
-	r.SetReaderBody(bytes.NewReader(buf))
-}
-
-// SetStringBody sets the body of the request to be backed by a string.
-func (r *Request) SetStringBody(s string) {
-	r.SetReaderBody(strings.NewReader(s))
-}
-
-// SetReaderBody will set the request's body reader.
-func (r *Request) SetReaderBody(reader io.ReadSeeker) {
-	r.HTTPRequest.Body = newOffsetReader(reader, 0)
-	r.Body = reader
-}
-
-// 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
-	r.NotHoist = false
-	r.Sign()
-	if r.Error != nil {
-		return "", r.Error
-	}
-	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
-}
-
-func debugLogReqError(r *Request, stage string, retrying bool, err error) {
-	if !r.Config.LogLevel.Matches(aws.LogDebugWithRequestErrors) {
-		return
-	}
-
-	retryStr := "not retrying"
-	if retrying {
-		retryStr = "will retry"
-	}
-
-	r.Config.Logger.Log(fmt.Sprintf("DEBUG: %s %s/%s failed, %s, error %v",
-		stage, r.ClientInfo.ServiceName, r.Operation.Name, retryStr, err))
-}
-
-// 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
-// in the order they were set.
-//
-// The request will only be built once. Multiple calls to build will have
-// no effect.
-//
-// If any Validate or Build errors occur the build will stop and the error
-// which occurred will be returned.
-func (r *Request) Build() error {
-	if !r.built {
-		r.Handlers.Validate.Run(r)
-		if r.Error != nil {
-			debugLogReqError(r, "Validate Request", false, r.Error)
-			return r.Error
-		}
-		r.Handlers.Build.Run(r)
-		if r.Error != nil {
-			debugLogReqError(r, "Build Request", false, r.Error)
-			return r.Error
-		}
-		r.built = true
-	}
-
-	return r.Error
-}
-
-// Sign will sign the request returning error if errors are encountered.
-//
-// Send will build the request prior to signing. All Sign Handlers will
-// be executed in the order they were set.
-func (r *Request) Sign() error {
-	r.Build()
-	if r.Error != nil {
-		debugLogReqError(r, "Build Request", false, r.Error)
-		return r.Error
-	}
-
-	r.Handlers.Sign.Run(r)
-	return r.Error
-}
-
-// Send will send the request returning error if errors are encountered.
-//
-// Send will sign the request prior to sending. All Send Handlers will
-// be executed in the order they were set.
-//
-// Canceling a request is non-deterministic. If a request has been canceled,
-// then the transport will choose, randomly, one of the state channels during
-// reads or getting the connection.
-//
-// readLoop() and getConn(req *Request, cm connectMethod)
-// https://github.com/golang/go/blob/master/src/net/http/transport.go
-func (r *Request) Send() error {
-	for {
-		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",
-					r.ClientInfo.ServiceName, r.Operation.Name, r.RetryCount))
-			}
-
-			var body io.ReadCloser
-			if reader, ok := r.HTTPRequest.Body.(*offsetReader); ok {
-				body = reader.CloseAndCopy(r.BodyStart)
-			} else {
-				if r.Config.Logger != nil {
-					r.Config.Logger.Log("Request body type has been overwritten. May cause race conditions")
-				}
-				r.Body.Seek(r.BodyStart, 0)
-				body = ioutil.NopCloser(r.Body)
-			}
-
-			r.HTTPRequest = copyHTTPRequest(r.HTTPRequest, body)
-			if r.HTTPResponse != nil && r.HTTPResponse.Body != nil {
-				// Closing response body. Since we are setting a new request to send off, this
-				// response will get squashed and leaked.
-				r.HTTPResponse.Body.Close()
-			}
-		}
-
-		r.Sign()
-		if r.Error != nil {
-			return r.Error
-		}
-
-		r.Retryable = nil
-
-		r.Handlers.Send.Run(r)
-		if r.Error != nil {
-			if strings.Contains(r.Error.Error(), "net/http: request canceled") {
-				return r.Error
-			}
-
-			err := r.Error
-			r.Handlers.Retry.Run(r)
-			r.Handlers.AfterRetry.Run(r)
-			if r.Error != nil {
-				debugLogReqError(r, "Send Request", false, r.Error)
-				return r.Error
-			}
-			debugLogReqError(r, "Send Request", true, err)
-			continue
-		}
-
-		r.Handlers.UnmarshalMeta.Run(r)
-		r.Handlers.ValidateResponse.Run(r)
-		if r.Error != nil {
-			err := r.Error
-			r.Handlers.UnmarshalError.Run(r)
-			r.Handlers.Retry.Run(r)
-			r.Handlers.AfterRetry.Run(r)
-			if r.Error != nil {
-				debugLogReqError(r, "Validate Response", false, r.Error)
-				return r.Error
-			}
-			debugLogReqError(r, "Validate Response", true, err)
-			continue
-		}
-
-		r.Handlers.Unmarshal.Run(r)
-		if r.Error != nil {
-			err := r.Error
-			r.Handlers.Retry.Run(r)
-			r.Handlers.AfterRetry.Run(r)
-			if r.Error != nil {
-				debugLogReqError(r, "Unmarshal Response", false, r.Error)
-				return r.Error
-			}
-			debugLogReqError(r, "Unmarshal Response", true, err)
-			continue
-		}
-
-		break
-	}
-
-	return nil
-}
-
-// AddToUserAgent adds the string to the end of the request's current user agent.
-func AddToUserAgent(r *Request, s string) {
-	curUA := r.HTTPRequest.Header.Get("User-Agent")
-	if len(curUA) > 0 {
-		s = curUA + " " + s
-	}
-	r.HTTPRequest.Header.Set("User-Agent", s)
-}

+ 0 - 33
Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request/request_1_6_test.go

@@ -1,33 +0,0 @@
-// +build go1.6
-
-package request_test
-
-import (
-	"testing"
-
-	"github.com/stretchr/testify/assert"
-
-	"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"
-	"github.com/aws/aws-sdk-go/aws/request"
-	"github.com/aws/aws-sdk-go/private/endpoints"
-)
-
-// go version 1.4 and 1.5 do not return an error. Version 1.5 will url encode
-// the uri while 1.4 will not
-func TestRequestInvalidEndpoint(t *testing.T) {
-	endpoint, _ := endpoints.NormalizeEndpoint("localhost:80 ", "test-service", "test-region", false, false)
-	r := request.New(
-		aws.Config{},
-		metadata.ClientInfo{Endpoint: endpoint},
-		defaults.Handlers(),
-		client.DefaultRetryer{},
-		&request.Operation{},
-		nil,
-		nil,
-	)
-
-	assert.Error(t, r.Error)
-}

+ 0 - 455
Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request/request_pagination_test.go

@@ -1,455 +0,0 @@
-package request_test
-
-import (
-	"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"
-	"github.com/aws/aws-sdk-go/service/dynamodb"
-	"github.com/aws/aws-sdk-go/service/route53"
-	"github.com/aws/aws-sdk-go/service/s3"
-)
-
-// Use DynamoDB methods for simplicity
-func TestPaginationQueryPage(t *testing.T) {
-	db := dynamodb.New(unit.Session)
-	tokens, pages, numPages, gotToEnd := []map[string]*dynamodb.AttributeValue{}, []map[string]*dynamodb.AttributeValue{}, 0, false
-
-	reqNum := 0
-	resps := []*dynamodb.QueryOutput{
-		{
-			LastEvaluatedKey: map[string]*dynamodb.AttributeValue{"key": {S: aws.String("key1")}},
-			Count:            aws.Int64(1),
-			Items: []map[string]*dynamodb.AttributeValue{
-				{
-					"key": {S: aws.String("key1")},
-				},
-			},
-		},
-		{
-			LastEvaluatedKey: map[string]*dynamodb.AttributeValue{"key": {S: aws.String("key2")}},
-			Count:            aws.Int64(1),
-			Items: []map[string]*dynamodb.AttributeValue{
-				{
-					"key": {S: aws.String("key2")},
-				},
-			},
-		},
-		{
-			LastEvaluatedKey: map[string]*dynamodb.AttributeValue{},
-			Count:            aws.Int64(1),
-			Items: []map[string]*dynamodb.AttributeValue{
-				{
-					"key": {S: aws.String("key3")},
-				},
-			},
-		},
-	}
-
-	db.Handlers.Send.Clear() // mock sending
-	db.Handlers.Unmarshal.Clear()
-	db.Handlers.UnmarshalMeta.Clear()
-	db.Handlers.ValidateResponse.Clear()
-	db.Handlers.Build.PushBack(func(r *request.Request) {
-		in := r.Params.(*dynamodb.QueryInput)
-		if in == nil {
-			tokens = append(tokens, nil)
-		} else if len(in.ExclusiveStartKey) != 0 {
-			tokens = append(tokens, in.ExclusiveStartKey)
-		}
-	})
-	db.Handlers.Unmarshal.PushBack(func(r *request.Request) {
-		r.Data = resps[reqNum]
-		reqNum++
-	})
-
-	params := &dynamodb.QueryInput{
-		Limit:     aws.Int64(2),
-		TableName: aws.String("tablename"),
-	}
-	err := db.QueryPages(params, func(p *dynamodb.QueryOutput, last bool) bool {
-		numPages++
-		for _, item := range p.Items {
-			pages = append(pages, item)
-		}
-		if last {
-			if gotToEnd {
-				assert.Fail(t, "last=true happened twice")
-			}
-			gotToEnd = true
-		}
-		return true
-	})
-	assert.Nil(t, err)
-
-	assert.Equal(t,
-		[]map[string]*dynamodb.AttributeValue{
-			{"key": {S: aws.String("key1")}},
-			{"key": {S: aws.String("key2")}},
-		}, tokens)
-	assert.Equal(t,
-		[]map[string]*dynamodb.AttributeValue{
-			{"key": {S: aws.String("key1")}},
-			{"key": {S: aws.String("key2")}},
-			{"key": {S: aws.String("key3")}},
-		}, pages)
-	assert.Equal(t, 3, numPages)
-	assert.True(t, gotToEnd)
-	assert.Nil(t, params.ExclusiveStartKey)
-}
-
-// Use DynamoDB methods for simplicity
-func TestPagination(t *testing.T) {
-	db := dynamodb.New(unit.Session)
-	tokens, pages, numPages, gotToEnd := []string{}, []string{}, 0, false
-
-	reqNum := 0
-	resps := []*dynamodb.ListTablesOutput{
-		{TableNames: []*string{aws.String("Table1"), aws.String("Table2")}, LastEvaluatedTableName: aws.String("Table2")},
-		{TableNames: []*string{aws.String("Table3"), aws.String("Table4")}, LastEvaluatedTableName: aws.String("Table4")},
-		{TableNames: []*string{aws.String("Table5")}},
-	}
-
-	db.Handlers.Send.Clear() // mock sending
-	db.Handlers.Unmarshal.Clear()
-	db.Handlers.UnmarshalMeta.Clear()
-	db.Handlers.ValidateResponse.Clear()
-	db.Handlers.Build.PushBack(func(r *request.Request) {
-		in := r.Params.(*dynamodb.ListTablesInput)
-		if in == nil {
-			tokens = append(tokens, "")
-		} else if in.ExclusiveStartTableName != nil {
-			tokens = append(tokens, *in.ExclusiveStartTableName)
-		}
-	})
-	db.Handlers.Unmarshal.PushBack(func(r *request.Request) {
-		r.Data = resps[reqNum]
-		reqNum++
-	})
-
-	params := &dynamodb.ListTablesInput{Limit: aws.Int64(2)}
-	err := db.ListTablesPages(params, func(p *dynamodb.ListTablesOutput, last bool) bool {
-		numPages++
-		for _, t := range p.TableNames {
-			pages = append(pages, *t)
-		}
-		if last {
-			if gotToEnd {
-				assert.Fail(t, "last=true happened twice")
-			}
-			gotToEnd = true
-		}
-		return true
-	})
-
-	assert.Equal(t, []string{"Table2", "Table4"}, tokens)
-	assert.Equal(t, []string{"Table1", "Table2", "Table3", "Table4", "Table5"}, pages)
-	assert.Equal(t, 3, numPages)
-	assert.True(t, gotToEnd)
-	assert.Nil(t, err)
-	assert.Nil(t, params.ExclusiveStartTableName)
-}
-
-// Use DynamoDB methods for simplicity
-func TestPaginationEachPage(t *testing.T) {
-	db := dynamodb.New(unit.Session)
-	tokens, pages, numPages, gotToEnd := []string{}, []string{}, 0, false
-
-	reqNum := 0
-	resps := []*dynamodb.ListTablesOutput{
-		{TableNames: []*string{aws.String("Table1"), aws.String("Table2")}, LastEvaluatedTableName: aws.String("Table2")},
-		{TableNames: []*string{aws.String("Table3"), aws.String("Table4")}, LastEvaluatedTableName: aws.String("Table4")},
-		{TableNames: []*string{aws.String("Table5")}},
-	}
-
-	db.Handlers.Send.Clear() // mock sending
-	db.Handlers.Unmarshal.Clear()
-	db.Handlers.UnmarshalMeta.Clear()
-	db.Handlers.ValidateResponse.Clear()
-	db.Handlers.Build.PushBack(func(r *request.Request) {
-		in := r.Params.(*dynamodb.ListTablesInput)
-		if in == nil {
-			tokens = append(tokens, "")
-		} else if in.ExclusiveStartTableName != nil {
-			tokens = append(tokens, *in.ExclusiveStartTableName)
-		}
-	})
-	db.Handlers.Unmarshal.PushBack(func(r *request.Request) {
-		r.Data = resps[reqNum]
-		reqNum++
-	})
-
-	params := &dynamodb.ListTablesInput{Limit: aws.Int64(2)}
-	req, _ := db.ListTablesRequest(params)
-	err := req.EachPage(func(p interface{}, last bool) bool {
-		numPages++
-		for _, t := range p.(*dynamodb.ListTablesOutput).TableNames {
-			pages = append(pages, *t)
-		}
-		if last {
-			if gotToEnd {
-				assert.Fail(t, "last=true happened twice")
-			}
-			gotToEnd = true
-		}
-
-		return true
-	})
-
-	assert.Equal(t, []string{"Table2", "Table4"}, tokens)
-	assert.Equal(t, []string{"Table1", "Table2", "Table3", "Table4", "Table5"}, pages)
-	assert.Equal(t, 3, numPages)
-	assert.True(t, gotToEnd)
-	assert.Nil(t, err)
-}
-
-// Use DynamoDB methods for simplicity
-func TestPaginationEarlyExit(t *testing.T) {
-	db := dynamodb.New(unit.Session)
-	numPages, gotToEnd := 0, false
-
-	reqNum := 0
-	resps := []*dynamodb.ListTablesOutput{
-		{TableNames: []*string{aws.String("Table1"), aws.String("Table2")}, LastEvaluatedTableName: aws.String("Table2")},
-		{TableNames: []*string{aws.String("Table3"), aws.String("Table4")}, LastEvaluatedTableName: aws.String("Table4")},
-		{TableNames: []*string{aws.String("Table5")}},
-	}
-
-	db.Handlers.Send.Clear() // mock sending
-	db.Handlers.Unmarshal.Clear()
-	db.Handlers.UnmarshalMeta.Clear()
-	db.Handlers.ValidateResponse.Clear()
-	db.Handlers.Unmarshal.PushBack(func(r *request.Request) {
-		r.Data = resps[reqNum]
-		reqNum++
-	})
-
-	params := &dynamodb.ListTablesInput{Limit: aws.Int64(2)}
-	err := db.ListTablesPages(params, func(p *dynamodb.ListTablesOutput, last bool) bool {
-		numPages++
-		if numPages == 2 {
-			return false
-		}
-		if last {
-			if gotToEnd {
-				assert.Fail(t, "last=true happened twice")
-			}
-			gotToEnd = true
-		}
-		return true
-	})
-
-	assert.Equal(t, 2, numPages)
-	assert.False(t, gotToEnd)
-	assert.Nil(t, err)
-}
-
-func TestSkipPagination(t *testing.T) {
-	client := s3.New(unit.Session)
-	client.Handlers.Send.Clear() // mock sending
-	client.Handlers.Unmarshal.Clear()
-	client.Handlers.UnmarshalMeta.Clear()
-	client.Handlers.ValidateResponse.Clear()
-	client.Handlers.Unmarshal.PushBack(func(r *request.Request) {
-		r.Data = &s3.HeadBucketOutput{}
-	})
-
-	req, _ := client.HeadBucketRequest(&s3.HeadBucketInput{Bucket: aws.String("bucket")})
-
-	numPages, gotToEnd := 0, false
-	req.EachPage(func(p interface{}, last bool) bool {
-		numPages++
-		if last {
-			gotToEnd = true
-		}
-		return true
-	})
-	assert.Equal(t, 1, numPages)
-	assert.True(t, gotToEnd)
-}
-
-// Use S3 for simplicity
-func TestPaginationTruncation(t *testing.T) {
-	client := s3.New(unit.Session)
-
-	reqNum := 0
-	resps := []*s3.ListObjectsOutput{
-		{IsTruncated: aws.Bool(true), Contents: []*s3.Object{{Key: aws.String("Key1")}}},
-		{IsTruncated: aws.Bool(true), Contents: []*s3.Object{{Key: aws.String("Key2")}}},
-		{IsTruncated: aws.Bool(false), Contents: []*s3.Object{{Key: aws.String("Key3")}}},
-		{IsTruncated: aws.Bool(true), Contents: []*s3.Object{{Key: aws.String("Key4")}}},
-	}
-
-	client.Handlers.Send.Clear() // mock sending
-	client.Handlers.Unmarshal.Clear()
-	client.Handlers.UnmarshalMeta.Clear()
-	client.Handlers.ValidateResponse.Clear()
-	client.Handlers.Unmarshal.PushBack(func(r *request.Request) {
-		r.Data = resps[reqNum]
-		reqNum++
-	})
-
-	params := &s3.ListObjectsInput{Bucket: aws.String("bucket")}
-
-	results := []string{}
-	err := client.ListObjectsPages(params, func(p *s3.ListObjectsOutput, last bool) bool {
-		results = append(results, *p.Contents[0].Key)
-		return true
-	})
-
-	assert.Equal(t, []string{"Key1", "Key2", "Key3"}, results)
-	assert.Nil(t, err)
-
-	// Try again without truncation token at all
-	reqNum = 0
-	resps[1].IsTruncated = nil
-	resps[2].IsTruncated = aws.Bool(true)
-	results = []string{}
-	err = client.ListObjectsPages(params, func(p *s3.ListObjectsOutput, last bool) bool {
-		results = append(results, *p.Contents[0].Key)
-		return true
-	})
-
-	assert.Equal(t, []string{"Key1", "Key2"}, results)
-	assert.Nil(t, err)
-}
-
-func TestPaginationNilToken(t *testing.T) {
-	client := route53.New(unit.Session)
-
-	reqNum := 0
-	resps := []*route53.ListResourceRecordSetsOutput{
-		{
-			ResourceRecordSets: []*route53.ResourceRecordSet{
-				{Name: aws.String("first.example.com.")},
-			},
-			IsTruncated:          aws.Bool(true),
-			NextRecordName:       aws.String("second.example.com."),
-			NextRecordType:       aws.String("MX"),
-			NextRecordIdentifier: aws.String("second"),
-			MaxItems:             aws.String("1"),
-		},
-		{
-			ResourceRecordSets: []*route53.ResourceRecordSet{
-				{Name: aws.String("second.example.com.")},
-			},
-			IsTruncated:    aws.Bool(true),
-			NextRecordName: aws.String("third.example.com."),
-			NextRecordType: aws.String("MX"),
-			MaxItems:       aws.String("1"),
-		},
-		{
-			ResourceRecordSets: []*route53.ResourceRecordSet{
-				{Name: aws.String("third.example.com.")},
-			},
-			IsTruncated: aws.Bool(false),
-			MaxItems:    aws.String("1"),
-		},
-	}
-	client.Handlers.Send.Clear() // mock sending
-	client.Handlers.Unmarshal.Clear()
-	client.Handlers.UnmarshalMeta.Clear()
-	client.Handlers.ValidateResponse.Clear()
-
-	idents := []string{}
-	client.Handlers.Build.PushBack(func(r *request.Request) {
-		p := r.Params.(*route53.ListResourceRecordSetsInput)
-		idents = append(idents, aws.StringValue(p.StartRecordIdentifier))
-
-	})
-	client.Handlers.Unmarshal.PushBack(func(r *request.Request) {
-		r.Data = resps[reqNum]
-		reqNum++
-	})
-
-	params := &route53.ListResourceRecordSetsInput{
-		HostedZoneId: aws.String("id-zone"),
-	}
-
-	results := []string{}
-	err := client.ListResourceRecordSetsPages(params, func(p *route53.ListResourceRecordSetsOutput, last bool) bool {
-		results = append(results, *p.ResourceRecordSets[0].Name)
-		return true
-	})
-
-	assert.NoError(t, err)
-	assert.Equal(t, []string{"", "second", ""}, idents)
-	assert.Equal(t, []string{"first.example.com.", "second.example.com.", "third.example.com."}, results)
-}
-
-// Benchmarks
-var benchResps = []*dynamodb.ListTablesOutput{
-	{TableNames: []*string{aws.String("TABLE"), aws.String("NXT")}, LastEvaluatedTableName: aws.String("NXT")},
-	{TableNames: []*string{aws.String("TABLE"), aws.String("NXT")}, LastEvaluatedTableName: aws.String("NXT")},
-	{TableNames: []*string{aws.String("TABLE"), aws.String("NXT")}, LastEvaluatedTableName: aws.String("NXT")},
-	{TableNames: []*string{aws.String("TABLE"), aws.String("NXT")}, LastEvaluatedTableName: aws.String("NXT")},
-	{TableNames: []*string{aws.String("TABLE"), aws.String("NXT")}, LastEvaluatedTableName: aws.String("NXT")},
-	{TableNames: []*string{aws.String("TABLE"), aws.String("NXT")}, LastEvaluatedTableName: aws.String("NXT")},
-	{TableNames: []*string{aws.String("TABLE"), aws.String("NXT")}, LastEvaluatedTableName: aws.String("NXT")},
-	{TableNames: []*string{aws.String("TABLE"), aws.String("NXT")}, LastEvaluatedTableName: aws.String("NXT")},
-	{TableNames: []*string{aws.String("TABLE"), aws.String("NXT")}, LastEvaluatedTableName: aws.String("NXT")},
-	{TableNames: []*string{aws.String("TABLE"), aws.String("NXT")}, LastEvaluatedTableName: aws.String("NXT")},
-	{TableNames: []*string{aws.String("TABLE"), aws.String("NXT")}, LastEvaluatedTableName: aws.String("NXT")},
-	{TableNames: []*string{aws.String("TABLE"), aws.String("NXT")}, LastEvaluatedTableName: aws.String("NXT")},
-	{TableNames: []*string{aws.String("TABLE"), aws.String("NXT")}, LastEvaluatedTableName: aws.String("NXT")},
-	{TableNames: []*string{aws.String("TABLE")}},
-}
-
-var benchDb = func() *dynamodb.DynamoDB {
-	db := dynamodb.New(unit.Session)
-	db.Handlers.Send.Clear() // mock sending
-	db.Handlers.Unmarshal.Clear()
-	db.Handlers.UnmarshalMeta.Clear()
-	db.Handlers.ValidateResponse.Clear()
-	return db
-}
-
-func BenchmarkCodegenIterator(b *testing.B) {
-	reqNum := 0
-	db := benchDb()
-	db.Handlers.Unmarshal.PushBack(func(r *request.Request) {
-		r.Data = benchResps[reqNum]
-		reqNum++
-	})
-
-	input := &dynamodb.ListTablesInput{Limit: aws.Int64(2)}
-	iter := func(fn func(*dynamodb.ListTablesOutput, bool) bool) error {
-		page, _ := db.ListTablesRequest(input)
-		for ; page != nil; page = page.NextPage() {
-			page.Send()
-			out := page.Data.(*dynamodb.ListTablesOutput)
-			if result := fn(out, !page.HasNextPage()); page.Error != nil || !result {
-				return page.Error
-			}
-		}
-		return nil
-	}
-
-	for i := 0; i < b.N; i++ {
-		reqNum = 0
-		iter(func(p *dynamodb.ListTablesOutput, last bool) bool {
-			return true
-		})
-	}
-}
-
-func BenchmarkEachPageIterator(b *testing.B) {
-	reqNum := 0
-	db := benchDb()
-	db.Handlers.Unmarshal.PushBack(func(r *request.Request) {
-		r.Data = benchResps[reqNum]
-		reqNum++
-	})
-
-	input := &dynamodb.ListTablesInput{Limit: aws.Int64(2)}
-	for i := 0; i < b.N; i++ {
-		reqNum = 0
-		req, _ := db.ListTablesRequest(input)
-		req.EachPage(func(p interface{}, last bool) bool {
-			return true
-		})
-	}
-}

+ 0 - 380
Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request/request_test.go

@@ -1,380 +0,0 @@
-package request_test
-
-import (
-	"bytes"
-	"encoding/json"
-	"errors"
-	"fmt"
-	"io"
-	"io/ioutil"
-	"net/http"
-	"runtime"
-	"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/credentials"
-	"github.com/aws/aws-sdk-go/aws/request"
-	"github.com/aws/aws-sdk-go/awstesting"
-)
-
-type testData struct {
-	Data string
-}
-
-func body(str string) io.ReadCloser {
-	return ioutil.NopCloser(bytes.NewReader([]byte(str)))
-}
-
-func unmarshal(req *request.Request) {
-	defer req.HTTPResponse.Body.Close()
-	if req.Data != nil {
-		json.NewDecoder(req.HTTPResponse.Body).Decode(req.Data)
-	}
-	return
-}
-
-func unmarshalError(req *request.Request) {
-	bodyBytes, err := ioutil.ReadAll(req.HTTPResponse.Body)
-	if err != nil {
-		req.Error = awserr.New("UnmarshaleError", req.HTTPResponse.Status, err)
-		return
-	}
-	if len(bodyBytes) == 0 {
-		req.Error = awserr.NewRequestFailure(
-			awserr.New("UnmarshaleError", req.HTTPResponse.Status, fmt.Errorf("empty body")),
-			req.HTTPResponse.StatusCode,
-			"",
-		)
-		return
-	}
-	var jsonErr jsonErrorResponse
-	if err := json.Unmarshal(bodyBytes, &jsonErr); err != nil {
-		req.Error = awserr.New("UnmarshaleError", "JSON unmarshal", err)
-		return
-	}
-	req.Error = awserr.NewRequestFailure(
-		awserr.New(jsonErr.Code, jsonErr.Message, nil),
-		req.HTTPResponse.StatusCode,
-		"",
-	)
-}
-
-type jsonErrorResponse struct {
-	Code    string `json:"__type"`
-	Message string `json:"message"`
-}
-
-// test that retries occur for 5xx status codes
-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: 200, Body: body(`{"data":"valid"}`)},
-	}
-
-	s := awstesting.NewClient(aws.NewConfig().WithMaxRetries(10))
-	s.Handlers.Validate.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 = &reqs[reqNum]
-		reqNum++
-	})
-	out := &testData{}
-	r := s.NewRequest(&request.Operation{Name: "Operation"}, nil, out)
-	err := r.Send()
-	assert.Nil(t, err)
-	assert.Equal(t, 2, int(r.RetryCount))
-	assert.Equal(t, "valid", out.Data)
-}
-
-// test that retries occur for 4xx status codes with a response type that can be retried - see `shouldRetry`
-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: 200, Body: body(`{"data":"valid"}`)},
-	}
-
-	s := awstesting.NewClient(aws.NewConfig().WithMaxRetries(10))
-	s.Handlers.Validate.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 = &reqs[reqNum]
-		reqNum++
-	})
-	out := &testData{}
-	r := s.NewRequest(&request.Operation{Name: "Operation"}, nil, out)
-	err := r.Send()
-	assert.Nil(t, err)
-	assert.Equal(t, 2, int(r.RetryCount))
-	assert.Equal(t, "valid", out.Data)
-}
-
-// test that retries don't occur for 4xx status codes with a response type that can't be retried
-func TestRequest4xxUnretryable(t *testing.T) {
-	s := awstesting.NewClient(aws.NewConfig().WithMaxRetries(10))
-	s.Handlers.Validate.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: 401, Body: body(`{"__type":"SignatureDoesNotMatch","message":"Signature does not match."}`)}
-	})
-	out := &testData{}
-	r := s.NewRequest(&request.Operation{Name: "Operation"}, nil, out)
-	err := r.Send()
-	assert.NotNil(t, err)
-	if e, ok := err.(awserr.RequestFailure); ok {
-		assert.Equal(t, 401, e.StatusCode())
-	} else {
-		assert.Fail(t, "Expected error to be a service failure")
-	}
-	assert.Equal(t, "SignatureDoesNotMatch", err.(awserr.Error).Code())
-	assert.Equal(t, "Signature does not match.", err.(awserr.Error).Message())
-	assert.Equal(t, 0, int(r.RetryCount))
-}
-
-func TestRequestExhaustRetries(t *testing.T) {
-	delays := []time.Duration{}
-	sleepDelay := func(delay time.Duration) {
-		delays = append(delays, delay)
-	}
-
-	reqNum := 0
-	reqs := []http.Response{
-		{StatusCode: 500, Body: body(`{"__type":"UnknownError","message":"An error occurred."}`)},
-		{StatusCode: 500, Body: body(`{"__type":"UnknownError","message":"An error occurred."}`)},
-		{StatusCode: 500, Body: body(`{"__type":"UnknownError","message":"An error occurred."}`)},
-		{StatusCode: 500, Body: body(`{"__type":"UnknownError","message":"An error occurred."}`)},
-	}
-
-	s := awstesting.NewClient(aws.NewConfig().WithSleepDelay(sleepDelay))
-	s.Handlers.Validate.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 = &reqs[reqNum]
-		reqNum++
-	})
-	r := s.NewRequest(&request.Operation{Name: "Operation"}, nil, nil)
-	err := r.Send()
-	assert.NotNil(t, err)
-	if e, ok := err.(awserr.RequestFailure); ok {
-		assert.Equal(t, 500, e.StatusCode())
-	} else {
-		assert.Fail(t, "Expected error to be a service failure")
-	}
-	assert.Equal(t, "UnknownError", err.(awserr.Error).Code())
-	assert.Equal(t, "An error occurred.", err.(awserr.Error).Message())
-	assert.Equal(t, 3, int(r.RetryCount))
-
-	expectDelays := []struct{ min, max time.Duration }{{30, 59}, {60, 118}, {120, 236}}
-	for i, v := range delays {
-		min := expectDelays[i].min * time.Millisecond
-		max := expectDelays[i].max * time.Millisecond
-		assert.True(t, min <= v && v <= max,
-			"Expect delay to be within range, i:%d, v:%s, min:%s, max:%s", i, v, min, max)
-	}
-}
-
-// test that the request is retried after the credentials are expired.
-func TestRequestRecoverExpiredCreds(t *testing.T) {
-	reqNum := 0
-	reqs := []http.Response{
-		{StatusCode: 400, Body: body(`{"__type":"ExpiredTokenException","message":"expired token"}`)},
-		{StatusCode: 200, Body: body(`{"data":"valid"}`)},
-	}
-
-	s := awstesting.NewClient(&aws.Config{MaxRetries: aws.Int(10), Credentials: credentials.NewStaticCredentials("AKID", "SECRET", "")})
-	s.Handlers.Validate.Clear()
-	s.Handlers.Unmarshal.PushBack(unmarshal)
-	s.Handlers.UnmarshalError.PushBack(unmarshalError)
-
-	credExpiredBeforeRetry := false
-	credExpiredAfterRetry := false
-
-	s.Handlers.AfterRetry.PushBack(func(r *request.Request) {
-		credExpiredAfterRetry = r.Config.Credentials.IsExpired()
-	})
-
-	s.Handlers.Sign.Clear()
-	s.Handlers.Sign.PushBack(func(r *request.Request) {
-		r.Config.Credentials.Get()
-	})
-	s.Handlers.Send.Clear() // mock sending
-	s.Handlers.Send.PushBack(func(r *request.Request) {
-		r.HTTPResponse = &reqs[reqNum]
-		reqNum++
-	})
-	out := &testData{}
-	r := s.NewRequest(&request.Operation{Name: "Operation"}, nil, out)
-	err := r.Send()
-	assert.Nil(t, err)
-
-	assert.False(t, credExpiredBeforeRetry, "Expect valid creds before retry check")
-	assert.True(t, credExpiredAfterRetry, "Expect expired creds after retry check")
-	assert.False(t, s.Config.Credentials.IsExpired(), "Expect valid creds after cred expired recovery")
-
-	assert.Equal(t, 1, int(r.RetryCount))
-	assert.Equal(t, "valid", out.Data)
-}
-
-func TestMakeAddtoUserAgentHandler(t *testing.T) {
-	fn := request.MakeAddToUserAgentHandler("name", "version", "extra1", "extra2")
-	r := &request.Request{HTTPRequest: &http.Request{Header: http.Header{}}}
-	r.HTTPRequest.Header.Set("User-Agent", "foo/bar")
-	fn(r)
-
-	assert.Equal(t, "foo/bar name/version (extra1; extra2)", r.HTTPRequest.Header.Get("User-Agent"))
-}
-
-func TestMakeAddtoUserAgentFreeFormHandler(t *testing.T) {
-	fn := request.MakeAddToUserAgentFreeFormHandler("name/version (extra1; extra2)")
-	r := &request.Request{HTTPRequest: &http.Request{Header: http.Header{}}}
-	r.HTTPRequest.Header.Set("User-Agent", "foo/bar")
-	fn(r)
-
-	assert.Equal(t, "foo/bar name/version (extra1; extra2)", r.HTTPRequest.Header.Get("User-Agent"))
-}
-
-func TestRequestUserAgent(t *testing.T) {
-	s := awstesting.NewClient(&aws.Config{Region: aws.String("us-east-1")})
-	//	s.Handlers.Validate.Clear()
-
-	req := s.NewRequest(&request.Operation{Name: "Operation"}, nil, &testData{})
-	req.HTTPRequest.Header.Set("User-Agent", "foo/bar")
-	assert.NoError(t, req.Build())
-
-	expectUA := fmt.Sprintf("foo/bar %s/%s (%s; %s; %s)",
-		aws.SDKName, aws.SDKVersion, runtime.Version(), runtime.GOOS, runtime.GOARCH)
-	assert.Equal(t, expectUA, req.HTTPRequest.Header.Get("User-Agent"))
-}
-
-func TestRequestThrottleRetries(t *testing.T) {
-	delays := []time.Duration{}
-	sleepDelay := func(delay time.Duration) {
-		delays = append(delays, delay)
-	}
-
-	reqNum := 0
-	reqs := []http.Response{
-		{StatusCode: 500, Body: body(`{"__type":"Throttling","message":"An error occurred."}`)},
-		{StatusCode: 500, Body: body(`{"__type":"Throttling","message":"An error occurred."}`)},
-		{StatusCode: 500, Body: body(`{"__type":"Throttling","message":"An error occurred."}`)},
-		{StatusCode: 500, Body: body(`{"__type":"Throttling","message":"An error occurred."}`)},
-	}
-
-	s := awstesting.NewClient(aws.NewConfig().WithSleepDelay(sleepDelay))
-	s.Handlers.Validate.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 = &reqs[reqNum]
-		reqNum++
-	})
-	r := s.NewRequest(&request.Operation{Name: "Operation"}, nil, nil)
-	err := r.Send()
-	assert.NotNil(t, err)
-	if e, ok := err.(awserr.RequestFailure); ok {
-		assert.Equal(t, 500, e.StatusCode())
-	} else {
-		assert.Fail(t, "Expected error to be a service failure")
-	}
-	assert.Equal(t, "Throttling", err.(awserr.Error).Code())
-	assert.Equal(t, "An error occurred.", err.(awserr.Error).Message())
-	assert.Equal(t, 3, int(r.RetryCount))
-
-	expectDelays := []struct{ min, max time.Duration }{{500, 999}, {1000, 1998}, {2000, 3996}}
-	for i, v := range delays {
-		min := expectDelays[i].min * time.Millisecond
-		max := expectDelays[i].max * time.Millisecond
-		assert.True(t, min <= v && v <= max,
-			"Expect delay to be within range, i:%d, v:%s, min:%s, max:%s", i, v, min, max)
-	}
-}
-
-// test that retries occur for request timeouts when response.Body can be nil
-func TestRequestRecoverTimeoutWithNilBody(t *testing.T) {
-	reqNum := 0
-	reqs := []*http.Response{
-		{StatusCode: 0, Body: nil}, // body can be nil when requests time out
-		{StatusCode: 200, Body: body(`{"data":"valid"}`)},
-	}
-	errors := []error{
-		errors.New("timeout"), nil,
-	}
-
-	s := awstesting.NewClient(aws.NewConfig().WithMaxRetries(10))
-	s.Handlers.Validate.Clear()
-	s.Handlers.Unmarshal.PushBack(unmarshal)
-	s.Handlers.UnmarshalError.PushBack(unmarshalError)
-	s.Handlers.AfterRetry.Clear() // force retry on all errors
-	s.Handlers.AfterRetry.PushBack(func(r *request.Request) {
-		if r.Error != nil {
-			r.Error = nil
-			r.Retryable = aws.Bool(true)
-			r.RetryCount++
-		}
-	})
-	s.Handlers.Send.Clear() // mock sending
-	s.Handlers.Send.PushBack(func(r *request.Request) {
-		r.HTTPResponse = reqs[reqNum]
-		r.Error = errors[reqNum]
-		reqNum++
-	})
-	out := &testData{}
-	r := s.NewRequest(&request.Operation{Name: "Operation"}, nil, out)
-	err := r.Send()
-	assert.Nil(t, err)
-	assert.Equal(t, 1, int(r.RetryCount))
-	assert.Equal(t, "valid", out.Data)
-}
-
-func TestRequestRecoverTimeoutWithNilResponse(t *testing.T) {
-	reqNum := 0
-	reqs := []*http.Response{
-		nil,
-		{StatusCode: 200, Body: body(`{"data":"valid"}`)},
-	}
-	errors := []error{
-		errors.New("timeout"),
-		nil,
-	}
-
-	s := awstesting.NewClient(aws.NewConfig().WithMaxRetries(10))
-	s.Handlers.Validate.Clear()
-	s.Handlers.Unmarshal.PushBack(unmarshal)
-	s.Handlers.UnmarshalError.PushBack(unmarshalError)
-	s.Handlers.AfterRetry.Clear() // force retry on all errors
-	s.Handlers.AfterRetry.PushBack(func(r *request.Request) {
-		if r.Error != nil {
-			r.Error = nil
-			r.Retryable = aws.Bool(true)
-			r.RetryCount++
-		}
-	})
-	s.Handlers.Send.Clear() // mock sending
-	s.Handlers.Send.PushBack(func(r *request.Request) {
-		r.HTTPResponse = reqs[reqNum]
-		r.Error = errors[reqNum]
-		reqNum++
-	})
-	out := &testData{}
-	r := s.NewRequest(&request.Operation{Name: "Operation"}, nil, out)
-	err := r.Send()
-	assert.Nil(t, err)
-	assert.Equal(t, 1, int(r.RetryCount))
-	assert.Equal(t, "valid", out.Data)
-}

+ 0 - 16
Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request/retryer_test.go

@@ -1,16 +0,0 @@
-package request
-
-import (
-	"testing"
-
-	"github.com/stretchr/testify/assert"
-
-	"github.com/aws/aws-sdk-go/aws/awserr"
-)
-
-func TestRequestThrottling(t *testing.T) {
-	req := Request{}
-
-	req.Error = awserr.New("Throttling", "", nil)
-	assert.True(t, req.IsErrorThrottle())
-}

+ 0 - 229
Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/session/doc.go

@@ -1,229 +0,0 @@
-/*
-Package session provides configuration for the SDK's service clients.
-
-Sessions can be shared across all service clients that share the same base
-configuration.  The Session is built from the SDK's default configuration and
-request handlers.
-
-Sessions should be cached when possible, because creating a new Session will
-load all configuration values from the environment, and config files each time
-the Session is created. Sharing the Session value across all of your service
-clients will ensure the configuration is loaded the fewest number of times possible.
-
-Concurrency
-
-Sessions are safe to use concurrently as long as the Session is not being
-modified. The SDK will not modify the Session once the Session has been created.
-Creating service clients concurrently from a shared Session is safe.
-
-Sessions from Shared Config
-
-Sessions can be created using the method above that will only load the
-additional config if the AWS_SDK_LOAD_CONFIG environment variable is set.
-Alternatively you can explicitly create a Session with shared config enabled.
-To do this you can use NewSessionWithOptions to configure how the Session will
-be created. Using the NewSessionWithOptions with SharedConfigState set to
-SharedConfigEnabled will create the session as if the AWS_SDK_LOAD_CONFIG
-environment variable was set.
-
-Creating Sessions
-
-When creating Sessions optional aws.Config values can be passed in that will
-override the default, or loaded config values the Session is being created
-with. This allows you to provide additional, or case based, configuration
-as needed.
-
-By default NewSession will only load credentials from the shared credentials
-file (~/.aws/credentials). If the AWS_SDK_LOAD_CONFIG environment variable is
-set to a truthy value the Session will be created from the configuration
-values from the shared config (~/.aws/config) and shared credentials
-(~/.aws/credentials) files. See the section Sessions from Shared Config for
-more information.
-
-Create a Session with the default config and request handlers. With credentials
-region, and profile loaded from the environment and shared config automatically.
-Requires the AWS_PROFILE to be set, or "default" is used.
-
-	// Create Session
-	sess, err := session.NewSession()
-
-	// Create a Session with a custom region
-	sess, err := session.NewSession(&aws.Config{Region: aws.String("us-east-1")})
-
-	// Create a S3 client instance from a session
-	sess, err := session.NewSession()
-	if err != nil {
-		// Handle Session creation error
-	}
-	svc := s3.New(sess)
-
-Create Session With Option Overrides
-
-In addition to NewSession, Sessions can be created using NewSessionWithOptions.
-This func allows you to control and override how the Session will be created
-through code instead of being driven by environment variables only.
-
-Use NewSessionWithOptions when you want to provide the config profile, or
-override the shared config state (AWS_SDK_LOAD_CONFIG).
-
-	// Equivalent to session.New
-	sess, err := session.NewSessionWithOptions(session.Options{})
-
-	// Specify profile to load for the session's config
-	sess, err := session.NewSessionWithOptions(session.Options{
-		 Profile: "profile_name",
-	})
-
-	// Specify profile for config and region for requests
-	sess, err := session.NewSessionWithOptions(session.Options{
-		 Config: aws.Config{Region: aws.String("us-east-1")},
-		 Profile: "profile_name",
-	})
-
-	// Force enable Shared Config support
-	sess, err := session.NewSessionWithOptions(session.Options{
-		SharedConfigState: SharedConfigEnable,
-	})
-
-Deprecated "New" function
-
-The New session function has been deprecated because it does not provide good
-way to return errors that occur when loading the configuration files and values.
-Because of this, the NewWithError
-
-Adding Handlers
-
-You can add handlers to a session for processing HTTP requests. All service
-clients that use the session inherit the handlers. For example, the following
-handler logs every request and its payload made by a service client:
-
-	// Create a session, and add additional handlers for all service
-	// clients created with the Session to inherit. Adds logging handler.
-	sess, err := session.NewSession()
-	sess.Handlers.Send.PushFront(func(r *request.Request) {
-		// Log every request made and its payload
-		logger.Println("Request: %s/%s, Payload: %s",
-			r.ClientInfo.ServiceName, r.Operation, r.Params)
-	})
-
-Deprecated "New" function
-
-The New session function has been deprecated because it does not provide good
-way to return errors that occur when loading the configuration files and values.
-Because of this, NewSession was created so errors can be retrieved when
-creating a session fails.
-
-Shared Config Fields
-
-By default the SDK will only load the shared credentials file's (~/.aws/credentials)
-credentials values, and all other config is provided by the environment variables,
-SDK defaults, and user provided aws.Config values.
-
-If the AWS_SDK_LOAD_CONFIG environment variable is set, or SharedConfigEnable
-option is used to create the Session the full shared config values will be
-loaded. This includes credentials, region, and support for assume role. In
-addition the Session will load its configuration from both the shared config
-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).
-
-Credentials are the values the SDK should use for authenticating requests with
-AWS Services. They arfrom a configuration file will need to include both
-aws_access_key_id and aws_secret_access_key must be provided together in the
-same file to be considered valid. The values will be ignored if not a complete
-group. aws_session_token is an optional field that can be provided if both of
-the other two fields are also provided.
-
-	aws_access_key_id = AKID
-	aws_secret_access_key = SECRET
-	aws_session_token = TOKEN
-
-Assume Role values allow you to configure the SDK to assume an IAM role using
-a set of credentials provided in a config file via the source_profile field.
-Both "role_arn" and "source_profile" are required. The SDK does not support
-assuming a role with MFA token Via the Session's constructor. You can use the
-stscreds.AssumeRoleProvider credentials provider to specify custom
-configuration and support for MFA.
-
-	role_arn = arn:aws:iam::<account_number>:role/<role_name>
-	source_profile = profile_with_creds
-	external_id = 1234
-	mfa_serial = not supported!
-	role_session_name = session_name
-
-Region is the region the SDK should use for looking up AWS service endpoints
-and signing requests.
-
-	region = us-east-1
-
-Environment Variables
-
-When a Session is created several environment variables can be set to adjust
-how the SDK functions, and what configuration data it loads when creating
-Sessions. All environment values are optional, but some values like credentials
-require multiple of the values to set or the partial values will be ignored.
-All environment variable values are strings unless otherwise noted.
-
-Environment configuration values. If set both Access Key ID and Secret Access
-Key must be provided. Session Token and optionally also be provided, but is
-not required.
-
-	# Access Key ID
-	AWS_ACCESS_KEY_ID=AKID
-	AWS_ACCESS_KEY=AKID # only read if AWS_ACCESS_KEY_ID is not set.
-
-	# Secret Access Key
-	AWS_SECRET_ACCESS_KEY=SECRET
-	AWS_SECRET_KEY=SECRET=SECRET # only read if AWS_SECRET_ACCESS_KEY is not set.
-
-	# Session Token
-	AWS_SESSION_TOKEN=TOKEN
-
-Region value will instruct the SDK where to make service API requests to. If is
-not provided in the environment the region must be provided before a service
-client request is made.
-
-	AWS_REGION=us-east-1
-
-	# AWS_DEFAULT_REGION is only read if AWS_SDK_LOAD_CONFIG is also set,
-	# and AWS_REGION is not also set.
-	AWS_DEFAULT_REGION=us-east-1
-
-Profile name the SDK should load use when loading shared config from the
-configuration files. If not provided "default" will be used as the profile name.
-
-	AWS_PROFILE=my_profile
-
-	# AWS_DEFAULT_PROFILE is only read if AWS_SDK_LOAD_CONFIG is also set,
-	# and AWS_PROFILE is not also set.
-	AWS_DEFAULT_PROFILE=my_profile
-
-SDK load config instructs the SDK to load the shared config in addition to
-shared credentials. This also expands the configuration loaded so the shared
-credentials will have parity with the shared config file. This also enables
-Region and Profile support for the AWS_DEFAULT_REGION and AWS_DEFAULT_PROFILE
-env values as well.
-
-	AWS_SDK_LOAD_CONFIG=1
-
-Shared credentials file path can be set to instruct the SDK to use an alternative
-file for the shared credentials. If not set the file will be loaded from
-$HOME/.aws/credentials on Linux/Unix based systems, and
-%USERPROFILE%\.aws\credentials on Windows.
-
-	AWS_SHARED_CREDENTIALS_FILE=$HOME/my_shared_credentials
-
-Shared config file path can be set to instruct the SDK to use an alternative
-file for the shared config. If not set the file will be loaded from
-$HOME/.aws/config on Linux/Unix based systems, and
-%USERPROFILE%\.aws\config on Windows.
-
-	AWS_CONFIG_FILE=$HOME/my_shared_config
-
-
-*/
-package session

+ 0 - 276
Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/session/env_config_test.go

@@ -1,276 +0,0 @@
-package session
-
-import (
-	"os"
-	"path/filepath"
-	"strings"
-	"testing"
-
-	"github.com/aws/aws-sdk-go/aws/credentials"
-	"github.com/stretchr/testify/assert"
-)
-
-func TestLoadEnvConfig_Creds(t *testing.T) {
-	env := stashEnv()
-	defer popEnv(env)
-
-	cases := []struct {
-		Env map[string]string
-		Val credentials.Value
-	}{
-		{
-			Env: map[string]string{
-				"AWS_ACCESS_KEY": "AKID",
-			},
-			Val: credentials.Value{},
-		},
-		{
-			Env: map[string]string{
-				"AWS_ACCESS_KEY_ID": "AKID",
-			},
-			Val: credentials.Value{},
-		},
-		{
-			Env: map[string]string{
-				"AWS_SECRET_KEY": "SECRET",
-			},
-			Val: credentials.Value{},
-		},
-		{
-			Env: map[string]string{
-				"AWS_SECRET_ACCESS_KEY": "SECRET",
-			},
-			Val: credentials.Value{},
-		},
-		{
-			Env: map[string]string{
-				"AWS_ACCESS_KEY_ID":     "AKID",
-				"AWS_SECRET_ACCESS_KEY": "SECRET",
-			},
-			Val: credentials.Value{
-				AccessKeyID: "AKID", SecretAccessKey: "SECRET",
-				ProviderName: "EnvConfigCredentials",
-			},
-		},
-		{
-			Env: map[string]string{
-				"AWS_ACCESS_KEY": "AKID",
-				"AWS_SECRET_KEY": "SECRET",
-			},
-			Val: credentials.Value{
-				AccessKeyID: "AKID", SecretAccessKey: "SECRET",
-				ProviderName: "EnvConfigCredentials",
-			},
-		},
-		{
-			Env: map[string]string{
-				"AWS_ACCESS_KEY":    "AKID",
-				"AWS_SECRET_KEY":    "SECRET",
-				"AWS_SESSION_TOKEN": "TOKEN",
-			},
-			Val: credentials.Value{
-				AccessKeyID: "AKID", SecretAccessKey: "SECRET", SessionToken: "TOKEN",
-				ProviderName: "EnvConfigCredentials",
-			},
-		},
-	}
-
-	for _, c := range cases {
-		os.Clearenv()
-
-		for k, v := range c.Env {
-			os.Setenv(k, v)
-		}
-
-		cfg := loadEnvConfig()
-		assert.Equal(t, c.Val, cfg.Creds)
-	}
-}
-
-func TestLoadEnvConfig(t *testing.T) {
-	env := stashEnv()
-	defer popEnv(env)
-
-	cases := []struct {
-		Env                 map[string]string
-		Region, Profile     string
-		UseSharedConfigCall bool
-	}{
-		{
-			Env: map[string]string{
-				"AWS_REGION":  "region",
-				"AWS_PROFILE": "profile",
-			},
-			Region: "region", Profile: "profile",
-		},
-		{
-			Env: map[string]string{
-				"AWS_REGION":          "region",
-				"AWS_DEFAULT_REGION":  "default_region",
-				"AWS_PROFILE":         "profile",
-				"AWS_DEFAULT_PROFILE": "default_profile",
-			},
-			Region: "region", Profile: "profile",
-		},
-		{
-			Env: map[string]string{
-				"AWS_REGION":          "region",
-				"AWS_DEFAULT_REGION":  "default_region",
-				"AWS_PROFILE":         "profile",
-				"AWS_DEFAULT_PROFILE": "default_profile",
-				"AWS_SDK_LOAD_CONFIG": "1",
-			},
-			Region: "region", Profile: "profile",
-		},
-		{
-			Env: map[string]string{
-				"AWS_DEFAULT_REGION":  "default_region",
-				"AWS_DEFAULT_PROFILE": "default_profile",
-			},
-		},
-		{
-			Env: map[string]string{
-				"AWS_DEFAULT_REGION":  "default_region",
-				"AWS_DEFAULT_PROFILE": "default_profile",
-				"AWS_SDK_LOAD_CONFIG": "1",
-			},
-			Region: "default_region", Profile: "default_profile",
-		},
-		{
-			Env: map[string]string{
-				"AWS_REGION":  "region",
-				"AWS_PROFILE": "profile",
-			},
-			Region: "region", Profile: "profile",
-			UseSharedConfigCall: true,
-		},
-		{
-			Env: map[string]string{
-				"AWS_REGION":          "region",
-				"AWS_DEFAULT_REGION":  "default_region",
-				"AWS_PROFILE":         "profile",
-				"AWS_DEFAULT_PROFILE": "default_profile",
-			},
-			Region: "region", Profile: "profile",
-			UseSharedConfigCall: true,
-		},
-		{
-			Env: map[string]string{
-				"AWS_REGION":          "region",
-				"AWS_DEFAULT_REGION":  "default_region",
-				"AWS_PROFILE":         "profile",
-				"AWS_DEFAULT_PROFILE": "default_profile",
-				"AWS_SDK_LOAD_CONFIG": "1",
-			},
-			Region: "region", Profile: "profile",
-			UseSharedConfigCall: true,
-		},
-		{
-			Env: map[string]string{
-				"AWS_DEFAULT_REGION":  "default_region",
-				"AWS_DEFAULT_PROFILE": "default_profile",
-			},
-			Region: "default_region", Profile: "default_profile",
-			UseSharedConfigCall: true,
-		},
-		{
-			Env: map[string]string{
-				"AWS_DEFAULT_REGION":  "default_region",
-				"AWS_DEFAULT_PROFILE": "default_profile",
-				"AWS_SDK_LOAD_CONFIG": "1",
-			},
-			Region: "default_region", Profile: "default_profile",
-			UseSharedConfigCall: true,
-		},
-	}
-
-	for _, c := range cases {
-		os.Clearenv()
-
-		for k, v := range c.Env {
-			os.Setenv(k, v)
-		}
-
-		var cfg envConfig
-		if c.UseSharedConfigCall {
-			cfg = loadSharedEnvConfig()
-		} else {
-			cfg = loadEnvConfig()
-		}
-
-		assert.Equal(t, c.Region, cfg.Region)
-		assert.Equal(t, c.Profile, cfg.Profile)
-	}
-}
-
-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)
-
-	os.Setenv("empty_key", "")
-	os.Setenv("second_key", "2")
-	os.Setenv("third_key", "3")
-
-	var dst string
-	setFromEnvVal(&dst, []string{
-		"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])
-	}
-}

+ 0 - 388
Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/session/session.go

@@ -1,388 +0,0 @@
-package session
-
-import (
-	"fmt"
-
-	"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/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/defaults"
-	"github.com/aws/aws-sdk-go/aws/request"
-	"github.com/aws/aws-sdk-go/private/endpoints"
-)
-
-// A Session provides a central location to create service clients from and
-// store configurations and request handlers for those services.
-//
-// 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.
-type Session struct {
-	Config   *aws.Config
-	Handlers request.Handlers
-}
-
-// New creates a new instance of the handlers merging in the provided configs
-// on top of the SDK's default configurations. Once the Session is created it
-// can be mutated to modify the Config or Handlers. The Session is safe to be
-// read concurrently, but it should not be written to concurrently.
-//
-// If the AWS_SDK_LOAD_CONFIG environment is set to a truthy value, the New
-// method could now encounter an error when loading the configuration. When
-// The environment variable is set, and an error occurs, New will return a
-// session that will fail all requests reporting the error that occured while
-// loading the session. Use NewSession to get the error when creating the
-// session.
-//
-// If the AWS_SDK_LOAD_CONFIG environment variable is set to a truthy value
-// the shared config file (~/.aws/config) will also be loaded, in addition to
-// the shared credentials file (~/.aws/config). Values set in both the
-// shared config, and shared credentials will be taken from the shared
-// credentials file.
-//
-// Deprecated: Use NewSession functiions to create sessions instead. NewSession
-// has the same functionality as New except an error can be returned when the
-// func is called instead of waiting to receive an error until a request is made.
-func New(cfgs ...*aws.Config) *Session {
-	// load initial config from environment
-	envCfg := loadEnvConfig()
-
-	if envCfg.EnableSharedConfig {
-		s, err := newSession(envCfg, cfgs...)
-		if err != nil {
-			// Old session.New expected all errors to be discovered when
-			// a request is made, and would report the errors then. This
-			// needs to be replicated if an error occurs while creating
-			// the session.
-			msg := "failed to create session with AWS_SDK_LOAD_CONFIG enabled. " +
-				"Use session.NewSession to handle errors occuring during session creation."
-
-			// Session creation failed, need to report the error and prevent
-			// any requests from succeeding.
-			s = &Session{Config: defaults.Config()}
-			s.Config.MergeIn(cfgs...)
-			s.Config.Logger.Log("ERROR:", msg, "Error:", err)
-			s.Handlers.Validate.PushBack(func(r *request.Request) {
-				r.Error = err
-			})
-		}
-		return s
-	}
-
-	return oldNewSession(cfgs...)
-}
-
-// NewSession returns a new Session created from SDK defaults, config files,
-// environment, and user provided config files. Once the Session is created
-// it can be mutated to modify the Config or Handlers. The Session is safe to
-// be read concurrently, but it should not be written to concurrently.
-//
-// If the AWS_SDK_LOAD_CONFIG environment variable is set to a truthy value
-// the shared config file (~/.aws/config) will also be loaded in addition to
-// the shared credentials file (~/.aws/config). Values set in both the
-// shared config, and shared credentials will be taken from the shared
-// credentials file. Enabling the Shared Config will also allow the Session
-// to be built with retrieving credentials with AssumeRole set in the config.
-//
-// See the NewSessionWithOptions func for information on how to override or
-// control through code how the Session will be created. Such as specifing the
-// config profile, and controlling if shared config is enabled or not.
-func NewSession(cfgs ...*aws.Config) (*Session, error) {
-	envCfg := loadEnvConfig()
-
-	return newSession(envCfg, cfgs...)
-}
-
-// SharedConfigState provides the ability to optionally override the state
-// of the session's creation based on the shared config being enabled or
-// disabled.
-type SharedConfigState int
-
-const (
-	// SharedConfigStateFromEnv does not override any state of the
-	// AWS_SDK_LOAD_CONFIG env var. It is the default value of the
-	// SharedConfigState type.
-	SharedConfigStateFromEnv SharedConfigState = iota
-
-	// SharedConfigDisable overrides the AWS_SDK_LOAD_CONFIG env var value
-	// and disables the shared config functionality.
-	SharedConfigDisable
-
-	// SharedConfigEnable overrides the AWS_SDK_LOAD_CONFIG env var value
-	// and enables the shared config functionality.
-	SharedConfigEnable
-)
-
-// Options provides the means to control how a Session is created and what
-// configuration values will be loaded.
-//
-type Options struct {
-	// Provides config values for the SDK to use when creating service clients
-	// and making API requests to services. Any value set in with this field
-	// will override the associated value provided by the SDK defaults,
-	// environment or config files where relevent.
-	//
-	// If not set, configuration values from from SDK defaults, environment,
-	// config will be used.
-	Config aws.Config
-
-	// Overrides the config profile the Session should be created from. If not
-	// set the value of the environment variable will be loaded (AWS_PROFILE,
-	// or AWS_DEFAULT_PROFILE if the Shared Config is enabled).
-	//
-	// If not set and environment variables are not set the "default"
-	// (DefaultSharedConfigProfile) will be used as the profile to load the
-	// session config from.
-	Profile string
-
-	// Instructs how the Session will be created based on the AWS_SDK_LOAD_CONFIG
-	// environment variable. By default a Session will be created using the
-	// value provided by the AWS_SDK_LOAD_CONFIG environment variable.
-	//
-	// Setting this value to SharedConfigEnable or SharedConfigDisable
-	// will allow you to override the AWS_SDK_LOAD_CONFIG environment variable
-	// and enable or disable the shared config functionality.
-	SharedConfigState SharedConfigState
-}
-
-// NewSessionWithOptions returns a new Session created from SDK defaults, config files,
-// environment, and user provided config files. This func uses the Options
-// values to configure how the Session is created.
-//
-// If the AWS_SDK_LOAD_CONFIG environment variable is set to a truthy value
-// the shared config file (~/.aws/config) will also be loaded in addition to
-// the shared credentials file (~/.aws/config). Values set in both the
-// shared config, and shared credentials will be taken from the shared
-// credentials file. Enabling the Shared Config will also allow the Session
-// to be built with retrieving credentials with AssumeRole set in the config.
-//
-//     // Equivalent to session.New
-//     sess, err := session.NewSessionWithOptions(session.Options{})
-//
-//     // Specify profile to load for the session's config
-//     sess, err := session.NewSessionWithOptions(session.Options{
-//          Profile: "profile_name",
-//     })
-//
-//     // Specify profile for config and region for requests
-//     sess, err := session.NewSessionWithOptions(session.Options{
-//          Config: aws.Config{Region: aws.String("us-east-1")},
-//          Profile: "profile_name",
-//     })
-//
-//     // Force enable Shared Config support
-//     sess, err := session.NewSessionWithOptions(session.Options{
-//         SharedConfigState: SharedConfigEnable,
-//     })
-func NewSessionWithOptions(opts Options) (*Session, error) {
-	envCfg := loadEnvConfig()
-
-	if len(opts.Profile) > 0 {
-		envCfg.Profile = opts.Profile
-	}
-
-	switch opts.SharedConfigState {
-	case SharedConfigDisable:
-		envCfg.EnableSharedConfig = false
-	case SharedConfigEnable:
-		envCfg.EnableSharedConfig = true
-	}
-
-	return newSession(envCfg, &opts.Config)
-}
-
-// Must is a helper function to ensure the Session is valid and there was no
-// error when calling a NewSession function.
-//
-// This helper is intended to be used in variable initialization to load the
-// Session and configuration at startup. Such as:
-//
-//     var sess = session.Must(session.NewSession())
-func Must(sess *Session, err error) *Session {
-	if err != nil {
-		panic(err)
-	}
-
-	return sess
-}
-
-func oldNewSession(cfgs ...*aws.Config) *Session {
-	cfg := defaults.Config()
-	handlers := defaults.Handlers()
-
-	// Apply the passed in configs so the configuration can be applied to the
-	// default credential chain
-	cfg.MergeIn(cfgs...)
-	cfg.Credentials = defaults.CredChain(cfg, handlers)
-
-	// Reapply any passed in configs to override credentials if set
-	cfg.MergeIn(cfgs...)
-
-	s := &Session{
-		Config:   cfg,
-		Handlers: handlers,
-	}
-
-	initHandlers(s)
-
-	return s
-}
-
-func newSession(envCfg envConfig, cfgs ...*aws.Config) (*Session, error) {
-	cfg := defaults.Config()
-	handlers := defaults.Handlers()
-
-	// Get a merged version of the user provided config to determine if
-	// credentials were.
-	userCfg := &aws.Config{}
-	userCfg.MergeIn(cfgs...)
-
-	// Order 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:]
-	}
-
-	// Load additional config from file(s)
-	sharedCfg, err := loadSharedConfig(envCfg.Profile, cfgFiles)
-	if err != nil {
-		return nil, err
-	}
-
-	mergeConfigSrcs(cfg, userCfg, envCfg, sharedCfg, handlers)
-
-	s := &Session{
-		Config:   cfg,
-		Handlers: handlers,
-	}
-
-	initHandlers(s)
-
-	return s, nil
-}
-
-func mergeConfigSrcs(cfg, userCfg *aws.Config, envCfg envConfig, sharedCfg sharedConfig, handlers request.Handlers) {
-	// Merge in user provided configuration
-	cfg.MergeIn(userCfg)
-
-	// Region if not already set by user
-	if len(aws.StringValue(cfg.Region)) == 0 {
-		if len(envCfg.Region) > 0 {
-			cfg.WithRegion(envCfg.Region)
-		} else if envCfg.EnableSharedConfig && len(sharedCfg.Region) > 0 {
-			cfg.WithRegion(sharedCfg.Region)
-		}
-	}
-
-	// Configure credentials if not already set
-	if cfg.Credentials == credentials.AnonymousCredentials && userCfg.Credentials == nil {
-		if len(envCfg.Creds.AccessKeyID) > 0 {
-			cfg.Credentials = credentials.NewStaticCredentialsFromCreds(
-				envCfg.Creds,
-			)
-		} else if envCfg.EnableSharedConfig && len(sharedCfg.AssumeRole.RoleARN) > 0 && sharedCfg.AssumeRoleSource != nil {
-			cfgCp := *cfg
-			cfgCp.Credentials = credentials.NewStaticCredentialsFromCreds(
-				sharedCfg.AssumeRoleSource.Creds,
-			)
-			cfg.Credentials = stscreds.NewCredentials(
-				&Session{
-					Config:   &cfgCp,
-					Handlers: handlers.Copy(),
-				},
-				sharedCfg.AssumeRole.RoleARN,
-				func(opt *stscreds.AssumeRoleProvider) {
-					opt.RoleSessionName = sharedCfg.AssumeRole.RoleSessionName
-
-					if len(sharedCfg.AssumeRole.ExternalID) > 0 {
-						opt.ExternalID = aws.String(sharedCfg.AssumeRole.ExternalID)
-					}
-
-					// MFA not supported
-				},
-			)
-		} else if len(sharedCfg.Creds.AccessKeyID) > 0 {
-			cfg.Credentials = credentials.NewStaticCredentialsFromCreds(
-				sharedCfg.Creds,
-			)
-		} else {
-			// Fallback to default credentials provider, include mock errors
-			// for the credential chain so user can identify why credentials
-			// failed to be retrieved.
-			cfg.Credentials = credentials.NewCredentials(&credentials.ChainProvider{
-				VerboseErrors: aws.BoolValue(cfg.CredentialsChainVerboseErrors),
-				Providers: []credentials.Provider{
-					&credProviderError{Err: awserr.New("EnvAccessKeyNotFound", "failed to find credentials in the environment.", nil)},
-					&credProviderError{Err: awserr.New("SharedCredsLoad", fmt.Sprintf("failed to load profile, %s.", envCfg.Profile), nil)},
-					defaults.RemoteCredProvider(*cfg, handlers),
-				},
-			})
-		}
-	}
-}
-
-type credProviderError struct {
-	Err error
-}
-
-var emptyCreds = credentials.Value{}
-
-func (c credProviderError) Retrieve() (credentials.Value, error) {
-	return credentials.Value{}, c.Err
-}
-func (c credProviderError) IsExpired() bool {
-	return true
-}
-
-func initHandlers(s *Session) {
-	// Add the Validate parameter handler if it is not disabled.
-	s.Handlers.Validate.Remove(corehandlers.ValidateParametersHandler)
-	if !aws.BoolValue(s.Config.DisableParamValidation) {
-		s.Handlers.Validate.PushBackNamed(corehandlers.ValidateParametersHandler)
-	}
-}
-
-// Copy creates and returns a copy of the current Session, coping the config
-// and handlers. If any additional configs are provided they will be merged
-// on top of the Session's copied config.
-//
-//     // Create a copy of the current Session, configured for the us-west-2 region.
-//     sess.Copy(&aws.Config{Region: aws.String("us-west-2")})
-func (s *Session) Copy(cfgs ...*aws.Config) *Session {
-	newSession := &Session{
-		Config:   s.Config.Copy(cfgs...),
-		Handlers: s.Handlers.Copy(),
-	}
-
-	initHandlers(newSession)
-
-	return newSession
-}
-
-// ClientConfig satisfies the client.ConfigProvider interface and is used to
-// configure the service client instances. Passing the Session to the service
-// client's constructor (New) will use this method to configure the client.
-func (s *Session) ClientConfig(serviceName string, cfgs ...*aws.Config) client.Config {
-	s = s.Copy(cfgs...)
-	endpoint, signingRegion := endpoints.NormalizeEndpoint(
-		aws.StringValue(s.Config.Endpoint),
-		serviceName,
-		aws.StringValue(s.Config.Region),
-		aws.BoolValue(s.Config.DisableSSL),
-		aws.BoolValue(s.Config.UseDualStack),
-	)
-
-	return client.Config{
-		Config:        s.Config,
-		Handlers:      s.Handlers,
-		Endpoint:      endpoint,
-		SigningRegion: signingRegion,
-	}
-}

+ 0 - 344
Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/session/session_test.go

@@ -1,344 +0,0 @@
-package session
-
-import (
-	"bytes"
-	"fmt"
-	"net/http"
-	"net/http/httptest"
-	"os"
-	"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/defaults"
-	"github.com/aws/aws-sdk-go/service/s3"
-)
-
-func TestNewDefaultSession(t *testing.T) {
-	oldEnv := initSessionTestEnv()
-	defer popEnv(oldEnv)
-
-	s := New(&aws.Config{Region: aws.String("region")})
-
-	assert.Equal(t, "region", *s.Config.Region)
-	assert.Equal(t, http.DefaultClient, s.Config.HTTPClient)
-	assert.NotNil(t, s.Config.Logger)
-	assert.Equal(t, aws.LogOff, *s.Config.LogLevel)
-}
-
-func TestNew_WithCustomCreds(t *testing.T) {
-	oldEnv := initSessionTestEnv()
-	defer popEnv(oldEnv)
-
-	customCreds := credentials.NewStaticCredentials("AKID", "SECRET", "TOKEN")
-	s := New(&aws.Config{Credentials: customCreds})
-
-	assert.Equal(t, customCreds, s.Config.Credentials)
-}
-
-type mockLogger struct {
-	*bytes.Buffer
-}
-
-func (w mockLogger) Log(args ...interface{}) {
-	fmt.Fprintln(w, args...)
-}
-
-func TestNew_WithSessionLoadError(t *testing.T) {
-	oldEnv := initSessionTestEnv()
-	defer popEnv(oldEnv)
-
-	os.Setenv("AWS_SDK_LOAD_CONFIG", "1")
-	os.Setenv("AWS_CONFIG_FILE", testConfigFilename)
-	os.Setenv("AWS_PROFILE", "assume_role_invalid_source_profile")
-
-	logger := bytes.Buffer{}
-	s := New(&aws.Config{Logger: &mockLogger{&logger}})
-
-	assert.NotNil(t, s)
-
-	svc := s3.New(s)
-	_, err := svc.ListBuckets(&s3.ListBucketsInput{})
-
-	assert.Error(t, err)
-	assert.Contains(t, logger.String(), "ERROR: failed to create session with AWS_SDK_LOAD_CONFIG enabled")
-	assert.Contains(t, err.Error(), SharedConfigAssumeRoleError{
-		RoleARN: "assume_role_invalid_source_profile_role_arn",
-	}.Error())
-}
-
-func TestSessionCopy(t *testing.T) {
-	oldEnv := initSessionTestEnv()
-	defer popEnv(oldEnv)
-
-	os.Setenv("AWS_REGION", "orig_region")
-
-	s := Session{
-		Config:   defaults.Config(),
-		Handlers: defaults.Handlers(),
-	}
-
-	newSess := s.Copy(&aws.Config{Region: aws.String("new_region")})
-
-	assert.Equal(t, "orig_region", *s.Config.Region)
-	assert.Equal(t, "new_region", *newSess.Config.Region)
-}
-
-func TestSessionClientConfig(t *testing.T) {
-	s, err := NewSession(&aws.Config{Region: aws.String("orig_region")})
-	assert.NoError(t, err)
-
-	cfg := s.ClientConfig("s3", &aws.Config{Region: aws.String("us-west-2")})
-
-	assert.Equal(t, "https://s3-us-west-2.amazonaws.com", cfg.Endpoint)
-	assert.Empty(t, cfg.SigningRegion)
-	assert.Equal(t, "us-west-2", *cfg.Config.Region)
-}
-
-func TestNewSession_NoCredentials(t *testing.T) {
-	oldEnv := initSessionTestEnv()
-	defer popEnv(oldEnv)
-
-	s, err := NewSession()
-	assert.NoError(t, err)
-
-	assert.NotNil(t, s.Config.Credentials)
-	assert.NotEqual(t, credentials.AnonymousCredentials, s.Config.Credentials)
-}
-
-func TestNewSessionWithOptions_OverrideProfile(t *testing.T) {
-	oldEnv := initSessionTestEnv()
-	defer popEnv(oldEnv)
-
-	os.Setenv("AWS_SDK_LOAD_CONFIG", "1")
-	os.Setenv("AWS_SHARED_CREDENTIALS_FILE", testConfigFilename)
-	os.Setenv("AWS_PROFILE", "other_profile")
-
-	s, err := NewSessionWithOptions(Options{
-		Profile: "full_profile",
-	})
-	assert.NoError(t, err)
-
-	assert.Equal(t, "full_profile_region", *s.Config.Region)
-
-	creds, err := s.Config.Credentials.Get()
-	assert.NoError(t, err)
-	assert.Equal(t, "full_profile_akid", creds.AccessKeyID)
-	assert.Equal(t, "full_profile_secret", creds.SecretAccessKey)
-	assert.Empty(t, creds.SessionToken)
-	assert.Contains(t, creds.ProviderName, "SharedConfigCredentials")
-}
-
-func TestNewSessionWithOptions_OverrideSharedConfigEnable(t *testing.T) {
-	oldEnv := initSessionTestEnv()
-	defer popEnv(oldEnv)
-
-	os.Setenv("AWS_SDK_LOAD_CONFIG", "0")
-	os.Setenv("AWS_SHARED_CREDENTIALS_FILE", testConfigFilename)
-	os.Setenv("AWS_PROFILE", "full_profile")
-
-	s, err := NewSessionWithOptions(Options{
-		SharedConfigState: SharedConfigEnable,
-	})
-	assert.NoError(t, err)
-
-	assert.Equal(t, "full_profile_region", *s.Config.Region)
-
-	creds, err := s.Config.Credentials.Get()
-	assert.NoError(t, err)
-	assert.Equal(t, "full_profile_akid", creds.AccessKeyID)
-	assert.Equal(t, "full_profile_secret", creds.SecretAccessKey)
-	assert.Empty(t, creds.SessionToken)
-	assert.Contains(t, creds.ProviderName, "SharedConfigCredentials")
-}
-
-func TestNewSessionWithOptions_OverrideSharedConfigDisable(t *testing.T) {
-	oldEnv := initSessionTestEnv()
-	defer popEnv(oldEnv)
-
-	os.Setenv("AWS_SDK_LOAD_CONFIG", "1")
-	os.Setenv("AWS_SHARED_CREDENTIALS_FILE", testConfigFilename)
-	os.Setenv("AWS_PROFILE", "full_profile")
-
-	s, err := NewSessionWithOptions(Options{
-		SharedConfigState: SharedConfigDisable,
-	})
-	assert.NoError(t, err)
-
-	assert.Empty(t, *s.Config.Region)
-
-	creds, err := s.Config.Credentials.Get()
-	assert.NoError(t, err)
-	assert.Equal(t, "full_profile_akid", creds.AccessKeyID)
-	assert.Equal(t, "full_profile_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
-		InProfile string
-		OutRegion string
-		OutCreds  credentials.Value
-	}{
-		{
-			InEnvs: map[string]string{
-				"AWS_SDK_LOAD_CONFIG":         "0",
-				"AWS_SHARED_CREDENTIALS_FILE": testConfigFilename,
-				"AWS_PROFILE":                 "other_profile",
-			},
-			InProfile: "full_profile",
-			OutRegion: "full_profile_region",
-			OutCreds: credentials.Value{
-				AccessKeyID:     "full_profile_akid",
-				SecretAccessKey: "full_profile_secret",
-				ProviderName:    "SharedConfigCredentials",
-			},
-		},
-		{
-			InEnvs: map[string]string{
-				"AWS_SDK_LOAD_CONFIG":         "0",
-				"AWS_SHARED_CREDENTIALS_FILE": testConfigFilename,
-				"AWS_REGION":                  "env_region",
-				"AWS_ACCESS_KEY":              "env_akid",
-				"AWS_SECRET_ACCESS_KEY":       "env_secret",
-				"AWS_PROFILE":                 "other_profile",
-			},
-			InProfile: "full_profile",
-			OutRegion: "env_region",
-			OutCreds: credentials.Value{
-				AccessKeyID:     "env_akid",
-				SecretAccessKey: "env_secret",
-				ProviderName:    "EnvConfigCredentials",
-			},
-		},
-		{
-			InEnvs: map[string]string{
-				"AWS_SDK_LOAD_CONFIG":         "0",
-				"AWS_SHARED_CREDENTIALS_FILE": testConfigFilename,
-				"AWS_CONFIG_FILE":             testConfigOtherFilename,
-				"AWS_PROFILE":                 "shared_profile",
-			},
-			InProfile: "config_file_load_order",
-			OutRegion: "shared_config_region",
-			OutCreds: credentials.Value{
-				AccessKeyID:     "shared_config_akid",
-				SecretAccessKey: "shared_config_secret",
-				ProviderName:    "SharedConfigCredentials",
-			},
-		},
-	}
-
-	for _, c := range cases {
-		oldEnv := initSessionTestEnv()
-		defer popEnv(oldEnv)
-
-		for k, v := range c.InEnvs {
-			os.Setenv(k, v)
-		}
-
-		s, err := NewSessionWithOptions(Options{
-			Profile:           c.InProfile,
-			SharedConfigState: SharedConfigEnable,
-		})
-		assert.NoError(t, err)
-
-		creds, err := s.Config.Credentials.Get()
-		assert.NoError(t, err)
-		assert.Equal(t, c.OutRegion, *s.Config.Region)
-		assert.Equal(t, c.OutCreds.AccessKeyID, creds.AccessKeyID)
-		assert.Equal(t, c.OutCreds.SecretAccessKey, creds.SecretAccessKey)
-		assert.Equal(t, c.OutCreds.SessionToken, creds.SessionToken)
-		assert.Contains(t, creds.ProviderName, c.OutCreds.ProviderName)
-	}
-}
-
-func TestSesisonAssumeRole(t *testing.T) {
-	oldEnv := initSessionTestEnv()
-	defer popEnv(oldEnv)
-
-	os.Setenv("AWS_REGION", "us-east-1")
-	os.Setenv("AWS_SDK_LOAD_CONFIG", "1")
-	os.Setenv("AWS_SHARED_CREDENTIALS_FILE", testConfigFilename)
-	os.Setenv("AWS_PROFILE", "assume_role_w_creds")
-
-	server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
-		const respMsg = `
-<AssumeRoleResponse xmlns="https://sts.amazonaws.com/doc/2011-06-15/">
-  <AssumeRoleResult>
-    <AssumedRoleUser>
-      <Arn>arn:aws:sts::account_id:assumed-role/role/session_name</Arn>
-      <AssumedRoleId>AKID:session_name</AssumedRoleId>
-    </AssumedRoleUser>
-    <Credentials>
-      <AccessKeyId>AKID</AccessKeyId>
-      <SecretAccessKey>SECRET</SecretAccessKey>
-      <SessionToken>SESSION_TOKEN</SessionToken>
-      <Expiration>%s</Expiration>
-    </Credentials>
-  </AssumeRoleResult>
-  <ResponseMetadata>
-    <RequestId>request-id</RequestId>
-  </ResponseMetadata>
-</AssumeRoleResponse>
-`
-		w.Write([]byte(fmt.Sprintf(respMsg, time.Now().Add(15*time.Minute).Format("2006-01-02T15:04:05Z"))))
-	}))
-
-	s, err := NewSession(&aws.Config{Endpoint: aws.String(server.URL), DisableSSL: aws.Bool(true)})
-
-	creds, err := s.Config.Credentials.Get()
-	assert.NoError(t, err)
-	assert.Equal(t, "AKID", creds.AccessKeyID)
-	assert.Equal(t, "SECRET", creds.SecretAccessKey)
-	assert.Equal(t, "SESSION_TOKEN", creds.SessionToken)
-	assert.Contains(t, creds.ProviderName, "AssumeRoleProvider")
-}
-
-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)
-
-	os.Setenv("AWS_SDK_LOAD_CONFIG", "0")
-	os.Setenv("AWS_SHARED_CREDENTIALS_FILE", testConfigFilename)
-	os.Setenv("AWS_PROFILE", "assume_role_w_creds")
-
-	s, err := NewSession()
-	assert.NoError(t, err)
-
-	creds, err := s.Config.Credentials.Get()
-	assert.NoError(t, err)
-	assert.Equal(t, "assume_role_w_creds_akid", creds.AccessKeyID)
-	assert.Equal(t, "assume_role_w_creds_secret", creds.SecretAccessKey)
-	assert.Contains(t, creds.ProviderName, "SharedConfigCredentials")
-}
-
-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)
-
-	os.Setenv("AWS_SDK_LOAD_CONFIG", "1")
-	os.Setenv("AWS_SHARED_CREDENTIALS_FILE", testConfigFilename)
-	os.Setenv("AWS_PROFILE", "assume_role_invalid_source_profile")
-
-	s, err := NewSession()
-	assert.Error(t, err)
-	assert.Contains(t, err.Error(), "SharedConfigAssumeRoleError: failed to load assume role")
-	assert.Nil(t, s)
-}
-
-func initSessionTestEnv() (oldEnv []string) {
-	oldEnv = stashEnv()
-	os.Setenv("AWS_CONFIG_FILE", "file_not_exists")
-	os.Setenv("AWS_SHARED_CREDENTIALS_FILE", "file_not_exists")
-
-	return oldEnv
-}

+ 0 - 294
Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/session/shared_config.go

@@ -1,294 +0,0 @@
-package session
-
-import (
-	"fmt"
-	"os"
-
-	"github.com/aws/aws-sdk-go/aws/awserr"
-	"github.com/aws/aws-sdk-go/aws/credentials"
-	"github.com/go-ini/ini"
-)
-
-const (
-	// Static Credentials group
-	accessKeyIDKey  = `aws_access_key_id`     // group required
-	secretAccessKey = `aws_secret_access_key` // group required
-	sessionTokenKey = `aws_session_token`     // optional
-
-	// Assume Role Credentials group
-	roleArnKey         = `role_arn`          // group required
-	sourceProfileKey   = `source_profile`    // group required
-	externalIDKey      = `external_id`       // optional
-	mfaSerialKey       = `mfa_serial`        // optional
-	roleSessionNameKey = `role_session_name` // optional
-
-	// Additional Config fields
-	regionKey = `region`
-
-	// DefaultSharedConfigProfile is the default profile to be used when
-	// loading configuration from the config files if another profile name
-	// is not provided.
-	DefaultSharedConfigProfile = `default`
-)
-
-type assumeRoleConfig struct {
-	RoleARN         string
-	SourceProfile   string
-	ExternalID      string
-	MFASerial       string
-	RoleSessionName string
-}
-
-// sharedConfig represents the configuration fields of the SDK config files.
-type sharedConfig struct {
-	// Credentials values from the config file. Both aws_access_key_id
-	// and aws_secret_access_key must be provided together in the same file
-	// to be considered valid. The values will be ignored if not a complete group.
-	// aws_session_token is an optional field that can be provided if both of the
-	// other two fields are also provided.
-	//
-	//	aws_access_key_id
-	//	aws_secret_access_key
-	//	aws_session_token
-	Creds credentials.Value
-
-	AssumeRole       assumeRoleConfig
-	AssumeRoleSource *sharedConfig
-
-	// Region is the region the SDK should use for looking up AWS service endpoints
-	// and signing requests.
-	//
-	//	region
-	Region string
-}
-
-type sharedConfigFile struct {
-	Filename string
-	IniData  *ini.File
-}
-
-// loadSharedConfig retrieves the configuration from the list of files
-// using the profile provided. The order the files are listed will determine
-// precedence. Values in subsequent files will overwrite values defined in
-// earlier files.
-//
-// For example, given two files A and B. Both define credentials. If the order
-// of the files are A then B, B's credential values will be used instead of A's.
-//
-// See sharedConfig.setFromFile for information how the config files
-// will be loaded.
-func loadSharedConfig(profile string, filenames []string) (sharedConfig, error) {
-	if len(profile) == 0 {
-		profile = DefaultSharedConfigProfile
-	}
-
-	files, err := loadSharedConfigIniFiles(filenames)
-	if err != nil {
-		return sharedConfig{}, err
-	}
-
-	cfg := sharedConfig{}
-	if err = cfg.setFromIniFiles(profile, files); err != nil {
-		return sharedConfig{}, err
-	}
-
-	if len(cfg.AssumeRole.SourceProfile) > 0 {
-		if err := cfg.setAssumeRoleSource(profile, files); err != nil {
-			return sharedConfig{}, err
-		}
-	}
-
-	return cfg, nil
-}
-
-func loadSharedConfigIniFiles(filenames []string) ([]sharedConfigFile, error) {
-	files := make([]sharedConfigFile, 0, len(filenames))
-
-	for _, filename := range filenames {
-		if _, err := os.Stat(filename); os.IsNotExist(err) {
-			// Trim files from the list that don't exist.
-			continue
-		}
-
-		f, err := ini.Load(filename)
-		if err != nil {
-			return nil, SharedConfigLoadError{Filename: filename}
-		}
-
-		files = append(files, sharedConfigFile{
-			Filename: filename, IniData: f,
-		})
-	}
-
-	return files, nil
-}
-
-func (cfg *sharedConfig) setAssumeRoleSource(origProfile string, files []sharedConfigFile) error {
-	var assumeRoleSrc sharedConfig
-
-	// Multiple level assume role chains are not support
-	if cfg.AssumeRole.SourceProfile == origProfile {
-		assumeRoleSrc = *cfg
-		assumeRoleSrc.AssumeRole = assumeRoleConfig{}
-	} else {
-		err := assumeRoleSrc.setFromIniFiles(cfg.AssumeRole.SourceProfile, files)
-		if err != nil {
-			return err
-		}
-	}
-
-	if len(assumeRoleSrc.Creds.AccessKeyID) == 0 {
-		return SharedConfigAssumeRoleError{RoleARN: cfg.AssumeRole.RoleARN}
-	}
-
-	cfg.AssumeRoleSource = &assumeRoleSrc
-
-	return nil
-}
-
-func (cfg *sharedConfig) setFromIniFiles(profile string, files []sharedConfigFile) error {
-	// Trim files from the list that don't exist.
-	for _, f := range files {
-		if err := cfg.setFromIniFile(profile, f); err != nil {
-			if _, ok := err.(SharedConfigProfileNotExistsError); ok {
-				// Ignore proviles missings
-				continue
-			}
-			return err
-		}
-	}
-
-	return nil
-}
-
-// setFromFile loads the configuration from the file using
-// the profile provided. A sharedConfig pointer type value is used so that
-// multiple config file loadings can be chained.
-//
-// Only loads complete logically grouped values, and will not set fields in cfg
-// for incomplete grouped values in the config. Such as credentials. For example
-// if a config file only includes aws_access_key_id but no aws_secret_access_key
-// the aws_access_key_id will be ignored.
-func (cfg *sharedConfig) setFromIniFile(profile string, file sharedConfigFile) error {
-	section, err := file.IniData.GetSection(profile)
-	if err != nil {
-		// Fallback to to alternate profile name: profile <name>
-		section, err = file.IniData.GetSection(fmt.Sprintf("profile %s", profile))
-		if err != nil {
-			return SharedConfigProfileNotExistsError{Profile: profile, Err: err}
-		}
-	}
-
-	// Shared Credentials
-	akid := section.Key(accessKeyIDKey).String()
-	secret := section.Key(secretAccessKey).String()
-	if len(akid) > 0 && len(secret) > 0 {
-		cfg.Creds = credentials.Value{
-			AccessKeyID:     akid,
-			SecretAccessKey: secret,
-			SessionToken:    section.Key(sessionTokenKey).String(),
-			ProviderName:    fmt.Sprintf("SharedConfigCredentials: %s", file.Filename),
-		}
-	}
-
-	// Assume Role
-	roleArn := section.Key(roleArnKey).String()
-	srcProfile := section.Key(sourceProfileKey).String()
-	if len(roleArn) > 0 && len(srcProfile) > 0 {
-		cfg.AssumeRole = assumeRoleConfig{
-			RoleARN:         roleArn,
-			SourceProfile:   srcProfile,
-			ExternalID:      section.Key(externalIDKey).String(),
-			MFASerial:       section.Key(mfaSerialKey).String(),
-			RoleSessionName: section.Key(roleSessionNameKey).String(),
-		}
-	}
-
-	// Region
-	if v := section.Key(regionKey).String(); len(v) > 0 {
-		cfg.Region = v
-	}
-
-	return nil
-}
-
-// SharedConfigLoadError is an error for the shared config file failed to load.
-type SharedConfigLoadError struct {
-	Filename string
-	Err      error
-}
-
-// Code is the short id of the error.
-func (e SharedConfigLoadError) Code() string {
-	return "SharedConfigLoadError"
-}
-
-// Message is the description of the error
-func (e SharedConfigLoadError) Message() string {
-	return fmt.Sprintf("failed to load config file, %s", e.Filename)
-}
-
-// OrigErr is the underlying error that caused the failure.
-func (e SharedConfigLoadError) OrigErr() error {
-	return e.Err
-}
-
-// Error satisfies the error interface.
-func (e SharedConfigLoadError) Error() string {
-	return awserr.SprintError(e.Code(), e.Message(), "", e.Err)
-}
-
-// SharedConfigProfileNotExistsError is an error for the shared config when
-// the profile was not find in the config file.
-type SharedConfigProfileNotExistsError struct {
-	Profile string
-	Err     error
-}
-
-// Code is the short id of the error.
-func (e SharedConfigProfileNotExistsError) Code() string {
-	return "SharedConfigProfileNotExistsError"
-}
-
-// Message is the description of the error
-func (e SharedConfigProfileNotExistsError) Message() string {
-	return fmt.Sprintf("failed to get profile, %s", e.Profile)
-}
-
-// OrigErr is the underlying error that caused the failure.
-func (e SharedConfigProfileNotExistsError) OrigErr() error {
-	return e.Err
-}
-
-// Error satisfies the error interface.
-func (e SharedConfigProfileNotExistsError) Error() string {
-	return awserr.SprintError(e.Code(), e.Message(), "", e.Err)
-}
-
-// SharedConfigAssumeRoleError is an error for the shared config when the
-// profile contains assume role information, but that information is invalid
-// or not complete.
-type SharedConfigAssumeRoleError struct {
-	RoleARN string
-}
-
-// Code is the short id of the error.
-func (e SharedConfigAssumeRoleError) Code() string {
-	return "SharedConfigAssumeRoleError"
-}
-
-// Message is the description of the error
-func (e SharedConfigAssumeRoleError) Message() string {
-	return fmt.Sprintf("failed to load assume role for %s, source profile has no shared credentials",
-		e.RoleARN)
-}
-
-// OrigErr is the underlying error that caused the failure.
-func (e SharedConfigAssumeRoleError) OrigErr() error {
-	return nil
-}
-
-// Error satisfies the error interface.
-func (e SharedConfigAssumeRoleError) Error() string {
-	return awserr.SprintError(e.Code(), e.Message(), "", nil)
-}

+ 0 - 264
Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/session/shared_config_test.go

@@ -1,264 +0,0 @@
-package session
-
-import (
-	"fmt"
-	"path/filepath"
-	"testing"
-
-	"github.com/aws/aws-sdk-go/aws/credentials"
-	"github.com/go-ini/ini"
-	"github.com/stretchr/testify/assert"
-)
-
-var (
-	testConfigFilename      = filepath.Join("testdata", "shared_config")
-	testConfigOtherFilename = filepath.Join("testdata", "shared_config_other")
-)
-
-func TestLoadSharedConfig(t *testing.T) {
-	cases := []struct {
-		Filenames []string
-		Profile   string
-		Expected  sharedConfig
-		Err       error
-	}{
-		{
-			Filenames: []string{"file_not_exists"},
-			Profile:   "default",
-		},
-		{
-			Filenames: []string{testConfigFilename},
-			Expected: sharedConfig{
-				Region: "default_region",
-			},
-		},
-		{
-			Filenames: []string{testConfigOtherFilename, testConfigFilename},
-			Profile:   "config_file_load_order",
-			Expected: sharedConfig{
-				Region: "shared_config_region",
-				Creds: credentials.Value{
-					AccessKeyID:     "shared_config_akid",
-					SecretAccessKey: "shared_config_secret",
-					ProviderName:    fmt.Sprintf("SharedConfigCredentials: %s", testConfigFilename),
-				},
-			},
-		},
-		{
-			Filenames: []string{testConfigFilename, testConfigOtherFilename},
-			Profile:   "config_file_load_order",
-			Expected: sharedConfig{
-				Region: "shared_config_other_region",
-				Creds: credentials.Value{
-					AccessKeyID:     "shared_config_other_akid",
-					SecretAccessKey: "shared_config_other_secret",
-					ProviderName:    fmt.Sprintf("SharedConfigCredentials: %s", testConfigOtherFilename),
-				},
-			},
-		},
-		{
-			Filenames: []string{testConfigOtherFilename, testConfigFilename},
-			Profile:   "assume_role",
-			Expected: sharedConfig{
-				AssumeRole: assumeRoleConfig{
-					RoleARN:       "assume_role_role_arn",
-					SourceProfile: "complete_creds",
-				},
-				AssumeRoleSource: &sharedConfig{
-					Creds: credentials.Value{
-						AccessKeyID:     "complete_creds_akid",
-						SecretAccessKey: "complete_creds_secret",
-						ProviderName:    fmt.Sprintf("SharedConfigCredentials: %s", testConfigFilename),
-					},
-				},
-			},
-		},
-		{
-			Filenames: []string{testConfigOtherFilename, testConfigFilename},
-			Profile:   "assume_role_invalid_source_profile",
-			Expected: sharedConfig{
-				AssumeRole: assumeRoleConfig{
-					RoleARN:       "assume_role_invalid_source_profile_role_arn",
-					SourceProfile: "profile_not_exists",
-				},
-			},
-			Err: SharedConfigAssumeRoleError{RoleARN: "assume_role_invalid_source_profile_role_arn"},
-		},
-		{
-			Filenames: []string{testConfigOtherFilename, testConfigFilename},
-			Profile:   "assume_role_w_creds",
-			Expected: sharedConfig{
-				Creds: credentials.Value{
-					AccessKeyID:     "assume_role_w_creds_akid",
-					SecretAccessKey: "assume_role_w_creds_secret",
-					ProviderName:    fmt.Sprintf("SharedConfigCredentials: %s", testConfigFilename),
-				},
-				AssumeRole: assumeRoleConfig{
-					RoleARN:         "assume_role_w_creds_role_arn",
-					SourceProfile:   "assume_role_w_creds",
-					ExternalID:      "1234",
-					RoleSessionName: "assume_role_w_creds_session_name",
-				},
-				AssumeRoleSource: &sharedConfig{
-					Creds: credentials.Value{
-						AccessKeyID:     "assume_role_w_creds_akid",
-						SecretAccessKey: "assume_role_w_creds_secret",
-						ProviderName:    fmt.Sprintf("SharedConfigCredentials: %s", testConfigFilename),
-					},
-				},
-			},
-		},
-		{
-			Filenames: []string{testConfigOtherFilename, testConfigFilename},
-			Profile:   "assume_role_wo_creds",
-			Expected: sharedConfig{
-				AssumeRole: assumeRoleConfig{
-					RoleARN:       "assume_role_wo_creds_role_arn",
-					SourceProfile: "assume_role_wo_creds",
-				},
-			},
-			Err: SharedConfigAssumeRoleError{RoleARN: "assume_role_wo_creds_role_arn"},
-		},
-		{
-			Filenames: []string{filepath.Join("testdata", "shared_config_invalid_ini")},
-			Profile:   "profile_name",
-			Err:       SharedConfigLoadError{Filename: filepath.Join("testdata", "shared_config_invalid_ini")},
-		},
-	}
-
-	for i, c := range cases {
-		cfg, err := loadSharedConfig(c.Profile, c.Filenames)
-		if c.Err != nil {
-			assert.Contains(t, err.Error(), c.Err.Error(), "expected error, %d", i)
-			continue
-		}
-
-		assert.NoError(t, err, "unexpected error, %d", i)
-		assert.Equal(t, c.Expected, cfg, "not equal, %d", i)
-	}
-}
-
-func TestLoadSharedConfigFromFile(t *testing.T) {
-	filename := testConfigFilename
-	f, err := ini.Load(filename)
-	if err != nil {
-		t.Fatalf("failed to load test config file, %s, %v", filename, err)
-	}
-	iniFile := sharedConfigFile{IniData: f, Filename: filename}
-
-	cases := []struct {
-		Profile  string
-		Expected sharedConfig
-		Err      error
-	}{
-		{
-			Profile:  "default",
-			Expected: sharedConfig{Region: "default_region"},
-		},
-		{
-			Profile:  "alt_profile_name",
-			Expected: sharedConfig{Region: "alt_profile_name_region"},
-		},
-		{
-			Profile:  "short_profile_name_first",
-			Expected: sharedConfig{Region: "short_profile_name_first_short"},
-		},
-		{
-			Profile:  "partial_creds",
-			Expected: sharedConfig{},
-		},
-		{
-			Profile: "complete_creds",
-			Expected: sharedConfig{
-				Creds: credentials.Value{
-					AccessKeyID:     "complete_creds_akid",
-					SecretAccessKey: "complete_creds_secret",
-					ProviderName:    fmt.Sprintf("SharedConfigCredentials: %s", testConfigFilename),
-				},
-			},
-		},
-		{
-			Profile: "complete_creds_with_token",
-			Expected: sharedConfig{
-				Creds: credentials.Value{
-					AccessKeyID:     "complete_creds_with_token_akid",
-					SecretAccessKey: "complete_creds_with_token_secret",
-					SessionToken:    "complete_creds_with_token_token",
-					ProviderName:    fmt.Sprintf("SharedConfigCredentials: %s", testConfigFilename),
-				},
-			},
-		},
-		{
-			Profile: "full_profile",
-			Expected: sharedConfig{
-				Creds: credentials.Value{
-					AccessKeyID:     "full_profile_akid",
-					SecretAccessKey: "full_profile_secret",
-					ProviderName:    fmt.Sprintf("SharedConfigCredentials: %s", testConfigFilename),
-				},
-				Region: "full_profile_region",
-			},
-		},
-		{
-			Profile:  "partial_assume_role",
-			Expected: sharedConfig{},
-		},
-		{
-			Profile: "assume_role",
-			Expected: sharedConfig{
-				AssumeRole: assumeRoleConfig{
-					RoleARN:       "assume_role_role_arn",
-					SourceProfile: "complete_creds",
-				},
-			},
-		},
-		{
-			Profile: "does_not_exists",
-			Err:     SharedConfigProfileNotExistsError{Profile: "does_not_exists"},
-		},
-	}
-
-	for i, c := range cases {
-		cfg := sharedConfig{}
-
-		err := cfg.setFromIniFile(c.Profile, iniFile)
-		if c.Err != nil {
-			assert.Contains(t, err.Error(), c.Err.Error(), "expected error, %d", i)
-			continue
-		}
-
-		assert.NoError(t, err, "unexpected error, %d", i)
-		assert.Equal(t, c.Expected, cfg, "not equal, %d", i)
-	}
-}
-
-func TestLoadSharedConfigIniFiles(t *testing.T) {
-	cases := []struct {
-		Filenames []string
-		Expected  []sharedConfigFile
-	}{
-		{
-			Filenames: []string{"not_exists", testConfigFilename},
-			Expected: []sharedConfigFile{
-				{Filename: testConfigFilename},
-			},
-		},
-		{
-			Filenames: []string{testConfigFilename, testConfigOtherFilename},
-			Expected: []sharedConfigFile{
-				{Filename: testConfigFilename},
-				{Filename: testConfigOtherFilename},
-			},
-		},
-	}
-
-	for i, c := range cases {
-		files, err := loadSharedConfigIniFiles(c.Filenames)
-		assert.NoError(t, err, "unexpected error, %d", i)
-		assert.Equal(t, len(c.Expected), len(files), "expected num files, %d", i)
-
-		for i, expectedFile := range c.Expected {
-			assert.Equal(t, expectedFile.Filename, files[i].Filename)
-		}
-	}
-}

+ 0 - 77
Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/signer/v4/functional_test.go

@@ -1,77 +0,0 @@
-package v4_test
-
-import (
-	"net/http"
-	"net/url"
-	"testing"
-	"time"
-
-	"github.com/aws/aws-sdk-go/aws"
-	"github.com/aws/aws-sdk-go/awstesting/unit"
-	"github.com/aws/aws-sdk-go/service/s3"
-	"github.com/stretchr/testify/assert"
-)
-
-func TestPresignHandler(t *testing.T) {
-	svc := s3.New(unit.Session)
-	req, _ := svc.PutObjectRequest(&s3.PutObjectInput{
-		Bucket:             aws.String("bucket"),
-		Key:                aws.String("key"),
-		ContentDisposition: aws.String("a+b c$d"),
-		ACL:                aws.String("public-read"),
-	})
-	req.Time = time.Unix(0, 0)
-	urlstr, err := req.Presign(5 * time.Minute)
-
-	assert.NoError(t, err)
-
-	expectedDate := "19700101T000000Z"
-	expectedHeaders := "content-disposition;host;x-amz-acl"
-	expectedSig := "b2754ba8ffeb74a40b94767017e24c4672107d6d5a894648d5d332ca61f5ffe4"
-	expectedCred := "AKID/19700101/mock-region/s3/aws4_request"
-
-	u, _ := url.Parse(urlstr)
-	urlQ := u.Query()
-	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
-}
-
-func TestPresignRequest(t *testing.T) {
-	svc := s3.New(unit.Session)
-	req, _ := svc.PutObjectRequest(&s3.PutObjectInput{
-		Bucket:             aws.String("bucket"),
-		Key:                aws.String("key"),
-		ContentDisposition: aws.String("a+b c$d"),
-		ACL:                aws.String("public-read"),
-	})
-	req.Time = time.Unix(0, 0)
-	urlstr, headers, err := req.PresignRequest(5 * time.Minute)
-
-	assert.NoError(t, err)
-
-	expectedDate := "19700101T000000Z"
-	expectedHeaders := "content-disposition;host;x-amz-acl;x-amz-content-sha256"
-	expectedSig := "0d200ba61501d752acd06f39ef4dbe7d83ffd5ea15978dc3476dfc00b8eb574e"
-	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"},
-	}
-
-	u, _ := url.Parse(urlstr)
-	urlQ := u.Query()
-	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
-}

+ 0 - 57
Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/signer/v4/header_rules_test.go

@@ -1,57 +0,0 @@
-package v4
-
-import (
-	"testing"
-
-	"github.com/stretchr/testify/assert"
-)
-
-func TestRuleCheckWhitelist(t *testing.T) {
-	w := whitelist{
-		mapRule{
-			"Cache-Control": struct{}{},
-		},
-	}
-
-	assert.True(t, w.IsValid("Cache-Control"))
-	assert.False(t, w.IsValid("Cache-"))
-}
-
-func TestRuleCheckBlacklist(t *testing.T) {
-	b := blacklist{
-		mapRule{
-			"Cache-Control": struct{}{},
-		},
-	}
-
-	assert.False(t, b.IsValid("Cache-Control"))
-	assert.True(t, b.IsValid("Cache-"))
-}
-
-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-"))
-}
-
-func TestRuleComplexWhitelist(t *testing.T) {
-	w := rules{
-		whitelist{
-			mapRule{
-				"Cache-Control": struct{}{},
-			},
-		},
-		patterns{"X-Amz-Meta-"},
-	}
-
-	r := rules{
-		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"))
-}

+ 0 - 644
Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go

@@ -1,644 +0,0 @@
-// Package v4 implements signing for AWS V4 signer
-//
-// Provides request signing for request that need to be signed with
-// AWS V4 Signatures.
-package v4
-
-import (
-	"bytes"
-	"crypto/hmac"
-	"crypto/sha256"
-	"encoding/hex"
-	"fmt"
-	"io"
-	"net/http"
-	"net/url"
-	"sort"
-	"strconv"
-	"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"
-	"github.com/aws/aws-sdk-go/private/protocol/rest"
-)
-
-const (
-	authHeaderPrefix = "AWS4-HMAC-SHA256"
-	timeFormat       = "20060102T150405Z"
-	shortTimeFormat  = "20060102"
-
-	// emptyStringSHA256 is a SHA256 of an empty string
-	emptyStringSHA256 = `e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855`
-)
-
-var ignoredHeaders = rules{
-	blacklist{
-		mapRule{
-			"Authorization": struct{}{},
-			"User-Agent":    struct{}{},
-		},
-	},
-}
-
-// requiredSignedHeaders is a whitelist for build canonical headers.
-var requiredSignedHeaders = rules{
-	whitelist{
-		mapRule{
-			"Cache-Control":                                               struct{}{},
-			"Content-Disposition":                                         struct{}{},
-			"Content-Encoding":                                            struct{}{},
-			"Content-Language":                                            struct{}{},
-			"Content-Md5":                                                 struct{}{},
-			"Content-Type":                                                struct{}{},
-			"Expires":                                                     struct{}{},
-			"If-Match":                                                    struct{}{},
-			"If-Modified-Since":                                           struct{}{},
-			"If-None-Match":                                               struct{}{},
-			"If-Unmodified-Since":                                         struct{}{},
-			"Range":                                                       struct{}{},
-			"X-Amz-Acl":                                                   struct{}{},
-			"X-Amz-Copy-Source":                                           struct{}{},
-			"X-Amz-Copy-Source-If-Match":                                  struct{}{},
-			"X-Amz-Copy-Source-If-Modified-Since":                         struct{}{},
-			"X-Amz-Copy-Source-If-None-Match":                             struct{}{},
-			"X-Amz-Copy-Source-If-Unmodified-Since":                       struct{}{},
-			"X-Amz-Copy-Source-Range":                                     struct{}{},
-			"X-Amz-Copy-Source-Server-Side-Encryption-Customer-Algorithm": struct{}{},
-			"X-Amz-Copy-Source-Server-Side-Encryption-Customer-Key":       struct{}{},
-			"X-Amz-Copy-Source-Server-Side-Encryption-Customer-Key-Md5":   struct{}{},
-			"X-Amz-Grant-Full-control":                                    struct{}{},
-			"X-Amz-Grant-Read":                                            struct{}{},
-			"X-Amz-Grant-Read-Acp":                                        struct{}{},
-			"X-Amz-Grant-Write":                                           struct{}{},
-			"X-Amz-Grant-Write-Acp":                                       struct{}{},
-			"X-Amz-Metadata-Directive":                                    struct{}{},
-			"X-Amz-Mfa":                                                   struct{}{},
-			"X-Amz-Request-Payer":                                         struct{}{},
-			"X-Amz-Server-Side-Encryption":                                struct{}{},
-			"X-Amz-Server-Side-Encryption-Aws-Kms-Key-Id":                 struct{}{},
-			"X-Amz-Server-Side-Encryption-Customer-Algorithm":             struct{}{},
-			"X-Amz-Server-Side-Encryption-Customer-Key":                   struct{}{},
-			"X-Amz-Server-Side-Encryption-Customer-Key-Md5":               struct{}{},
-			"X-Amz-Storage-Class":                                         struct{}{},
-			"X-Amz-Website-Redirect-Location":                             struct{}{},
-		},
-	},
-	patterns{"X-Amz-Meta-"},
-}
-
-// allowedHoisting is a whitelist for build query headers. The boolean value
-// represents whether or not it is a pattern.
-var allowedQueryHoisting = inclusiveRules{
-	blacklist{requiredSignedHeaders},
-	patterns{"X-Amz-"},
-}
-
-// Signer applies AWS v4 signing to given request. Use this to sign requests
-// that need to be signed with AWS V4 Signatures.
-type Signer struct {
-	// The authentication credentials the request will be signed against.
-	// This value must be set to sign requests.
-	Credentials *credentials.Credentials
-
-	// Sets the log level the signer should use when reporting information to
-	// the logger. If the logger is nil nothing will be logged. See
-	// aws.LogLevelType for more information on available logging levels
-	//
-	// By default nothing will be logged.
-	Debug aws.LogLevelType
-
-	// The logger loging information will be written to. If there the logger
-	// is nil, nothing will be logged.
-	Logger aws.Logger
-
-	// Disables the Signer's moving HTTP header key/value pairs from the HTTP
-	// request header to the request's query string. This is most commonly used
-	// with pre-signed requests preventing headers from being added to the
-	// request's query string.
-	DisableHeaderHoisting bool
-
-	// currentTimeFn returns the time value which represents the current time.
-	// This value should only be used for testing. If it is nil the default
-	// time.Now will be used.
-	currentTimeFn func() time.Time
-}
-
-// NewSigner returns a Signer pointer configured with the credentials and optional
-// option values provided. If not options are provided the Signer will use its
-// default configuration.
-func NewSigner(credentials *credentials.Credentials, options ...func(*Signer)) *Signer {
-	v4 := &Signer{
-		Credentials: credentials,
-	}
-
-	for _, option := range options {
-		option(v4)
-	}
-
-	return v4
-}
-
-type signingCtx struct {
-	ServiceName      string
-	Region           string
-	Request          *http.Request
-	Body             io.ReadSeeker
-	Query            url.Values
-	Time             time.Time
-	ExpireTime       time.Duration
-	SignedHeaderVals http.Header
-
-	credValues         credentials.Value
-	isPresign          bool
-	formattedTime      string
-	formattedShortTime string
-
-	bodyDigest       string
-	signedHeaders    string
-	canonicalHeaders string
-	canonicalString  string
-	credentialString string
-	stringToSign     string
-	signature        string
-	authorization    string
-}
-
-// Sign signs AWS v4 requests with the provided body, service name, region the
-// request is made to, and time the request is signed at. The signTime allows
-// you to specify that a request is signed for the future, and cannot be
-// used until then.
-//
-// Returns a list of HTTP headers that were included in the signature or an
-// error if signing the request failed. Generally for signed requests this value
-// is not needed as the full request context will be captured by the http.Request
-// value. It is included for reference though.
-//
-// Sign differs from Presign in that it will sign the request using HTTP
-// header values. This type of signing is intended for http.Request values that
-// will not be shared, or are shared in a way the header values on the request
-// will not be lost.
-//
-// The requests body is an io.ReadSeeker so the SHA256 of the body can be
-// generated. To bypass the signer computing the hash you can set the
-// "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)
-}
-
-// Presign signs AWS v4 requests with the provided body, service name, region
-// the request is made to, and time the request is signed at. The signTime
-// allows you to specify that a request is signed for the future, and cannot
-// be used until then.
-//
-// Returns a list of HTTP headers that were included in the signature or an
-// error if signing the request failed. For presigned requests these headers
-// and their values must be included on the HTTP request when it is made. This
-// is helpful to know what header values need to be shared with the party the
-// presigned request will be distributed to.
-//
-// Presign differs from Sign in that it will sign the request using query string
-// instead of header values. This allows you to share the Presigned Request's
-// URL with third parties, or distribute it throughout your system with minimal
-// dependencies.
-//
-// Presign also takes an exp value which is the duration the
-// signed request will be valid after the signing time. This is allows you to
-// set when the request will expire.
-//
-// The requests body is an io.ReadSeeker so the SHA256 of the body can be
-// generated. To bypass the signer computing the hash you can set the
-// "X-Amz-Content-Sha256" header with a precomputed value. The signer will
-// only compute the hash if the request header value is empty.
-//
-// Presigning a S3 request will not compute the body's SHA256 hash by default.
-// This is done due to the general use case for S3 presigned URLs is to share
-// PUT/GET capabilities. If you would like to include the body's SHA256 in the
-// 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)
-}
-
-func (v4 Signer) signWithBody(r *http.Request, body io.ReadSeeker, service, region string, exp time.Duration, signTime time.Time) (http.Header, error) {
-	currentTimeFn := v4.currentTimeFn
-	if currentTimeFn == nil {
-		currentTimeFn = time.Now
-	}
-
-	ctx := &signingCtx{
-		Request:     r,
-		Body:        body,
-		Query:       r.URL.Query(),
-		Time:        signTime,
-		ExpireTime:  exp,
-		isPresign:   exp != 0,
-		ServiceName: service,
-		Region:      region,
-	}
-
-	if ctx.isRequestSigned() {
-		if !v4.Credentials.IsExpired() && currentTimeFn().Before(ctx.Time.Add(10*time.Minute)) {
-			// If the request is already signed, and the credentials have not
-			// expired, and the request is not too old ignore the signing request.
-			return ctx.SignedHeaderVals, nil
-		}
-		ctx.Time = currentTimeFn()
-		ctx.handlePresignRemoval()
-	}
-
-	var err error
-	ctx.credValues, err = v4.Credentials.Get()
-	if err != nil {
-		return http.Header{}, err
-	}
-
-	ctx.assignAmzQueryValues()
-	ctx.build(v4.DisableHeaderHoisting)
-
-	if v4.Debug.Matches(aws.LogDebugWithSigning) {
-		v4.logSigningInfo(ctx)
-	}
-
-	return ctx.SignedHeaderVals, nil
-}
-
-func (ctx *signingCtx) handlePresignRemoval() {
-	if !ctx.isPresign {
-		return
-	}
-
-	// The credentials have expired for this request. The current signing
-	// is invalid, and needs to be request because the request will fail.
-	ctx.removePresign()
-
-	// Update the request's query string to ensure the values stays in
-	// sync in the case retrieving the new credentials fails.
-	ctx.Request.URL.RawQuery = ctx.Query.Encode()
-}
-
-func (ctx *signingCtx) assignAmzQueryValues() {
-	if ctx.isPresign {
-		ctx.Query.Set("X-Amz-Algorithm", authHeaderPrefix)
-		if ctx.credValues.SessionToken != "" {
-			ctx.Query.Set("X-Amz-Security-Token", ctx.credValues.SessionToken)
-		} else {
-			ctx.Query.Del("X-Amz-Security-Token")
-		}
-
-		return
-	}
-
-	if ctx.credValues.SessionToken != "" {
-		ctx.Request.Header.Set("X-Amz-Security-Token", ctx.credValues.SessionToken)
-	}
-}
-
-// 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: "v4.SignRequestHandler", Fn: SignSDKRequest,
-}
-
-// 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
-// API operation requests.
-//
-// This function should not be used on its on its own, but in conjunction with
-// an AWS service client's API operation call. To sign a standalone request
-// not created by a service client's API operation method use the "Sign" or
-// "Presign" functions of the "Signer" type.
-//
-// If the credentials of the request's config are set to
-// credentials.AnonymousCredentials the request will not be signed.
-func SignSDKRequest(req *request.Request) {
-	signSDKRequestWithCurrTime(req, time.Now)
-}
-func signSDKRequestWithCurrTime(req *request.Request, curTimeFn func() time.Time) {
-	// 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
-	}
-
-	region := req.ClientInfo.SigningRegion
-	if region == "" {
-		region = aws.StringValue(req.Config.Region)
-	}
-
-	name := req.ClientInfo.SigningName
-	if name == "" {
-		name = req.ClientInfo.ServiceName
-	}
-
-	v4 := NewSigner(req.Config.Credentials, func(v4 *Signer) {
-		v4.Debug = req.Config.LogLevel.Value()
-		v4.Logger = req.Config.Logger
-		v4.DisableHeaderHoisting = req.NotHoist
-		v4.currentTimeFn = curTimeFn
-	})
-
-	signingTime := req.Time
-	if !req.LastSignedAt.IsZero() {
-		signingTime = req.LastSignedAt
-	}
-
-	signedHeaders, err := v4.signWithBody(req.HTTPRequest, req.Body, name, region, req.ExpireTime, signingTime)
-	if err != nil {
-		req.Error = err
-		req.SignedHeaderVals = nil
-		return
-	}
-
-	req.SignedHeaderVals = signedHeaders
-	req.LastSignedAt = curTimeFn()
-}
-
-const logSignInfoMsg = `DEBUG: Request Signiture:
----[ CANONICAL STRING  ]-----------------------------
-%s
----[ STRING TO SIGN ]--------------------------------
-%s%s
------------------------------------------------------`
-const logSignedURLMsg = `
----[ SIGNED URL ]------------------------------------
-%s`
-
-func (v4 *Signer) logSigningInfo(ctx *signingCtx) {
-	signedURLMsg := ""
-	if ctx.isPresign {
-		signedURLMsg = fmt.Sprintf(logSignedURLMsg, ctx.Request.URL.String())
-	}
-	msg := fmt.Sprintf(logSignInfoMsg, ctx.canonicalString, ctx.stringToSign, signedURLMsg)
-	v4.Logger.Log(msg)
-}
-
-func (ctx *signingCtx) build(disableHeaderHoisting bool) {
-	ctx.buildTime()             // no depends
-	ctx.buildCredentialString() // no depends
-
-	unsignedHeaders := ctx.Request.Header
-	if ctx.isPresign {
-		if !disableHeaderHoisting {
-			urlValues := url.Values{}
-			urlValues, unsignedHeaders = buildQuery(allowedQueryHoisting, unsignedHeaders) // no depends
-			for k := range urlValues {
-				ctx.Query[k] = urlValues[k]
-			}
-		}
-	}
-
-	ctx.buildBodyDigest()
-	ctx.buildCanonicalHeaders(ignoredHeaders, unsignedHeaders)
-	ctx.buildCanonicalString() // depends on canon headers / signed headers
-	ctx.buildStringToSign()    // depends on canon string
-	ctx.buildSignature()       // depends on string to sign
-
-	if ctx.isPresign {
-		ctx.Request.URL.RawQuery += "&X-Amz-Signature=" + ctx.signature
-	} else {
-		parts := []string{
-			authHeaderPrefix + " Credential=" + ctx.credValues.AccessKeyID + "/" + ctx.credentialString,
-			"SignedHeaders=" + ctx.signedHeaders,
-			"Signature=" + ctx.signature,
-		}
-		ctx.Request.Header.Set("Authorization", strings.Join(parts, ", "))
-	}
-}
-
-func (ctx *signingCtx) buildTime() {
-	ctx.formattedTime = ctx.Time.UTC().Format(timeFormat)
-	ctx.formattedShortTime = ctx.Time.UTC().Format(shortTimeFormat)
-
-	if ctx.isPresign {
-		duration := int64(ctx.ExpireTime / time.Second)
-		ctx.Query.Set("X-Amz-Date", ctx.formattedTime)
-		ctx.Query.Set("X-Amz-Expires", strconv.FormatInt(duration, 10))
-	} else {
-		ctx.Request.Header.Set("X-Amz-Date", ctx.formattedTime)
-	}
-}
-
-func (ctx *signingCtx) buildCredentialString() {
-	ctx.credentialString = strings.Join([]string{
-		ctx.formattedShortTime,
-		ctx.Region,
-		ctx.ServiceName,
-		"aws4_request",
-	}, "/")
-
-	if ctx.isPresign {
-		ctx.Query.Set("X-Amz-Credential", ctx.credValues.AccessKeyID+"/"+ctx.credentialString)
-	}
-}
-
-func buildQuery(r rule, header http.Header) (url.Values, http.Header) {
-	query := url.Values{}
-	unsignedHeaders := http.Header{}
-	for k, h := range header {
-		if r.IsValid(k) {
-			query[k] = h
-		} else {
-			unsignedHeaders[k] = h
-		}
-	}
-
-	return query, unsignedHeaders
-}
-func (ctx *signingCtx) buildCanonicalHeaders(r rule, header http.Header) {
-	var headers []string
-	headers = append(headers, "host")
-	for k, v := range header {
-		canonicalKey := http.CanonicalHeaderKey(k)
-		if !r.IsValid(canonicalKey) {
-			continue // ignored header
-		}
-		if ctx.SignedHeaderVals == nil {
-			ctx.SignedHeaderVals = make(http.Header)
-		}
-
-		lowerCaseKey := strings.ToLower(k)
-		if _, ok := ctx.SignedHeaderVals[lowerCaseKey]; ok {
-			// include additional values
-			ctx.SignedHeaderVals[lowerCaseKey] = append(ctx.SignedHeaderVals[lowerCaseKey], v...)
-			continue
-		}
-
-		headers = append(headers, lowerCaseKey)
-		ctx.SignedHeaderVals[lowerCaseKey] = v
-	}
-	sort.Strings(headers)
-
-	ctx.signedHeaders = strings.Join(headers, ";")
-
-	if ctx.isPresign {
-		ctx.Query.Set("X-Amz-SignedHeaders", ctx.signedHeaders)
-	}
-
-	headerValues := make([]string, len(headers))
-	for i, k := range headers {
-		if k == "host" {
-			headerValues[i] = "host:" + ctx.Request.URL.Host
-		} else {
-			headerValues[i] = k + ":" +
-				strings.Join(ctx.SignedHeaderVals[k], ",")
-		}
-	}
-
-	ctx.canonicalHeaders = strings.Join(stripExcessSpaces(headerValues), "\n")
-}
-
-func (ctx *signingCtx) buildCanonicalString() {
-	ctx.Request.URL.RawQuery = strings.Replace(ctx.Query.Encode(), "+", "%20", -1)
-	uri := ctx.Request.URL.Opaque
-	if uri != "" {
-		uri = "/" + strings.Join(strings.Split(uri, "/")[3:], "/")
-	} else {
-		uri = ctx.Request.URL.Path
-	}
-	if uri == "" {
-		uri = "/"
-	}
-
-	if ctx.ServiceName != "s3" {
-		uri = rest.EscapePath(uri, false)
-	}
-
-	ctx.canonicalString = strings.Join([]string{
-		ctx.Request.Method,
-		uri,
-		ctx.Request.URL.RawQuery,
-		ctx.canonicalHeaders + "\n",
-		ctx.signedHeaders,
-		ctx.bodyDigest,
-	}, "\n")
-}
-
-func (ctx *signingCtx) buildStringToSign() {
-	ctx.stringToSign = strings.Join([]string{
-		authHeaderPrefix,
-		ctx.formattedTime,
-		ctx.credentialString,
-		hex.EncodeToString(makeSha256([]byte(ctx.canonicalString))),
-	}, "\n")
-}
-
-func (ctx *signingCtx) buildSignature() {
-	secret := ctx.credValues.SecretAccessKey
-	date := makeHmac([]byte("AWS4"+secret), []byte(ctx.formattedShortTime))
-	region := makeHmac(date, []byte(ctx.Region))
-	service := makeHmac(region, []byte(ctx.ServiceName))
-	credentials := makeHmac(service, []byte("aws4_request"))
-	signature := makeHmac(credentials, []byte(ctx.stringToSign))
-	ctx.signature = hex.EncodeToString(signature)
-}
-
-func (ctx *signingCtx) buildBodyDigest() {
-	hash := ctx.Request.Header.Get("X-Amz-Content-Sha256")
-	if hash == "" {
-		if ctx.isPresign && ctx.ServiceName == "s3" {
-			hash = "UNSIGNED-PAYLOAD"
-		} else if ctx.Body == nil {
-			hash = emptyStringSHA256
-		} else {
-			hash = hex.EncodeToString(makeSha256Reader(ctx.Body))
-		}
-		if ctx.ServiceName == "s3" || ctx.ServiceName == "glacier" {
-			ctx.Request.Header.Set("X-Amz-Content-Sha256", hash)
-		}
-	}
-	ctx.bodyDigest = hash
-}
-
-// isRequestSigned returns if the request is currently signed or presigned
-func (ctx *signingCtx) isRequestSigned() bool {
-	if ctx.isPresign && ctx.Query.Get("X-Amz-Signature") != "" {
-		return true
-	}
-	if ctx.Request.Header.Get("Authorization") != "" {
-		return true
-	}
-
-	return false
-}
-
-// unsign removes signing flags for both signed and presigned requests.
-func (ctx *signingCtx) removePresign() {
-	ctx.Query.Del("X-Amz-Algorithm")
-	ctx.Query.Del("X-Amz-Signature")
-	ctx.Query.Del("X-Amz-Security-Token")
-	ctx.Query.Del("X-Amz-Date")
-	ctx.Query.Del("X-Amz-Expires")
-	ctx.Query.Del("X-Amz-Credential")
-	ctx.Query.Del("X-Amz-SignedHeaders")
-}
-
-func makeHmac(key []byte, data []byte) []byte {
-	hash := hmac.New(sha256.New, key)
-	hash.Write(data)
-	return hash.Sum(nil)
-}
-
-func makeSha256(data []byte) []byte {
-	hash := sha256.New()
-	hash.Write(data)
-	return hash.Sum(nil)
-}
-
-func makeSha256Reader(reader io.ReadSeeker) []byte {
-	hash := sha256.New()
-	start, _ := reader.Seek(0, 1)
-	defer reader.Seek(start, 0)
-
-	io.Copy(hash, reader)
-	return hash.Sum(nil)
-}
-
-const doubleSpaces = "  "
-
-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)
-
-		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)
-			}
-
-			stripToIdx := -1
-			for j := idx + 1; j < len(buf); j++ {
-				if buf[j] != ' ' {
-					buf = append(buf[:idx+1], buf[j:]...)
-					stripToIdx = j
-					break
-				}
-			}
-
-			if stripToIdx >= 0 {
-				idx = bytes.Index(buf[stripToIdx:], doubleSpaceBytes)
-				if idx >= 0 {
-					idx += stripToIdx
-				}
-			} else {
-				idx = -1
-			}
-		}
-
-		if buf != nil {
-			vals[i] = string(buf)
-		} else {
-			vals[i] = trimmed
-		}
-	}
-	return vals
-}

+ 0 - 353
Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/signer/v4/v4_test.go

@@ -1,353 +0,0 @@
-package v4
-
-import (
-	"io"
-	"net/http"
-	"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"
-	"github.com/aws/aws-sdk-go/awstesting"
-)
-
-func TestStripExcessHeaders(t *testing.T) {
-	vals := []string{
-		"123",
-		"1 2 3",
-		"  1 2 3",
-		"1  2 3",
-		"1  23",
-		"1  2  3",
-		"1  2  ",
-		" 1  2  ",
-	}
-
-	expected := []string{
-		"123",
-		"1 2 3",
-		"1 2 3",
-		"1 2 3",
-		"1 23",
-		"1 2 3",
-		"1 2",
-		"1 2",
-	}
-
-	newVals := stripExcessSpaces(vals)
-	for i := 0; i < len(newVals); i++ {
-		assert.Equal(t, expected[i], newVals[i], "test: %d", i)
-	}
-}
-
-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)
-	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.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
-}
-
-func buildSigner() Signer {
-	return Signer{
-		Credentials: credentials.NewStaticCredentials("AKID", "SECRET", "SESSION"),
-	}
-}
-
-func removeWS(text string) string {
-	text = strings.Replace(text, " ", "", -1)
-	text = strings.Replace(text, "\n", "", -1)
-	text = strings.Replace(text, "\t", "", -1)
-	return text
-}
-
-func assertEqual(t *testing.T, expected, given string) {
-	if removeWS(expected) != removeWS(given) {
-		t.Errorf("\nExpected: %s\nGiven:    %s", expected, given)
-	}
-}
-
-func TestPresignRequest(t *testing.T) {
-	req, body := buildRequest("dynamodb", "us-east-1", "{}")
-
-	signer := buildSigner()
-	signer.Presign(req, body, "dynamodb", "us-east-1", 300*time.Second, time.Unix(0, 0))
-
-	expectedDate := "19700101T000000Z"
-	expectedHeaders := "content-length;content-type;host;x-amz-meta-other-header;x-amz-meta-other-header_with_underscore"
-	expectedSig := "ea7856749041f727690c580569738282e99c79355fe0d8f125d3b5535d2ece83"
-	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"))
-}
-
-func TestSignRequest(t *testing.T) {
-	req, body := buildRequest("dynamodb", "us-east-1", "{}")
-	signer := buildSigner()
-	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"
-
-	q := req.Header
-	assert.Equal(t, expectedSig, q.Get("Authorization"))
-	assert.Equal(t, expectedDate, q.Get("X-Amz-Date"))
-}
-
-func TestSignBodyS3(t *testing.T) {
-	req, body := buildRequest("s3", "us-east-1", "hello")
-	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)
-}
-
-func TestSignBodyGlacier(t *testing.T) {
-	req, body := buildRequest("glacier", "us-east-1", "hello")
-	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)
-}
-
-func TestPresignEmptyBodyS3(t *testing.T) {
-	req, body := buildRequest("s3", "us-east-1", "hello")
-	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)
-}
-
-func TestSignPrecomputedBodyChecksum(t *testing.T) {
-	req, body := buildRequest("dynamodb", "us-east-1", "hello")
-	req.Header.Set("X-Amz-Content-Sha256", "PRECOMPUTED")
-	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)
-}
-
-func TestAnonymousCredentials(t *testing.T) {
-	svc := awstesting.NewClient(&aws.Config{Credentials: credentials.AnonymousCredentials})
-	r := svc.NewRequest(
-		&request.Operation{
-			Name:       "BatchGetItem",
-			HTTPMethod: "POST",
-			HTTPPath:   "/",
-		},
-		nil,
-		nil,
-	)
-	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"))
-
-	hQ := r.HTTPRequest.Header
-	assert.Empty(t, hQ.Get("Authorization"))
-	assert.Empty(t, hQ.Get("X-Amz-Date"))
-}
-
-func TestIgnoreResignRequestWithValidCreds(t *testing.T) {
-	svc := awstesting.NewClient(&aws.Config{
-		Credentials: credentials.NewStaticCredentials("AKID", "SECRET", "SESSION"),
-		Region:      aws.String("us-west-2"),
-	})
-	r := svc.NewRequest(
-		&request.Operation{
-			Name:       "BatchGetItem",
-			HTTPMethod: "POST",
-			HTTPPath:   "/",
-		},
-		nil,
-		nil,
-	)
-
-	SignSDKRequest(r)
-	sig := r.HTTPRequest.Header.Get("Authorization")
-
-	SignSDKRequest(r)
-	assert.Equal(t, sig, r.HTTPRequest.Header.Get("Authorization"))
-}
-
-func TestIgnorePreResignRequestWithValidCreds(t *testing.T) {
-	svc := awstesting.NewClient(&aws.Config{
-		Credentials: credentials.NewStaticCredentials("AKID", "SECRET", "SESSION"),
-		Region:      aws.String("us-west-2"),
-	})
-	r := svc.NewRequest(
-		&request.Operation{
-			Name:       "BatchGetItem",
-			HTTPMethod: "POST",
-			HTTPPath:   "/",
-		},
-		nil,
-		nil,
-	)
-	r.ExpireTime = time.Minute * 10
-
-	SignSDKRequest(r)
-	sig := r.HTTPRequest.Header.Get("X-Amz-Signature")
-
-	SignSDKRequest(r)
-	assert.Equal(t, sig, r.HTTPRequest.Header.Get("X-Amz-Signature"))
-}
-
-func TestResignRequestExpiredCreds(t *testing.T) {
-	creds := credentials.NewStaticCredentials("AKID", "SECRET", "SESSION")
-	svc := awstesting.NewClient(&aws.Config{Credentials: creds})
-	r := svc.NewRequest(
-		&request.Operation{
-			Name:       "BatchGetItem",
-			HTTPMethod: "POST",
-			HTTPPath:   "/",
-		},
-		nil,
-		nil,
-	)
-	SignSDKRequest(r)
-	querySig := r.HTTPRequest.Header.Get("Authorization")
-	var origSignedHeaders string
-	for _, p := range strings.Split(querySig, ", ") {
-		if strings.HasPrefix(p, "SignedHeaders=") {
-			origSignedHeaders = p[len("SignedHeaders="):]
-			break
-		}
-	}
-	assert.NotEmpty(t, origSignedHeaders)
-	assert.NotContains(t, origSignedHeaders, "authorization")
-	origSignedAt := r.LastSignedAt
-
-	creds.Expire()
-
-	signSDKRequestWithCurrTime(r, func() time.Time {
-		// Simulate one second has passed so that signature's date changes
-		// when it is resigned.
-		return time.Now().Add(1 * time.Second)
-	})
-	updatedQuerySig := r.HTTPRequest.Header.Get("Authorization")
-	assert.NotEqual(t, querySig, updatedQuerySig)
-
-	var updatedSignedHeaders string
-	for _, p := range strings.Split(updatedQuerySig, ", ") {
-		if strings.HasPrefix(p, "SignedHeaders=") {
-			updatedSignedHeaders = p[len("SignedHeaders="):]
-			break
-		}
-	}
-	assert.NotEmpty(t, updatedSignedHeaders)
-	assert.NotContains(t, updatedQuerySig, "authorization")
-	assert.NotEqual(t, origSignedAt, r.LastSignedAt)
-}
-
-func TestPreResignRequestExpiredCreds(t *testing.T) {
-	provider := &credentials.StaticProvider{Value: credentials.Value{
-		AccessKeyID:     "AKID",
-		SecretAccessKey: "SECRET",
-		SessionToken:    "SESSION",
-	}}
-	creds := credentials.NewCredentials(provider)
-	svc := awstesting.NewClient(&aws.Config{Credentials: creds})
-	r := svc.NewRequest(
-		&request.Operation{
-			Name:       "BatchGetItem",
-			HTTPMethod: "POST",
-			HTTPPath:   "/",
-		},
-		nil,
-		nil,
-	)
-	r.ExpireTime = time.Minute * 10
-
-	SignSDKRequest(r)
-	querySig := r.HTTPRequest.URL.Query().Get("X-Amz-Signature")
-	signedHeaders := r.HTTPRequest.URL.Query().Get("X-Amz-SignedHeaders")
-	assert.NotEmpty(t, signedHeaders)
-	origSignedAt := r.LastSignedAt
-
-	creds.Expire()
-
-	signSDKRequestWithCurrTime(r, func() time.Time {
-		// 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"))
-	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)
-}
-
-func TestResignRequestExpiredRequest(t *testing.T) {
-	creds := credentials.NewStaticCredentials("AKID", "SECRET", "SESSION")
-	svc := awstesting.NewClient(&aws.Config{Credentials: creds})
-	r := svc.NewRequest(
-		&request.Operation{
-			Name:       "BatchGetItem",
-			HTTPMethod: "POST",
-			HTTPPath:   "/",
-		},
-		nil,
-		nil,
-	)
-
-	SignSDKRequest(r)
-	querySig := r.HTTPRequest.Header.Get("Authorization")
-	origSignedAt := r.LastSignedAt
-
-	signSDKRequestWithCurrTime(r, func() time.Time {
-		// 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)
-}
-
-func BenchmarkPresignRequest(b *testing.B) {
-	signer := buildSigner()
-	req, body := buildRequest("dynamodb", "us-east-1", "{}")
-	for i := 0; i < b.N; i++ {
-		signer.Presign(req, body, "dynamodb", "us-east-1", 300*time.Second, time.Now())
-	}
-}
-
-func BenchmarkSignRequest(b *testing.B) {
-	signer := buildSigner()
-	req, body := buildRequest("dynamodb", "us-east-1", "{}")
-	for i := 0; i < b.N; i++ {
-		signer.Sign(req, body, "dynamodb", "us-east-1", time.Now())
-	}
-}
-
-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   `,
-	}
-
-	b.ResetTimer()
-	for i := 0; i < b.N; i++ {
-		stripExcessSpaces(vals)
-	}
-}

+ 0 - 75
Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/types_test.go

@@ -1,75 +0,0 @@
-package aws
-
-import (
-	"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)
-
-	n, err = b.WriteAt([]byte{1, 1, 1}, 5)
-	assert.NoError(t, err)
-	assert.Equal(t, 3, n)
-
-	n, err = b.WriteAt([]byte{2}, 1)
-	assert.NoError(t, err)
-	assert.Equal(t, 1, n)
-
-	n, err = b.WriteAt([]byte{3}, 2)
-	assert.NoError(t, err)
-	assert.Equal(t, 1, n)
-
-	assert.Equal(t, []byte{1, 2, 3, 0, 0, 1, 1, 1}, b.Bytes())
-}
-
-func BenchmarkWriteAtBuffer(b *testing.B) {
-	buf := &WriteAtBuffer{}
-	r := rand.New(rand.NewSource(1))
-
-	b.ResetTimer()
-	for i := 0; i < b.N; i++ {
-		to := r.Intn(10) * 4096
-		bs := make([]byte, to)
-		buf.WriteAt(bs, r.Int63n(10)*4096)
-	}
-}
-
-func BenchmarkWriteAtBufferOrderedWrites(b *testing.B) {
-	// test the performance of a WriteAtBuffer when written in an
-	// ordered fashion. This is similar to the behavior of the
-	// s3.Downloader, since downloads the first chunk of the file, then
-	// the second, and so on.
-	//
-	// This test simulates a 150MB file being written in 30 ordered 5MB chunks.
-	chunk := int64(5e6)
-	max := chunk * 30
-	// we'll write the same 5MB chunk every time
-	tmp := make([]byte, chunk)
-	for i := 0; i < b.N; i++ {
-		buf := &WriteAtBuffer{}
-		for i := int64(0); i < max; i += chunk {
-			buf.WriteAt(tmp, i)
-		}
-	}
-}
-
-func BenchmarkWriteAtBufferParallel(b *testing.B) {
-	buf := &WriteAtBuffer{}
-	r := rand.New(rand.NewSource(1))
-
-	b.ResetTimer()
-	b.RunParallel(func(pb *testing.PB) {
-		for pb.Next() {
-			to := r.Intn(10) * 4096
-			bs := make([]byte, to)
-			buf.WriteAt(bs, r.Int63n(10)*4096)
-		}
-	})
-}

+ 0 - 8
Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/version.go

@@ -1,8 +0,0 @@
-// Package aws provides core functionality for making requests to AWS services.
-package aws
-
-// SDKName is the name of this AWS SDK
-const SDKName = "aws-sdk-go"
-
-// SDKVersion is the version of this SDK
-const SDKVersion = "1.4.1"

+ 0 - 19
Godeps/_workspace/src/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/Godeps/Godeps.json

@@ -1,19 +0,0 @@
-{
-	"ImportPath": "github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer",
-	"GoVersion": "go1.6",
-	"GodepVersion": "v60",
-	"Deps": [
-		{
-			"ImportPath": "golang.org/x/tools/go/ast/astutil",
-			"Rev": "b75b3f5cd5d50fbb1fb88ce784d2e7cca17bba8a"
-		},
-		{
-			"ImportPath": "golang.org/x/tools/go/buildutil",
-			"Rev": "b75b3f5cd5d50fbb1fb88ce784d2e7cca17bba8a"
-		},
-		{
-			"ImportPath": "golang.org/x/tools/go/loader",
-			"Rev": "b75b3f5cd5d50fbb1fb88ce784d2e7cca17bba8a"
-		}
-	]
-}

+ 0 - 5
Godeps/_workspace/src/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/Godeps/Readme

@@ -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.

+ 0 - 200
Godeps/_workspace/src/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/gen/gen.go

@@ -1,200 +0,0 @@
-// +build go1.5
-
-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)
-	}
-}

+ 0 - 116
Godeps/_workspace/src/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/rename/rename.go

@@ -1,116 +0,0 @@
-// +build go1.5
-
-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
-					}
-				}
-			}
-		}
-	}
-}

+ 0 - 2120
Godeps/_workspace/src/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/rename/renames.go

@@ -1,2120 +0,0 @@
-// +build go1.5
-
-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{},
-	},
-}

+ 0 - 45
Godeps/_workspace/src/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/renamer.go

@@ -1,45 +0,0 @@
-// +build go1.5
-
-package main
-
-//go:generate go run 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()
-}

+ 0 - 624
Godeps/_workspace/src/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/ast/astutil/enclosing.go

@@ -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))
-}

+ 0 - 400
Godeps/_workspace/src/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/ast/astutil/imports.go

@@ -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 "<nil>":
-		// 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
-}

+ 0 - 14
Godeps/_workspace/src/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/ast/astutil/util.go

@@ -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
-	}
-}

+ 0 - 195
Godeps/_workspace/src/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/buildutil/allpackages.go

@@ -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
-}

+ 0 - 108
Godeps/_workspace/src/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/buildutil/fakecontext.go

@@ -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 }

+ 0 - 75
Godeps/_workspace/src/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/buildutil/tags.go

@@ -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 "<tagsFlag>"
-}
-
-func isSpaceByte(c byte) bool {
-	return c == ' ' || c == '\t' || c == '\n' || c == '\r'
-}

+ 0 - 167
Godeps/_workspace/src/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/buildutil/util.go

@@ -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)
-}

+ 0 - 209
Godeps/_workspace/src/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/loader/cgo.go

@@ -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
-}

+ 0 - 39
Godeps/_workspace/src/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/loader/cgo_pkgconfig.go

@@ -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)
-}

+ 0 - 205
Godeps/_workspace/src/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/loader/doc.go

@@ -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.

+ 0 - 13
Godeps/_workspace/src/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/loader/go16.go

@@ -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
-}

+ 0 - 1059
Godeps/_workspace/src/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/loader/loader.go

@@ -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 = `
-<args> 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) }

+ 0 - 124
Godeps/_workspace/src/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/loader/util.go

@@ -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()
-}

+ 0 - 163
Godeps/_workspace/src/github.com/aws/aws-sdk-go/awstesting/assert.go

@@ -1,163 +0,0 @@
-package awstesting
-
-import (
-	"encoding/json"
-	"encoding/xml"
-	"fmt"
-	"net/url"
-	"reflect"
-	"regexp"
-	"sort"
-	"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...)
-}
-
-// 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(expect)
-	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
-	}
-
-	for k, expectQVals := range expectQ {
-		sort.Strings(expectQVals)
-		actualQVals := actualQ[k]
-		sort.Strings(actualQVals)
-		equal(t, expectQVals, actualQVals, msgAndArgs...)
-	}
-
-	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
-}

+ 0 - 64
Godeps/_workspace/src/github.com/aws/aws-sdk-go/awstesting/assert_test.go

@@ -1,64 +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:       `<OperationRequest xmlns="https://foo/"><RecursiveStruct xmlns="https://foo/"><RecursiveMap xmlns="https://foo/"><entry xmlns="https://foo/"><key xmlns="https://foo/">foo</key><value xmlns="https://foo/"><NoRecurse xmlns="https://foo/">foo</NoRecurse></value></entry><entry xmlns="https://foo/"><key xmlns="https://foo/">bar</key><value xmlns="https://foo/"><NoRecurse xmlns="https://foo/">bar</NoRecurse></value></entry></RecursiveMap></RecursiveStruct></OperationRequest>`,
-			a:       `<OperationRequest xmlns="https://foo/"><RecursiveStruct xmlns="https://foo/"><RecursiveMap xmlns="https://foo/"><entry xmlns="https://foo/"><key xmlns="https://foo/">bar</key><value xmlns="https://foo/"><NoRecurse xmlns="https://foo/">bar</NoRecurse></value></entry><entry xmlns="https://foo/"><key xmlns="https://foo/">foo</key><value xmlns="https://foo/"><NoRecurse xmlns="https://foo/">foo</NoRecurse></value></entry></RecursiveMap></RecursiveStruct></OperationRequest>`,
-			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)
-		}
-	}
-}

+ 0 - 20
Godeps/_workspace/src/github.com/aws/aws-sdk-go/awstesting/client.go

@@ -1,20 +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...)
-
-	return client.New(*def.Config, info, def.Handlers)
-}

+ 0 - 124
Godeps/_workspace/src/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/integration_test.go

@@ -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))
-}

+ 0 - 29
Godeps/_workspace/src/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/s3crypto/client.go

@@ -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"),
-		}).WithLogLevel(aws.LogDebugWithRequestRetries | aws.LogDebugWithRequestErrors))
-		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)
-	})
-}

+ 0 - 18
Godeps/_workspace/src/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/s3crypto/s3_crypto.feature

@@ -1,18 +0,0 @@
-# language: en
-@s3crypto @client
-Feature: S3 Integration Crypto Tests
-
-  Scenario: Get all plaintext fixtures for symmetric masterkey aes cbc 
-    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: 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: 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

+ 0 - 192
Godeps/_workspace/src/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/s3crypto/stepdef.go

@@ -1,192 +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"] != "kms" {
-				continue
-			}
-			//masterkeyB64 := ctObj.Metadata["Masterkey"]
-			//masterkey, err := base64.StdEncoding.DecodeString(*masterkeyB64)
-			//assert.NoError(T, err)
-
-			//s3CryptoClient.Config.MasterKey = masterkey
-			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["ciphertexts"] = ciphertexts
-	})
-
-	gucumber.And(`^I compare the decrypted ciphertext to the plaintext$`, func() {
-		plaintexts := gucumber.World["plaintexts"].(map[string][]byte)
-		ciphertexts := gucumber.World["ciphertexts"].(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)
-		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: &region,
-	}))
-
-	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")
-}

+ 0 - 163
Godeps/_workspace/src/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/s3manager/integration_test.go

@@ -1,163 +0,0 @@
-// +build integration
-
-// Package s3manager provides
-package s3manager
-
-import (
-	"bytes"
-	"crypto/md5"
-	"fmt"
-	"io"
-	"os"
-	"testing"
-	"time"
-
-	"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/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) {
-	setup()
-	defer teardown() // only called if we panic
-	result := m.Run()
-	teardown()
-	os.Exit(result)
-}
-
-func setup() {
-	// Create a bucket for testing
-	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() {
-	svc := s3.New(integration.Session)
-
-	objs, _ := svc.ListObjects(&s3.ListObjectsInput{Bucket: bucketName})
-	for _, o := range objs.Contents {
-		svc.DeleteObject(&s3.DeleteObjectInput{Bucket: bucketName, Key: o.Key})
-	}
-
-	uploads, _ := svc.ListMultipartUploads(&s3.ListMultipartUploadsInput{Bucket: bucketName})
-	for _, u := range uploads.Uploads {
-		svc.AbortMultipartUpload(&s3.AbortMultipartUploadInput{
-			Bucket:   bucketName,
-			Key:      u.Key,
-			UploadId: u.UploadId,
-		})
-	}
-
-	svc.DeleteBucket(&s3.DeleteBucketInput{Bucket: bucketName})
-}
-
-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)
-	assert.NoError(t, err)
-	assert.Equal(t, md5value, fmt.Sprintf("%x", md5.Sum(w.buf[0:n])))
-}
-
-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),
-	})
-
-	assert.NoError(t, err)
-	assert.NotEqual(t, "", out.UploadID)
-	assert.Regexp(t, `^https?://.+/`+key+`$`, out.Location)
-
-	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),
-	})
-	assert.Error(t, err)
-	assert.NotContains(t, err.Error(), "MissingRegion")
-	uploadID := ""
-	if merr, ok := err.(s3manager.MultiUploadFailure); ok {
-		uploadID = merr.UploadID()
-	}
-	assert.NotEmpty(t, uploadID)
-
-	_, err = svc.ListParts(&s3.ListPartsInput{
-		Bucket: bucketName, Key: &key, UploadId: &uploadID})
-	assert.Error(t, err)
-}

+ 0 - 1
Godeps/_workspace/src/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/s3manager/stub.go

@@ -1 +0,0 @@
-package s3manager

+ 0 - 1
Godeps/_workspace/src/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/stub.go

@@ -1 +0,0 @@
-package s3

+ 0 - 44
Godeps/_workspace/src/github.com/aws/aws-sdk-go/awstesting/integration/integration.go

@@ -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)
-}

+ 0 - 14
Godeps/_workspace/src/github.com/aws/aws-sdk-go/awstesting/integration/smoke/acm/acm.feature

@@ -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
-

+ 0 - 16
Godeps/_workspace/src/github.com/aws/aws-sdk-go/awstesting/integration/smoke/acm/client.go

@@ -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)
-	})
-}

+ 0 - 16
Godeps/_workspace/src/github.com/aws/aws-sdk-go/awstesting/integration/smoke/apigateway/apigateway.feature

@@ -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
-    """

Some files were not shown because too many files changed in this diff