From 0e6ee35942c86bdc4dc032958eb5395fa7a75b3b Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Thu, 5 Apr 2018 17:46:45 +0300 Subject: [PATCH] Update vendored deps, including AWS SDK, openpgp, ftp, ... --- Gopkg.lock | 24 +- s3/server_test.go | 3 +- vendor/github.com/aws/aws-sdk-go/.travis.yml | 15 +- vendor/github.com/aws/aws-sdk-go/CHANGELOG.md | 1199 + .../aws/aws-sdk-go/CODE_OF_CONDUCT.md | 4 + .../github.com/aws/aws-sdk-go/CONTRIBUTING.md | 2 +- vendor/github.com/aws/aws-sdk-go/README.md | 6 +- .../aws/aws-sdk-go/aws/awsutil/copy_test.go | 178 +- .../aws/aws-sdk-go/aws/awsutil/equal_test.go | 5 +- .../aws-sdk-go/aws/awsutil/path_value_test.go | 82 +- .../aws/aws-sdk-go/aws/client/client.go | 6 + .../aws-sdk-go/aws/client/default_retryer.go | 76 +- .../aws/client/default_retryer_test.go | 189 + .../aws/aws-sdk-go/aws/client/logger.go | 4 + .../aws/aws-sdk-go/aws/client/logger_test.go | 87 + .../github.com/aws/aws-sdk-go/aws/config.go | 24 +- .../aws/aws-sdk-go/aws/convert_types_test.go | 347 +- .../aws-sdk-go/aws/corehandlers/handlers.go | 28 +- .../aws/corehandlers/handlers_test.go | 91 +- .../aws/corehandlers/param_validator_test.go | 72 +- .../aws-sdk-go/aws/corehandlers/user_agent.go | 37 + .../aws/corehandlers/user_agent_test.go | 40 + .../aws/aws-sdk-go/aws/defaults/defaults.go | 35 +- .../aws-sdk-go/aws/defaults/defaults_test.go | 32 +- .../aws-sdk-go/aws/ec2metadata/api_test.go | 117 +- .../aws/aws-sdk-go/aws/ec2metadata/service.go | 24 + .../aws/ec2metadata/service_test.go | 62 +- .../aws/aws-sdk-go/aws/endpoints/defaults.go | 703 +- .../aws/aws-sdk-go/aws/endpoints/endpoints.go | 4 + .../aws/aws-sdk-go/aws/endpoints/v3model.go | 12 +- .../aws-sdk-go/aws/endpoints/v3model_test.go | 343 +- .../aws-sdk-go/aws/request/offset_reader.go | 4 +- .../aws/request/offset_reader_test.go | 7 +- .../aws/aws-sdk-go/aws/request/request.go | 193 +- .../aws/request/request_pagination.go | 25 +- .../aws/request/request_pagination_test.go | 139 +- .../aws/request/request_resetbody_test.go | 71 +- .../aws-sdk-go/aws/request/request_test.go | 283 +- .../aws/aws-sdk-go/aws/session/env_config.go | 8 + .../aws-sdk-go/aws/session/env_config_test.go | 47 +- .../aws/aws-sdk-go/aws/session/session.go | 38 +- .../aws-sdk-go/aws/session/session_test.go | 28 +- .../aws/signer/v4/functional_1_5_test.go | 41 +- .../aws/signer/v4/functional_test.go | 88 + .../aws/signer/v4/header_rules_test.go | 46 +- .../aws/aws-sdk-go/aws/signer/v4/v4.go | 39 +- .../aws/aws-sdk-go/aws/signer/v4/v4_test.go | 97 +- vendor/github.com/aws/aws-sdk-go/aws/types.go | 83 + .../aws/aws-sdk-go/aws/types_test.go | 39 +- .../github.com/aws/aws-sdk-go/aws/version.go | 2 +- .../aws/aws-sdk-go/awstesting/assert.go | 16 + .../customizations/s3/integration_test.go | 92 +- .../customizations/s3/object_checksum_test.go | 102 + .../customizations/s3/s3crypto/stepdef.go | 45 +- .../s3/s3manager/integration_test.go | 3 +- .../customizations/s3/shared_test.go | 67 + .../autoscalingplans/autoscalingplans.feature | 7 + .../smoke/autoscalingplans/client.go | 16 + .../integration/smoke/cloudhsmv2/client.go | 16 + .../smoke/cloudhsmv2/cloudhsmv2.feature | 7 + .../integration/smoke/mediastore/client.go | 16 + .../smoke/mediastore/mediastore.feature | 7 + .../smoke/mediastoredata/client.go | 34 + .../mediastoredata/mediastoredata.feature | 7 + .../integration/smoke/mobile/client.go | 16 + .../integration/smoke/mobile/mobile.feature | 7 + .../smoke/sagemakerruntime/client.go | 16 + .../sagemakerruntime/sagemakerruntime.feature | 10 + .../awstesting/integration/smoke/shared.go | 86 +- .../aws-sdk-go/awstesting/performance/init.go | 9 +- .../aws/aws-sdk-go/awstesting/util_test.go | 58 +- .../github.com/aws/aws-sdk-go/buildspec.yml | 21 + .../doc-src/aws-godoc/templates/godoc.html | 2 +- vendor/github.com/aws/aws-sdk-go/doc.go | 2 +- .../customEndpoint/customEndpoint.go | 2 +- .../aws/request/customRetryer/README.md | 11 + .../request/customRetryer/custom_retryer.go | 75 + .../example/aws/request/withContext/README.md | 2 +- .../service/ec2/instancesbyRegion/README.md | 4 +- .../instancesbyRegion/instancesByRegion.go | 4 +- .../example/service/s3/sync/README.md | 26 + .../example/service/s3/sync/sync.go | 112 + .../aws/aws-sdk-go/internal/sdkio/io_go1.6.go | 10 + .../aws/aws-sdk-go/internal/sdkio/io_go1.7.go | 12 + .../internal/sdkrand/locked_source.go | 29 + .../2017-05-31/api-2.json | 3 +- .../2017-05-31/docs-2.json | 16 +- .../2017-05-31}/examples-1.json | 0 .../2017-05-31/paginators-1.json | 0 .../models/apis/acm-pca/2017-08-22/api-2.json | 905 + .../apis/acm-pca/2017-08-22/docs-2.json | 575 + .../2017-08-22}/examples-1.json | 0 .../apis/acm-pca/2017-08-22/paginators-1.json | 4 + .../models/apis/acm/2015-12-08/api-2.json | 227 +- .../models/apis/acm/2015-12-08/docs-2.json | 242 +- .../models/apis/acm/2015-12-08/smoke.json | 18 + .../alexaforbusiness/2017-11-09/api-2.json | 1860 ++ .../alexaforbusiness/2017-11-09/docs-2.json | 1288 + .../2017-11-09}/examples-1.json | 0 .../2017-11-09/paginators-1.json | 49 + .../apis/apigateway/2015-07-09/api-2.json | 396 +- .../apis/apigateway/2015-07-09/docs-2.json | 721 +- .../apigateway/2015-07-09/paginators-1.json | 6 + .../apis/apigateway/2015-07-09/smoke.json | 20 + .../2016-02-06/api-2.json | 167 +- .../2016-02-06/docs-2.json | 176 +- .../2016-02-06/smoke.json | 13 + .../apis/appstream/2016-12-01/api-2.json | 491 +- .../apis/appstream/2016-12-01/docs-2.json | 655 +- .../models/apis/appsync/2017-07-25/api-2.json | 1417 + .../apis/appsync/2017-07-25/docs-2.json | 677 + .../apis/appsync/2017-07-25/examples-1.json | 5 + .../apis/appsync/2017-07-25/paginators-1.json | 4 + .../autoscaling-plans/2018-01-06/api-2.json | 465 + .../autoscaling-plans/2018-01-06/docs-2.json | 371 + .../2018-01-06/examples-1.json | 5 + .../2018-01-06/paginators-1.json | 4 + .../apis/autoscaling/2011-01-01/api-2.json | 74 +- .../apis/autoscaling/2011-01-01/docs-2.json | 145 +- .../models/apis/batch/2016-08-10/api-2.json | 75 +- .../models/apis/batch/2016-08-10/docs-2.json | 121 +- .../models/apis/batch/2016-08-10/smoke.json | 11 + .../models/apis/budgets/2016-10-20/api-2.json | 37 +- .../apis/budgets/2016-10-20/docs-2.json | 333 +- .../models/apis/ce/2017-10-25/api-2.json | 661 + .../models/apis/ce/2017-10-25/docs-2.json | 651 + .../models/apis/ce/2017-10-25/examples-1.json | 5 + .../apis/ce/2017-10-25/paginators-1.json | 4 + .../models/apis/check_collisions_test.go | 35 + .../models/apis/cloud9/2017-09-23/api-2.json | 528 + .../models/apis/cloud9/2017-09-23/docs-2.json | 317 + .../apis/cloud9/2017-09-23/examples-1.json | 308 + .../apis/cloud9/2017-09-23/paginators-1.json | 14 + .../apis/clouddirectory/2016-05-10/api-2.json | 220 +- .../clouddirectory/2016-05-10/docs-2.json | 131 +- .../apis/cloudformation/2010-05-15/api-2.json | 62 +- .../cloudformation/2010-05-15/docs-2.json | 49 +- .../apis/cloudfront/2017-03-25/api-2.json | 39 +- .../apis/cloudfront/2017-03-25/docs-2.json | 87 +- .../apis/cloudfront/2017-10-30/api-2.json | 3940 +++ .../apis/cloudfront/2017-10-30/docs-2.json | 2058 ++ .../cloudfront/2017-10-30/examples-1.json | 5 + .../cloudfront/2017-10-30/paginators-1.json | 32 + .../apis/cloudfront/2017-10-30/smoke.json | 20 + .../apis/cloudfront/2017-10-30/waiters-2.json | 47 + .../apis/cloudhsm/2014-05-30/api-2.json | 1 + .../apis/cloudhsm/2014-05-30/docs-2.json | 76 +- .../cloudhsm/2014-05-30/paginators-1.json | 4 + .../apis/cloudhsmv2/2017-04-28/api-2.json | 8 +- .../apis/cloudhsmv2/2017-04-28/docs-2.json | 4 +- .../apis/cloudhsmv2/2017-04-28/smoke.json | 18 + .../apis/codebuild/2016-10-06/api-2.json | 215 +- .../apis/codebuild/2016-10-06/docs-2.json | 165 +- .../apis/codecommit/2015-04-13/api-2.json | 1640 +- .../apis/codecommit/2015-04-13/docs-2.json | 921 +- .../codecommit/2015-04-13/paginators-1.json | 20 + .../apis/codecommit/2015-04-13/smoke.json | 18 + .../apis/codedeploy/2014-10-06/api-2.json | 273 +- .../apis/codedeploy/2014-10-06/docs-2.json | 183 +- .../apis/cognito-idp/2016-04-18/api-2.json | 900 +- .../apis/cognito-idp/2016-04-18/docs-2.json | 660 +- .../apis/comprehend/2017-11-27/api-2.json | 685 + .../apis/comprehend/2017-11-27/docs-2.json | 472 + .../comprehend/2017-11-27/examples-1.json | 5 + .../comprehend/2017-11-27/paginators-1.json | 9 + .../models/apis/config/2014-11-12/api-2.json | 673 +- .../models/apis/config/2014-11-12/docs-2.json | 590 +- .../models/apis/config/2014-11-12/smoke.json | 19 + .../models/apis/connect/2017-08-08/api-2.json | 191 + .../apis/connect/2017-08-08/docs-2.json | 140 + .../apis/connect/2017-08-08/examples-1.json | 5 + .../apis/connect/2017-08-08/paginators-1.json | 4 + .../apis/devicefarm/2015-06-23/api-2.json | 341 +- .../apis/devicefarm/2015-06-23/docs-2.json | 230 +- .../apis/devicefarm/2015-06-23/smoke.json | 18 + .../apis/directconnect/2012-10-25/api-2.json | 298 +- .../apis/directconnect/2012-10-25/docs-2.json | 223 +- .../apis/discovery/2015-11-01/api-2.json | 16 +- .../apis/discovery/2015-11-01/docs-2.json | 6 +- .../models/apis/dms/2016-01-01/api-2.json | 255 +- .../models/apis/dms/2016-01-01/docs-2.json | 124 +- .../apis/dms/2016-01-01/paginators-1.json | 10 + .../models/apis/dms/2016-01-01/smoke.json | 18 + .../models/apis/ds/2015-04-16/api-2.json | 18 +- .../models/apis/ds/2015-04-16/docs-2.json | 9 +- .../models/apis/ds/2015-04-16/smoke.json | 20 + .../apis/dynamodb/2011-12-05/api-2.json | 1 + .../apis/dynamodb/2012-08-10/api-2.json | 744 +- .../apis/dynamodb/2012-08-10/docs-2.json | 575 +- .../models/apis/ec2/2016-11-15/api-2.json | 2510 +- .../models/apis/ec2/2016-11-15/docs-2.json | 1940 +- .../models/apis/ec2/2016-11-15/smoke.json | 20 + .../models/apis/ec2/2016-11-15/waiters-2.json | 6 + .../models/apis/ecr/2015-09-21/api-2.json | 260 +- .../models/apis/ecr/2015-09-21/docs-2.json | 219 +- .../apis/ecr/2015-09-21/paginators-1.json | 18 +- .../models/apis/ecs/2014-11-13/api-2.json | 354 +- .../models/apis/ecs/2014-11-13/docs-2.json | 550 +- .../apis/elasticache/2015-02-02/api-2.json | 93 +- .../apis/elasticache/2015-02-02/docs-2.json | 368 +- .../elasticache/2015-02-02/examples-1.json | 110 +- .../elasticbeanstalk/2010-12-01/api-2.json | 134 + .../elasticbeanstalk/2010-12-01/docs-2.json | 90 +- .../elasticbeanstalk/2010-12-01/smoke.json | 18 + .../2012-06-01/api-2.json | 14 +- .../2012-06-01/docs-2.json | 7 +- .../2015-12-01/api-2.json | 108 +- .../2015-12-01/docs-2.json | 91 +- .../2015-12-01/smoke.json | 20 + .../elasticmapreduce/2009-03-31/api-2.json | 20 +- .../elasticmapreduce/2009-03-31/docs-2.json | 48 +- .../models/apis/email/2010-12-01/api-2.json | 766 +- .../models/apis/email/2010-12-01/docs-2.json | 604 +- .../apis/email/2010-12-01/examples-1.json | 66 + .../apis/email/2010-12-01/paginators-1.json | 5 + .../models/apis/es/2015-01-01/api-2.json | 164 +- .../models/apis/es/2015-01-01/docs-2.json | 136 +- .../models/apis/es/2015-01-01/smoke.json | 18 + .../models/apis/events/2015-10-07/api-2.json | 42 +- .../models/apis/events/2015-10-07/docs-2.json | 42 +- .../models/apis/events/2015-10-07/smoke.json | 18 + .../apis/firehose/2015-08-04/api-2.json | 145 +- .../apis/firehose/2015-08-04/docs-2.json | 115 +- .../models/apis/fms/2018-01-01/api-2.json | 544 + .../models/apis/fms/2018-01-01/docs-2.json | 371 + .../apis/fms/2018-01-01/examples-1.json | 5 + .../apis/fms/2018-01-01/paginators-1.json | 4 + .../apis/gamelift/2015-10-01/api-2.json | 90 +- .../apis/gamelift/2015-10-01/docs-2.json | 140 +- .../models/apis/glacier/2012-06-01/api-2.json | 177 +- .../apis/glacier/2012-06-01/docs-2.json | 197 +- .../{AWS Glue => glue}/2017-03-31/api-2.json | 361 +- .../{AWS Glue => glue}/2017-03-31/docs-2.json | 591 +- .../apis/glue/2017-03-31/examples-1.json | 5 + .../2017-03-31/paginators-1.json | 0 .../apis/greengrass/2017-06-07/api-2.json | 866 +- .../apis/greengrass/2017-06-07/docs-2.json | 666 +- .../apis/guardduty/2017-11-28/api-2.json | 2683 ++ .../apis/guardduty/2017-11-28/docs-2.json | 961 + .../guardduty/2017-11-28/paginators-1.json | 40 + .../models/apis/iam/2010-05-08/api-2.json | 43 +- .../models/apis/iam/2010-05-08/docs-2.json | 565 +- .../models/apis/iam/2010-05-08/smoke.json | 18 + .../apis/inspector/2016-02-16/api-2.json | 30 +- .../apis/inspector/2016-02-16/docs-2.json | 36 +- .../apis/inspector/2016-02-16/examples-1.json | 1 + .../apis/iot-jobs-data/2017-09-29/api-2.json | 339 + .../apis/iot-jobs-data/2017-09-29/docs-2.json | 242 + .../iot-jobs-data/2017-09-29/examples-1.json | 5 + .../2017-09-29/paginators-1.json | 4 + .../models/apis/iot/2015-05-28/api-2.json | 3791 ++- .../models/apis/iot/2015-05-28/docs-2.json | 3001 +- .../2017-09-30/api-2.json | 200 + .../2017-09-30/docs-2.json | 150 + .../2017-09-30/examples-1.json | 5 + .../2017-09-30/paginators-1.json | 4 + .../kinesis-video-media/2017-09-30/api-2.json | 160 + .../2017-09-30/docs-2.json | 114 + .../2017-09-30/examples-1.json | 5 + .../2017-09-30/paginators-1.json | 4 + .../models/apis/kinesis/2013-12-02/api-2.json | 114 +- .../apis/kinesis/2013-12-02/docs-2.json | 190 +- .../models/apis/kinesis/2013-12-02/smoke.json | 18 + .../kinesisanalytics/2015-08-14/api-2.json | 197 +- .../kinesisanalytics/2015-08-14/docs-2.json | 194 +- .../apis/kinesisvideo/2017-09-30/api-2.json | 548 + .../apis/kinesisvideo/2017-09-30/docs-2.json | 360 + .../kinesisvideo/2017-09-30/examples-1.json | 5 + .../kinesisvideo/2017-09-30/paginators-1.json | 4 + .../models/apis/kms/2014-11-01/api-2.json | 7 +- .../models/apis/kms/2014-11-01/docs-2.json | 174 +- .../apis/kms/2014-11-01/examples-1.json | 8 +- .../models/apis/kms/2014-11-01/smoke.json | 19 + .../models/apis/lambda/2015-03-31/api-2.json | 179 +- .../models/apis/lambda/2015-03-31/docs-2.json | 148 +- .../models/apis/lambda/2015-03-31/smoke.json | 18 + .../apis/lex-models/2017-04-19/api-2.json | 185 +- .../apis/lex-models/2017-04-19/docs-2.json | 101 +- .../apis/lightsail/2016-11-28/api-2.json | 1212 +- .../apis/lightsail/2016-11-28/docs-2.json | 709 +- .../apis/mediaconvert/2017-08-29/api-2.json | 6175 ++++ .../apis/mediaconvert/2017-08-29/docs-2.json | 2571 ++ .../apis/medialive/2017-10-14/api-2.json | 5961 ++++ .../apis/medialive/2017-10-14/docs-2.json | 2432 ++ .../medialive/2017-10-14/paginators-1.json | 22 + .../apis/mediapackage/2017-10-12/api-2.json | 1485 + .../apis/mediapackage/2017-10-12/docs-2.json | 248 + .../mediapackage/2017-10-12/paginators-1.json | 16 + .../mediastore-data/2017-09-01/api-2.json | 392 + .../mediastore-data/2017-09-01/docs-2.json | 224 + .../2017-09-01/examples-1.json | 5 + .../2017-09-01/paginators-1.json | 4 + .../apis/mediastore/2017-09-01/api-2.json | 466 + .../apis/mediastore/2017-09-01/docs-2.json | 294 + .../mediastore/2017-09-01/examples-1.json | 5 + .../mediastore/2017-09-01/paginators-1.json | 4 + .../2017-07-01/api-2.json | 0 .../2017-07-01/docs-2.json | 0 .../apis/mobile/2017-07-01/examples-1.json | 5 + .../2017-07-01/paginators-1.json | 0 .../apis/monitoring/2010-08-01/api-2.json | 146 +- .../apis/monitoring/2010-08-01/docs-2.json | 166 +- .../models/apis/mq/2017-11-27/api-2.json | 1865 ++ .../models/apis/mq/2017-11-27/docs-2.json | 394 + .../mturk-requester/2017-01-17/api-2.json | 67 +- .../mturk-requester/2017-01-17/docs-2.json | 48 +- .../mturk-requester/2017-01-17/smoke.json | 11 + .../apis/opsworks/2013-02-18/api-2.json | 52 +- .../apis/opsworks/2013-02-18/docs-2.json | 68 +- .../apis/opsworks/2013-02-18/smoke.json | 18 + .../apis/opsworks/2013-02-18/waiters-2.json | 8 +- .../apis/opsworkscm/2016-11-01/api-2.json | 7 +- .../apis/opsworkscm/2016-11-01/docs-2.json | 64 +- .../apis/opsworkscm/2016-11-01/waiters-2.json | 25 + .../apis/organizations/2016-11-28/api-2.json | 130 +- .../apis/organizations/2016-11-28/docs-2.json | 111 +- .../2016-11-28/paginators-1.json | 5 + .../apis/pinpoint/2016-12-01/api-2.json | 968 +- .../apis/pinpoint/2016-12-01/docs-2.json | 719 +- .../models/apis/polly/2016-06-10/api-2.json | 8 +- .../models/apis/pricing/2017-10-15/api-2.json | 227 + .../apis/pricing/2017-10-15/docs-2.json | 168 + .../apis/pricing/2017-10-15/examples-1.json | 103 + .../apis/pricing/2017-10-15/paginators-1.json | 19 + .../models/apis/rds/2013-01-10/api-2.json | 1 + .../models/apis/rds/2013-01-10/smoke.json | 18 + .../models/apis/rds/2013-02-12/api-2.json | 1 + .../models/apis/rds/2013-02-12/smoke.json | 18 + .../models/apis/rds/2013-09-09/api-2.json | 1 + .../models/apis/rds/2013-09-09/smoke.json | 18 + .../models/apis/rds/2014-09-01/api-2.json | 1 + .../models/apis/rds/2014-09-01/smoke.json | 18 + .../models/apis/rds/2014-10-31/api-2.json | 225 +- .../models/apis/rds/2014-10-31/docs-2.json | 752 +- .../models/apis/rds/2014-10-31/smoke.json | 18 + .../models/apis/rds/2014-10-31/waiters-2.json | 85 + .../apis/redshift/2012-12-01/api-2.json | 42 +- .../apis/redshift/2012-12-01/docs-2.json | 55 +- .../apis/redshift/2012-12-01/smoke.json | 18 + .../apis/rekognition/2016-06-27/api-2.json | 1104 +- .../apis/rekognition/2016-06-27/docs-2.json | 756 +- .../rekognition/2016-06-27/paginators-1.json | 35 + .../resource-groups/2017-11-27/api-2.json | 628 + .../resource-groups/2017-11-27/docs-2.json | 340 + .../2017-11-27/examples-1.json | 5 + .../2017-11-27/paginators-1.json | 19 + .../models/apis/route53/2013-04-01/api-2.json | 244 +- .../apis/route53/2013-04-01/docs-2.json | 152 +- .../models/apis/route53/2013-04-01/smoke.json | 18 + .../apis/route53domains/2014-05-15/api-2.json | 68 +- .../route53domains/2014-05-15/docs-2.json | 41 +- .../apis/runtime.lex/2016-11-28/api-2.json | 16 + .../apis/runtime.lex/2016-11-28/docs-2.json | 11 +- .../runtime.sagemaker/2017-05-13/api-2.json | 134 + .../runtime.sagemaker/2017-05-13/docs-2.json | 83 + .../2017-05-13/examples-1.json | 5 + .../2017-05-13/paginators-1.json | 4 + .../models/apis/s3/2006-03-01/api-2.json | 519 +- .../models/apis/s3/2006-03-01/docs-2.json | 430 +- .../models/apis/s3/2006-03-01/examples-1.json | 2 +- .../models/apis/s3/2006-03-01/smoke.json | 11 + .../apis/sagemaker/2017-07-24/api-2.json | 1778 ++ .../apis/sagemaker/2017-07-24/docs-2.json | 1210 + .../apis/sagemaker/2017-07-24/examples-1.json | 5 + .../sagemaker/2017-07-24/paginators-1.json | 39 + .../apis/sagemaker/2017-07-24/waiters-2.json | 133 + .../apis/secretsmanager/2017-10-17/api-2.json | 863 + .../secretsmanager/2017-10-17/docs-2.json | 582 + .../secretsmanager/2017-10-17/examples-1.json | 5 + .../2017-10-17/paginators-1.json | 14 + .../apis/serverlessrepo/2017-09-08/api-2.json | 1315 + .../serverlessrepo/2017-09-08/docs-2.json | 253 + .../2017-09-08/paginators-1.json | 14 + .../apis/servicecatalog/2015-12-10/api-2.json | 453 +- .../servicecatalog/2015-12-10/docs-2.json | 1076 +- .../2015-12-10/paginators-1.json | 5 + .../servicediscovery/2017-03-14/api-2.json | 1047 + .../servicediscovery/2017-03-14/docs-2.json | 742 + .../2017-03-14/examples-1.json | 5 + .../2017-03-14/paginators-1.json | 29 + .../models/apis/shield/2016-06-02/api-2.json | 87 +- .../models/apis/shield/2016-06-02/docs-2.json | 97 +- .../apis/shield/2016-06-02/paginators-1.json | 4 + .../models/apis/sms/2016-10-24/docs-2.json | 2 +- .../apis/snowball/2016-06-30/docs-2.json | 6 +- .../models/apis/sqs/2012-11-05/api-2.json | 89 + .../models/apis/sqs/2012-11-05/docs-2.json | 104 +- .../models/apis/ssm/2014-11-06/api-2.json | 533 +- .../models/apis/ssm/2014-11-06/docs-2.json | 489 +- .../models/apis/ssm/2014-11-06/smoke.json | 18 + .../models/apis/states/2016-11-23/api-2.json | 86 +- .../models/apis/states/2016-11-23/docs-2.json | 208 +- .../apis/states/2016-11-23/paginators-1.json | 10 +- .../apis/storagegateway/2013-06-30/api-2.json | 67 +- .../storagegateway/2013-06-30/docs-2.json | 156 +- .../models/apis/sts/2011-06-15/api-2.json | 5 +- .../models/apis/sts/2011-06-15/docs-2.json | 12 +- .../models/apis/sts/2011-06-15/smoke.json | 19 + .../aws/aws-sdk-go/models/apis/stub.go | 3 + .../apis/transcribe/2017-10-26/api-2.json | 455 + .../apis/transcribe/2017-10-26/docs-2.json | 321 + .../transcribe/2017-10-26/examples-1.json | 5 + .../transcribe/2017-10-26/paginators-1.json | 14 + .../apis/translate/2017-07-01/api-2.json | 128 + .../apis/translate/2017-07-01/docs-2.json | 83 + .../apis/translate/2017-07-01/examples-1.json | 5 + .../translate/2017-07-01/paginators-1.json | 4 + .../apis/waf-regional/2016-11-28/api-2.json | 1358 +- .../apis/waf-regional/2016-11-28/docs-2.json | 608 +- .../apis/waf-regional/2016-11-28/smoke.json | 21 + .../models/apis/waf/2015-08-24/api-2.json | 1429 +- .../models/apis/waf/2015-08-24/docs-2.json | 615 +- .../models/apis/waf/2015-08-24/smoke.json | 21 + .../apis/workdocs/2016-05-01/api-2.json | 138 +- .../apis/workdocs/2016-05-01/docs-2.json | 188 +- .../apis/workmail/2017-10-01/api-2.json | 1345 + .../apis/workmail/2017-10-01/docs-2.json | 740 + .../apis/workmail/2017-10-01/examples-1.json | 5 + .../workmail/2017-10-01/paginators-1.json | 34 + .../apis/workspaces/2015-04-08/api-2.json | 48 +- .../apis/workspaces/2015-04-08/docs-2.json | 300 +- .../models/apis/xray/2016-04-12/api-2.json | 32 +- .../models/apis/xray/2016-04-12/docs-2.json | 28 +- .../apis/xray/2016-04-12/paginators-1.json | 22 +- .../customizations/service-aliases.json | 1 + .../models/endpoints/endpoints.json | 619 +- .../models/protocol_tests/generate.go | 78 +- .../models/protocol_tests/input/ec2.json | 129 +- .../models/protocol_tests/input/json.json | 70 + .../models/protocol_tests/input/query.json | 133 + .../protocol_tests/input/rest-json.json | 160 +- .../models/protocol_tests/input/rest-xml.json | 92 + .../models/protocol_tests/output/ec2.json | 49 + .../models/protocol_tests/output/json.json | 49 + .../models/protocol_tests/output/query.json | 49 + .../protocol_tests/output/rest-json.json | 136 +- .../protocol_tests/output/rest-xml.json | 161 + .../aws/aws-sdk-go/private/model/api/api.go | 126 +- .../aws-sdk-go/private/model/api/api_test.go | 95 +- .../private/model/api/customization_passes.go | 14 +- .../private/model/api/eventstream.go | 28 + .../private/model/api/eventstream_test.go | 79 + .../private/model/api/example_test.go | 126 +- .../private/model/api/examples_builder.go | 142 +- .../aws/aws-sdk-go/private/model/api/load.go | 18 +- .../aws-sdk-go/private/model/api/operation.go | 6 +- .../private/model/api/param_filler.go | 14 + .../aws-sdk-go/private/model/api/passes.go | 86 +- .../private/model/api/passes_test.go | 46 +- .../aws/aws-sdk-go/private/model/api/shape.go | 19 +- .../private/model/cli/gen-api/main.go | 14 +- .../private/protocol/ec2query/build.go | 2 +- .../private/protocol/ec2query/build_test.go | 445 +- .../protocol/ec2query/unmarshal_test.go | 370 +- .../private/protocol/json/jsonutil/build.go | 21 +- .../protocol/json/jsonutil/unmarshal.go | 15 +- .../private/protocol/jsonrpc/build_test.go | 526 +- .../protocol/jsonrpc/unmarshal_test.go | 358 +- .../aws-sdk-go/private/protocol/jsonvalue.go | 76 + .../private/protocol/jsonvalue_test.go | 93 + .../private/protocol/query/build.go | 2 +- .../private/protocol/query/build_test.go | 1249 +- .../protocol/query/queryutil/queryutil.go | 4 + .../private/protocol/query/unmarshal_test.go | 502 +- .../aws-sdk-go/private/protocol/rest/build.go | 21 +- .../private/protocol/rest/unmarshal.go | 14 +- .../private/protocol/restjson/build_test.go | 827 +- .../protocol/restjson/unmarshal_test.go | 792 +- .../private/protocol/restxml/build_test.go | 684 +- .../protocol/restxml/unmarshal_test.go | 860 +- .../xml/xmlutil/xml_to_struct_test.go | 66 - .../aws-sdk-go/private/signer/v2/v2_test.go | 102 +- .../service/acm/acmiface/interface.go | 8 + .../aws/aws-sdk-go/service/acm/api.go | 1207 +- .../aws/aws-sdk-go/service/acm/doc.go | 4 +- .../aws/aws-sdk-go/service/acm/errors.go | 13 +- .../service/acmpca/acmpcaiface/interface.go | 128 + .../aws/aws-sdk-go/service/acmpca/api.go | 3840 +++ .../aws/aws-sdk-go/service/acmpca/doc.go | 55 + .../aws/aws-sdk-go/service/acmpca/errors.go | 109 + .../aws/aws-sdk-go/service/acmpca/service.go | 95 + .../alexaforbusinessiface/interface.go | 283 + .../service/alexaforbusiness/api.go | 9452 ++++++ .../service/alexaforbusiness/doc.go | 34 + .../service/alexaforbusiness/errors.go | 44 + .../service/alexaforbusiness/service.go | 95 + .../aws/aws-sdk-go/service/apigateway/api.go | 3159 +- .../apigateway/apigatewayiface/interface.go | 35 + .../aws/aws-sdk-go/service/apigateway/doc.go | 10 +- .../service/applicationautoscaling/api.go | 1579 +- .../applicationautoscalingiface/interface.go | 12 + .../service/applicationautoscaling/doc.go | 22 +- .../service/applicationautoscaling/errors.go | 18 +- .../service/applicationautoscaling/service.go | 6 +- .../applicationdiscoveryservice/api.go | 184 +- .../applicationdiscoveryservice/doc.go | 43 +- .../aws/aws-sdk-go/service/appstream/api.go | 3210 +- .../appstream/appstreamiface/interface.go | 44 + .../aws/aws-sdk-go/service/appstream/doc.go | 5 +- .../aws-sdk-go/service/appstream/errors.go | 7 + .../aws-sdk-go/service/appstream/service.go | 6 +- .../aws/aws-sdk-go/service/appsync/api.go | 5574 ++++ .../service/appsync/appsynciface/interface.go | 172 + .../aws/aws-sdk-go/service/appsync/doc.go | 29 + .../aws/aws-sdk-go/service/appsync/errors.go | 69 + .../aws/aws-sdk-go/service/appsync/service.go | 97 + .../aws/aws-sdk-go/service/athena/api.go | 102 +- .../aws/aws-sdk-go/service/athena/doc.go | 2 +- .../aws/aws-sdk-go/service/autoscaling/api.go | 824 +- .../aws/aws-sdk-go/service/autoscaling/doc.go | 9 +- .../aws-sdk-go/service/autoscaling/errors.go | 6 + .../service/autoscaling/examples_test.go | 26 + .../service/autoscalingplans/api.go | 1710 ++ .../autoscalingplansiface/interface.go | 80 + .../service/autoscalingplans/doc.go | 36 + .../service/autoscalingplans/errors.go | 44 + .../service/autoscalingplans/service.go | 98 + .../aws/aws-sdk-go/service/batch/api.go | 671 +- .../aws/aws-sdk-go/service/batch/doc.go | 2 +- .../aws/aws-sdk-go/service/batch/errors.go | 4 +- .../aws/aws-sdk-go/service/budgets/api.go | 690 +- .../aws/aws-sdk-go/service/budgets/doc.go | 36 +- .../aws/aws-sdk-go/service/budgets/errors.go | 21 +- .../aws/aws-sdk-go/service/cloud9/api.go | 2143 ++ .../service/cloud9/cloud9iface/interface.go | 110 + .../aws/aws-sdk-go/service/cloud9/doc.go | 58 + .../aws/aws-sdk-go/service/cloud9/errors.go | 48 + .../service/cloud9/examples_test.go | 537 + .../aws/aws-sdk-go/service/cloud9/service.go | 95 + .../aws-sdk-go/service/clouddirectory/api.go | 1783 +- .../clouddirectoryiface/interface.go | 16 + .../aws-sdk-go/service/clouddirectory/doc.go | 2 +- .../service/clouddirectory/errors.go | 10 +- .../service/clouddirectory/service.go | 6 +- .../aws-sdk-go/service/cloudformation/api.go | 841 +- .../cloudformationiface/interface.go | 4 + .../aws-sdk-go/service/cloudformation/doc.go | 2 +- .../aws/aws-sdk-go/service/cloudfront/api.go | 14329 ++++++--- .../cloudfront/cloudfrontiface/interface.go | 76 + .../aws/aws-sdk-go/service/cloudfront/doc.go | 10 +- .../aws-sdk-go/service/cloudfront/errors.go | 142 +- .../aws-sdk-go/service/cloudfront/service.go | 2 +- .../cloudfront/sign/sign_cookie_test.go | 82 +- .../aws/aws-sdk-go/service/cloudhsm/api.go | 346 +- .../aws/aws-sdk-go/service/cloudhsm/doc.go | 11 +- .../aws/aws-sdk-go/service/cloudhsmv2/api.go | 90 +- .../aws/aws-sdk-go/service/cloudhsmv2/doc.go | 2 +- .../aws-sdk-go/service/cloudhsmv2/service.go | 6 +- .../aws/aws-sdk-go/service/cloudsearch/api.go | 48 +- .../aws/aws-sdk-go/service/cloudsearch/doc.go | 2 +- .../service/cloudsearchdomain/api.go | 6 +- .../cloudsearchdomain/customizations_test.go | 34 +- .../service/cloudsearchdomain/doc.go | 2 +- .../service/cloudsearchdomain/service.go | 6 +- .../aws/aws-sdk-go/service/cloudtrail/api.go | 121 +- .../aws/aws-sdk-go/service/cloudtrail/doc.go | 2 +- .../aws/aws-sdk-go/service/cloudwatch/api.go | 853 +- .../cloudwatch/cloudwatchiface/interface.go | 4 + .../aws/aws-sdk-go/service/cloudwatch/doc.go | 2 +- .../service/cloudwatchevents/api.go | 338 +- .../service/cloudwatchevents/doc.go | 2 +- .../aws-sdk-go/service/cloudwatchlogs/api.go | 280 +- .../aws-sdk-go/service/cloudwatchlogs/doc.go | 2 +- .../aws/aws-sdk-go/service/codebuild/api.go | 1221 +- .../codebuild/codebuildiface/interface.go | 16 + .../aws/aws-sdk-go/service/codebuild/doc.go | 16 +- .../aws-sdk-go/service/codebuild/errors.go | 6 + .../aws/aws-sdk-go/service/codecommit/api.go | 8078 ++++- .../codecommit/codecommitiface/interface.go | 88 + .../aws/aws-sdk-go/service/codecommit/doc.go | 91 +- .../aws-sdk-go/service/codecommit/errors.go | 461 +- .../aws/aws-sdk-go/service/codedeploy/api.go | 1071 +- .../codedeploy/codedeployiface/interface.go | 8 + .../aws/aws-sdk-go/service/codedeploy/doc.go | 44 +- .../aws-sdk-go/service/codedeploy/errors.go | 83 + .../aws-sdk-go/service/codepipeline/api.go | 259 +- .../aws-sdk-go/service/codepipeline/doc.go | 2 +- .../aws/aws-sdk-go/service/codestar/api.go | 148 +- .../aws/aws-sdk-go/service/codestar/doc.go | 2 +- .../aws-sdk-go/service/cognitoidentity/api.go | 148 +- .../cognitoidentity/customizations_test.go | 28 +- .../aws-sdk-go/service/cognitoidentity/doc.go | 2 +- .../service/cognitoidentityprovider/api.go | 5782 +++- .../cognitoidentityprovideriface/interface.go | 48 + .../service/cognitoidentityprovider/doc.go | 2 +- .../service/cognitoidentityprovider/errors.go | 20 + .../aws/aws-sdk-go/service/cognitosync/api.go | 143 +- .../aws/aws-sdk-go/service/cognitosync/doc.go | 2 +- .../aws/aws-sdk-go/service/comprehend/api.go | 2860 ++ .../comprehend/comprehendiface/interface.go | 111 + .../aws/aws-sdk-go/service/comprehend/doc.go | 31 + .../aws-sdk-go/service/comprehend/errors.go | 59 + .../aws-sdk-go/service/comprehend/service.go | 98 + .../aws-sdk-go/service/configservice/api.go | 5460 +++- .../configserviceiface/interface.go | 56 +- .../aws-sdk-go/service/configservice/doc.go | 14 +- .../service/configservice/errors.go | 35 +- .../aws/aws-sdk-go/service/connect/api.go | 439 + .../service/connect/connectiface/interface.go | 72 + .../aws/aws-sdk-go/service/connect/doc.go | 32 + .../aws/aws-sdk-go/service/connect/errors.go | 57 + .../aws/aws-sdk-go/service/connect/service.go | 97 + .../service/costandusagereportservice/api.go | 25 +- .../service/costandusagereportservice/doc.go | 2 +- .../costandusagereportservice/service.go | 6 +- .../aws-sdk-go/service/costexplorer/api.go | 2913 ++ .../costexploreriface/interface.go | 88 + .../aws-sdk-go/service/costexplorer/doc.go | 38 + .../aws-sdk-go/service/costexplorer/errors.go | 30 + .../service/costexplorer/service.go | 98 + .../service/databasemigrationservice/api.go | 1484 +- .../interface.go | 22 + .../service/databasemigrationservice/doc.go | 2 +- .../databasemigrationservice/examples_test.go | 2 + .../aws-sdk-go/service/datapipeline/api.go | 167 +- .../aws-sdk-go/service/datapipeline/doc.go | 2 +- .../aws/aws-sdk-go/service/dax/api.go | 182 +- .../aws/aws-sdk-go/service/dax/doc.go | 2 +- .../aws/aws-sdk-go/service/devicefarm/api.go | 2432 +- .../devicefarm/devicefarmiface/interface.go | 32 + .../aws/aws-sdk-go/service/devicefarm/doc.go | 2 +- .../aws-sdk-go/service/directconnect/api.go | 2115 +- .../directconnectiface/interface.go | 28 + .../aws-sdk-go/service/directconnect/doc.go | 2 +- .../service/directoryservice/api.go | 371 +- .../service/directoryservice/doc.go | 2 +- .../aws/aws-sdk-go/service/dynamodb/api.go | 4306 ++- .../aws/aws-sdk-go/service/dynamodb/doc.go | 2 +- .../dynamodb/dynamodbattribute/decode.go | 44 +- .../dynamodb/dynamodbattribute/decode_test.go | 95 +- .../dynamodb/dynamodbattribute/encode.go | 5 +- .../dynamodb/dynamodbattribute/encode_test.go | 70 +- .../dynamodb/dynamodbattribute/field_test.go | 18 +- .../dynamodbattribute/marshaler_test.go | 47 + .../dynamodb/dynamodbattribute/shared_test.go | 13 +- .../dynamodb/dynamodbattribute/tag_test.go | 6 +- .../dynamodb/dynamodbiface/interface.go | 48 + .../aws/aws-sdk-go/service/dynamodb/errors.go | 89 +- .../aws-sdk-go/service/dynamodbstreams/api.go | 39 +- .../aws-sdk-go/service/dynamodbstreams/doc.go | 2 +- .../service/dynamodbstreams/service.go | 6 +- .../aws/aws-sdk-go/service/ec2/api.go | 12667 ++++++-- .../aws-sdk-go/service/ec2/customizations.go | 53 + .../service/ec2/customizations_test.go | 25 +- .../aws/aws-sdk-go/service/ec2/doc.go | 7 +- .../service/ec2/ec2iface/interface.go | 108 + .../aws-sdk-go/service/ec2/examples_test.go | 12 + .../aws-sdk-go/service/ec2/retryer_test.go | 37 + .../aws/aws-sdk-go/service/ec2/waiters.go | 5 + .../aws/aws-sdk-go/service/ecr/api.go | 1530 +- .../aws/aws-sdk-go/service/ecr/doc.go | 6 +- .../service/ecr/ecriface/interface.go | 20 + .../aws/aws-sdk-go/service/ecr/errors.go | 25 +- .../aws/aws-sdk-go/service/ecs/api.go | 2806 +- .../aws/aws-sdk-go/service/ecs/doc.go | 26 +- .../aws/aws-sdk-go/service/ecs/errors.go | 47 +- .../aws-sdk-go/service/ecs/examples_test.go | 40 + .../aws/aws-sdk-go/service/efs/api.go | 90 +- .../aws/aws-sdk-go/service/efs/doc.go | 2 +- .../aws/aws-sdk-go/service/elasticache/api.go | 1878 +- .../aws/aws-sdk-go/service/elasticache/doc.go | 2 +- .../elasticache/elasticacheiface/interface.go | 4 + .../aws-sdk-go/service/elasticache/errors.go | 23 +- .../service/elasticbeanstalk/api.go | 1002 +- .../service/elasticbeanstalk/doc.go | 2 +- .../elasticbeanstalkiface/interface.go | 12 + .../service/elasticbeanstalk/errors.go | 25 +- .../service/elasticsearchservice/api.go | 740 +- .../service/elasticsearchservice/doc.go | 2 +- .../elasticsearchserviceiface/interface.go | 4 + .../service/elastictranscoder/api.go | 34 +- .../service/elastictranscoder/doc.go | 2 +- .../aws/aws-sdk-go/service/elb/api.go | 261 +- .../aws/aws-sdk-go/service/elb/doc.go | 35 +- .../aws/aws-sdk-go/service/elb/errors.go | 6 + .../aws-sdk-go/service/elb/examples_test.go | 10 + .../aws/aws-sdk-go/service/elbv2/api.go | 916 +- .../aws/aws-sdk-go/service/elbv2/doc.go | 2 +- .../service/elbv2/elbv2iface/interface.go | 16 +- .../aws/aws-sdk-go/service/elbv2/errors.go | 6 +- .../aws-sdk-go/service/elbv2/examples_test.go | 6 + .../aws/aws-sdk-go/service/emr/api.go | 471 +- .../aws/aws-sdk-go/service/emr/doc.go | 2 +- .../aws/aws-sdk-go/service/firehose/api.go | 732 +- .../aws/aws-sdk-go/service/firehose/doc.go | 2 +- .../aws/aws-sdk-go/service/firehose/errors.go | 4 - .../firehose/firehoseiface/interface.go | 4 - .../aws/aws-sdk-go/service/fms/api.go | 2466 ++ .../aws/aws-sdk-go/service/fms/doc.go | 31 + .../aws/aws-sdk-go/service/fms/errors.go | 42 + .../service/fms/fmsiface/interface.go | 112 + .../aws/aws-sdk-go/service/fms/service.go | 95 + .../aws/aws-sdk-go/service/gamelift/api.go | 1322 +- .../aws/aws-sdk-go/service/gamelift/doc.go | 38 +- .../gamelift/gameliftiface/interface.go | 4 + .../aws/aws-sdk-go/service/glacier/api.go | 1047 +- .../service/glacier/customizations_test.go | 54 +- .../aws/aws-sdk-go/service/glacier/doc.go | 2 +- .../aws-sdk-go/service/glacier/treehash.go | 6 +- .../aws/aws-sdk-go/service/glue/api.go | 2862 +- .../aws/aws-sdk-go/service/glue/doc.go | 4 +- .../service/glue/glueiface/interface.go | 16 + .../aws/aws-sdk-go/service/greengrass/api.go | 3633 ++- .../aws/aws-sdk-go/service/greengrass/doc.go | 2 +- .../aws-sdk-go/service/greengrass/errors.go | 4 +- .../greengrass/greengrassiface/interface.go | 36 + .../aws-sdk-go/service/greengrass/service.go | 6 +- .../aws/aws-sdk-go/service/guardduty/api.go | 7989 +++++ .../aws/aws-sdk-go/service/guardduty/doc.go | 29 + .../aws-sdk-go/service/guardduty/errors.go | 18 + .../guardduty/guarddutyiface/interface.go | 230 + .../aws-sdk-go/service/guardduty/service.go | 97 + .../aws/aws-sdk-go/service/health/api.go | 60 +- .../aws/aws-sdk-go/service/health/doc.go | 2 +- .../aws/aws-sdk-go/service/iam/api.go | 2585 +- .../aws/aws-sdk-go/service/iam/doc.go | 2 +- .../service/iam/iamiface/interface.go | 4 + .../aws/aws-sdk-go/service/inspector/api.go | 396 +- .../aws/aws-sdk-go/service/inspector/doc.go | 2 +- .../aws/aws-sdk-go/service/iot/api.go | 24734 ++++++++++++---- .../aws/aws-sdk-go/service/iot/doc.go | 2 +- .../aws/aws-sdk-go/service/iot/errors.go | 37 + .../service/iot/iotiface/interface.go | 264 + .../aws/aws-sdk-go/service/iot/service.go | 6 +- .../aws-sdk-go/service/iotdataplane/api.go | 8 +- .../iotdataplane/customizations_test.go | 34 +- .../aws-sdk-go/service/iotdataplane/doc.go | 2 +- .../service/iotdataplane/service.go | 6 +- .../service/iotjobsdataplane/api.go | 1043 + .../service/iotjobsdataplane/doc.go | 43 + .../service/iotjobsdataplane/errors.go | 53 + .../iotjobsdataplaneiface/interface.go | 80 + .../service/iotjobsdataplane/service.go | 96 + .../aws/aws-sdk-go/service/kinesis/api.go | 1365 +- .../aws/aws-sdk-go/service/kinesis/doc.go | 6 +- .../aws/aws-sdk-go/service/kinesis/errors.go | 22 +- .../service/kinesis/kinesisiface/interface.go | 8 + .../service/kinesisanalytics/api.go | 1452 +- .../service/kinesisanalytics/doc.go | 2 +- .../kinesisanalyticsiface/interface.go | 8 + .../aws-sdk-go/service/kinesisvideo/api.go | 2138 ++ .../aws-sdk-go/service/kinesisvideo/doc.go | 26 + .../aws-sdk-go/service/kinesisvideo/errors.go | 76 + .../kinesisvideoiface/interface.go | 104 + .../service/kinesisvideo/service.go | 93 + .../service/kinesisvideoarchivedmedia/api.go | 613 + .../service/kinesisvideoarchivedmedia/doc.go | 26 + .../kinesisvideoarchivedmedia/errors.go | 33 + .../interface.go | 72 + .../kinesisvideoarchivedmedia/service.go | 93 + .../service/kinesisvideomedia/api.go | 403 + .../service/kinesisvideomedia/doc.go | 26 + .../service/kinesisvideomedia/errors.go | 48 + .../kinesisvideomediaiface/interface.go | 68 + .../service/kinesisvideomedia/service.go | 93 + .../aws/aws-sdk-go/service/kms/api.go | 1107 +- .../aws/aws-sdk-go/service/kms/doc.go | 2 +- .../aws/aws-sdk-go/service/kms/errors.go | 10 +- .../aws-sdk-go/service/kms/examples_test.go | 2 + .../aws/aws-sdk-go/service/lambda/api.go | 1022 +- .../aws/aws-sdk-go/service/lambda/doc.go | 2 +- .../aws/aws-sdk-go/service/lambda/errors.go | 12 +- .../service/lambda/examples_test.go | 12 + .../service/lambda/lambdaiface/interface.go | 8 + .../service/lexmodelbuildingservice/api.go | 950 +- .../service/lexmodelbuildingservice/doc.go | 2 +- .../lexmodelbuildingservice/examples_test.go | 43 + .../lexmodelbuildingserviceiface/interface.go | 8 + .../lexmodelbuildingservice/service.go | 6 +- .../service/lexruntimeservice/api.go | 132 +- .../service/lexruntimeservice/doc.go | 2 +- .../service/lexruntimeservice/service.go | 6 +- .../aws/aws-sdk-go/service/lightsail/api.go | 12289 +++++--- .../aws/aws-sdk-go/service/lightsail/doc.go | 2 +- .../aws-sdk-go/service/lightsail/errors.go | 4 +- .../lightsail/lightsailiface/interface.go | 92 + .../aws-sdk-go/service/machinelearning/api.go | 56 +- .../machinelearning/customizations_test.go | 10 +- .../aws-sdk-go/service/machinelearning/doc.go | 2 +- .../marketplacecommerceanalytics/api.go | 16 +- .../marketplacecommerceanalytics/doc.go | 2 +- .../marketplacecommerceanalytics/service.go | 6 +- .../marketplaceentitlementservice/api.go | 10 +- .../marketplaceentitlementservice/doc.go | 2 +- .../marketplaceentitlementservice/service.go | 6 +- .../service/marketplacemetering/api.go | 26 +- .../service/marketplacemetering/doc.go | 2 +- .../service/marketplacemetering/service.go | 6 +- .../aws-sdk-go/service/mediaconvert/api.go | 14447 +++++++++ .../aws-sdk-go/service/mediaconvert/doc.go | 28 + .../aws-sdk-go/service/mediaconvert/errors.go | 30 + .../mediaconvertiface/interface.go | 144 + .../service/mediaconvert/service.go | 97 + .../aws/aws-sdk-go/service/medialive/api.go | 12744 ++++++++ .../aws/aws-sdk-go/service/medialive/doc.go | 28 + .../aws-sdk-go/service/medialive/errors.go | 42 + .../medialive/medialiveiface/interface.go | 141 + .../aws-sdk-go/service/medialive/service.go | 97 + .../aws-sdk-go/service/mediapackage/api.go | 3208 ++ .../aws-sdk-go/service/mediapackage/doc.go | 28 + .../aws-sdk-go/service/mediapackage/errors.go | 30 + .../mediapackageiface/interface.go | 114 + .../service/mediapackage/service.go | 97 + .../aws/aws-sdk-go/service/mediastore/api.go | 1764 ++ .../aws/aws-sdk-go/service/mediastore/doc.go | 29 + .../aws-sdk-go/service/mediastore/errors.go | 42 + .../mediastore/mediastoreiface/interface.go | 104 + .../aws-sdk-go/service/mediastore/service.go | 98 + .../aws-sdk-go/service/mediastoredata/api.go | 1092 + .../aws-sdk-go/service/mediastoredata/doc.go | 30 + .../service/mediastoredata/errors.go | 30 + .../mediastoredataiface/interface.go | 84 + .../service/mediastoredata/service.go | 96 + .../aws-sdk-go/service/migrationhub/api.go | 303 +- .../aws-sdk-go/service/migrationhub/doc.go | 6 +- .../aws-sdk-go/service/migrationhub/errors.go | 11 +- .../aws/aws-sdk-go/service/mobile/api.go | 76 +- .../aws/aws-sdk-go/service/mobile/doc.go | 2 +- .../aws/aws-sdk-go/service/mobile/service.go | 6 +- .../aws-sdk-go/service/mobileanalytics/api.go | 2 +- .../aws-sdk-go/service/mobileanalytics/doc.go | 2 +- .../aws/aws-sdk-go/service/mq/api.go | 3741 +++ .../aws/aws-sdk-go/service/mq/doc.go | 31 + .../aws/aws-sdk-go/service/mq/errors.go | 42 + .../service/mq/mqiface/interface.go | 132 + .../aws/aws-sdk-go/service/mq/service.go | 97 + .../aws/aws-sdk-go/service/mturk/api.go | 557 +- .../aws/aws-sdk-go/service/mturk/doc.go | 2 +- .../aws/aws-sdk-go/service/opsworks/api.go | 932 +- .../aws/aws-sdk-go/service/opsworks/doc.go | 7 +- .../opsworks/opsworksiface/interface.go | 4 + .../aws-sdk-go/service/opsworks/waiters.go | 5 - .../aws/aws-sdk-go/service/opsworkscm/api.go | 320 +- .../aws/aws-sdk-go/service/opsworkscm/doc.go | 50 +- .../opsworkscm/opsworkscmiface/interface.go | 3 + .../aws-sdk-go/service/opsworkscm/service.go | 6 +- .../aws-sdk-go/service/opsworkscm/waiters.go | 61 + .../aws-sdk-go/service/organizations/api.go | 3864 ++- .../aws-sdk-go/service/organizations/doc.go | 8 +- .../service/organizations/errors.go | 62 +- .../service/organizations/examples_test.go | 6 + .../organizationsiface/interface.go | 15 + .../aws/aws-sdk-go/service/pinpoint/api.go | 3773 ++- .../aws/aws-sdk-go/service/pinpoint/doc.go | 2 +- .../pinpoint/pinpointiface/interface.go | 44 + .../aws-sdk-go/service/pinpoint/service.go | 6 +- .../aws/aws-sdk-go/service/polly/api.go | 67 +- .../aws/aws-sdk-go/service/polly/doc.go | 2 +- .../aws/aws-sdk-go/service/pricing/api.go | 955 + .../aws/aws-sdk-go/service/pricing/doc.go | 51 + .../aws/aws-sdk-go/service/pricing/errors.go | 37 + .../service/pricing/examples_test.go | 154 + .../service/pricing/pricingiface/interface.go | 85 + .../aws/aws-sdk-go/service/pricing/service.go | 98 + .../aws/aws-sdk-go/service/rds/api.go | 4304 +-- .../service/rds/customizations_test.go | 36 +- .../aws/aws-sdk-go/service/rds/doc.go | 4 +- .../service/rds/rdsiface/interface.go | 14 + .../service/rds/rdsutils/connect_test.go | 11 +- .../aws/aws-sdk-go/service/rds/waiters.go | 142 + .../aws/aws-sdk-go/service/redshift/api.go | 750 +- .../aws/aws-sdk-go/service/redshift/doc.go | 2 +- .../aws/aws-sdk-go/service/rekognition/api.go | 9406 ++++-- .../aws/aws-sdk-go/service/rekognition/doc.go | 2 +- .../aws-sdk-go/service/rekognition/errors.go | 25 +- .../rekognition/rekognitioniface/interface.go | 97 + .../aws-sdk-go/service/resourcegroups/api.go | 2509 ++ .../aws-sdk-go/service/resourcegroups/doc.go | 60 + .../service/resourcegroups/errors.go | 50 + .../resourcegroupsiface/interface.go | 121 + .../service/resourcegroups/service.go | 96 + .../service/resourcegroupstaggingapi/api.go | 44 +- .../service/resourcegroupstaggingapi/doc.go | 2 +- .../aws/aws-sdk-go/service/route53/api.go | 1534 +- .../aws/aws-sdk-go/service/route53/doc.go | 2 +- .../aws/aws-sdk-go/service/route53/errors.go | 88 +- .../service/route53/examples_test.go | 271 + .../service/route53/route53iface/interface.go | 12 + .../route53/unmarshal_error_leak_test.go | 16 +- .../service/route53/unmarshal_error_test.go | 45 +- .../aws-sdk-go/service/route53domains/api.go | 600 +- .../aws-sdk-go/service/route53domains/doc.go | 2 +- .../service/route53domains/errors.go | 6 +- .../route53domainsiface/interface.go | 4 + .../aws/aws-sdk-go/service/s3/api.go | 2411 +- .../aws/aws-sdk-go/service/s3/bench_test.go | 58 + .../aws/aws-sdk-go/service/s3/body_hash.go | 249 + .../aws-sdk-go/service/s3/body_hash_test.go | 523 + .../service/s3/bucket_location_test.go | 6 +- .../aws/aws-sdk-go/service/s3/content_md5.go | 36 - .../aws-sdk-go/service/s3/customizations.go | 6 + .../service/s3/customizations_test.go | 29 +- .../aws/aws-sdk-go/service/s3/doc.go | 2 +- .../aws/aws-sdk-go/service/s3/doc_custom.go | 4 +- .../aws-sdk-go/service/s3/examples_test.go | 16 +- .../s3/platform_handlers_go1.6_test.go | 33 +- .../s3crypto/aes_gcm_content_cipher_test.go | 17 +- .../service/s3/s3crypto/aes_gcm_test.go | 30 +- .../service/s3/s3crypto/cipher_test.go | 18 +- .../service/s3/s3crypto/cipher_util_test.go | 86 +- .../s3/s3crypto/decryption_client_test.go | 86 +- .../service/s3/s3crypto/encryption_client.go | 8 +- .../s3/s3crypto/encryption_client_test.go | 30 +- .../service/s3/s3crypto/hash_io_test.go | 12 +- .../service/s3/s3crypto/helper_test.go | 67 +- .../service/s3/s3crypto/key_handler_test.go | 14 +- .../s3/s3crypto/kms_key_handler_test.go | 48 +- .../service/s3/s3crypto/mat_desc_test.go | 19 +- .../service/s3/s3crypto/strategy.go | 5 +- .../service/s3/s3crypto/strategy_test.go | 91 +- .../service/s3/s3iface/interface.go | 12 + .../aws-sdk-go/service/s3/s3manager/batch.go | 40 +- .../service/s3/s3manager/batch_1_7_test.go | 116 + .../service/s3/s3manager/batch_test.go | 136 +- .../service/s3/s3manager/bucket_region.go | 15 +- .../s3/s3manager/bucket_region_test.go | 20 +- .../aws-sdk-go/service/s3/s3manager/upload.go | 42 +- .../aws/aws-sdk-go/service/s3/sse_test.go | 66 +- .../aws-sdk-go/service/s3/statusok_error.go | 3 +- .../service/s3/statusok_error_test.go | 86 +- .../service/s3/unmarshal_error_leak_test.go | 15 +- .../aws/aws-sdk-go/service/sagemaker/api.go | 8822 ++++++ .../aws/aws-sdk-go/service/sagemaker/doc.go | 28 + .../aws-sdk-go/service/sagemaker/errors.go | 25 + .../sagemaker/sagemakeriface/interface.go | 239 + .../aws-sdk-go/service/sagemaker/service.go | 98 + .../aws-sdk-go/service/sagemaker/waiters.go | 331 + .../service/sagemakerruntime/api.go | 221 + .../service/sagemakerruntime/doc.go | 28 + .../service/sagemakerruntime/errors.go | 30 + .../sagemakerruntimeiface/interface.go | 68 + .../service/sagemakerruntime/service.go | 97 + .../aws-sdk-go/service/secretsmanager/api.go | 4475 +++ .../aws-sdk-go/service/secretsmanager/doc.go | 108 + .../service/secretsmanager/errors.go | 74 + .../secretsmanageriface/interface.go | 130 + .../service/secretsmanager/service.go | 98 + .../serverlessapplicationrepository/api.go | 2769 ++ .../serverlessapplicationrepository/doc.go | 58 + .../serverlessapplicationrepository/errors.go | 44 + .../interface.go | 110 + .../service.go | 97 + .../aws-sdk-go/service/servicecatalog/api.go | 4017 ++- .../aws-sdk-go/service/servicecatalog/doc.go | 15 +- .../service/servicecatalog/errors.go | 15 +- .../servicecatalogiface/interface.go | 31 + .../service/servicediscovery/api.go | 5325 ++++ .../service/servicediscovery/doc.go | 33 + .../service/servicediscovery/errors.go | 75 + .../service/servicediscovery/service.go | 95 + .../servicediscoveryiface/interface.go | 151 + .../aws/aws-sdk-go/service/ses/api.go | 11653 +++++--- .../aws/aws-sdk-go/service/ses/doc.go | 2 +- .../aws/aws-sdk-go/service/ses/errors.go | 80 + .../aws-sdk-go/service/ses/examples_test.go | 135 +- .../aws/aws-sdk-go/service/ses/service.go | 6 +- .../service/ses/sesiface/interface.go | 75 + .../aws/aws-sdk-go/service/sfn/api.go | 960 +- .../aws/aws-sdk-go/service/sfn/doc.go | 36 +- .../aws/aws-sdk-go/service/sfn/errors.go | 11 +- .../service/sfn/sfniface/interface.go | 8 + .../aws/aws-sdk-go/service/shield/api.go | 448 +- .../aws/aws-sdk-go/service/shield/doc.go | 2 +- .../aws/aws-sdk-go/service/shield/errors.go | 8 +- .../service/shield/shieldiface/interface.go | 4 + .../aws/aws-sdk-go/service/simpledb/api.go | 20 +- .../aws/aws-sdk-go/service/simpledb/doc.go | 2 +- .../simpledb/unmarshal_error_leak_test.go | 13 +- .../service/simpledb/unmarshall_error_test.go | 34 +- .../aws/aws-sdk-go/service/sms/api.go | 98 +- .../aws/aws-sdk-go/service/sms/doc.go | 2 +- .../aws/aws-sdk-go/service/snowball/api.go | 161 +- .../aws/aws-sdk-go/service/snowball/doc.go | 2 +- .../service/snowball/examples_test.go | 2 + .../aws/aws-sdk-go/service/sns/api.go | 245 +- .../aws/aws-sdk-go/service/sns/doc.go | 2 +- .../aws/aws-sdk-go/service/sqs/api.go | 792 +- .../aws/aws-sdk-go/service/sqs/api_test.go | 14 +- .../aws-sdk-go/service/sqs/checksums_test.go | 89 +- .../aws/aws-sdk-go/service/sqs/doc.go | 9 +- .../service/sqs/sqsiface/interface.go | 12 + .../aws/aws-sdk-go/service/ssm/api.go | 3546 ++- .../aws/aws-sdk-go/service/ssm/doc.go | 14 +- .../aws/aws-sdk-go/service/ssm/errors.go | 60 +- .../service/ssm/ssmiface/interface.go | 4 + .../aws-sdk-go/service/storagegateway/api.go | 993 +- .../aws-sdk-go/service/storagegateway/doc.go | 2 +- .../storagegatewayiface/interface.go | 4 + .../aws/aws-sdk-go/service/sts/api.go | 196 +- .../service/sts/customizations_test.go | 18 +- .../aws/aws-sdk-go/service/sts/doc.go | 2 +- .../aws/aws-sdk-go/service/support/api.go | 128 +- .../aws/aws-sdk-go/service/support/doc.go | 2 +- .../aws/aws-sdk-go/service/swf/api.go | 62 +- .../aws/aws-sdk-go/service/swf/doc.go | 2 +- .../service/transcribeservice/api.go | 2141 ++ .../service/transcribeservice/doc.go | 28 + .../service/transcribeservice/errors.go | 43 + .../service/transcribeservice/service.go | 98 + .../transcribeserviceiface/interface.go | 102 + .../aws/aws-sdk-go/service/translate/api.go | 258 + .../aws/aws-sdk-go/service/translate/doc.go | 29 + .../aws-sdk-go/service/translate/errors.go | 54 + .../aws-sdk-go/service/translate/service.go | 98 + .../translate/translateiface/interface.go | 68 + .../aws/aws-sdk-go/service/waf/api.go | 19938 ++++++++----- .../aws/aws-sdk-go/service/waf/doc.go | 2 +- .../aws/aws-sdk-go/service/waf/errors.go | 40 +- .../aws-sdk-go/service/waf/examples_test.go | 47 + .../service/waf/wafiface/interface.go | 100 + .../aws/aws-sdk-go/service/wafregional/api.go | 8811 ++++-- .../aws/aws-sdk-go/service/wafregional/doc.go | 2 +- .../aws-sdk-go/service/wafregional/errors.go | 40 +- .../service/wafregional/examples_test.go | 47 + .../wafregional/wafregionaliface/interface.go | 100 + .../aws/aws-sdk-go/service/workdocs/api.go | 985 +- .../aws/aws-sdk-go/service/workdocs/doc.go | 22 +- .../aws/aws-sdk-go/service/workdocs/errors.go | 12 +- .../workdocs/workdocsiface/interface.go | 4 + .../aws/aws-sdk-go/service/workmail/api.go | 6252 ++++ .../aws/aws-sdk-go/service/workmail/doc.go | 54 + .../aws/aws-sdk-go/service/workmail/errors.go | 113 + .../aws-sdk-go/service/workmail/service.go | 95 + .../workmail/workmailiface/interface.go | 194 + .../aws/aws-sdk-go/service/workspaces/api.go | 627 +- .../aws/aws-sdk-go/service/workspaces/doc.go | 6 +- .../aws/aws-sdk-go/service/xray/api.go | 329 +- .../aws/aws-sdk-go/service/xray/doc.go | 2 +- .../service/xray/xrayiface/interface.go | 12 + vendor/github.com/h2non/filetype/.travis.yml | 2 + vendor/github.com/h2non/filetype/History.md | 35 + vendor/github.com/h2non/filetype/README.md | 24 +- vendor/github.com/h2non/filetype/kind_test.go | 2 +- .../github.com/h2non/filetype/match_test.go | 4 +- .../h2non/filetype/matchers/archive.go | 16 + .../h2non/filetype/matchers/document.go | 66 + .../h2non/filetype/matchers/matchers.go | 2 +- .../h2non/filetype/matchers/video.go | 32 +- vendor/github.com/h2non/filetype/version.go | 2 +- vendor/github.com/jlaffaye/ftp/.travis.yml | 5 +- vendor/github.com/jlaffaye/ftp/client_test.go | 207 + vendor/github.com/jlaffaye/ftp/ftp.go | 116 +- vendor/github.com/jlaffaye/ftp/parse.go | 84 +- vendor/github.com/jlaffaye/ftp/parse_test.go | 113 +- .../github.com/syndtr/goleveldb/.travis.yml | 3 +- vendor/github.com/syndtr/goleveldb/README.md | 2 +- .../github.com/syndtr/goleveldb/leveldb/db.go | 23 +- .../syndtr/goleveldb/leveldb/db_test.go | 4 +- .../syndtr/goleveldb/leveldb/db_write.go | 10 +- .../syndtr/goleveldb/leveldb/session.go | 4 +- .../syndtr/goleveldb/leveldb/storage.go | 63 + .../leveldb/storage/file_storage_plan9.go | 4 +- .../goleveldb/leveldb/storage/mem_storage.go | 8 +- .../leveldb/storage/mem_storage_test.go | 52 + .../syndtr/goleveldb/leveldb/util/util.go | 2 +- .../goleveldb/manualtest/dbstress/main.go | 7 +- vendor/golang.org/x/crypto/AUTHORS | 2 +- vendor/golang.org/x/crypto/CONTRIBUTING.md | 15 +- vendor/golang.org/x/crypto/CONTRIBUTORS | 2 +- vendor/golang.org/x/crypto/README | 3 - vendor/golang.org/x/crypto/README.md | 21 + vendor/golang.org/x/crypto/acme/acme.go | 258 +- vendor/golang.org/x/crypto/acme/acme_test.go | 136 +- .../x/crypto/acme/autocert/autocert.go | 443 +- .../x/crypto/acme/autocert/autocert_test.go | 377 +- .../x/crypto/acme/autocert/cache.go | 14 +- .../x/crypto/acme/autocert/cache_test.go | 4 +- .../x/crypto/acme/autocert/example_test.go | 36 + .../x/crypto/acme/autocert/listener.go | 160 + .../x/crypto/acme/autocert/renewal.go | 48 +- .../x/crypto/acme/autocert/renewal_test.go | 159 +- vendor/golang.org/x/crypto/acme/jws.go | 2 +- vendor/golang.org/x/crypto/acme/jws_test.go | 177 +- vendor/golang.org/x/crypto/acme/types.go | 136 +- vendor/golang.org/x/crypto/acme/types_test.go | 63 + vendor/golang.org/x/crypto/argon2/argon2.go | 285 + .../golang.org/x/crypto/argon2/argon2_test.go | 233 + vendor/golang.org/x/crypto/argon2/blake2b.go | 53 + .../x/crypto/argon2/blamka_amd64.go | 61 + .../golang.org/x/crypto/argon2/blamka_amd64.s | 252 + .../x/crypto/argon2/blamka_generic.go | 163 + .../golang.org/x/crypto/argon2/blamka_ref.go | 15 + vendor/golang.org/x/crypto/bcrypt/bcrypt.go | 11 +- .../golang.org/x/crypto/bcrypt/bcrypt_test.go | 17 + vendor/golang.org/x/crypto/blake2b/blake2b.go | 111 +- .../x/crypto/blake2b/blake2b_test.go | 401 +- vendor/golang.org/x/crypto/blake2b/blake2x.go | 177 + vendor/golang.org/x/crypto/blake2s/blake2s.go | 100 +- .../x/crypto/blake2s/blake2s_386.go | 7 +- .../x/crypto/blake2s/blake2s_amd64.go | 11 +- .../x/crypto/blake2s/blake2s_ref.go | 7 +- .../x/crypto/blake2s/blake2s_test.go | 699 +- vendor/golang.org/x/crypto/blake2s/blake2x.go | 178 + .../x/crypto/blowfish/blowfish_test.go | 2 +- vendor/golang.org/x/crypto/blowfish/cipher.go | 2 +- vendor/golang.org/x/crypto/blowfish/const.go | 2 +- vendor/golang.org/x/crypto/bn256/bn256.go | 22 +- .../chacha20poly1305/chacha20poly1305.go | 2 +- .../chacha20poly1305_amd64.go | 59 +- .../chacha20poly1305/chacha20poly1305_amd64.s | 45 +- .../chacha20poly1305_generic.go | 2 +- vendor/golang.org/x/crypto/cryptobyte/asn1.go | 240 +- .../x/crypto/cryptobyte/asn1/asn1.go | 46 + .../x/crypto/cryptobyte/asn1_test.go | 45 +- .../golang.org/x/crypto/cryptobyte/builder.go | 84 +- .../x/crypto/cryptobyte/cryptobyte_test.go | 49 + .../x/crypto/cryptobyte/example_test.go | 50 +- .../golang.org/x/crypto/cryptobyte/string.go | 18 +- .../x/crypto/curve25519/const_amd64.h | 2 +- .../x/crypto/curve25519/const_amd64.s | 2 +- .../x/crypto/curve25519/cswap_amd64.s | 131 +- .../x/crypto/curve25519/curve25519.go | 25 +- .../x/crypto/curve25519/curve25519_test.go | 10 + vendor/golang.org/x/crypto/curve25519/doc.go | 2 +- .../x/crypto/curve25519/freeze_amd64.s | 2 +- .../x/crypto/curve25519/ladderstep_amd64.s | 2 +- .../x/crypto/curve25519/mul_amd64.s | 2 +- .../x/crypto/curve25519/square_amd64.s | 2 +- vendor/golang.org/x/crypto/ed25519/ed25519.go | 21 +- .../x/crypto/ed25519/ed25519_test.go | 26 +- .../internal/edwards25519/edwards25519.go | 22 + .../internal/chacha20/chacha_generic.go | 5 +- .../internal/chacha20/chacha_test.go | 0 .../golang.org/x/crypto/md4/example_test.go | 20 + vendor/golang.org/x/crypto/nacl/auth/auth.go | 58 + .../x/crypto/nacl/auth/auth_test.go | 172 + .../x/crypto/nacl/auth/example_test.go | 36 + vendor/golang.org/x/crypto/nacl/box/box.go | 21 +- .../x/crypto/nacl/box/example_test.go | 95 + .../x/crypto/nacl/secretbox/example_test.go | 2 +- .../x/crypto/nacl/secretbox/secretbox.go | 17 + .../x/crypto/nacl/secretbox/secretbox_test.go | 63 + vendor/golang.org/x/crypto/nacl/sign/sign.go | 83 + .../x/crypto/nacl/sign/sign_test.go | 74 + vendor/golang.org/x/crypto/ocsp/ocsp.go | 83 +- vendor/golang.org/x/crypto/ocsp/ocsp_test.go | 27 +- vendor/golang.org/x/crypto/openpgp/keys.go | 10 +- .../golang.org/x/crypto/openpgp/keys_test.go | 75 +- .../x/crypto/openpgp/packet/encrypted_key.go | 9 +- .../openpgp/packet/encrypted_key_test.go | 73 +- .../x/crypto/openpgp/packet/packet.go | 32 +- .../crypto/openpgp/packet/private_key_test.go | 2 +- .../x/crypto/openpgp/packet/public_key.go | 11 +- .../crypto/openpgp/packet/public_key_test.go | 26 + .../openpgp/packet/symmetric_key_encrypted.go | 6 +- .../packet/symmetric_key_encrypted_test.go | 82 +- .../golang.org/x/crypto/pbkdf2/pbkdf2_test.go | 19 + .../golang.org/x/crypto/pkcs12/bmp-string.go | 2 +- vendor/golang.org/x/crypto/pkcs12/crypto.go | 2 +- .../x/crypto/pkcs12/internal/rc2/rc2.go | 3 - .../x/crypto/pkcs12/internal/rc2/rc2_test.go | 1 - .../golang.org/x/crypto/poly1305/poly1305.go | 3 +- .../x/crypto/ripemd160/ripemd160_test.go | 18 +- .../x/crypto/ripemd160/ripemd160block.go | 64 +- .../x/crypto/salsa20/salsa/salsa2020_amd64.s | 2 +- .../x/crypto/salsa20/salsa/salsa20_amd64.go | 3 +- .../x/crypto/salsa20/salsa/salsa20_ref.go | 2 +- .../x/crypto/salsa20/salsa/salsa_test.go | 19 + vendor/golang.org/x/crypto/salsa20/salsa20.go | 10 +- .../x/crypto/scrypt/example_test.go | 26 + vendor/golang.org/x/crypto/scrypt/scrypt.go | 9 +- .../golang.org/x/crypto/scrypt/scrypt_test.go | 4 +- vendor/golang.org/x/crypto/sha3/sha3.go | 5 +- vendor/golang.org/x/crypto/sha3/sha3_test.go | 7 +- vendor/golang.org/x/crypto/sha3/shake.go | 2 +- .../golang.org/x/crypto/ssh/agent/client.go | 50 +- .../x/crypto/ssh/agent/client_test.go | 78 +- .../x/crypto/ssh/agent/example_test.go | 15 +- .../golang.org/x/crypto/ssh/agent/server.go | 92 +- .../x/crypto/ssh/agent/server_test.go | 56 +- .../golang.org/x/crypto/ssh/benchmark_test.go | 3 +- vendor/golang.org/x/crypto/ssh/buffer.go | 5 +- vendor/golang.org/x/crypto/ssh/certs.go | 44 +- vendor/golang.org/x/crypto/ssh/certs_test.go | 143 +- vendor/golang.org/x/crypto/ssh/channel.go | 142 +- vendor/golang.org/x/crypto/ssh/cipher.go | 252 +- vendor/golang.org/x/crypto/ssh/cipher_test.go | 92 +- vendor/golang.org/x/crypto/ssh/client.go | 77 +- vendor/golang.org/x/crypto/ssh/client_auth.go | 164 +- .../x/crypto/ssh/client_auth_test.go | 173 +- vendor/golang.org/x/crypto/ssh/client_test.go | 171 +- vendor/golang.org/x/crypto/ssh/common.go | 34 +- vendor/golang.org/x/crypto/ssh/connection.go | 2 +- vendor/golang.org/x/crypto/ssh/doc.go | 3 + .../golang.org/x/crypto/ssh/example_test.go | 68 +- vendor/golang.org/x/crypto/ssh/handshake.go | 59 +- .../golang.org/x/crypto/ssh/handshake_test.go | 36 +- vendor/golang.org/x/crypto/ssh/kex.go | 32 +- vendor/golang.org/x/crypto/ssh/keys.go | 229 +- vendor/golang.org/x/crypto/ssh/keys_test.go | 50 +- .../x/crypto/ssh/knownhosts/knownhosts.go | 546 + .../crypto/ssh/knownhosts/knownhosts_test.go | 329 + vendor/golang.org/x/crypto/ssh/messages.go | 38 +- vendor/golang.org/x/crypto/ssh/mux.go | 6 +- vendor/golang.org/x/crypto/ssh/mux_test.go | 4 - vendor/golang.org/x/crypto/ssh/server.go | 138 +- vendor/golang.org/x/crypto/ssh/session.go | 22 +- .../golang.org/x/crypto/ssh/session_test.go | 10 +- vendor/golang.org/x/crypto/ssh/streamlocal.go | 115 + vendor/golang.org/x/crypto/ssh/tcpip.go | 198 +- .../x/crypto/ssh/terminal/terminal.go | 2 +- .../golang.org/x/crypto/ssh/terminal/util.go | 69 +- .../x/crypto/ssh/terminal/util_bsd.go | 6 +- .../x/crypto/ssh/terminal/util_linux.go | 9 +- .../x/crypto/ssh/terminal/util_solaris.go | 59 +- .../x/crypto/ssh/terminal/util_windows.go | 116 +- .../x/crypto/ssh/test/banner_test.go | 32 + .../golang.org/x/crypto/ssh/test/cert_test.go | 38 +- .../x/crypto/ssh/test/dial_unix_test.go | 128 + vendor/golang.org/x/crypto/ssh/test/doc.go | 2 +- .../x/crypto/ssh/test/forward_unix_test.go | 62 +- .../x/crypto/ssh/test/multi_auth_test.go | 144 + .../x/crypto/ssh/test/session_test.go | 110 +- .../x/crypto/ssh/test/sshd_test_pw.c | 173 + .../x/crypto/ssh/test/tcpip_test.go | 46 - .../x/crypto/ssh/test/test_unix_test.go | 107 +- .../golang.org/x/crypto/ssh/testdata/keys.go | 78 + vendor/golang.org/x/crypto/ssh/transport.go | 70 +- .../golang.org/x/crypto/ssh/transport_test.go | 14 +- vendor/golang.org/x/crypto/tea/cipher.go | 1 - vendor/golang.org/x/crypto/twofish/twofish.go | 2 +- .../x/crypto/twofish/twofish_test.go | 2 +- vendor/golang.org/x/crypto/xtea/block.go | 2 +- vendor/golang.org/x/crypto/xtea/cipher.go | 6 +- vendor/golang.org/x/crypto/xts/xts.go | 43 +- vendor/golang.org/x/crypto/xts/xts_test.go | 20 + vendor/golang.org/x/sys/CONTRIBUTING.md | 15 +- vendor/golang.org/x/sys/README | 3 - vendor/golang.org/x/sys/README.md | 18 + vendor/golang.org/x/sys/plan9/asm.s | 2 +- vendor/golang.org/x/sys/plan9/asm_plan9_arm.s | 25 + vendor/golang.org/x/sys/plan9/env_plan9.go | 6 +- vendor/golang.org/x/sys/plan9/env_unset.go | 14 - vendor/golang.org/x/sys/plan9/errors_plan9.go | 2 +- vendor/golang.org/x/sys/plan9/race.go | 2 +- vendor/golang.org/x/sys/plan9/race0.go | 2 +- vendor/golang.org/x/sys/plan9/syscall.go | 9 +- .../golang.org/x/sys/plan9/syscall_plan9.go | 10 +- .../x/sys/plan9/zsyscall_plan9_arm.go | 284 + vendor/golang.org/x/sys/unix/.gitignore | 1 + vendor/golang.org/x/sys/unix/README.md | 173 + .../golang.org/x/sys/unix/affinity_linux.go | 124 + vendor/golang.org/x/sys/unix/asm_linux_386.s | 36 +- .../golang.org/x/sys/unix/asm_linux_amd64.s | 30 +- vendor/golang.org/x/sys/unix/asm_linux_arm.s | 35 +- .../golang.org/x/sys/unix/asm_linux_arm64.s | 30 +- .../golang.org/x/sys/unix/asm_linux_mips64x.s | 36 +- .../golang.org/x/sys/unix/asm_linux_mipsx.s | 33 +- .../golang.org/x/sys/unix/asm_linux_ppc64x.s | 30 +- .../golang.org/x/sys/unix/asm_linux_s390x.s | 28 + .../golang.org/x/sys/unix/asm_openbsd_arm.s | 29 + .../golang.org/x/sys/unix/asm_solaris_amd64.s | 4 +- vendor/golang.org/x/sys/unix/cap_freebsd.go | 195 + vendor/golang.org/x/sys/unix/creds_test.go | 184 +- vendor/golang.org/x/sys/unix/dev_darwin.go | 24 + .../golang.org/x/sys/unix/dev_darwin_test.go | 51 + vendor/golang.org/x/sys/unix/dev_dragonfly.go | 30 + .../x/sys/unix/dev_dragonfly_test.go | 50 + vendor/golang.org/x/sys/unix/dev_freebsd.go | 30 + vendor/golang.org/x/sys/unix/dev_linux.go | 42 + .../golang.org/x/sys/unix/dev_linux_test.go | 53 + vendor/golang.org/x/sys/unix/dev_netbsd.go | 29 + .../golang.org/x/sys/unix/dev_netbsd_test.go | 50 + vendor/golang.org/x/sys/unix/dev_openbsd.go | 29 + .../golang.org/x/sys/unix/dev_openbsd_test.go | 54 + .../golang.org/x/sys/unix/dev_solaris_test.go | 51 + vendor/golang.org/x/sys/unix/dirent.go | 17 + vendor/golang.org/x/sys/unix/endian_big.go | 9 + vendor/golang.org/x/sys/unix/endian_little.go | 9 + vendor/golang.org/x/sys/unix/env_unix.go | 6 +- vendor/golang.org/x/sys/unix/env_unset.go | 14 - .../x/sys/unix/errors_freebsd_386.go | 227 + .../x/sys/unix/errors_freebsd_amd64.go | 227 + .../x/sys/unix/errors_freebsd_arm.go | 226 + vendor/golang.org/x/sys/unix/example_test.go | 19 + vendor/golang.org/x/sys/unix/export_test.go | 2 +- .../x/sys/unix/{flock.go => fcntl.go} | 8 +- ...ck_linux_32bit.go => fcntl_linux_32bit.go} | 0 vendor/golang.org/x/sys/unix/gccgo.go | 19 +- vendor/golang.org/x/sys/unix/gccgo_c.c | 8 +- .../x/sys/unix/gccgo_linux_amd64.go | 2 +- .../x/sys/unix/gccgo_linux_sparc64.go | 20 - vendor/golang.org/x/sys/unix/linux/Dockerfile | 48 + vendor/golang.org/x/sys/unix/linux/mkall.go | 482 + .../{mksysnum_linux.pl => linux/mksysnum.pl} | 15 +- vendor/golang.org/x/sys/unix/linux/types.go | 696 + vendor/golang.org/x/sys/unix/mkall.sh | 172 +- vendor/golang.org/x/sys/unix/mkerrors.sh | 98 +- vendor/golang.org/x/sys/unix/mkpost.go | 83 +- vendor/golang.org/x/sys/unix/mksyscall.pl | 29 +- .../x/sys/unix/mksyscall_solaris.pl | 2 +- .../golang.org/x/sys/unix/mksysnum_darwin.pl | 2 +- .../x/sys/unix/mksysnum_dragonfly.pl | 2 +- .../golang.org/x/sys/unix/mksysnum_freebsd.pl | 15 +- .../golang.org/x/sys/unix/mksysnum_netbsd.pl | 4 +- .../golang.org/x/sys/unix/mksysnum_openbsd.pl | 2 +- .../golang.org/x/sys/unix/mmap_unix_test.go | 12 + .../golang.org/x/sys/unix/openbsd_pledge.go | 38 + vendor/golang.org/x/sys/unix/openbsd_test.go | 113 + vendor/golang.org/x/sys/unix/pagesize_unix.go | 15 + vendor/golang.org/x/sys/unix/race.go | 2 +- vendor/golang.org/x/sys/unix/race0.go | 2 +- .../golang.org/x/sys/unix/sockcmsg_linux.go | 2 +- vendor/golang.org/x/sys/unix/sockcmsg_unix.go | 9 +- vendor/golang.org/x/sys/unix/syscall.go | 35 +- vendor/golang.org/x/sys/unix/syscall_bsd.go | 100 +- .../golang.org/x/sys/unix/syscall_bsd_test.go | 31 + .../golang.org/x/sys/unix/syscall_darwin.go | 175 +- .../x/sys/unix/syscall_darwin_386.go | 19 +- .../x/sys/unix/syscall_darwin_amd64.go | 21 +- .../x/sys/unix/syscall_darwin_arm.go | 23 +- .../x/sys/unix/syscall_darwin_arm64.go | 19 +- .../x/sys/unix/syscall_dragonfly.go | 188 +- .../x/sys/unix/syscall_dragonfly_amd64.go | 17 +- .../golang.org/x/sys/unix/syscall_freebsd.go | 192 +- .../x/sys/unix/syscall_freebsd_386.go | 17 +- .../x/sys/unix/syscall_freebsd_amd64.go | 17 +- .../x/sys/unix/syscall_freebsd_arm.go | 17 +- .../x/sys/unix/syscall_freebsd_test.go | 279 +- vendor/golang.org/x/sys/unix/syscall_linux.go | 347 +- .../x/sys/unix/syscall_linux_386.go | 22 +- .../x/sys/unix/syscall_linux_amd64.go | 18 +- .../x/sys/unix/syscall_linux_arm.go | 18 +- .../x/sys/unix/syscall_linux_arm64.go | 28 +- .../golang.org/x/sys/unix/syscall_linux_gc.go | 14 + .../x/sys/unix/syscall_linux_gccgo.go | 21 + .../x/sys/unix/syscall_linux_mips64x.go | 34 +- .../x/sys/unix/syscall_linux_mipsx.go | 23 +- .../x/sys/unix/syscall_linux_ppc64x.go | 21 +- .../x/sys/unix/syscall_linux_s390x.go | 18 +- .../x/sys/unix/syscall_linux_sparc64.go | 37 +- .../x/sys/unix/syscall_linux_test.go | 315 +- .../golang.org/x/sys/unix/syscall_netbsd.go | 149 +- .../x/sys/unix/syscall_netbsd_386.go | 17 +- .../x/sys/unix/syscall_netbsd_amd64.go | 17 +- .../x/sys/unix/syscall_netbsd_arm.go | 17 +- .../golang.org/x/sys/unix/syscall_no_getwd.go | 11 - .../golang.org/x/sys/unix/syscall_openbsd.go | 170 +- .../x/sys/unix/syscall_openbsd_386.go | 17 +- .../x/sys/unix/syscall_openbsd_amd64.go | 17 +- .../x/sys/unix/syscall_openbsd_arm.go | 33 + .../golang.org/x/sys/unix/syscall_solaris.go | 150 +- .../x/sys/unix/syscall_solaris_amd64.go | 20 +- .../x/sys/unix/syscall_solaris_test.go | 55 + vendor/golang.org/x/sys/unix/syscall_test.go | 10 + vendor/golang.org/x/sys/unix/syscall_unix.go | 79 + .../x/sys/unix/syscall_unix_test.go | 238 +- vendor/golang.org/x/sys/unix/timestruct.go | 82 + .../golang.org/x/sys/unix/timestruct_test.go | 54 + vendor/golang.org/x/sys/unix/types_darwin.go | 29 +- .../golang.org/x/sys/unix/types_dragonfly.go | 40 +- vendor/golang.org/x/sys/unix/types_freebsd.go | 51 +- vendor/golang.org/x/sys/unix/types_linux.go | 469 - vendor/golang.org/x/sys/unix/types_netbsd.go | 51 +- vendor/golang.org/x/sys/unix/types_openbsd.go | 40 +- vendor/golang.org/x/sys/unix/types_solaris.go | 31 +- .../x/sys/unix/zerrors_darwin_386.go | 199 +- .../x/sys/unix/zerrors_darwin_amd64.go | 199 +- .../x/sys/unix/zerrors_darwin_arm.go | 488 +- .../x/sys/unix/zerrors_darwin_arm64.go | 199 +- .../x/sys/unix/zerrors_dragonfly_amd64.go | 66 +- .../x/sys/unix/zerrors_freebsd_386.go | 2915 +- .../x/sys/unix/zerrors_freebsd_amd64.go | 2921 +- .../x/sys/unix/zerrors_freebsd_arm.go | 2910 +- .../x/sys/unix/zerrors_linux_386.go | 3475 ++- .../x/sys/unix/zerrors_linux_amd64.go | 3484 ++- .../x/sys/unix/zerrors_linux_arm.go | 3411 ++- .../x/sys/unix/zerrors_linux_arm64.go | 3542 ++- .../x/sys/unix/zerrors_linux_mips.go | 3457 ++- .../x/sys/unix/zerrors_linux_mips64.go | 3549 ++- .../x/sys/unix/zerrors_linux_mips64le.go | 3549 ++- .../x/sys/unix/zerrors_linux_mipsle.go | 3650 +-- .../x/sys/unix/zerrors_linux_ppc64.go | 3685 +-- .../x/sys/unix/zerrors_linux_ppc64le.go | 3681 +-- .../x/sys/unix/zerrors_linux_s390x.go | 3739 +-- .../x/sys/unix/zerrors_netbsd_386.go | 10 +- .../x/sys/unix/zerrors_netbsd_amd64.go | 10 +- .../x/sys/unix/zerrors_netbsd_arm.go | 13 +- .../x/sys/unix/zerrors_openbsd_386.go | 10 +- .../x/sys/unix/zerrors_openbsd_amd64.go | 10 +- .../x/sys/unix/zerrors_openbsd_arm.go | 1594 + .../x/sys/unix/zerrors_solaris_amd64.go | 55 +- .../golang.org/x/sys/unix/zptrace386_linux.go | 80 + .../golang.org/x/sys/unix/zptracearm_linux.go | 41 + .../x/sys/unix/zptracemips_linux.go | 50 + .../x/sys/unix/zptracemipsle_linux.go | 50 + .../x/sys/unix/zsyscall_darwin_386.go | 355 +- .../x/sys/unix/zsyscall_darwin_amd64.go | 370 +- .../x/sys/unix/zsyscall_darwin_arm.go | 357 +- .../x/sys/unix/zsyscall_darwin_arm64.go | 355 +- .../x/sys/unix/zsyscall_dragonfly_amd64.go | 264 +- .../x/sys/unix/zsyscall_freebsd_386.go | 438 +- .../x/sys/unix/zsyscall_freebsd_amd64.go | 438 +- .../x/sys/unix/zsyscall_freebsd_arm.go | 438 +- .../x/sys/unix/zsyscall_linux_386.go | 405 +- .../x/sys/unix/zsyscall_linux_amd64.go | 405 +- .../x/sys/unix/zsyscall_linux_arm.go | 405 +- .../x/sys/unix/zsyscall_linux_arm64.go | 411 +- .../x/sys/unix/zsyscall_linux_mips.go | 415 +- .../x/sys/unix/zsyscall_linux_mips64.go | 436 +- .../x/sys/unix/zsyscall_linux_mips64le.go | 436 +- .../x/sys/unix/zsyscall_linux_mipsle.go | 415 +- .../x/sys/unix/zsyscall_linux_ppc64.go | 417 +- .../x/sys/unix/zsyscall_linux_ppc64le.go | 417 +- .../x/sys/unix/zsyscall_linux_s390x.go | 405 +- .../x/sys/unix/zsyscall_linux_sparc64.go | 23 +- .../x/sys/unix/zsyscall_netbsd_386.go | 263 +- .../x/sys/unix/zsyscall_netbsd_amd64.go | 263 +- .../x/sys/unix/zsyscall_netbsd_arm.go | 265 +- .../x/sys/unix/zsyscall_openbsd_386.go | 253 +- .../x/sys/unix/zsyscall_openbsd_amd64.go | 253 +- .../x/sys/unix/zsyscall_openbsd_arm.go | 1472 + .../x/sys/unix/zsyscall_solaris_amd64.go | 221 +- ...sctl_openbsd.go => zsysctl_openbsd_386.go} | 0 .../x/sys/unix/zsysctl_openbsd_amd64.go | 270 + .../x/sys/unix/zsysctl_openbsd_arm.go | 270 + .../x/sys/unix/zsysnum_darwin_386.go | 60 +- .../x/sys/unix/zsysnum_darwin_amd64.go | 60 +- .../x/sys/unix/zsysnum_darwin_arm.go | 120 +- .../x/sys/unix/zsysnum_darwin_arm64.go | 60 +- .../x/sys/unix/zsysnum_dragonfly_amd64.go | 21 +- .../x/sys/unix/zsysnum_freebsd_386.go | 686 +- .../x/sys/unix/zsysnum_freebsd_amd64.go | 686 +- .../x/sys/unix/zsysnum_freebsd_arm.go | 686 +- .../x/sys/unix/zsysnum_linux_386.go | 6 +- .../x/sys/unix/zsysnum_linux_amd64.go | 5 +- .../x/sys/unix/zsysnum_linux_arm.go | 5 +- .../x/sys/unix/zsysnum_linux_arm64.go | 5 +- .../x/sys/unix/zsysnum_linux_mips.go | 5 +- .../x/sys/unix/zsysnum_linux_mips64.go | 5 +- .../x/sys/unix/zsysnum_linux_mips64le.go | 5 +- .../x/sys/unix/zsysnum_linux_mipsle.go | 5 +- .../x/sys/unix/zsysnum_linux_ppc64.go | 5 +- .../x/sys/unix/zsysnum_linux_ppc64le.go | 5 +- .../x/sys/unix/zsysnum_linux_s390x.go | 7 +- .../x/sys/unix/zsysnum_netbsd_386.go | 1 + .../x/sys/unix/zsysnum_netbsd_amd64.go | 1 + .../x/sys/unix/zsysnum_netbsd_arm.go | 1 + .../x/sys/unix/zsysnum_openbsd_arm.go | 213 + .../x/sys/unix/zsysnum_solaris_amd64.go | 13 - .../x/sys/unix/ztypes_darwin_386.go | 158 +- .../x/sys/unix/ztypes_darwin_amd64.go | 199 +- .../x/sys/unix/ztypes_darwin_arm.go | 153 +- .../x/sys/unix/ztypes_darwin_arm64.go | 204 +- .../x/sys/unix/ztypes_dragonfly_amd64.go | 149 +- .../x/sys/unix/ztypes_freebsd_386.go | 111 +- .../x/sys/unix/ztypes_freebsd_amd64.go | 107 +- .../x/sys/unix/ztypes_freebsd_arm.go | 119 +- .../golang.org/x/sys/unix/ztypes_linux_386.go | 492 +- .../x/sys/unix/ztypes_linux_amd64.go | 556 +- .../golang.org/x/sys/unix/ztypes_linux_arm.go | 534 +- .../x/sys/unix/ztypes_linux_arm64.go | 558 +- .../x/sys/unix/ztypes_linux_mips.go | 547 +- .../x/sys/unix/ztypes_linux_mips64.go | 553 +- .../x/sys/unix/ztypes_linux_mips64le.go | 553 +- .../x/sys/unix/ztypes_linux_mipsle.go | 547 +- .../x/sys/unix/ztypes_linux_ppc64.go | 560 +- .../x/sys/unix/ztypes_linux_ppc64le.go | 560 +- .../x/sys/unix/ztypes_linux_s390x.go | 458 +- .../x/sys/unix/ztypes_linux_sparc64.go | 222 +- .../x/sys/unix/ztypes_netbsd_386.go | 56 +- .../x/sys/unix/ztypes_netbsd_amd64.go | 56 +- .../x/sys/unix/ztypes_netbsd_arm.go | 56 +- .../x/sys/unix/ztypes_openbsd_386.go | 47 +- .../x/sys/unix/ztypes_openbsd_amd64.go | 47 +- .../x/sys/unix/ztypes_openbsd_arm.go | 477 + .../x/sys/unix/ztypes_solaris_amd64.go | 228 +- .../golang.org/x/sys/windows/dll_windows.go | 10 +- vendor/golang.org/x/sys/windows/env_unset.go | 15 - .../golang.org/x/sys/windows/env_windows.go | 6 +- .../x/sys/windows/memory_windows.go | 26 + vendor/golang.org/x/sys/windows/mksyscall.go | 2 +- vendor/golang.org/x/sys/windows/race.go | 2 +- vendor/golang.org/x/sys/windows/race0.go | 2 +- .../golang.org/x/sys/windows/registry/key.go | 10 +- .../x/sys/windows/registry/registry_test.go | 4 +- .../x/sys/windows/security_windows.go | 43 +- vendor/golang.org/x/sys/windows/service.go | 21 + .../x/sys/windows/svc/debug/service.go | 2 +- .../x/sys/windows/svc/eventlog/log_test.go | 2 +- vendor/golang.org/x/sys/windows/svc/go12.go | 2 +- vendor/golang.org/x/sys/windows/svc/go13.go | 2 +- .../golang.org/x/sys/windows/svc/mgr/mgr.go | 47 +- .../x/sys/windows/svc/mgr/mgr_test.go | 17 +- .../x/sys/windows/svc/mgr/service.go | 4 +- .../golang.org/x/sys/windows/svc/service.go | 97 +- .../golang.org/x/sys/windows/svc/svc_test.go | 2 +- vendor/golang.org/x/sys/windows/svc/sys_386.s | 7 +- .../golang.org/x/sys/windows/svc/sys_amd64.s | 7 +- vendor/golang.org/x/sys/windows/syscall.go | 9 +- .../golang.org/x/sys/windows/syscall_test.go | 20 + .../x/sys/windows/syscall_windows.go | 188 +- .../x/sys/windows/syscall_windows_test.go | 2 +- .../{ztypes_windows.go => types_windows.go} | 119 +- ...es_windows_386.go => types_windows_386.go} | 2 +- ...indows_amd64.go => types_windows_amd64.go} | 2 +- .../x/sys/windows/zsyscall_windows.go | 421 +- 1497 files changed, 482105 insertions(+), 99418 deletions(-) create mode 100644 vendor/github.com/aws/aws-sdk-go/CODE_OF_CONDUCT.md create mode 100644 vendor/github.com/aws/aws-sdk-go/aws/client/default_retryer_test.go create mode 100644 vendor/github.com/aws/aws-sdk-go/aws/corehandlers/user_agent.go create mode 100644 vendor/github.com/aws/aws-sdk-go/aws/corehandlers/user_agent_test.go create mode 100644 vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/object_checksum_test.go create mode 100644 vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/shared_test.go create mode 100644 vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/autoscalingplans/autoscalingplans.feature create mode 100644 vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/autoscalingplans/client.go create mode 100644 vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudhsmv2/client.go create mode 100644 vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudhsmv2/cloudhsmv2.feature create mode 100644 vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/mediastore/client.go create mode 100644 vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/mediastore/mediastore.feature create mode 100644 vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/mediastoredata/client.go create mode 100644 vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/mediastoredata/mediastoredata.feature create mode 100644 vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/mobile/client.go create mode 100644 vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/mobile/mobile.feature create mode 100644 vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/sagemakerruntime/client.go create mode 100644 vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/sagemakerruntime/sagemakerruntime.feature create mode 100644 vendor/github.com/aws/aws-sdk-go/buildspec.yml create mode 100644 vendor/github.com/aws/aws-sdk-go/example/aws/request/customRetryer/README.md create mode 100644 vendor/github.com/aws/aws-sdk-go/example/aws/request/customRetryer/custom_retryer.go create mode 100644 vendor/github.com/aws/aws-sdk-go/example/service/s3/sync/README.md create mode 100644 vendor/github.com/aws/aws-sdk-go/example/service/s3/sync/sync.go create mode 100644 vendor/github.com/aws/aws-sdk-go/internal/sdkio/io_go1.6.go create mode 100644 vendor/github.com/aws/aws-sdk-go/internal/sdkio/io_go1.7.go create mode 100644 vendor/github.com/aws/aws-sdk-go/internal/sdkrand/locked_source.go rename vendor/github.com/aws/aws-sdk-go/models/apis/{mgh => AWSMigrationHub}/2017-05-31/api-2.json (99%) rename vendor/github.com/aws/aws-sdk-go/models/apis/{mgh => AWSMigrationHub}/2017-05-31/docs-2.json (87%) rename vendor/github.com/aws/aws-sdk-go/models/apis/{AWS Glue/2017-03-31 => AWSMigrationHub/2017-05-31}/examples-1.json (100%) rename vendor/github.com/aws/aws-sdk-go/models/apis/{mgh => AWSMigrationHub}/2017-05-31/paginators-1.json (100%) create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/acm-pca/2017-08-22/api-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/acm-pca/2017-08-22/docs-2.json rename vendor/github.com/aws/aws-sdk-go/models/apis/{MobileHub/2017-07-01 => acm-pca/2017-08-22}/examples-1.json (100%) create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/acm-pca/2017-08-22/paginators-1.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/acm/2015-12-08/smoke.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/alexaforbusiness/2017-11-09/api-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/alexaforbusiness/2017-11-09/docs-2.json rename vendor/github.com/aws/aws-sdk-go/models/apis/{mgh/2017-05-31 => alexaforbusiness/2017-11-09}/examples-1.json (100%) create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/alexaforbusiness/2017-11-09/paginators-1.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/apigateway/2015-07-09/smoke.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/application-autoscaling/2016-02-06/smoke.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/appsync/2017-07-25/api-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/appsync/2017-07-25/docs-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/appsync/2017-07-25/examples-1.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/appsync/2017-07-25/paginators-1.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/autoscaling-plans/2018-01-06/api-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/autoscaling-plans/2018-01-06/docs-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/autoscaling-plans/2018-01-06/examples-1.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/autoscaling-plans/2018-01-06/paginators-1.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/batch/2016-08-10/smoke.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/ce/2017-10-25/api-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/ce/2017-10-25/docs-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/ce/2017-10-25/examples-1.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/ce/2017-10-25/paginators-1.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/check_collisions_test.go create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/cloud9/2017-09-23/api-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/cloud9/2017-09-23/docs-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/cloud9/2017-09-23/examples-1.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/cloud9/2017-09-23/paginators-1.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/cloudfront/2017-10-30/api-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/cloudfront/2017-10-30/docs-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/cloudfront/2017-10-30/examples-1.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/cloudfront/2017-10-30/paginators-1.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/cloudfront/2017-10-30/smoke.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/cloudfront/2017-10-30/waiters-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/cloudhsm/2014-05-30/paginators-1.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/cloudhsmv2/2017-04-28/smoke.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/codecommit/2015-04-13/smoke.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/comprehend/2017-11-27/api-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/comprehend/2017-11-27/docs-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/comprehend/2017-11-27/examples-1.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/comprehend/2017-11-27/paginators-1.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/config/2014-11-12/smoke.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/connect/2017-08-08/api-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/connect/2017-08-08/docs-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/connect/2017-08-08/examples-1.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/connect/2017-08-08/paginators-1.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/devicefarm/2015-06-23/smoke.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/dms/2016-01-01/smoke.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/ds/2015-04-16/smoke.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/ec2/2016-11-15/smoke.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/elasticbeanstalk/2010-12-01/smoke.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/elasticloadbalancingv2/2015-12-01/smoke.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/es/2015-01-01/smoke.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/events/2015-10-07/smoke.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/fms/2018-01-01/api-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/fms/2018-01-01/docs-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/fms/2018-01-01/examples-1.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/fms/2018-01-01/paginators-1.json rename vendor/github.com/aws/aws-sdk-go/models/apis/{AWS Glue => glue}/2017-03-31/api-2.json (90%) rename vendor/github.com/aws/aws-sdk-go/models/apis/{AWS Glue => glue}/2017-03-31/docs-2.json (68%) create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/glue/2017-03-31/examples-1.json rename vendor/github.com/aws/aws-sdk-go/models/apis/{AWS Glue => glue}/2017-03-31/paginators-1.json (100%) create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/guardduty/2017-11-28/api-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/guardduty/2017-11-28/docs-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/guardduty/2017-11-28/paginators-1.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/iam/2010-05-08/smoke.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/iot-jobs-data/2017-09-29/api-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/iot-jobs-data/2017-09-29/docs-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/iot-jobs-data/2017-09-29/examples-1.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/iot-jobs-data/2017-09-29/paginators-1.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/kinesis-video-archived-media/2017-09-30/api-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/kinesis-video-archived-media/2017-09-30/docs-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/kinesis-video-archived-media/2017-09-30/examples-1.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/kinesis-video-archived-media/2017-09-30/paginators-1.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/kinesis-video-media/2017-09-30/api-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/kinesis-video-media/2017-09-30/docs-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/kinesis-video-media/2017-09-30/examples-1.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/kinesis-video-media/2017-09-30/paginators-1.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/kinesis/2013-12-02/smoke.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/kinesisvideo/2017-09-30/api-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/kinesisvideo/2017-09-30/docs-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/kinesisvideo/2017-09-30/examples-1.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/kinesisvideo/2017-09-30/paginators-1.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/kms/2014-11-01/smoke.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/lambda/2015-03-31/smoke.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/mediaconvert/2017-08-29/api-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/mediaconvert/2017-08-29/docs-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/medialive/2017-10-14/api-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/medialive/2017-10-14/docs-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/medialive/2017-10-14/paginators-1.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/mediapackage/2017-10-12/api-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/mediapackage/2017-10-12/docs-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/mediapackage/2017-10-12/paginators-1.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/mediastore-data/2017-09-01/api-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/mediastore-data/2017-09-01/docs-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/mediastore-data/2017-09-01/examples-1.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/mediastore-data/2017-09-01/paginators-1.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/mediastore/2017-09-01/api-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/mediastore/2017-09-01/docs-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/mediastore/2017-09-01/examples-1.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/mediastore/2017-09-01/paginators-1.json rename vendor/github.com/aws/aws-sdk-go/models/apis/{MobileHub => mobile}/2017-07-01/api-2.json (100%) rename vendor/github.com/aws/aws-sdk-go/models/apis/{MobileHub => mobile}/2017-07-01/docs-2.json (100%) create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/mobile/2017-07-01/examples-1.json rename vendor/github.com/aws/aws-sdk-go/models/apis/{MobileHub => mobile}/2017-07-01/paginators-1.json (100%) create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/mq/2017-11-27/api-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/mq/2017-11-27/docs-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/mturk-requester/2017-01-17/smoke.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/opsworks/2013-02-18/smoke.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/opsworkscm/2016-11-01/waiters-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/pricing/2017-10-15/api-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/pricing/2017-10-15/docs-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/pricing/2017-10-15/examples-1.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/pricing/2017-10-15/paginators-1.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/rds/2013-01-10/smoke.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/rds/2013-02-12/smoke.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/rds/2013-09-09/smoke.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/rds/2014-09-01/smoke.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/rds/2014-10-31/smoke.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/redshift/2012-12-01/smoke.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/resource-groups/2017-11-27/api-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/resource-groups/2017-11-27/docs-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/resource-groups/2017-11-27/examples-1.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/resource-groups/2017-11-27/paginators-1.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/route53/2013-04-01/smoke.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/runtime.sagemaker/2017-05-13/api-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/runtime.sagemaker/2017-05-13/docs-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/runtime.sagemaker/2017-05-13/examples-1.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/runtime.sagemaker/2017-05-13/paginators-1.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/s3/2006-03-01/smoke.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/sagemaker/2017-07-24/api-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/sagemaker/2017-07-24/docs-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/sagemaker/2017-07-24/examples-1.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/sagemaker/2017-07-24/paginators-1.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/sagemaker/2017-07-24/waiters-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/secretsmanager/2017-10-17/api-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/secretsmanager/2017-10-17/docs-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/secretsmanager/2017-10-17/examples-1.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/secretsmanager/2017-10-17/paginators-1.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/serverlessrepo/2017-09-08/api-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/serverlessrepo/2017-09-08/docs-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/serverlessrepo/2017-09-08/paginators-1.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/servicediscovery/2017-03-14/api-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/servicediscovery/2017-03-14/docs-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/servicediscovery/2017-03-14/examples-1.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/servicediscovery/2017-03-14/paginators-1.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/shield/2016-06-02/paginators-1.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/ssm/2014-11-06/smoke.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/sts/2011-06-15/smoke.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/stub.go create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/transcribe/2017-10-26/api-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/transcribe/2017-10-26/docs-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/transcribe/2017-10-26/examples-1.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/transcribe/2017-10-26/paginators-1.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/translate/2017-07-01/api-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/translate/2017-07-01/docs-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/translate/2017-07-01/examples-1.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/translate/2017-07-01/paginators-1.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/waf-regional/2016-11-28/smoke.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/waf/2015-08-24/smoke.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/workmail/2017-10-01/api-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/workmail/2017-10-01/docs-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/workmail/2017-10-01/examples-1.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/workmail/2017-10-01/paginators-1.json create mode 100644 vendor/github.com/aws/aws-sdk-go/private/model/api/eventstream.go create mode 100644 vendor/github.com/aws/aws-sdk-go/private/model/api/eventstream_test.go create mode 100644 vendor/github.com/aws/aws-sdk-go/private/protocol/jsonvalue.go create mode 100644 vendor/github.com/aws/aws-sdk-go/private/protocol/jsonvalue_test.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/xml_to_struct_test.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/acmpca/acmpcaiface/interface.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/acmpca/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/acmpca/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/acmpca/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/acmpca/service.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/alexaforbusiness/alexaforbusinessiface/interface.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/alexaforbusiness/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/alexaforbusiness/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/alexaforbusiness/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/alexaforbusiness/service.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/appsync/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/appsync/appsynciface/interface.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/appsync/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/appsync/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/appsync/service.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/autoscalingplans/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/autoscalingplans/autoscalingplansiface/interface.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/autoscalingplans/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/autoscalingplans/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/autoscalingplans/service.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloud9/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloud9/cloud9iface/interface.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloud9/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloud9/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloud9/examples_test.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloud9/service.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/comprehend/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/comprehend/comprehendiface/interface.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/comprehend/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/comprehend/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/comprehend/service.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/connect/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/connect/connectiface/interface.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/connect/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/connect/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/connect/service.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/costexplorer/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/costexplorer/costexploreriface/interface.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/costexplorer/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/costexplorer/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/costexplorer/service.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/ec2/retryer_test.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/fms/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/fms/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/fms/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/fms/fmsiface/interface.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/fms/service.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/guardduty/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/guardduty/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/guardduty/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/guardduty/guarddutyiface/interface.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/guardduty/service.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/iotjobsdataplane/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/iotjobsdataplane/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/iotjobsdataplane/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/iotjobsdataplane/iotjobsdataplaneiface/interface.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/iotjobsdataplane/service.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/kinesisvideo/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/kinesisvideo/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/kinesisvideo/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/kinesisvideo/kinesisvideoiface/interface.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/kinesisvideo/service.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/kinesisvideoarchivedmedia/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/kinesisvideoarchivedmedia/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/kinesisvideoarchivedmedia/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/kinesisvideoarchivedmedia/kinesisvideoarchivedmediaiface/interface.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/kinesisvideoarchivedmedia/service.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/kinesisvideomedia/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/kinesisvideomedia/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/kinesisvideomedia/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/kinesisvideomedia/kinesisvideomediaiface/interface.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/kinesisvideomedia/service.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/mediaconvert/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/mediaconvert/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/mediaconvert/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/mediaconvert/mediaconvertiface/interface.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/mediaconvert/service.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/medialive/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/medialive/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/medialive/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/medialive/medialiveiface/interface.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/medialive/service.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/mediapackage/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/mediapackage/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/mediapackage/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/mediapackage/mediapackageiface/interface.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/mediapackage/service.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/mediastore/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/mediastore/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/mediastore/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/mediastore/mediastoreiface/interface.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/mediastore/service.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/mediastoredata/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/mediastoredata/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/mediastoredata/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/mediastoredata/mediastoredataiface/interface.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/mediastoredata/service.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/mq/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/mq/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/mq/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/mq/mqiface/interface.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/mq/service.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/opsworkscm/waiters.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/pricing/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/pricing/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/pricing/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/pricing/examples_test.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/pricing/pricingiface/interface.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/pricing/service.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/resourcegroups/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/resourcegroups/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/resourcegroups/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/resourcegroups/resourcegroupsiface/interface.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/resourcegroups/service.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/s3/bench_test.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/s3/body_hash.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/s3/body_hash_test.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/s3/content_md5.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/batch_1_7_test.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/sagemaker/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/sagemaker/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/sagemaker/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/sagemaker/sagemakeriface/interface.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/sagemaker/service.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/sagemaker/waiters.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/sagemakerruntime/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/sagemakerruntime/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/sagemakerruntime/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/sagemakerruntime/sagemakerruntimeiface/interface.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/sagemakerruntime/service.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/secretsmanager/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/secretsmanager/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/secretsmanager/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/secretsmanager/secretsmanageriface/interface.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/secretsmanager/service.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/serverlessapplicationrepository/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/serverlessapplicationrepository/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/serverlessapplicationrepository/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/serverlessapplicationrepository/serverlessapplicationrepositoryiface/interface.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/serverlessapplicationrepository/service.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/servicediscovery/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/servicediscovery/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/servicediscovery/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/servicediscovery/service.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/servicediscovery/servicediscoveryiface/interface.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/transcribeservice/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/transcribeservice/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/transcribeservice/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/transcribeservice/service.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/transcribeservice/transcribeserviceiface/interface.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/translate/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/translate/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/translate/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/translate/service.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/translate/translateiface/interface.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/workmail/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/workmail/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/workmail/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/workmail/service.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/workmail/workmailiface/interface.go create mode 100644 vendor/github.com/h2non/filetype/matchers/document.go create mode 100644 vendor/github.com/syndtr/goleveldb/leveldb/storage.go delete mode 100644 vendor/golang.org/x/crypto/README create mode 100644 vendor/golang.org/x/crypto/README.md create mode 100644 vendor/golang.org/x/crypto/acme/autocert/example_test.go create mode 100644 vendor/golang.org/x/crypto/acme/autocert/listener.go create mode 100644 vendor/golang.org/x/crypto/acme/types_test.go create mode 100644 vendor/golang.org/x/crypto/argon2/argon2.go create mode 100644 vendor/golang.org/x/crypto/argon2/argon2_test.go create mode 100644 vendor/golang.org/x/crypto/argon2/blake2b.go create mode 100644 vendor/golang.org/x/crypto/argon2/blamka_amd64.go create mode 100644 vendor/golang.org/x/crypto/argon2/blamka_amd64.s create mode 100644 vendor/golang.org/x/crypto/argon2/blamka_generic.go create mode 100644 vendor/golang.org/x/crypto/argon2/blamka_ref.go create mode 100644 vendor/golang.org/x/crypto/blake2b/blake2x.go create mode 100644 vendor/golang.org/x/crypto/blake2s/blake2x.go create mode 100644 vendor/golang.org/x/crypto/cryptobyte/asn1/asn1.go rename vendor/golang.org/x/crypto/{chacha20poly1305 => }/internal/chacha20/chacha_generic.go (96%) rename vendor/golang.org/x/crypto/{chacha20poly1305 => }/internal/chacha20/chacha_test.go (100%) create mode 100644 vendor/golang.org/x/crypto/md4/example_test.go create mode 100644 vendor/golang.org/x/crypto/nacl/auth/auth.go create mode 100644 vendor/golang.org/x/crypto/nacl/auth/auth_test.go create mode 100644 vendor/golang.org/x/crypto/nacl/auth/example_test.go create mode 100644 vendor/golang.org/x/crypto/nacl/box/example_test.go create mode 100644 vendor/golang.org/x/crypto/nacl/sign/sign.go create mode 100644 vendor/golang.org/x/crypto/nacl/sign/sign_test.go create mode 100644 vendor/golang.org/x/crypto/scrypt/example_test.go create mode 100644 vendor/golang.org/x/crypto/ssh/knownhosts/knownhosts.go create mode 100644 vendor/golang.org/x/crypto/ssh/knownhosts/knownhosts_test.go create mode 100644 vendor/golang.org/x/crypto/ssh/streamlocal.go create mode 100644 vendor/golang.org/x/crypto/ssh/test/banner_test.go create mode 100644 vendor/golang.org/x/crypto/ssh/test/dial_unix_test.go create mode 100644 vendor/golang.org/x/crypto/ssh/test/multi_auth_test.go create mode 100644 vendor/golang.org/x/crypto/ssh/test/sshd_test_pw.c delete mode 100644 vendor/golang.org/x/crypto/ssh/test/tcpip_test.go delete mode 100644 vendor/golang.org/x/sys/README create mode 100644 vendor/golang.org/x/sys/README.md create mode 100644 vendor/golang.org/x/sys/plan9/asm_plan9_arm.s delete mode 100644 vendor/golang.org/x/sys/plan9/env_unset.go create mode 100644 vendor/golang.org/x/sys/plan9/zsyscall_plan9_arm.go create mode 100644 vendor/golang.org/x/sys/unix/README.md create mode 100644 vendor/golang.org/x/sys/unix/affinity_linux.go create mode 100644 vendor/golang.org/x/sys/unix/asm_openbsd_arm.s create mode 100644 vendor/golang.org/x/sys/unix/cap_freebsd.go create mode 100644 vendor/golang.org/x/sys/unix/dev_darwin.go create mode 100644 vendor/golang.org/x/sys/unix/dev_darwin_test.go create mode 100644 vendor/golang.org/x/sys/unix/dev_dragonfly.go create mode 100644 vendor/golang.org/x/sys/unix/dev_dragonfly_test.go create mode 100644 vendor/golang.org/x/sys/unix/dev_freebsd.go create mode 100644 vendor/golang.org/x/sys/unix/dev_linux.go create mode 100644 vendor/golang.org/x/sys/unix/dev_linux_test.go create mode 100644 vendor/golang.org/x/sys/unix/dev_netbsd.go create mode 100644 vendor/golang.org/x/sys/unix/dev_netbsd_test.go create mode 100644 vendor/golang.org/x/sys/unix/dev_openbsd.go create mode 100644 vendor/golang.org/x/sys/unix/dev_openbsd_test.go create mode 100644 vendor/golang.org/x/sys/unix/dev_solaris_test.go create mode 100644 vendor/golang.org/x/sys/unix/dirent.go create mode 100644 vendor/golang.org/x/sys/unix/endian_big.go create mode 100644 vendor/golang.org/x/sys/unix/endian_little.go delete mode 100644 vendor/golang.org/x/sys/unix/env_unset.go create mode 100644 vendor/golang.org/x/sys/unix/errors_freebsd_386.go create mode 100644 vendor/golang.org/x/sys/unix/errors_freebsd_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/errors_freebsd_arm.go create mode 100644 vendor/golang.org/x/sys/unix/example_test.go rename vendor/golang.org/x/sys/unix/{flock.go => fcntl.go} (74%) rename vendor/golang.org/x/sys/unix/{flock_linux_32bit.go => fcntl_linux_32bit.go} (100%) delete mode 100644 vendor/golang.org/x/sys/unix/gccgo_linux_sparc64.go create mode 100644 vendor/golang.org/x/sys/unix/linux/Dockerfile create mode 100644 vendor/golang.org/x/sys/unix/linux/mkall.go rename vendor/golang.org/x/sys/unix/{mksysnum_linux.pl => linux/mksysnum.pl} (78%) create mode 100644 vendor/golang.org/x/sys/unix/linux/types.go create mode 100644 vendor/golang.org/x/sys/unix/openbsd_pledge.go create mode 100644 vendor/golang.org/x/sys/unix/openbsd_test.go create mode 100644 vendor/golang.org/x/sys/unix/pagesize_unix.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_gc.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_gccgo.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_no_getwd.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_solaris_test.go create mode 100644 vendor/golang.org/x/sys/unix/timestruct.go create mode 100644 vendor/golang.org/x/sys/unix/timestruct_test.go delete mode 100644 vendor/golang.org/x/sys/unix/types_linux.go create mode 100644 vendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go create mode 100644 vendor/golang.org/x/sys/unix/zptrace386_linux.go create mode 100644 vendor/golang.org/x/sys/unix/zptracearm_linux.go create mode 100644 vendor/golang.org/x/sys/unix/zptracemips_linux.go create mode 100644 vendor/golang.org/x/sys/unix/zptracemipsle_linux.go create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go rename vendor/golang.org/x/sys/unix/{zsysctl_openbsd.go => zsysctl_openbsd_386.go} (100%) create mode 100644 vendor/golang.org/x/sys/unix/zsysctl_openbsd_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm.go create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm.go delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_solaris_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go delete mode 100644 vendor/golang.org/x/sys/windows/env_unset.go create mode 100644 vendor/golang.org/x/sys/windows/memory_windows.go rename vendor/golang.org/x/sys/windows/{ztypes_windows.go => types_windows.go} (91%) rename vendor/golang.org/x/sys/windows/{ztypes_windows_386.go => types_windows_386.go} (88%) rename vendor/golang.org/x/sys/windows/{ztypes_windows_amd64.go => types_windows_amd64.go} (88%) diff --git a/Gopkg.lock b/Gopkg.lock index b14e722a4..12b288dda 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -44,6 +44,8 @@ "aws/request", "aws/session", "aws/signer/v4", + "internal/sdkio", + "internal/sdkrand", "internal/shareddefaults", "private/protocol", "private/protocol/query", @@ -54,8 +56,8 @@ "service/s3", "service/sts" ] - revision = "c652f9369083515c3ddf1fbaf6df68da2c101545" - version = "v1.12.1" + revision = "7f68df2a5baf19398d17def23a514a6e617e5937" + version = "v1.13.28" [[projects]] name = "github.com/cheggaaa/pb" @@ -98,16 +100,16 @@ revision = "553a641470496b2327abcac10b36396bd98e45c9" [[projects]] - branch = "master" name = "github.com/h2non/filetype" packages = ["matchers"] - revision = "0df83c38d14ff5f653d419d480eaac286ccbc823" + revision = "cc14fdc9ca0e4c2bafad7458f6ff79fd3947cfbb" + version = "v1.0.5" [[projects]] branch = "master" name = "github.com/jlaffaye/ftp" packages = ["."] - revision = "7b85eb4638a2c0473acefcfb929a98f879c15c86" + revision = "2403248fa8cc9f7909862627aa7337f13f8e0bf1" [[projects]] name = "github.com/jmespath/go-jmespath" @@ -218,7 +220,7 @@ "leveldb/table", "leveldb/util" ] - revision = "549b6d6b1c0419617182954dd77770f2e2685ed5" + revision = "714f901b98fdb3aa954b4193d8cbd64a28d80cad" [[projects]] name = "github.com/ugorji/go" @@ -245,13 +247,16 @@ "openpgp/s2k", "ssh/terminal" ] - revision = "459e26527287adbc2adcc5d0d49abff9a5f315a7" + revision = "b2aa35443fbc700ab74c586ae79b81c171851023" [[projects]] branch = "master" name = "golang.org/x/sys" - packages = ["unix"] - revision = "99f16d856c9836c42d24e7ab64ea72916925fa97" + packages = [ + "unix", + "windows" + ] + revision = "1d206c9fa8975fb4cf00df1dc8bf3283dc24ba0e" [[projects]] branch = "v1" @@ -283,4 +288,3 @@ inputs-digest = "5ab2b384766e62be84d3941971a1d8e99c637f80a2cb1482b3d9704c668b549f" solver-name = "gps-cdcl" solver-version = 1 -   diff --git a/s3/server_test.go b/s3/server_test.go index ccfcd8d90..63eb219cf 100644 --- a/s3/server_test.go +++ b/s3/server_test.go @@ -3,6 +3,7 @@ package s3 import ( "bytes" "crypto/md5" + "encoding/base64" "encoding/hex" "encoding/xml" "fmt" @@ -634,7 +635,7 @@ func (objr objectResource) put(a *action) interface{} { var expectHash []byte if c := a.req.Header.Get("Content-MD5"); c != "" { var err error - expectHash, err = hex.DecodeString(c) + expectHash, err = base64.StdEncoding.DecodeString(c) if err != nil || len(expectHash) != md5.Size { fatalError(400, "InvalidDigest", "The Content-MD5 you specified was invalid") } diff --git a/vendor/github.com/aws/aws-sdk-go/.travis.yml b/vendor/github.com/aws/aws-sdk-go/.travis.yml index 130d91151..5b1b57c53 100644 --- a/vendor/github.com/aws/aws-sdk-go/.travis.yml +++ b/vendor/github.com/aws/aws-sdk-go/.travis.yml @@ -3,11 +3,12 @@ language: go sudo: required go: - - 1.5 - - 1.6 - - 1.7 - - 1.8 - - 1.9 + - 1.5.x + - 1.6.x + - 1.7.x + - 1.8.x + - 1.9.x + - 1.10.x - tip # Use Go 1.5's vendoring experiment for 1.5 tests. @@ -23,3 +24,7 @@ script: matrix: allow_failures: - go: tip + +branches: + only: + - master diff --git a/vendor/github.com/aws/aws-sdk-go/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go/CHANGELOG.md index d86aaf439..eae8fe4bb 100644 --- a/vendor/github.com/aws/aws-sdk-go/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go/CHANGELOG.md @@ -1,3 +1,1202 @@ +Release v1.13.31 (2018-04-09) +=== + +### Service Client Updates +* `service/clouddirectory`: Updates service API and documentation + * Cloud Directory customers can fetch attributes within a facet on an object with the new GetObjectAttributes API and can fetch attributes from multiple facets or objects with the BatchGetObjectAttributes operation. +* `aws/endpoints`: Updated Regions and Endpoints metadata. + +Release v1.13.30 (2018-04-06) +=== + +### Service Client Updates +* `service/batch`: Updates service API and documentation + * Support for Timeout in SubmitJob and RegisterJobDefinition + +Release v1.13.29 (2018-04-05) +=== + +### Service Client Updates +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/ssm`: Updates service documentation + +Release v1.13.28 (2018-04-04) +=== + +### Service Client Updates +* `service/acm`: Updates service API and documentation + * AWS Certificate Manager has added support for AWS Certificate Manager Private Certificate Authority (CA). Customers can now request private certificates with the RequestCertificate API, and also export private certificates with the ExportCertificate API. +* `service/acm-pca`: Adds new service +* `service/config`: Updates service API and documentation +* `service/fms`: Adds new service +* `service/monitoring`: Updates service API and documentation + * The new GetMetricData API enables you to collect batch amounts of metric data and optionally perform math expressions on the data. With one GetMetricData call you can retrieve as many as 100 different metrics and a total of 100,800 data points. +* `service/s3`: Updates service API and documentation + * ONEZONE_IA storage class stores object data in only one Availability Zone at a lower price than STANDARD_IA. This SDK release provides API support for this new storage class. +* `service/sagemaker`: Updates service API and documentation + * SageMaker is now supporting many additional instance types in previously supported families for Notebooks, Training Jobs, and Endpoints. Training Jobs and Endpoints now support instances in the m5 family in addition to the previously supported instance families. For specific instance types supported please see the documentation for the SageMaker API. +* `service/secretsmanager`: Adds new service + * AWS Secrets Manager enables you to easily create and manage the secrets that you use in your customer-facing apps. Instead of embedding credentials into your source code, you can dynamically query Secrets Manager from your app whenever you need credentials. You can automatically and frequently rotate your secrets without having to deploy updates to your apps. All secret values are encrypted when they're at rest with AWS KMS, and while they're in transit with HTTPS and TLS. +* `service/transcribe`: Updates service API, documentation, and paginators + +Release v1.13.27 (2018-04-03) +=== + +### Service Client Updates +* `service/devicefarm`: Updates service API and documentation + * Added Private Device Management feature. Customers can now manage their private devices efficiently - view their status, set labels and apply profiles on them. Customers can also schedule automated tests and remote access sessions on individual instances in their private device fleet. +* `service/lambda`: Updates service API and documentation + * added nodejs8.10 as a valid runtime +* `service/translate`: Updates service API and documentation + +Release v1.13.26 (2018-04-02) +=== + +### Service Client Updates +* `service/apigateway`: Updates service API and documentation + * Amazon API Gateway now supports resource policies for APIs making it easier to set access controls for invoking APIs. +* `service/cloudfront`: Adds new service + * You can now use a new Amazon CloudFront capability called Field-Level Encryption to further enhance the security of sensitive data, such as credit card numbers or personally identifiable information (PII) like social security numbers. CloudFront's field-level encryption further encrypts sensitive data in an HTTPS form using field-specific encryption keys (which you supply) before a POST request is forwarded to your origin. This ensures that sensitive data can only be decrypted and viewed by certain components or services in your application stack. Field-level encryption is easy to setup. Simply configure the fields that have to be further encrypted by CloudFront using the public keys you specify and you can reduce attack surface for your sensitive data. +* `service/es`: Updates service API and documentation + * This adds Amazon Cognito authentication support to Kibana. + +Release v1.13.25 (2018-03-30) +=== + +### Service Client Updates +* `service/acm`: Updates service API and documentation + * Documentation updates for acm +* `service/connect`: Adds new service +* `aws/endpoints`: Updated Regions and Endpoints metadata. + +Release v1.13.24 (2018-03-29) +=== + +### Service Client Updates +* `service/alexaforbusiness`: Updates service API, documentation, and paginators +* `service/cloudformation`: Updates service API and documentation + * Enabling resource level permission control for StackSets APIs. Adding support for customers to use customized AdministrationRole to create security boundaries between different users. +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/greengrass`: Updates service API and documentation + * Greengrass APIs now support creating Machine Learning resource types and configuring binary data as the input payload for Greengrass Lambda functions. +* `service/ssm`: Updates service API + * This Patch Manager release supports creating patch baselines for CentOS. + +Release v1.13.23 (2018-03-28) +=== + +### Service Client Updates +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/iam`: Updates service API and documentation + * Add support for Longer Role Sessions. Four APIs manage max session duration: GetRole, ListRoles, CreateRole, and the new API UpdateRole. The max session duration integer attribute is measured in seconds. +* `service/mturk-requester`: Updates service API and documentation +* `service/sts`: Updates service API and documentation + * Change utilizes the Max Session Duration attribute introduced for IAM Roles and allows STS customers to request session duration up to the Max Session Duration of 12 hours from AssumeRole based APIs. + +Release v1.13.22 (2018-03-27) +=== + +### Service Client Updates +* `service/acm`: Updates service API and documentation + * AWS Certificate Manager has added support for customers to disable Certificate Transparency logging on a per-certificate basis. +* `aws/endpoints`: Updated Regions and Endpoints metadata. + +Release v1.13.21 (2018-03-26) +=== + +### Service Client Updates +* `service/dynamodb`: Updates service API and documentation + * Point-in-time recovery (PITR) provides continuous backups of your DynamoDB table data. With PITR, you do not have to worry about creating, maintaining, or scheduling backups. You enable PITR on your table and your backup is available for restore at any point in time from the moment you enable it, up to a maximum of the 35 preceding days. PITR provides continuous backups until you explicitly disable it. For more information, see the Amazon DynamoDB Developer Guide. + +Release v1.13.20 (2018-03-23) +=== + +### Service Client Updates +* `service/rds`: Updates service documentation + * Documentation updates for RDS + +Release v1.13.19 (2018-03-22) +=== + +### Service Client Updates +* `service/appstream`: Updates service API and documentation + * Feedback URL allows admins to provide a feedback link or a survey link for collecting user feedback while streaming sessions. When a feedback link is provided, streaming users will see a "Send Feedback" choice in their streaming session toolbar. On selecting this choice, user will be redirected to the link provided in a new browser tab. If a feedback link is not provided, users will not see the "Send Feedback" option. +* `service/codebuild`: Updates service API and documentation + * Adding support for branch filtering when using webhooks with AWS CodeBuild. +* `service/ecs`: Updates service API and documentation + * Amazon Elastic Container Service (ECS) now includes integrated Service Discovery using Route 53 Auto Naming. Customers can now specify a Route 53 Auto Naming service as part of an ECS service. ECS will register task IPs with Route 53, making them available via DNS in your VPC. +* `aws/endpoints`: Updated Regions and Endpoints metadata. + +### SDK Bugs +* `aws/endpoints`: Use service metadata for fallback signing name ([#1854](https://github.com/aws/aws-sdk-go/pull/1854)) + * Updates the SDK's endpoint resolution to fallback deriving the service's signing name from the service's modeled metadata in addition the the endpoints modeled data. + * Fixes [#1850](https://github.com/aws/aws-sdk-go/issues/1850) +Release v1.13.18 (2018-03-21) +=== + +### Service Client Updates +* `service/serverlessrepo`: Updates service documentation + +Release v1.13.17 (2018-03-20) +=== + +### Service Client Updates +* `service/ce`: Updates service API and documentation +* `service/config`: Updates service API and documentation +* `service/ecs`: Updates service API and documentation + * Amazon ECS users can now mount a temporary volume in memory in containers and specify the shared memory that a container can use through the use of docker's 'tmpfs' and 'shm-size' features respectively. These fields can be specified under linuxParameters in ContainerDefinition in the Task Definition Template. +* `service/elasticbeanstalk`: Updates service documentation + * Documentation updates for the new Elastic Beanstalk API DescribeAccountAttributes. +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/events`: Updates service API and documentation + * Added SQS FIFO queue target support +* `service/glue`: Updates service API and documentation + * API Updates for DevEndpoint: PublicKey is now optional for CreateDevEndpoint. The new DevEndpoint field PrivateAddress will be populated for DevEndpoints associated with a VPC. +* `service/medialive`: Updates service API and documentation + * AWS Elemental MediaLive has added support for updating Inputs and Input Security Groups. You can update Input Security Groups at any time and it will update all channels using that Input Security Group. Inputs can be updated as long as they are not attached to a currently running channel. + +Release v1.13.16 (2018-03-16) +=== + +### Service Client Updates +* `service/elasticbeanstalk`: Updates service API and documentation + * AWS Elastic Beanstalk is launching a new public API named DescribeAccountAttributes which allows customers to access account level attributes. In this release, the API will support quotas for resources such as applications, application versions, and environments. + +Release v1.13.15 (2018-03-15) +=== + +### Service Client Updates +* `service/organizations`: Updates service API and documentation + * This release adds additional reason codes to improve clarity to exceptions that can occur. +* `service/pinpoint`: Updates service API and documentation + * With this release, you can delete endpoints from your Amazon Pinpoint projects. Customers can now specify one of their leased dedicated long or short codes to send text messages. +* `service/sagemaker`: Updates service API, documentation, and paginators + * This release provides support for ml.p3.xlarge instance types for notebook instances. Lifecycle configuration is now available to customize your notebook instances on start; the configuration can be reused between multiple notebooks. If a notebook instance is attached to a VPC you can now opt out of internet access that by default is provided by SageMaker. + +Release v1.13.14 (2018-03-14) +=== + +### Service Client Updates +* `service/lightsail`: Updates service API and documentation + * Updates to existing Lightsail documentation + +Release v1.13.13 (2018-03-13) +=== + +### Service Client Updates +* `service/servicediscovery`: Updates service API and documentation + * This release adds support for custom health checks, which let you check the health of resources that aren't accessible over the internet. For example, you can use a custom health check when the instance is in an Amazon VPC. + +Release v1.13.12 (2018-03-12) +=== + +### Service Client Updates +* `service/cloudhsmv2`: Updates service API + * CreateCluster can now take both 8 and 17 character Subnet IDs. DeleteHsm can now take both 8 and 17 character ENI IDs. +* `service/discovery`: Updates service API and documentation + * Documentation updates for discovery +* `service/iot`: Updates service API and documentation + * We added new fields to the response of the following APIs. (1) describe-certificate: added new generationId, customerVersion fields (2) describe-ca-certificate: added new generationId, customerVersion and lastModifiedDate fields (3) get-policy: added generationId, creationDate and lastModifiedDate fields +* `service/redshift`: Updates service API and documentation + * DescribeClusterSnapshotsMessage with ClusterExists flag returns snapshots of existing clusters. Else both existing and deleted cluster snapshots are returned + +Release v1.13.11 (2018-03-08) +=== + +### Service Client Updates +* `service/AWSMigrationHub`: Updates service API and documentation +* `service/ecs`: Updates service API and documentation + * Amazon Elastic Container Service (ECS) now supports container health checks. Customers can now specify a docker container health check command and parameters in their task definition. ECS will monitor, report and take scheduling action based on the health status. +* `service/pinpoint`: Updates service API and documentation + * With this release, you can export endpoints from your Amazon Pinpoint projects. You can export a) all of the endpoints assigned to a project or b) the subset of endpoints assigned to a segment. +* `service/rds`: Updates service documentation + * Documentation updates for RDS + +Release v1.13.10 (2018-03-07) +=== + +### Service Client Updates +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/medialive`: Updates service API and documentation + * Updates API to model required traits and minimum/maximum constraints. + +Release v1.13.9 (2018-03-06) +=== + +### Service Client Updates +* `service/ecs`: Updates service documentation + * Documentation updates for Amazon ECS +* `aws/endpoints`: Updated Regions and Endpoints metadata. + +Release v1.13.8 (2018-03-01) +=== + +### Service Client Updates +* `service/ec2`: Updates service API and documentation + * Added support for modifying Placement Group association of instances via ModifyInstancePlacement API. +* `service/events`: Updates service API and documentation + * Added BatchParameters to the PutTargets API +* `service/servicecatalog`: Updates service API and documentation + * This release of ServiceCatalog adds the DeleteTagOption API. +* `service/ssm`: Updates service API and documentation + * This Inventory release supports the status message details reported by the last sync for the resource data sync API. +* `service/storagegateway`: Updates service API and documentation + * AWS Storage Gateway (File) support for two new file share attributes are added. 1. Users can specify the S3 Canned ACL to use for new objects created in the file share. 2. Users can create file shares for requester-pays buckets. + +Release v1.13.7 (2018-02-28) +=== + +### Service Client Updates +* `service/application-autoscaling`: Updates service API and documentation +* `aws/endpoints`: Updated Regions and Endpoints metadata. + +Release v1.13.6 (2018-02-27) +=== + +### Service Client Updates +* `service/ecr`: Updates service documentation + * Documentation updates for Amazon ECR. + +Release v1.13.5 (2018-02-26) +=== + +### Service Client Updates +* `service/route53`: Updates service API + * Added support for creating LBR rules using ap-northeast-3 region. +* `service/sts`: Updates service API and documentation + * Increased SAMLAssertion parameter size from 50000 to 100000 for AWS Security Token Service AssumeRoleWithSAML API to allow customers to pass bigger SAML assertions + +Release v1.13.4 (2018-02-23) +=== + +### Service Client Updates +* `service/appstream`: Updates service API and documentation + * This API update is to enable customers to copy their Amazon AppStream 2.0 images within and between AWS Regions +* `aws/endpoints`: Updated Regions and Endpoints metadata. + +Release v1.13.3 (2018-02-22) +=== + +### Service Client Updates +* `service/ce`: Updates service API and documentation +* `service/elasticloadbalancingv2`: Updates service documentation +* `aws/endpoints`: Updated Regions and Endpoints metadata. + +Release v1.13.2 (2018-02-21) +=== + +### Service Client Updates +* `service/codecommit`: Updates service API and documentation + * This release adds an API for adding a file directly to an AWS CodeCommit repository without requiring a Git client. +* `service/ec2`: Updates service API and documentation + * Adds support for tagging an EBS snapshot as part of the API call that creates the EBS snapshot +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/serverlessrepo`: Updates service API, documentation, and paginators + +Release v1.13.1 (2018-02-20) +=== + +### Service Client Updates +* `service/autoscaling`: Updates service API and documentation + * Amazon EC2 Auto Scaling support for service-linked roles +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/waf`: Updates service API and documentation + * The new PermissionPolicy APIs in AWS WAF Regional allow customers to attach resource-based policies to their entities. +* `service/waf-regional`: Updates service API and documentation + +Release v1.13.0 (2018-02-19) +=== + +### Service Client Updates +* `service/config`: Updates service API + * With this release, AWS Config updated the ConfigurationItemStatus enum values. The values prior to this update did not represent appropriate values returned by GetResourceConfigHistory. You must update your code to enumerate the new enum values so this is a breaking change. To map old properties to new properties, use the following descriptions: New discovered resource - Old property: Discovered, New property: ResourceDiscovered. Updated resource - Old property: Ok, New property: OK. Deleted resource - Old property: Deleted, New property: ResourceDeleted or ResourceDeletedNotRecorded. Not-recorded resource - Old property: N/A, New property: ResourceNotRecorded or ResourceDeletedNotRecorded. + +Release v1.12.79 (2018-02-16) +=== + +### Service Client Updates +* `service/rds`: Updates service API and documentation + * Updates RDS API to indicate whether a DBEngine supports read replicas. + +Release v1.12.78 (2018-02-15) +=== + +### Service Client Updates +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/gamelift`: Updates service API and documentation + * Updates to allow Fleets to run on On-Demand or Spot instances. +* `service/mediaconvert`: Updates service API and documentation + * Nielsen ID3 tags can now be inserted into transport stream (TS) and HLS outputs. For more information on Nielsen configuration you can go to https://docs.aws.amazon.com/mediaconvert/latest/apireference/jobs.html#jobs-nielsenconfiguration + +Release v1.12.77 (2018-02-14) +=== + +### Service Client Updates +* `service/appsync`: Updates service API and documentation +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/lex-models`: Updates service API and documentation + +Release v1.12.76 (2018-02-13) +=== + +### Service Client Updates +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/glacier`: Updates service documentation + * Documentation updates for glacier +* `service/route53`: Updates service API + * Added support for creating Private Hosted Zones and metric-based healthchecks in the ap-northeast-3 region for whitelisted customers. + +Release v1.12.75 (2018-02-12) +=== + +### Service Client Updates +* `service/cognito-idp`: Updates service API and documentation +* `service/ec2`: Updates service API and documentation + * Network interfaces now supply the following additional status of "associated" to better distinguish the current status. +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/guardduty`: Updates service API and documentation + * Added PortProbeAction information to the Action section of the port probe-type finding. +* `service/kms`: Updates service API + * This release of AWS Key Management Service includes support for InvalidArnException in the RetireGrant API. +* `service/rds`: Updates service documentation + * Aurora MySQL now supports MySQL 5.7. + +Release v1.12.74 (2018-02-09) +=== + +### Service Client Updates +* `service/ec2`: Updates service API and documentation + * Users can now better understand the longer ID opt-in status of their account using the two new APIs DescribeAggregateIdFormat and DescribePrincipalIdFormat +* `service/lex-models`: Updates service API and documentation +* `service/runtime.lex`: Updates service API and documentation + +Release v1.12.73 (2018-02-08) +=== + +### Service Client Updates +* `service/appstream`: Updates service API and documentation + * Adds support for allowing customers to provide a redirect URL for a stack. Users will be redirected to the link provided by the admin at the end of their streaming session. +* `service/budgets`: Updates service API and documentation + * Making budgetLimit and timePeriod optional, and updating budgets docs. +* `service/dms`: Updates service API, documentation, and paginators + * This release includes the addition of two new APIs: describe replication instance task logs and reboot instance. The first allows user to see how much storage each log for a task on a given instance is occupying. The second gives users the option to reboot the application software on the instance and force a fail over for MAZ instances to test robustness of their integration with our service. +* `service/ds`: Updates service API + * Updated the regex of some input parameters to support longer EC2 identifiers. +* `service/dynamodb`: Updates service API and documentation + * Amazon DynamoDB now supports server-side encryption using a default service key (alias/aws/dynamodb) from the AWS Key Management Service (KMS). AWS KMS is a service that combines secure, highly available hardware and software to provide a key management system scaled for the cloud. AWS KMS is used via the AWS Management Console or APIs to centrally create encryption keys, define the policies that control how keys can be used, and audit key usage to prove they are being used correctly. For more information, see the Amazon DynamoDB Developer Guide. +* `service/gamelift`: Updates service API and documentation + * Amazon GameLift FlexMatch added the StartMatchBackfill API. This API allows developers to add new players to an existing game session using the same matchmaking rules and player data that were used to initially create the session. +* `service/medialive`: Updates service API and documentation + * AWS Elemental MediaLive has added support for updating channel settings for idle channels. You can now update channel name, channel outputs and output destinations, encoder settings, user role ARN, and input specifications. Channel settings can be updated in the console or with API calls. Please note that running channels need to be stopped before they can be updated. We've also deprecated the 'Reserved' field. +* `service/mediastore`: Updates service API and documentation + * AWS Elemental MediaStore now supports per-container CORS configuration. + +Release v1.12.72 (2018-02-07) +=== + +### Service Client Updates +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/glue`: Updates service API and documentation + * This new feature will now allow customers to add a customized json classifier. They can specify a json path to indicate the object, array or field of the json documents they'd like crawlers to inspect when they crawl json files. +* `service/servicecatalog`: Updates service API, documentation, and paginators + * This release of Service Catalog adds SearchProvisionedProducts API and ProvisionedProductPlan APIs. +* `service/servicediscovery`: Updates service API and documentation + * This release adds support for registering CNAME record types and creating Route 53 alias records that route traffic to Amazon Elastic Load Balancers using Amazon Route 53 Auto Naming APIs. +* `service/ssm`: Updates service API and documentation + * This Patch Manager release supports configuring Linux repos as part of patch baselines, controlling updates of non-OS security packages and also creating patch baselines for SUSE12 + +### SDK Enhancements +* `private/model/api`: Add validation to ensure there is no duplication of services in models/apis ([#1758](https://github.com/aws/aws-sdk-go/pull/1758)) + * Prevents the SDK from mistakenly generating code a single service multiple times with different model versions. +* `example/service/ec2/instancesbyRegion`: Fix typos in example ([#1762](https://github.com/aws/aws-sdk-go/pull/1762)) +* `private/model/api`: removing SDK API reference crosslinks from input/output shapes. (#1765) + +### SDK Bugs +* `aws/session`: Fix bug in session.New not supporting AWS_SDK_LOAD_CONFIG ([#1770](https://github.com/aws/aws-sdk-go/pull/1770)) + * Fixes a bug in the session.New function that was not correctly sourcing the shared configuration files' path. + * Fixes [#1771](https://github.com/aws/aws-sdk-go/pull/1771) +Release v1.12.71 (2018-02-05) +=== + +### Service Client Updates +* `service/acm`: Updates service documentation + * Documentation updates for acm +* `service/cloud9`: Updates service documentation and examples + * API usage examples for AWS Cloud9. +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/kinesis`: Updates service API and documentation + * Using ListShards a Kinesis Data Streams customer or client can get information about shards in a data stream (including meta-data for each shard) without obtaining data stream level information. +* `service/opsworks`: Updates service API, documentation, and waiters + * AWS OpsWorks Stacks supports EBS encryption and HDD volume types. Also, a new DescribeOperatingSystems API is available, which lists all operating systems supported by OpsWorks Stacks. + +Release v1.12.70 (2018-01-26) +=== + +### Service Client Updates +* `service/devicefarm`: Updates service API and documentation + * Add InteractionMode in CreateRemoteAccessSession for DirectDeviceAccess feature. +* `service/medialive`: Updates service API and documentation + * Add InputSpecification to CreateChannel (specification of input attributes is used for channel sizing and affects pricing); add NotFoundException to DeleteInputSecurityGroups. +* `service/mturk-requester`: Updates service documentation + +Release v1.12.69 (2018-01-26) +=== + +### SDK Bugs +* `models/api`: Fix colliding names [#1754](https://github.com/aws/aws-sdk-go/pull/1754) [#1756](https://github.com/aws/aws-sdk-go/pull/1756) + * SDK had duplicate folders that were causing errors in some builds. + * Fixes [#1753](https://github.com/aws/aws-sdk-go/issues/1753) +Release v1.12.68 (2018-01-25) +=== + +### Service Client Updates +* `service/alexaforbusiness`: Updates service API and documentation +* `service/codebuild`: Updates service API and documentation + * Adding support for Shallow Clone and GitHub Enterprise in AWS CodeBuild. +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/guardduty`: Adds new service + * Added the missing AccessKeyDetails object to the resource shape. +* `service/lambda`: Updates service API and documentation + * AWS Lambda now supports Revision ID on your function versions and aliases, to track and apply conditional updates when you are updating your function version or alias resources. + +### SDK Bugs +* `service/s3/s3manager`: Fix check for nil OrigErr in Error() [#1749](https://github.com/aws/aws-sdk-go/issues/1749) + * S3 Manager's `Error` type did not check for nil of `OrigErr` when calling `Error()` + * Fixes [#1748](https://github.com/aws/aws-sdk-go/issues/1748) +Release v1.12.67 (2018-01-22) +=== + +### Service Client Updates +* `service/budgets`: Updates service API and documentation + * Add additional costTypes: IncludeDiscount, UseAmortized, to support finer control for different charges included in a cost budget. + +Release v1.12.66 (2018-01-19) +=== + +### Service Client Updates +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/glue`: Updates service API and documentation + * New AWS Glue DataCatalog APIs to manage table versions and a new feature to skip archiving of the old table version when updating table. +* `service/transcribe`: Adds new service + +Release v1.12.65 (2018-01-18) +=== + +### Service Client Updates +* `service/sagemaker`: Updates service API and documentation + * CreateTrainingJob and CreateEndpointConfig now supports KMS Key for volume encryption. + +Release v1.12.64 (2018-01-17) +=== + +### Service Client Updates +* `service/autoscaling-plans`: Updates service documentation +* `service/ec2`: Updates service documentation + * Documentation updates for EC2 + +Release v1.12.63 (2018-01-17) +=== + +### Service Client Updates +* `service/application-autoscaling`: Updates service API and documentation +* `service/autoscaling-plans`: Adds new service +* `service/rds`: Updates service API and documentation + * With this release you can now integrate RDS DB instances with CloudWatch Logs. We have added parameters to the operations for creating and modifying DB instances (for example CreateDBInstance) to allow you to take advantage of this capability through the CLI and API. Once you enable this feature, a stream of log events will publish to CloudWatch Logs for each log type you enable. + +Release v1.12.62 (2018-01-15) +=== + +### Service Client Updates +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/lambda`: Updates service API and documentation + * Support for creating Lambda Functions using 'dotnetcore2.0' and 'go1.x'. + +Release v1.12.61 (2018-01-12) +=== + +### Service Client Updates +* `service/glue`: Updates service API and documentation + * Support is added to generate ETL scripts in Scala which can now be run by AWS Glue ETL jobs. In addition, the trigger API now supports firing when any conditions are met (in addition to all conditions). Also, jobs can be triggered based on a "failed" or "stopped" job run (in addition to a "succeeded" job run). + +Release v1.12.60 (2018-01-11) +=== + +### Service Client Updates +* `service/elasticloadbalancing`: Updates service API and documentation +* `service/elasticloadbalancingv2`: Updates service API and documentation +* `service/rds`: Updates service API and documentation + * Read Replicas for Amazon RDS for MySQL, MariaDB, and PostgreSQL now support Multi-AZ deployments.Amazon RDS Read Replicas enable you to create one or more read-only copies of your database instance within the same AWS Region or in a different AWS Region. Updates made to the source database are asynchronously copied to the Read Replicas. In addition to providing scalability for read-heavy workloads, you can choose to promote a Read Replica to become standalone a DB instance when needed.Amazon RDS Multi-AZ Deployments provide enhanced availability for database instances within a single AWS Region. With Multi-AZ, your data is synchronously replicated to a standby in a different Availability Zone (AZ). In case of an infrastructure failure, Amazon RDS performs an automatic failover to the standby, minimizing disruption to your applications.You can now combine Read Replicas with Multi-AZ as part of a disaster recovery strategy for your production databases. A well-designed and tested plan is critical for maintaining business continuity after a disaster. Since Read Replicas can also be created in different regions than the source database, your Read Replica can be promoted to become the new production database in case of a regional disruption.You can also combine Read Replicas with Multi-AZ for your database engine upgrade process. You can create a Read Replica of your production database instance and upgrade it to a new database engine version. When the upgrade is complete, you can stop applications, promote the Read Replica to a standalone database instance and switch over your applications. Since the database instance is already a Multi-AZ deployment, no additional steps are needed.For more information, see the Amazon RDS User Guide. +* `service/ssm`: Updates service documentation + * Updates documentation for the HierarchyLevelLimitExceededException error. + +Release v1.12.59 (2018-01-09) +=== + +### Service Client Updates +* `service/kms`: Updates service documentation + * Documentation updates for AWS KMS + +Release v1.12.58 (2018-01-09) +=== + +### Service Client Updates +* `service/ds`: Updates service API and documentation + * On October 24 we introduced AWS Directory Service for Microsoft Active Directory (Standard Edition), also known as AWS Microsoft AD (Standard Edition), which is a managed Microsoft Active Directory (AD) that is optimized for small and midsize businesses (SMBs). With this SDK release, you can now create an AWS Microsoft AD directory using API. This enables you to run typical SMB workloads using a cost-effective, highly available, and managed Microsoft AD in the AWS Cloud. + +Release v1.12.57 (2018-01-08) +=== + +### Service Client Updates +* `service/codedeploy`: Updates service API and documentation + * The AWS CodeDeploy API was updated to support DeleteGitHubAccountToken, a new method that deletes a GitHub account connection. +* `service/discovery`: Updates service API and documentation + * Documentation updates for AWS Application Discovery Service. +* `service/route53`: Updates service API and documentation + * This release adds an exception to the CreateTrafficPolicyVersion API operation. + +Release v1.12.56 (2018-01-05) +=== + +### Service Client Updates +* `service/inspector`: Updates service API, documentation, and examples + * Added 2 new attributes to the DescribeAssessmentTemplate response, indicating the total number of assessment runs and last assessment run ARN (if present.) +* `service/snowball`: Updates service documentation + * Documentation updates for snowball +* `service/ssm`: Updates service documentation + * Documentation updates for ssm + +Release v1.12.55 (2018-01-02) +=== + +### Service Client Updates +* `service/rds`: Updates service documentation + * Documentation updates for rds + +Release v1.12.54 (2017-12-29) +=== + +### Service Client Updates +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/workspaces`: Updates service API and documentation + * Modify WorkSpaces have been updated with flexible storage and switching of hardware bundles feature. The following configurations have been added to ModifyWorkSpacesProperties: storage and compute. This update provides the capability to configure the storage of a WorkSpace. It also adds the capability of switching hardware bundle of a WorkSpace by specifying an eligible compute (Value, Standard, Performance, Power). + +Release v1.12.53 (2017-12-22) +=== + +### Service Client Updates +* `service/ec2`: Updates service API + * This release fixes an issue with tags not showing in DescribeAddresses responses. +* `service/ecs`: Updates service API and documentation + * Amazon ECS users can now set a health check initialization wait period of their ECS services, the services that are associated with an Elastic Load Balancer (ELB) will wait for a period of time before the ELB become healthy. You can now configure this in Create and Update Service. +* `service/inspector`: Updates service API and documentation + * PreviewAgents API now returns additional fields within the AgentPreview data type. The API now shows the agent health and availability status for all instances included in the assessment target. This allows users to check the health status of Inspector Agents before running an assessment. In addition, it shows the instance ID, hostname, and IP address of the targeted instances. +* `service/sagemaker`: Updates service API and documentation + * SageMaker Models no longer support SupplementalContainers. API's that have been affected are CreateModel and DescribeModel. + +Release v1.12.52 (2017-12-21) +=== + +### Service Client Updates +* `service/codebuild`: Updates service API and documentation + * Adding support allowing AWS CodeBuild customers to select specific curated image versions. +* `service/ec2`: Updates service API and documentation + * Elastic IP tagging enables you to add key and value metadata to your Elastic IPs so that you can search, filter, and organize them according to your organization's needs. +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/kinesisanalytics`: Updates service API and documentation + * Kinesis Analytics now supports AWS Lambda functions as output. + +Release v1.12.51 (2017-12-21) +=== + +### Service Client Updates +* `service/config`: Updates service API +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/iot`: Updates service API and documentation + * This release adds support for code signed Over-the-air update functionality for Amazon FreeRTOS. Users can now create and schedule Over-the-air updates to their Amazon FreeRTOS devices using these new APIs. + +Release v1.12.50 (2017-12-19) +=== + +### Service Client Updates +* `service/apigateway`: Updates service API and documentation + * API Gateway now adds support for calling API with compressed payloads using one of the supported content codings, tagging an API stage for cost allocation, and returning API keys from a custom authorizer for use with a usage plan. +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/mediastore-data`: Updates service documentation +* `service/route53`: Updates service API and documentation + * Route 53 added support for a new China (Ningxia) region, cn-northwest-1. You can now specify cn-northwest-1 as the region for latency-based or geoproximity routing. Route 53 also added support for a new EU (Paris) region, eu-west-3. You can now associate VPCs in eu-west-3 with private hosted zones and create alias records that route traffic to resources in eu-west-3. + +Release v1.12.49 (2017-12-19) +=== + +### Service Client Updates +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/monitoring`: Updates service documentation + * Documentation updates for monitoring + +Release v1.12.48 (2017-12-15) +=== + +### Service Client Updates +* `service/appstream`: Updates service API and documentation + * This API update is to enable customers to add tags to their Amazon AppStream 2.0 resources + +Release v1.12.47 (2017-12-14) +=== + +### Service Client Updates +* `service/apigateway`: Updates service API and documentation + * Adds support for Cognito Authorizer scopes at the API method level. +* `service/email`: Updates service documentation + * Added information about the maximum number of transactions per second for the SendCustomVerificationEmail operation. +* `aws/endpoints`: Updated Regions and Endpoints metadata. + +Release v1.12.46 (2017-12-12) +=== + +### Service Client Updates +* `service/workmail`: Adds new service + * Today, Amazon WorkMail released an administrative SDK and enabled AWS CloudTrail integration. With the administrative SDK, you can natively integrate WorkMail with your existing services. The SDK enables programmatic user, resource, and group management through API calls. This means your existing IT tools and workflows can now automate WorkMail management, and third party applications can streamline WorkMail migrations and account actions. + +Release v1.12.45 (2017-12-11) +=== + +### Service Client Updates +* `service/cognito-idp`: Updates service API and documentation +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/lex-models`: Updates service API and documentation +* `service/sagemaker`: Updates service API + * CreateModel API Update: The request parameter 'ExecutionRoleArn' has changed from optional to required. + +Release v1.12.44 (2017-12-08) +=== + +### Service Client Updates +* `service/appstream`: Updates service API and documentation + * This API update is to support the feature that allows customers to automatically consume the latest Amazon AppStream 2.0 agent as and when published by AWS. +* `service/ecs`: Updates service documentation + * Documentation updates for Windows containers. +* `service/monitoring`: Updates service API and documentation + * With this launch, you can now create a CloudWatch alarm that alerts you when M out of N datapoints of a metric are breaching your predefined threshold, such as three out of five times in any given five minutes interval or two out of six times in a thirty minutes interval. When M out of N datapoints are not breaching your threshold in an interval, the alarm will be in OK state. Please note that the M datapoints out of N datapoints in an interval can be of any order and does not need to be consecutive. Consequently, you can now get alerted even when the spikes in your metrics are intermittent over an interval. + +Release v1.12.43 (2017-12-07) +=== + +### Service Client Updates +* `service/email`: Updates service API, documentation, and paginators + * Customers can customize the emails that Amazon SES sends when verifying new identities. This feature is helpful for developers whose applications send email through Amazon SES on behalf of their customers. +* `service/es`: Updates service API and documentation + * Added support for encryption of data at rest on Amazon Elasticsearch Service using AWS KMS + +### SDK Bugs +* `models/apis` Fixes removes colliding sagemaker models folders ([#1686](https://github.com/aws/aws-sdk-go/pull/1686)) + * Fixes Release v1.12.42's SageMaker vs sagemaker model folders. +Release v1.12.42 (2017-12-06) +=== + +### Service Client Updates +* `service/clouddirectory`: Updates service API and documentation + * Amazon Cloud Directory makes it easier for you to apply schema changes across your directories with in-place schema upgrades. Your directories now remain available while backward-compatible schema changes are being applied, such as the addition of new fields. You also can view the history of your schema changes in Cloud Directory by using both major and minor version identifiers, which can help you track and audit schema versions across directories. +* `service/elasticbeanstalk`: Updates service documentation + * Documentation updates for AWS Elastic Beanstalk. +* `service/sagemaker`: Adds new service + * Initial waiters for common SageMaker workflows. + +Release v1.12.41 (2017-12-05) +=== + +### Service Client Updates +* `service/iot`: Updates service API and documentation + * Add error action API for RulesEngine. +* `service/servicecatalog`: Updates service API and documentation + * ServiceCatalog has two distinct personas for its use, an "admin" persona (who creates sets of products with different versions and prescribes who has access to them) and an "end-user" persona (who can launch cloud resources based on the configuration data their admins have given them access to). This API update will allow admin users to deactivate/activate product versions, end-user will only be able to access and launch active product versions. +* `service/servicediscovery`: Adds new service + * Amazon Route 53 Auto Naming lets you configure public or private namespaces that your microservice applications run in. When instances of the service become available, you can call the Auto Naming API to register the instance, and Amazon Route 53 automatically creates up to five DNS records and an optional health check. Clients that submit DNS queries for the service receive an answer that contains up to eight healthy records. + +Release v1.12.40 (2017-12-04) +=== + +### Service Client Updates +* `service/budgets`: Updates service API and documentation + * Add additional costTypes to support finer control for different charges included in a cost budget. +* `service/ecs`: Updates service documentation + * Documentation updates for ecs + +Release v1.12.39 (2017-12-01) +=== + +### Service Client Updates +* `service/SageMaker`: Updates service waiters + +Release v1.12.38 (2017-11-30) +=== + +### Service Client Updates +* `service/AWSMoneypenny`: Adds new service +* `service/Cloud9`: Adds new service +* `service/Serverless Registry`: Adds new service +* `service/apigateway`: Updates service API, documentation, and paginators + * Added support Private Integration and VPC Link features in API Gateway. This allows to create an API with the API Gateway private integration, thus providing clients access to HTTP/HTTPS resources in an Amazon VPC from outside of the VPC through a VpcLink resource. +* `service/ec2`: Updates service API and documentation + * Adds the following updates: 1. Spread Placement ensures that instances are placed on distinct hardware in order to reduce correlated failures. 2. Inter-region VPC Peering allows customers to peer VPCs across different AWS regions without requiring additional gateways, VPN connections or physical hardware +* `service/lambda`: Updates service API and documentation + * AWS Lambda now supports the ability to set the concurrency limits for individual functions, and increasing memory to 3008 MB. + +Release v1.12.37 (2017-11-30) +=== + +### Service Client Updates +* `service/Ardi`: Adds new service +* `service/autoscaling`: Updates service API and documentation + * You can now use Auto Scaling with EC2 Launch Templates via the CreateAutoScalingGroup and UpdateAutoScalingGroup APIs. +* `service/ec2`: Updates service API and documentation + * Adds the following updates: 1. T2 Unlimited enables high CPU performance for any period of time whenever required 2. You are now able to create and launch EC2 m5 and h1 instances +* `service/lightsail`: Updates service API and documentation + * This release adds support for load balancer and TLS/SSL certificate management. This set of APIs allows customers to create, manage, and scale secure load balanced applications on Lightsail infrastructure. To provide support for customers who manage their DNS on Lightsail, we've added the ability create an Alias A type record which can point to a load balancer DNS name via the CreateDomainEntry API http://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_CreateDomainEntry.html. +* `service/ssm`: Updates service API and documentation + * This release updates AWS Systems Manager APIs to enable executing automations at controlled rate, target resources in a resource groups and execute entire automation at once or single step at a time. It is now also possible to use YAML, in addition to JSON, when creating Systems Manager documents. +* `service/waf`: Updates service API and documentation + * This release adds support for rule group and managed rule group. Rule group is a container of rules that customers can create, put rules in it and associate the rule group to a WebACL. All rules in a rule group will function identically as they would if each rule was individually associated to the WebACL. Managed rule group is a pre-configured rule group composed by our security partners and made available via the AWS Marketplace. Customers can subscribe to these managed rule groups, associate the managed rule group to their WebACL and start using them immediately to protect their resources. +* `service/waf-regional`: Updates service API and documentation + +Release v1.12.36 (2017-11-29) +=== + +### Service Client Updates +* `service/DeepInsight`: Adds new service +* `service/IronmanRuntime`: Adds new service +* `service/Orchestra - Laser`: Adds new service +* `service/SageMaker`: Adds new service +* `service/Shine`: Adds new service +* `service/archived.kinesisvideo`: Adds new service +* `service/data.kinesisvideo`: Adds new service +* `service/dynamodb`: Updates service API and documentation + * Amazon DynamoDB now supports the following features: Global Table and On-Demand Backup. Global Table is a fully-managed, multi-region, multi-master database. DynamoDB customers can now write anywhere and read anywhere with single-digit millisecond latency by performing database operations closest to where end users reside. Global Table also enables customers to disaster-proof their applications, keeping them running and data accessible even in the face of natural disasters or region disruptions. Customers can set up Global Table with just a few clicks in the AWS Management Console-no application rewrites required. On-Demand Backup capability is to protect data from loss due to application errors, and meet customers' archival needs for compliance and regulatory reasons. Customers can backup and restore their DynamoDB table data anytime, with a single-click in the AWS management console or a single API call. Backup and restore actions execute with zero impact on table performance or availability. For more information, see the Amazon DynamoDB Developer Guide. +* `service/ecs`: Updates service API and documentation + * Amazon Elastic Container Service (Amazon ECS) released a new launch type for running containers on a serverless infrastructure. The Fargate launch type allows you to run your containerized applications without the need to provision and manage the backend infrastructure. Just register your task definition and Fargate launches the container for you. +* `service/glacier`: Updates service API and documentation + * This release includes support for Glacier Select, a new feature that allows you to filter and analyze your Glacier archives and store the results in a user-specified S3 location. +* `service/greengrass`: Updates service API and documentation + * Greengrass OTA feature allows updating Greengrass Core and Greengrass OTA Agent. Local Resource Access feature allows Greengrass Lambdas to access local resources such as peripheral devices and volumes. +* `service/iot`: Updates service API and documentation + * This release adds support for a number of new IoT features, including AWS IoT Device Management (Jobs, Fleet Index and Thing Registration), Thing Groups, Policies on Thing Groups, Registry & Job Events, JSON Logs, Fine-Grained Logging Controls, Custom Authorization and AWS Service Authentication Using X.509 Certificates. +* `service/kinesisvideo`: Adds new service + * Announcing Amazon Kinesis Video Streams, a fully managed video ingestion and storage service. Kinesis Video Streams makes it easy to securely stream video from connected devices to AWS for machine learning, analytics, and processing. You can also stream other time-encoded data like RADAR and LIDAR signals using Kinesis Video Streams. +* `service/rekognition`: Updates service API, documentation, and paginators + * This release introduces Amazon Rekognition support for video analysis. +* `service/s3`: Updates service API and documentation + * This release includes support for Glacier Select, a new feature that allows you to filter and analyze your Glacier storage class objects and store the results in a user-specified S3 location. + +Release v1.12.35 (2017-11-29) +=== + +### Service Client Updates +* `service/AmazonMQ`: Adds new service +* `service/GuardDuty`: Adds new service +* `service/apigateway`: Updates service API and documentation + * Changes related to CanaryReleaseDeployment feature. Enables API developer to create a deployment as canary deployment and test API changes with percentage of customers before promoting changes to all customers. +* `service/batch`: Updates service API and documentation + * Add support for Array Jobs which allow users to easily submit many copies of a job with a single API call. This change also enhances the job dependency model to support N_TO_N and sequential dependency chains. The ListJobs and DescribeJobs APIs now have the ability to list or describe the status of entire Array Jobs or individual elements within the array. +* `service/cognito-idp`: Updates service API and documentation +* `service/deepdish`: Adds new service + * AWS AppSync is an enterprise-level, fully managed GraphQL service with real-time data synchronization and offline programming features. +* `service/ec2`: Updates service API and documentation + * Adds the following updates: 1. You are now able to host a service powered by AWS PrivateLink to provide private connectivity to other VPCs. You are now also able to create endpoints to other services powered by PrivateLink including AWS services, Marketplace Seller services or custom services created by yourself or other AWS VPC customers. 2. You are now able to save launch parameters in a single template that can be used with Auto Scaling, Spot Fleet, Spot, and On Demand instances. 3. You are now able to launch Spot instances via the RunInstances API, using a single additional parameter. RunInstances will response synchronously with an instance ID should capacity be available for your Spot request. 4. A simplified Spot pricing model which delivers low, predictable prices that adjust gradually, based on long-term trends in supply and demand. 5. Amazon EC2 Spot can now hibernate Amazon EBS-backed instances in the event of an interruption, so your workloads pick up from where they left off. Spot can fulfill your request by resuming instances from a hibernated state when capacity is available. +* `service/lambda`: Updates service API and documentation + * Lambda aliases can now shift traffic between two function versions, based on preassigned weights. + +Release v1.12.34 (2017-11-27) +=== + +### Service Client Updates +* `service/data.mediastore`: Adds new service +* `service/mediaconvert`: Adds new service + * AWS Elemental MediaConvert is a file-based video conversion service that transforms media into formats required for traditional broadcast and for internet streaming to multi-screen devices. +* `service/medialive`: Adds new service + * AWS Elemental MediaLive is a video service that lets you easily create live outputs for broadcast and streaming delivery. +* `service/mediapackage`: Adds new service + * AWS Elemental MediaPackage is a just-in-time video packaging and origination service that lets you format highly secure and reliable live outputs for a variety of devices. +* `service/mediastore`: Adds new service + * AWS Elemental MediaStore is an AWS storage service optimized for media. It gives you the performance, consistency, and low latency required to deliver live and on-demand video content. AWS Elemental MediaStore acts as the origin store in your video workflow. + +Release v1.12.33 (2017-11-22) +=== + +### Service Client Updates +* `service/acm`: Updates service API and documentation + * AWS Certificate Manager now supports the ability to import domainless certs and additional Key Types as well as an additional validation method for DNS. +* `aws/endpoints`: Updated Regions and Endpoints metadata. + +Release v1.12.32 (2017-11-22) +=== + +### Service Client Updates +* `service/apigateway`: Updates service API and documentation + * Add support for Access logs and customizable integration timeouts +* `service/cloudformation`: Updates service API and documentation + * 1) Instance-level parameter overrides (CloudFormation-StackSet feature): This feature will allow the customers to override the template parameters on specific stackInstances. Customers will also have ability to update their existing instances with/without parameter-overrides using a new API "UpdateStackInstances" 2) Add support for SSM parameters in CloudFormation - This feature will allow the customers to use Systems Manager parameters in CloudFormation templates. They will be able to see values for these parameters in Describe APIs. +* `service/codebuild`: Updates service API and documentation + * Adding support for accessing Amazon VPC resources from AWS CodeBuild, dependency caching and build badges. +* `service/elasticmapreduce`: Updates service API and documentation + * Enable Kerberos on Amazon EMR. +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/rekognition`: Updates service API and documentation + * This release includes updates to Amazon Rekognition for the following APIs. The new DetectText API allows you to recognize and extract textual content from images. Face Model Versioning has been added to operations that deal with face detection. +* `service/shield`: Updates service API, documentation, and paginators + * The AWS Shield SDK has been updated in order to support Elastic IP address protections, the addition of AttackProperties objects in DescribeAttack responses, and a new GetSubscriptionState operation. +* `service/storagegateway`: Updates service API and documentation + * AWS Storage Gateway now enables you to get notification when all your files written to your NFS file share have been uploaded to Amazon S3. Storage Gateway also enables guessing of the MIME type for uploaded objects based on file extensions. +* `service/xray`: Updates service API, documentation, and paginators + * Added automatic pagination support for AWS X-Ray APIs in the SDKs that support this feature. + +Release v1.12.31 (2017-11-20) +=== + +### Service Client Updates +* `service/apigateway`: Updates service documentation + * Documentation updates for Apigateway +* `service/codecommit`: Updates service API, documentation, and paginators + * AWS CodeCommit now supports pull requests. You can use pull requests to collaboratively review code changes for minor changes or fixes, major feature additions, or new versions of your released software. +* `service/firehose`: Updates service API and documentation + * This release includes a new Kinesis Firehose feature that supports Splunk as Kinesis Firehose delivery destination. You can now use Kinesis Firehose to ingest real-time data to Splunk in a serverless, reliable, and salable manner. This release also includes a new feature that allows you to configure Lambda buffer size in Kinesis Firehose data transformation feature. You can now customize the data buffer size before invoking Lambda function in Kinesis Firehose for data transformation. This feature allows you to flexibly trade-off processing and delivery latency with cost and efficiency based on your specific use cases and requirements. +* `service/iis`: Adds new service + * The AWS Cost Explorer API gives customers programmatic access to AWS cost and usage information, allowing them to perform adhoc queries and build interactive cost management applications that leverage this dataset. +* `service/kinesis`: Updates service API and documentation + * Customers can now obtain the important characteristics of their stream with DescribeStreamSummary. The response will not include the shard list for the stream but will have the number of open shards, and all the other fields included in the DescribeStream response. +* `service/workdocs`: Updates service API and documentation + * DescribeGroups API and miscellaneous enhancements + +### SDK Bugs +* `aws/client`: Retry delays for throttled exception were not limited to 5 mintues [#1654](https://github.com/aws/aws-sdk-go/pull/1654) + * Fixes [#1653](https://github.com/aws/aws-sdk-go/issues/1653) +Release v1.12.30 (2017-11-17) +=== + +### Service Client Updates +* `service/application-autoscaling`: Updates service API and documentation +* `service/dms`: Updates service API, documentation, and paginators + * Support for migration task assessment. Support for data validation after the migration. +* `service/elasticloadbalancingv2`: Updates service API and documentation +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/rds`: Updates service API and documentation + * Amazon RDS now supports importing MySQL databases by using backup files from Amazon S3. +* `service/s3`: Updates service API + * Added ORC to the supported S3 Inventory formats. + +### SDK Bugs +* `private/protocol/restjson`: Define JSONValue marshaling for body and querystring ([#1640](https://github.com/aws/aws-sdk-go/pull/1640)) + * Adds support for APIs which use JSONValue for body and querystring targets. + * Fixes [#1636](https://github.com/aws/aws-sdk-go/issues/1636) +Release v1.12.29 (2017-11-16) +=== + +### Service Client Updates +* `service/application-autoscaling`: Updates service API and documentation +* `service/ec2`: Updates service API + * You are now able to create and launch EC2 x1e smaller instance sizes +* `service/glue`: Updates service API and documentation + * API update for AWS Glue. New crawler configuration attribute enables customers to specify crawler behavior. New XML classifier enables classification of XML data. +* `service/opsworkscm`: Updates service API, documentation, and waiters + * Documentation updates for OpsWorks-cm: a new feature, OpsWorks for Puppet Enterprise, that allows users to create and manage OpsWorks-hosted Puppet Enterprise servers. +* `service/organizations`: Updates service API, documentation, and paginators + * This release adds APIs that you can use to enable and disable integration with AWS services designed to work with AWS Organizations. This integration allows the AWS service to perform operations on your behalf on all of the accounts in your organization. Although you can use these APIs yourself, we recommend that you instead use the commands provided in the other AWS service to enable integration with AWS Organizations. +* `service/route53`: Updates service API and documentation + * You can use Route 53's GetAccountLimit/GetHostedZoneLimit/GetReusableDelegationSetLimit APIs to view your current limits (including custom set limits) on Route 53 resources such as hosted zones and health checks. These APIs also return the number of each resource you're currently using to enable comparison against your current limits. + +Release v1.12.28 (2017-11-15) +=== + +### Service Client Updates +* `service/apigateway`: Updates service API and documentation + * 1. Extended GetDocumentationParts operation to support retrieving documentation parts resources without contents. 2. Added hosted zone ID in the custom domain response. +* `service/email`: Updates service API, documentation, and examples + * SES launches Configuration Set Reputation Metrics and Email Pausing Today, two features that build upon the capabilities of the reputation dashboard. The first is the ability to export reputation metrics for individual configuration sets. The second is the ability to temporarily pause email sending, either at the configuration set level, or across your entire Amazon SES account. +* `service/polly`: Updates service API + * Amazon Polly adds Korean language support with new female voice - "Seoyeon" and new Indian English female voice - "Aditi" +* `service/states`: Updates service API and documentation + * You can now use the UpdateStateMachine API to update your state machine definition and role ARN. Existing executions will continue to use the previous definition and role ARN. You can use the DescribeStateMachineForExecution API to determine which state machine definition and role ARN is associated with an execution + +Release v1.12.27 (2017-11-14) +=== + +### Service Client Updates +* `service/ecs`: Updates service API and documentation + * Added new mode for Task Networking in ECS, called awsvpc mode. Mode configuration parameters to be passed in via awsvpcConfiguration. Updated APIs now use/show this new mode - RegisterTaskDefinition, CreateService, UpdateService, RunTask, StartTask. +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/lightsail`: Updates service API and documentation + * Lightsail now supports attached block storage, which allows you to scale your applications and protect application data with additional SSD-backed storage disks. This feature allows Lightsail customers to attach secure storage disks to their Lightsail instances and manage their attached disks, including creating and deleting disks, attaching and detaching disks from instances, and backing up disks via snapshot. +* `service/route53`: Updates service API and documentation + * When a Route 53 health check or hosted zone is created by a linked AWS service, the object now includes information about the service that created it. Hosted zones or health checks that are created by a linked service can't be updated or deleted using Route 53. +* `service/ssm`: Updates service API and documentation + * EC2 Systems Manager GetInventory API adds support for aggregation. + +### SDK Enhancements +* `aws/request`: Remove default port from HTTP host header ([#1618](https://github.com/aws/aws-sdk-go/pull/1618)) + * Updates the SDK to automatically remove default ports based on the URL's scheme when setting the HTTP Host header's value. + * Fixes [#1537](https://github.com/aws/aws-sdk-go/issues/1537) + +Release v1.12.26 (2017-11-09) +=== + +### Service Client Updates +* `service/ec2`: Updates service API and documentation + * Introduces the following features: 1. Create a default subnet in an Availability Zone if no default subnet exists. 2. Spot Fleet integrates with Elastic Load Balancing to enable you to attach one or more load balancers to a Spot Fleet request. When you attach the load balancer, it automatically registers the instance in the Spot Fleet to the load balancers which distributes incoming traffic across the instances. +* `aws/endpoints`: Updated Regions and Endpoints metadata. + +Release v1.12.25 (2017-11-08) +=== + +### Service Client Updates +* `service/application-autoscaling`: Updates service API and documentation +* `service/batch`: Updates service documentation + * Documentation updates for AWS Batch. +* `service/ec2`: Updates service API and documentation + * AWS PrivateLink for Amazon Services - Customers can now privately access Amazon services from their Amazon Virtual Private Cloud (VPC), without using public IPs, and without requiring the traffic to traverse across the Internet. +* `service/elasticache`: Updates service API and documentation + * This release adds online resharding for ElastiCache for Redis offering, providing the ability to add and remove shards from a running cluster. Developers can now dynamically scale-out or scale-in their Redis cluster workloads to adapt to changes in demand. ElastiCache will resize the cluster by adding or removing shards and redistribute hash slots uniformly across the new shard configuration, all while the cluster continues to stay online and serves requests. +* `aws/endpoints`: Updated Regions and Endpoints metadata. + +Release v1.12.24 (2017-11-07) +=== + +### Service Client Updates +* `service/elasticloadbalancingv2`: Updates service documentation +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/rds`: Updates service API and documentation + * DescribeOrderableDBInstanceOptions now returns the minimum and maximum allowed values for storage size, total provisioned IOPS, and provisioned IOPS per GiB for a DB instance. +* `service/s3`: Updates service API, documentation, and examples + * This releases adds support for 4 features: 1. Default encryption for S3 Bucket, 2. Encryption status in inventory and Encryption support for inventory. 3. Cross region replication of KMS-encrypted objects, and 4. ownership overwrite for CRR. + +Release v1.12.23 (2017-11-07) +=== + +### Service Client Updates +* `service/api.pricing`: Adds new service +* `service/ec2`: Updates service API + * You are now able to create and launch EC2 C5 instances, the next generation of EC2's compute-optimized instances, in us-east-1, us-west-2 and eu-west-1. C5 instances offer up to 72 vCPUs, 144 GiB of DDR4 instance memory, 25 Gbps in Network bandwidth and improved EBS and Networking bandwidth on smaller instance sizes to deliver improved performance for compute-intensive workloads. +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/kms`: Updates service API, documentation, and examples + * Documentation updates for AWS KMS. +* `service/organizations`: Updates service documentation + * This release updates permission statements for several API operations, and corrects some other minor errors. +* `service/states`: Updates service API, documentation, and paginators + * Documentation update. + +Release v1.12.22 (2017-11-03) +=== + +### Service Client Updates +* `service/ecs`: Updates service API and documentation + * Amazon ECS users can now add devices to their containers and enable init process in containers through the use of docker's 'devices' and 'init' features. These fields can be specified under linuxParameters in ContainerDefinition in the Task Definition Template. +* `aws/endpoints`: Updated Regions and Endpoints metadata. + +Release v1.12.21 (2017-11-02) +=== + +### Service Client Updates +* `service/apigateway`: Updates service API and documentation + * This release supports creating and managing Regional and Edge-Optimized API endpoints. +* `aws/endpoints`: Updated Regions and Endpoints metadata. + +### SDK Bugs +* `aws/request`: Fix bug in request presign creating invalide URL ([#1624](https://github.com/aws/aws-sdk-go/pull/1624)) + * Fixes a bug the Request Presign and PresignRequest methods that would allow a invalid expire duration as input. A expire time of 0 would be interpreted by the SDK to generate a normal request signature, not a presigned URL. This caused the returned URL unusable. + * Fixes [#1617](https://github.com/aws/aws-sdk-go/issues/1617) +Release v1.12.20 (2017-11-01) +=== + +### Service Client Updates +* `service/acm`: Updates service documentation + * Documentation updates for ACM +* `service/cloudhsmv2`: Updates service documentation + * Minor documentation update for AWS CloudHSM (cloudhsmv2). +* `service/directconnect`: Updates service API and documentation + * AWS DirectConnect now provides support for Global Access for Virtual Private Cloud (VPC) via a new feature called Direct Connect Gateway. A Direct Connect Gateway will allow you to group multiple Direct Connect Private Virtual Interfaces (DX-VIF) and Private Virtual Gateways (VGW) from different AWS regions (but belonging to the same AWS Account) and pass traffic from any DX-VIF to any VPC in the grouping. +* `aws/endpoints`: Updated Regions and Endpoints metadata. + +### SDK Enhancements +* `aws/client`: Adding status code 429 to throttlable status codes in default retryer (#1621) + +Release v1.12.19 (2017-10-26) +=== + +### Service Client Updates +* `aws/endpoints`: Updated Regions and Endpoints metadata. + +Release v1.12.18 (2017-10-26) +=== + +### Service Client Updates +* `service/cloudfront`: Updates service API and documentation + * You can now specify additional options for MinimumProtocolVersion, which controls the SSL/TLS protocol that CloudFront uses to communicate with viewers. The minimum protocol version that you choose also determines the ciphers that CloudFront uses to encrypt the content that it returns to viewers. +* `service/ec2`: Updates service API + * You are now able to create and launch EC2 P3 instance, next generation GPU instances, optimized for machine learning and high performance computing applications. With up to eight NVIDIA Tesla V100 GPUs, P3 instances provide up to one petaflop of mixed-precision, 125 teraflops of single-precision, and 62 teraflops of double-precision floating point performance, as well as a 300 GB/s second-generation NVLink interconnect that enables high-speed, low-latency GPU-to-GPU communication. P3 instances also feature up to 64 vCPUs based on custom Intel Xeon E5 (Broadwell) processors, 488 GB of DRAM, and 25 Gbps of dedicated aggregate network bandwidth using the Elastic Network Adapter (ENA). +* `aws/endpoints`: Updated Regions and Endpoints metadata. + +Release v1.12.17 (2017-10-24) +=== + +### Service Client Updates +* `service/config`: Updates service API +* `service/elasticache`: Updates service API, documentation, and examples + * Amazon ElastiCache for Redis today announced support for data encryption both for data in-transit and data at-rest. The new encryption in-transit functionality enables ElastiCache for Redis customers to encrypt data for all communication between clients and Redis engine, and all intra-cluster Redis communication. The encryption at-rest functionality allows customers to encrypt their S3 based backups. Customers can begin using the new functionality by simply enabling this functionality via AWS console, and a small configuration change in their Redis clients. The ElastiCache for Redis service automatically manages life cycle of the certificates required for encryption, including the issuance, renewal and expiration of certificates. Additionally, as part of this launch, customers will gain the ability to start using the Redis AUTH command that provides an added level of authentication. +* `service/glue`: Adds new service + * AWS Glue: Adding a new API, BatchStopJobRun, to stop one or more job runs for a specified Job. +* `service/pinpoint`: Updates service API and documentation + * Added support for APNs VoIP messages. Added support for collapsible IDs, message priority, and TTL for APNs and FCM/GCM. + +Release v1.12.16 (2017-10-23) +=== + +### Service Client Updates +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/organizations`: Updates service API and documentation + * This release supports integrating other AWS services with AWS Organizations through the use of an IAM service-linked role called AWSServiceRoleForOrganizations. Certain operations automatically create that role if it does not already exist. + +Release v1.12.15 (2017-10-20) +=== + +### Service Client Updates +* `service/ec2`: Updates service API and documentation + * Adding pagination support for DescribeSecurityGroups for EC2 Classic and VPC Security Groups + +Release v1.12.14 (2017-10-19) +=== + +### Service Client Updates +* `service/sqs`: Updates service API and documentation + * Added support for tracking cost allocation by adding, updating, removing, and listing the metadata tags of Amazon SQS queues. +* `service/ssm`: Updates service API and documentation + * EC2 Systems Manager versioning support for Parameter Store. Also support for referencing parameter versions in SSM Documents. + +Release v1.12.13 (2017-10-18) +=== + +### Service Client Updates +* `service/lightsail`: Updates service API and documentation + * This release adds support for Windows Server-based Lightsail instances. The GetInstanceAccessDetails API now returns the password of your Windows Server-based instance when using the default key pair. GetInstanceAccessDetails also returns a PasswordData object for Windows Server instances containing the ciphertext and keyPairName. The Blueprint data type now includes a list of platform values (LINUX_UNIX or WINDOWS). The Bundle data type now includes a list of SupportedPlatforms values (LINUX_UNIX or WINDOWS). + +Release v1.12.12 (2017-10-17) +=== + +### Service Client Updates +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/es`: Updates service API and documentation + * This release adds support for VPC access to Amazon Elasticsearch Service. + * This release adds support for VPC access to Amazon Elasticsearch Service. + +Release v1.12.11 (2017-10-16) +=== + +### Service Client Updates +* `service/cloudhsm`: Updates service API and documentation + * Documentation updates for AWS CloudHSM Classic. +* `service/ec2`: Updates service API and documentation + * You can now change the tenancy of your VPC from dedicated to default with a single API operation. For more details refer to the documentation for changing VPC tenancy. +* `service/es`: Updates service API and documentation + * AWS Elasticsearch adds support for enabling slow log publishing. Using slow log publishing options customers can configure and enable index/query slow log publishing of their domain to preferred AWS Cloudwatch log group. +* `service/rds`: Updates service API and waiters + * Adds waiters for DBSnapshotAvailable and DBSnapshotDeleted. +* `service/waf`: Updates service API and documentation + * This release adds support for regular expressions as match conditions in rules, and support for geographical location by country of request IP address as a match condition in rules. +* `service/waf-regional`: Updates service API and documentation + +Release v1.12.10 (2017-10-12) +=== + +### Service Client Updates +* `service/codecommit`: Updates service API and documentation + * This release includes the DeleteBranch API and a change to the contents of a Commit object. +* `service/dms`: Updates service API and documentation + * This change includes addition of new optional parameter to an existing API +* `service/elasticbeanstalk`: Updates service API and documentation + * Added the ability to add, delete or update Tags +* `service/polly`: Updates service API + * Amazon Polly exposes two new voices: "Matthew" (US English) and "Takumi" (Japanese) +* `service/rds`: Updates service API and documentation + * You can now call DescribeValidDBInstanceModifications to learn what modifications you can make to your DB instance. You can use this information when you call ModifyDBInstance. + +Release v1.12.9 (2017-10-11) +=== + +### Service Client Updates +* `service/ecr`: Updates service API, documentation, and paginators + * Adds support for new API set used to manage Amazon ECR repository lifecycle policies. Amazon ECR lifecycle policies enable you to specify the lifecycle management of images in a repository. The configuration is a set of one or more rules, where each rule defines an action for Amazon ECR to apply to an image. This allows the automation of cleaning up unused images, for example expiring images based on age or status. A lifecycle policy preview API is provided as well, which allows you to see the impact of a lifecycle policy on an image repository before you execute it +* `service/email`: Updates service API and documentation + * Added content related to email template management and templated email sending operations. +* `aws/endpoints`: Updated Regions and Endpoints metadata. + +Release v1.12.8 (2017-10-10) +=== + +### Service Client Updates +* `service/ec2`: Updates service API and documentation + * This release includes updates to AWS Virtual Private Gateway. +* `service/elasticloadbalancingv2`: Updates service API and documentation +* `service/opsworkscm`: Updates service API and documentation + * Provide engine specific information for node associations. + +Release v1.12.7 (2017-10-06) +=== + +### Service Client Updates +* `service/sqs`: Updates service documentation + * Documentation updates regarding availability of FIFO queues and miscellaneous corrections. + +Release v1.12.6 (2017-10-05) +=== + +### Service Client Updates +* `service/redshift`: Updates service API and documentation + * DescribeEventSubscriptions API supports tag keys and tag values as request parameters. + +Release v1.12.5 (2017-10-04) +=== + +### Service Client Updates +* `service/kinesisanalytics`: Updates service API and documentation + * Kinesis Analytics now supports schema discovery on objects in S3. Additionally, Kinesis Analytics now supports input data preprocessing through Lambda. +* `service/route53domains`: Updates service API and documentation + * Added a new API that checks whether a domain name can be transferred to Amazon Route 53. + +### SDK Bugs +* `service/s3/s3crypto`: Correct PutObjectRequest documentation ([#1568](https://github.com/aws/aws-sdk-go/pull/1568)) + * s3Crypto's PutObjectRequest docstring example was using an incorrect value. Corrected the type used in the example. +Release v1.12.4 (2017-10-03) +=== + +### Service Client Updates +* `service/ec2`: Updates service API, documentation, and waiters + * This release includes service updates to AWS VPN. +* `service/ssm`: Updates service API and documentation + * EC2 Systems Manager support for tagging SSM Documents. Also support for tag-based permissions to restrict access to SSM Documents based on these tags. + +Release v1.12.3 (2017-10-02) +=== + +### Service Client Updates +* `service/cloudhsm`: Updates service documentation and paginators + * Documentation updates for CloudHSM + +Release v1.12.2 (2017-09-29) +=== + +### Service Client Updates +* `service/appstream`: Updates service API and documentation + * Includes APIs for managing and accessing image builders, and deleting images. +* `service/codebuild`: Updates service API and documentation + * Adding support for Building GitHub Pull Requests in AWS CodeBuild +* `service/mturk-requester`: Updates service API and documentation +* `service/organizations`: Updates service API and documentation + * This release flags the HandshakeParty structure's Type and Id fields as 'required'. They effectively were required in the past, as you received an error if you did not include them. This is now reflected at the API definition level. +* `service/route53`: Updates service API and documentation + * This change allows customers to reset elements of health check. + +### SDK Bugs +* `private/protocol/query`: Fix query protocol handling of nested byte slices ([#1557](https://github.com/aws/aws-sdk-go/issues/1557)) + * Fixes the query protocol to correctly marshal nested []byte values of API operations. +* `service/s3`: Fix PutObject and UploadPart API to include ContentMD5 field ([#1559](https://github.com/aws/aws-sdk-go/pull/1559)) + * Fixes the SDK's S3 PutObject and UploadPart API code generation to correctly render the ContentMD5 field into the associated input types for these two API operations. + * Fixes [#1553](https://github.com/aws/aws-sdk-go/pull/1553) Release v1.12.1 (2017-09-27) === diff --git a/vendor/github.com/aws/aws-sdk-go/CODE_OF_CONDUCT.md b/vendor/github.com/aws/aws-sdk-go/CODE_OF_CONDUCT.md new file mode 100644 index 000000000..3b6446687 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/CODE_OF_CONDUCT.md @@ -0,0 +1,4 @@ +## Code of Conduct +This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct). +For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact +opensource-codeofconduct@amazon.com with any additional questions or comments. diff --git a/vendor/github.com/aws/aws-sdk-go/CONTRIBUTING.md b/vendor/github.com/aws/aws-sdk-go/CONTRIBUTING.md index 7c0186f0c..6f422a95e 100644 --- a/vendor/github.com/aws/aws-sdk-go/CONTRIBUTING.md +++ b/vendor/github.com/aws/aws-sdk-go/CONTRIBUTING.md @@ -67,7 +67,7 @@ Please be aware of the following notes prior to opening a pull request: 5. The JSON files under the SDK's `models` folder are sourced from outside the SDK. Such as `models/apis/ec2/2016-11-15/api.json`. We will not accept pull requests directly on these models. If you discover an issue with the models please - create a Github [issue](issues) describing the issue. + create a [GitHub issue][issues] describing the issue. ### Testing diff --git a/vendor/github.com/aws/aws-sdk-go/README.md b/vendor/github.com/aws/aws-sdk-go/README.md index d5e048a5f..9f10e76f3 100644 --- a/vendor/github.com/aws/aws-sdk-go/README.md +++ b/vendor/github.com/aws/aws-sdk-go/README.md @@ -6,6 +6,8 @@ aws-sdk-go is the official AWS SDK for the Go programming language. Checkout our [release notes](https://github.com/aws/aws-sdk-go/releases) for information about the latest bug fixes, updates, and features added to the SDK. +We [announced](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-2-0-developer-preview/) the Developer Preview for the [v2 AWS SDK for Go](https://github.com/aws/aws-sdk-go-v2). The v2 SDK is available at https://github.com/aws/aws-sdk-go-v2, and `go get github.com/aws/aws-sdk-go-v2` via `go get`. Check out the v2 SDK's [changes and updates](https://github.com/aws/aws-sdk-go-v2/blob/master/CHANGELOG.md), and let us know what you think. We want your feedback. + ## Installing If you are using Go 1.5 with the `GO15VENDOREXPERIMENT=1` vendoring flag, or 1.6 and higher you can use the following command to retrieve the SDK. The SDK's non-testing dependencies will be included and are vendored in the `vendor` folder. @@ -185,7 +187,7 @@ Option's SharedConfigState parameter. })) ``` -[credentials_pkg]: ttps://docs.aws.amazon.com/sdk-for-go/api/aws/credentials +[credentials_pkg]: https://docs.aws.amazon.com/sdk-for-go/api/aws/credentials ### Configuring AWS Region @@ -305,7 +307,7 @@ documentation for the errors that could be returned. // will leak connections. defer result.Body.Close() - fmt.Println("Object Size:", aws.StringValue(result.ContentLength)) + fmt.Println("Object Size:", aws.Int64Value(result.ContentLength)) ``` ### API Request Pagination and Resource Waiters diff --git a/vendor/github.com/aws/aws-sdk-go/aws/awsutil/copy_test.go b/vendor/github.com/aws/aws-sdk-go/aws/awsutil/copy_test.go index 0e75c5eea..007b37be1 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/awsutil/copy_test.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/awsutil/copy_test.go @@ -5,11 +5,11 @@ import ( "fmt" "io" "io/ioutil" + "reflect" "testing" "time" "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/stretchr/testify/assert" ) func ExampleCopy() { @@ -81,12 +81,24 @@ func TestCopy1(t *testing.T) { awsutil.Copy(&f2, f1) // Values are equal - assert.Equal(t, f2.A, f1.A) - assert.Equal(t, f2.B, f1.B) - assert.Equal(t, f2.C, f1.C) - assert.Equal(t, f2.D, f1.D) - assert.Equal(t, f2.E.B, f1.E.B) - assert.Equal(t, f2.E.D, f1.E.D) + if v1, v2 := f2.A, f1.A; v1 != v2 { + t.Errorf("expected values to be equivalent but received %v and %v", v1, v2) + } + if v1, v2 := f2.B, f1.B; !reflect.DeepEqual(v1, v2) { + t.Errorf("expected values to be equivalent but received %v and %v", v1, v2) + } + if v1, v2 := f2.C, f1.C; !reflect.DeepEqual(v1, v2) { + t.Errorf("expected values to be equivalent but received %v and %v", v1, v2) + } + if v1, v2 := f2.D, f1.D; !v1.Equal(*v2) { + t.Errorf("expected values to be equivalent but received %v and %v", v1, v2) + } + if v1, v2 := f2.E.B, f1.E.B; !reflect.DeepEqual(v1, v2) { + t.Errorf("expected values to be equivalent but received %v and %v", v1, v2) + } + if v1, v2 := f2.E.D, f1.E.D; v1 != v2 { + t.Errorf("expected values to be equivalent but received %v and %v", v1, v2) + } // But pointers are not! str3 := "nothello" @@ -99,14 +111,30 @@ func TestCopy1(t *testing.T) { *f2.E.B = int3 f2.E.c = 5 f2.E.D = 5 - assert.NotEqual(t, f2.A, f1.A) - assert.NotEqual(t, f2.B, f1.B) - assert.NotEqual(t, f2.C, f1.C) - assert.NotEqual(t, f2.D, f1.D) - assert.NotEqual(t, f2.E.a, f1.E.a) - assert.NotEqual(t, f2.E.B, f1.E.B) - assert.NotEqual(t, f2.E.c, f1.E.c) - assert.NotEqual(t, f2.E.D, f1.E.D) + if v1, v2 := f2.A, f1.A; v1 == v2 { + t.Errorf("expected values to be not equivalent, but received %v", v1) + } + if v1, v2 := f2.B, f1.B; reflect.DeepEqual(v1, v2) { + t.Errorf("expected values to be not equivalent, but received %v", v1) + } + if v1, v2 := f2.C, f1.C; reflect.DeepEqual(v1, v2) { + t.Errorf("expected values to be not equivalent, but received %v", v1) + } + if v1, v2 := f2.D, f1.D; v1 == v2 { + t.Errorf("expected values to be not equivalent, but received %v", v1) + } + if v1, v2 := f2.E.a, f1.E.a; v1 == v2 { + t.Errorf("expected values to be not equivalent, but received %v", v1) + } + if v1, v2 := f2.E.B, f1.E.B; v1 == v2 { + t.Errorf("expected values to be not equivalent, but received %v", v1) + } + if v1, v2 := f2.E.c, f1.E.c; v1 == v2 { + t.Errorf("expected values to be not equivalent, but received %v", v1) + } + if v1, v2 := f2.E.D, f1.E.D; v1 == v2 { + t.Errorf("expected values to be not equivalent, but received %v", v1) + } } func TestCopyNestedWithUnexported(t *testing.T) { @@ -125,10 +153,18 @@ func TestCopyNestedWithUnexported(t *testing.T) { awsutil.Copy(&f2, f1) // Values match - assert.Equal(t, f2.A, f1.A) - assert.NotEqual(t, f2.B, f1.B) - assert.NotEqual(t, f2.B.a, f1.B.a) - assert.Equal(t, f2.B.B, f2.B.B) + if v1, v2 := f2.A, f1.A; v1 != v2 { + t.Errorf("expected values to be equivalent but received %v and %v", v1, v2) + } + if v1, v2 := f2.B, f1.B; v1 == v2 { + t.Errorf("expected values to be not equivalent, but received %v", v1) + } + if v1, v2 := f2.B.a, f1.B.a; v1 == v2 { + t.Errorf("expected values to be not equivalent, but received %v", v1) + } + if v1, v2 := f2.B.B, f2.B.B; v1 != v2 { + t.Errorf("expected values to be equivalent but received %v and %v", v1, v2) + } } func TestCopyIgnoreNilMembers(t *testing.T) { @@ -139,34 +175,56 @@ func TestCopyIgnoreNilMembers(t *testing.T) { } f := &Foo{} - assert.Nil(t, f.A) - assert.Nil(t, f.B) - assert.Nil(t, f.C) + if v1 := f.A; v1 != nil { + t.Errorf("expected nil, but received %v", v1) + } + if v1 := f.B; v1 != nil { + t.Errorf("expected nil, but received %v", v1) + } + if v1 := f.C; v1 != nil { + t.Errorf("expected nil, but received %v", v1) + } var f2 Foo awsutil.Copy(&f2, f) - assert.Nil(t, f2.A) - assert.Nil(t, f2.B) - assert.Nil(t, f2.C) + if v1 := f2.A; v1 != nil { + t.Errorf("expected nil, but received %v", v1) + } + if v1 := f2.B; v1 != nil { + t.Errorf("expected nil, but received %v", v1) + } + if v1 := f2.C; v1 != nil { + t.Errorf("expected nil, but received %v", v1) + } fcopy := awsutil.CopyOf(f) f3 := fcopy.(*Foo) - assert.Nil(t, f3.A) - assert.Nil(t, f3.B) - assert.Nil(t, f3.C) + if v1 := f3.A; v1 != nil { + t.Errorf("expected nil, but received %v", v1) + } + if v1 := f3.B; v1 != nil { + t.Errorf("expected nil, but received %v", v1) + } + if v1 := f3.C; v1 != nil { + t.Errorf("expected nil, but received %v", v1) + } } func TestCopyPrimitive(t *testing.T) { str := "hello" var s string awsutil.Copy(&s, &str) - assert.Equal(t, "hello", s) + if v1, v2 := "hello", s; v1 != v2 { + t.Errorf("expected values to be equivalent but received %v and %v", v1, v2) + } } func TestCopyNil(t *testing.T) { var s string awsutil.Copy(&s, nil) - assert.Equal(t, "", s) + if v1, v2 := "", s; v1 != v2 { + t.Errorf("expected values to be equivalent but received %v and %v", v1, v2) + } } func TestCopyReader(t *testing.T) { @@ -174,13 +232,21 @@ func TestCopyReader(t *testing.T) { var r io.Reader awsutil.Copy(&r, buf) b, err := ioutil.ReadAll(r) - assert.NoError(t, err) - assert.Equal(t, []byte("hello world"), b) + if err != nil { + t.Errorf("expected no error, but received %v", err) + } + if v1, v2 := []byte("hello world"), b; !bytes.Equal(v1, v2) { + t.Errorf("expected values to be equivalent but received %v and %v", v1, v2) + } // empty bytes because this is not a deep copy b, err = ioutil.ReadAll(buf) - assert.NoError(t, err) - assert.Equal(t, []byte(""), b) + if err != nil { + t.Errorf("expected no error, but received %v", err) + } + if v1, v2 := []byte(""), b; !bytes.Equal(v1, v2) { + t.Errorf("expected values to be equivalent but received %v and %v", v1, v2) + } } func TestCopyDifferentStructs(t *testing.T) { @@ -226,17 +292,39 @@ func TestCopyDifferentStructs(t *testing.T) { awsutil.Copy(&f2, f1) // Values are equal - assert.Equal(t, f2.A, f1.A) - assert.Equal(t, f2.B, f1.B) - assert.Equal(t, f2.C, f1.C) - assert.Equal(t, "unique", f1.SrcUnique) - assert.Equal(t, 1, f1.SameNameDiffType) - assert.Equal(t, 0, f2.DstUnique) - assert.Equal(t, "", f2.SameNameDiffType) - assert.Equal(t, int1, *f1.unexportedPtr) - assert.Nil(t, f2.unexportedPtr) - assert.Equal(t, int2, *f1.ExportedPtr) - assert.Equal(t, int2, *f2.ExportedPtr) + if v1, v2 := f2.A, f1.A; v1 != v2 { + t.Errorf("expected values to be equivalent but received %v and %v", v1, v2) + } + if v1, v2 := f2.B, f1.B; !reflect.DeepEqual(v1, v2) { + t.Errorf("expected values to be equivalent but received %v and %v", v1, v2) + } + if v1, v2 := f2.C, f1.C; !reflect.DeepEqual(v1, v2) { + t.Errorf("expected values to be equivalent but received %v and %v", v1, v2) + } + if v1, v2 := "unique", f1.SrcUnique; v1 != v2 { + t.Errorf("expected values to be equivalent but received %v and %v", v1, v2) + } + if v1, v2 := 1, f1.SameNameDiffType; v1 != v2 { + t.Errorf("expected values to be equivalent but received %v and %v", v1, v2) + } + if v1, v2 := 0, f2.DstUnique; v1 != v2 { + t.Errorf("expected values to be equivalent but received %v and %v", v1, v2) + } + if v1, v2 := "", f2.SameNameDiffType; v1 != v2 { + t.Errorf("expected values to be equivalent but received %v and %v", v1, v2) + } + if v1, v2 := int1, *f1.unexportedPtr; v1 != v2 { + t.Errorf("expected values to be equivalent but received %v and %v", v1, v2) + } + if v1 := f2.unexportedPtr; v1 != nil { + t.Errorf("expected nil, but received %v", v1) + } + if v1, v2 := int2, *f1.ExportedPtr; v1 != v2 { + t.Errorf("expected values to be equivalent but received %v and %v", v1, v2) + } + if v1, v2 := int2, *f2.ExportedPtr; v1 != v2 { + t.Errorf("expected values to be equivalent but received %v and %v", v1, v2) + } } func ExampleCopyOf() { diff --git a/vendor/github.com/aws/aws-sdk-go/aws/awsutil/equal_test.go b/vendor/github.com/aws/aws-sdk-go/aws/awsutil/equal_test.go index 7a5db6e49..18d3c5b8e 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/awsutil/equal_test.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/awsutil/equal_test.go @@ -5,7 +5,6 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/stretchr/testify/assert" ) func TestDeepEqual(t *testing.T) { @@ -24,6 +23,8 @@ func TestDeepEqual(t *testing.T) { } for i, c := range cases { - assert.Equal(t, c.equal, awsutil.DeepEqual(c.a, c.b), "%d, a:%v b:%v, %t", i, c.a, c.b, c.equal) + if awsutil.DeepEqual(c.a, c.b) != c.equal { + t.Errorf("%d, a:%v b:%v, %t", i, c.a, c.b, c.equal) + } } } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/awsutil/path_value_test.go b/vendor/github.com/aws/aws-sdk-go/aws/awsutil/path_value_test.go index b2225566f..58a05d6ce 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/awsutil/path_value_test.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/awsutil/path_value_test.go @@ -1,10 +1,10 @@ package awsutil_test import ( + "strings" "testing" "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/stretchr/testify/assert" ) type Struct struct { @@ -50,8 +50,12 @@ func TestValueAtPathSuccess(t *testing.T) { } for i, c := range testCases { v, err := awsutil.ValuesAtPath(c.data, c.path) - assert.NoError(t, err, "case %d, expected no error, %s", i, c.path) - assert.Equal(t, c.expect, v, "case %d, %s", i, c.path) + if err != nil { + t.Errorf("case %v, expected no error, %v", i, c.path) + } + if e, a := c.expect, v; !awsutil.DeepEqual(e, a) { + t.Errorf("case %v, %v", i, c.path) + } } } @@ -78,12 +82,18 @@ func TestValueAtPathFailure(t *testing.T) { for i, c := range testCases { v, err := awsutil.ValuesAtPath(c.data, c.path) if c.errContains != "" { - assert.Contains(t, err.Error(), c.errContains, "case %d, expected error, %s", i, c.path) + if !strings.Contains(err.Error(), c.errContains) { + t.Errorf("case %v, expected error, %v", i, c.path) + } continue } else { - assert.NoError(t, err, "case %d, expected no error, %s", i, c.path) + if err != nil { + t.Errorf("case %v, expected no error, %v", i, c.path) + } + } + if e, a := c.expect, v; !awsutil.DeepEqual(e, a) { + t.Errorf("case %v, %v", i, c.path) } - assert.Equal(t, c.expect, v, "case %d, %s", i, c.path) } } @@ -92,51 +102,81 @@ func TestSetValueAtPathSuccess(t *testing.T) { awsutil.SetValueAtPath(&s, "C", "test1") awsutil.SetValueAtPath(&s, "B.B.C", "test2") awsutil.SetValueAtPath(&s, "B.D.C", "test3") - assert.Equal(t, "test1", s.C) - assert.Equal(t, "test2", s.B.B.C) - assert.Equal(t, "test3", s.B.D.C) + if e, a := "test1", s.C; e != a { + t.Errorf("expected %v, but received %v", e, a) + } + if e, a := "test2", s.B.B.C; e != a { + t.Errorf("expected %v, but received %v", e, a) + } + if e, a := "test3", s.B.D.C; e != a { + t.Errorf("expected %v, but received %v", e, a) + } awsutil.SetValueAtPath(&s, "B.*.C", "test0") - assert.Equal(t, "test0", s.B.B.C) - assert.Equal(t, "test0", s.B.D.C) + if e, a := "test0", s.B.B.C; e != a { + t.Errorf("expected %v, but received %v", e, a) + } + if e, a := "test0", s.B.D.C; e != a { + t.Errorf("expected %v, but received %v", e, a) + } var s2 Struct awsutil.SetValueAtPath(&s2, "b.b.c", "test0") - assert.Equal(t, "test0", s2.B.B.C) + if e, a := "test0", s2.B.B.C; e != a { + t.Errorf("expected %v, but received %v", e, a) + } awsutil.SetValueAtPath(&s2, "A", []Struct{{}}) - assert.Equal(t, []Struct{{}}, s2.A) + if e, a := []Struct{{}}, s2.A; !awsutil.DeepEqual(e, a) { + t.Errorf("expected %v, but received %v", e, a) + } str := "foo" s3 := Struct{} awsutil.SetValueAtPath(&s3, "b.b.c", str) - assert.Equal(t, "foo", s3.B.B.C) + if e, a := "foo", s3.B.B.C; e != a { + t.Errorf("expected %v, but received %v", e, a) + } s3 = Struct{B: &Struct{B: &Struct{C: str}}} awsutil.SetValueAtPath(&s3, "b.b.c", nil) - assert.Equal(t, "", s3.B.B.C) + if e, a := "", s3.B.B.C; e != a { + t.Errorf("expected %v, but received %v", e, a) + } s3 = Struct{} awsutil.SetValueAtPath(&s3, "b.b.c", nil) - assert.Equal(t, "", s3.B.B.C) + if e, a := "", s3.B.B.C; e != a { + t.Errorf("expected %v, but received %v", e, a) + } s3 = Struct{} awsutil.SetValueAtPath(&s3, "b.b.c", &str) - assert.Equal(t, "foo", s3.B.B.C) + if e, a := "foo", s3.B.B.C; e != a { + t.Errorf("expected %v, but received %v", e, a) + } var s4 struct{ Name *string } awsutil.SetValueAtPath(&s4, "Name", str) - assert.Equal(t, str, *s4.Name) + if e, a := str, *s4.Name; e != a { + t.Errorf("expected %v, but received %v", e, a) + } s4 = struct{ Name *string }{} awsutil.SetValueAtPath(&s4, "Name", nil) - assert.Equal(t, (*string)(nil), s4.Name) + if e, a := (*string)(nil), s4.Name; e != a { + t.Errorf("expected %v, but received %v", e, a) + } s4 = struct{ Name *string }{Name: &str} awsutil.SetValueAtPath(&s4, "Name", nil) - assert.Equal(t, (*string)(nil), s4.Name) + if e, a := (*string)(nil), s4.Name; e != a { + t.Errorf("expected %v, but received %v", e, a) + } s4 = struct{ Name *string }{} awsutil.SetValueAtPath(&s4, "Name", &str) - assert.Equal(t, str, *s4.Name) + if e, a := str, *s4.Name; e != a { + t.Errorf("expected %v, but received %v", e, a) + } } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/client/client.go b/vendor/github.com/aws/aws-sdk-go/aws/client/client.go index 788fe6e27..3271a18e8 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/client/client.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/client/client.go @@ -15,6 +15,12 @@ type Config struct { Endpoint string SigningRegion string SigningName string + + // States that the signing name did not come from a modeled source but + // was derived based on other data. Used by service client constructors + // to determine if the signin name can be overriden based on metadata the + // service has. + SigningNameDerived bool } // ConfigProvider provides a generic way for a service client to receive diff --git a/vendor/github.com/aws/aws-sdk-go/aws/client/default_retryer.go b/vendor/github.com/aws/aws-sdk-go/aws/client/default_retryer.go index e25a460fb..a397b0d04 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/client/default_retryer.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/client/default_retryer.go @@ -1,11 +1,11 @@ package client import ( - "math/rand" - "sync" + "strconv" "time" "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/internal/sdkrand" ) // DefaultRetryer implements basic retry logic using exponential backoff for @@ -30,25 +30,27 @@ func (d DefaultRetryer) MaxRetries() int { return d.NumMaxRetries } -var seededRand = rand.New(&lockedSource{src: rand.NewSource(time.Now().UnixNano())}) - // RetryRules returns the delay duration before retrying this request again func (d DefaultRetryer) RetryRules(r *request.Request) time.Duration { // Set the upper limit of delay in retrying at ~five minutes minTime := 30 throttle := d.shouldThrottle(r) if throttle { + if delay, ok := getRetryDelay(r); ok { + return delay + } + minTime = 500 } retryCount := r.RetryCount - if retryCount > 13 { - retryCount = 13 - } else if throttle && retryCount > 8 { + if throttle && retryCount > 8 { retryCount = 8 + } else if retryCount > 13 { + retryCount = 13 } - delay := (1 << uint(retryCount)) * (seededRand.Intn(minTime) + minTime) + delay := (1 << uint(retryCount)) * (sdkrand.SeededRand.Intn(minTime) + minTime) return time.Duration(delay) * time.Millisecond } @@ -60,7 +62,7 @@ func (d DefaultRetryer) ShouldRetry(r *request.Request) bool { return *r.Retryable } - if r.HTTPResponse.StatusCode >= 500 { + if r.HTTPResponse.StatusCode >= 500 && r.HTTPResponse.StatusCode != 501 { return true } return r.IsErrorRetryable() || d.shouldThrottle(r) @@ -68,29 +70,47 @@ func (d DefaultRetryer) ShouldRetry(r *request.Request) bool { // ShouldThrottle returns true if the request should be throttled. func (d DefaultRetryer) shouldThrottle(r *request.Request) bool { - if r.HTTPResponse.StatusCode == 502 || - r.HTTPResponse.StatusCode == 503 || - r.HTTPResponse.StatusCode == 504 { - return true + switch r.HTTPResponse.StatusCode { + case 429: + case 502: + case 503: + case 504: + default: + return r.IsErrorThrottle() } - return r.IsErrorThrottle() -} -// lockedSource is a thread-safe implementation of rand.Source -type lockedSource struct { - lk sync.Mutex - src rand.Source + return true } -func (r *lockedSource) Int63() (n int64) { - r.lk.Lock() - n = r.src.Int63() - r.lk.Unlock() - return +// This will look in the Retry-After header, RFC 7231, for how long +// it will wait before attempting another request +func getRetryDelay(r *request.Request) (time.Duration, bool) { + if !canUseRetryAfterHeader(r) { + return 0, false + } + + delayStr := r.HTTPResponse.Header.Get("Retry-After") + if len(delayStr) == 0 { + return 0, false + } + + delay, err := strconv.Atoi(delayStr) + if err != nil { + return 0, false + } + + return time.Duration(delay) * time.Second, true } -func (r *lockedSource) Seed(seed int64) { - r.lk.Lock() - r.src.Seed(seed) - r.lk.Unlock() +// Will look at the status code to see if the retry header pertains to +// the status code. +func canUseRetryAfterHeader(r *request.Request) bool { + switch r.HTTPResponse.StatusCode { + case 429: + case 503: + default: + return false + } + + return true } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/client/default_retryer_test.go b/vendor/github.com/aws/aws-sdk-go/aws/client/default_retryer_test.go new file mode 100644 index 000000000..fddba4e49 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/client/default_retryer_test.go @@ -0,0 +1,189 @@ +package client + +import ( + "net/http" + "testing" + "time" + + "github.com/aws/aws-sdk-go/aws/request" +) + +func TestRetryThrottleStatusCodes(t *testing.T) { + cases := []struct { + expectThrottle bool + expectRetry bool + r request.Request + }{ + { + false, + false, + request.Request{ + HTTPResponse: &http.Response{StatusCode: 200}, + }, + }, + { + true, + true, + request.Request{ + HTTPResponse: &http.Response{StatusCode: 429}, + }, + }, + { + true, + true, + request.Request{ + HTTPResponse: &http.Response{StatusCode: 502}, + }, + }, + { + true, + true, + request.Request{ + HTTPResponse: &http.Response{StatusCode: 503}, + }, + }, + { + true, + true, + request.Request{ + HTTPResponse: &http.Response{StatusCode: 504}, + }, + }, + { + false, + true, + request.Request{ + HTTPResponse: &http.Response{StatusCode: 500}, + }, + }, + } + + d := DefaultRetryer{NumMaxRetries: 10} + for i, c := range cases { + throttle := d.shouldThrottle(&c.r) + retry := d.ShouldRetry(&c.r) + + if e, a := c.expectThrottle, throttle; e != a { + t.Errorf("%d: expected %v, but received %v", i, e, a) + } + + if e, a := c.expectRetry, retry; e != a { + t.Errorf("%d: expected %v, but received %v", i, e, a) + } + } +} + +func TestCanUseRetryAfter(t *testing.T) { + cases := []struct { + r request.Request + e bool + }{ + { + request.Request{ + HTTPResponse: &http.Response{StatusCode: 200}, + }, + false, + }, + { + request.Request{ + HTTPResponse: &http.Response{StatusCode: 500}, + }, + false, + }, + { + request.Request{ + HTTPResponse: &http.Response{StatusCode: 429}, + }, + true, + }, + { + request.Request{ + HTTPResponse: &http.Response{StatusCode: 503}, + }, + true, + }, + } + + for i, c := range cases { + a := canUseRetryAfterHeader(&c.r) + if c.e != a { + t.Errorf("%d: expected %v, but received %v", i, c.e, a) + } + } +} + +func TestGetRetryDelay(t *testing.T) { + cases := []struct { + r request.Request + e time.Duration + equal bool + ok bool + }{ + { + request.Request{ + HTTPResponse: &http.Response{StatusCode: 429, Header: http.Header{"Retry-After": []string{"3600"}}}, + }, + 3600 * time.Second, + true, + true, + }, + { + request.Request{ + HTTPResponse: &http.Response{StatusCode: 503, Header: http.Header{"Retry-After": []string{"120"}}}, + }, + 120 * time.Second, + true, + true, + }, + { + request.Request{ + HTTPResponse: &http.Response{StatusCode: 503, Header: http.Header{"Retry-After": []string{"120"}}}, + }, + 1 * time.Second, + false, + true, + }, + { + request.Request{ + HTTPResponse: &http.Response{StatusCode: 503, Header: http.Header{"Retry-After": []string{""}}}, + }, + 0 * time.Second, + true, + false, + }, + } + + for i, c := range cases { + a, ok := getRetryDelay(&c.r) + if c.ok != ok { + t.Errorf("%d: expected %v, but received %v", i, c.ok, ok) + } + + if (c.e != a) == c.equal { + t.Errorf("%d: expected %v, but received %v", i, c.e, a) + } + } +} + +func TestRetryDelay(t *testing.T) { + r := request.Request{} + for i := 0; i < 100; i++ { + rTemp := r + rTemp.HTTPResponse = &http.Response{StatusCode: 500, Header: http.Header{"Retry-After": []string{""}}} + rTemp.RetryCount = i + a, _ := getRetryDelay(&rTemp) + if a > 5*time.Minute { + t.Errorf("retry delay should never be greater than five minutes, received %d", a) + } + } + + for i := 0; i < 100; i++ { + rTemp := r + rTemp.RetryCount = i + rTemp.HTTPResponse = &http.Response{StatusCode: 503, Header: http.Header{"Retry-After": []string{""}}} + a, _ := getRetryDelay(&rTemp) + if a > 5*time.Minute { + t.Errorf("retry delay should never be greater than five minutes, received %d", a) + } + } +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/client/logger.go b/vendor/github.com/aws/aws-sdk-go/aws/client/logger.go index 1f39c91f2..e223c54cc 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/client/logger.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/client/logger.go @@ -46,6 +46,7 @@ func (reader *teeReaderCloser) Close() error { func logRequest(r *request.Request) { logBody := r.Config.LogLevel.Matches(aws.LogDebugWithHTTPBody) + bodySeekable := aws.IsReaderSeekable(r.Body) dumpedBody, err := httputil.DumpRequestOut(r.HTTPRequest, logBody) if err != nil { r.Config.Logger.Log(fmt.Sprintf(logReqErrMsg, r.ClientInfo.ServiceName, r.Operation.Name, err)) @@ -53,6 +54,9 @@ func logRequest(r *request.Request) { } if logBody { + if !bodySeekable { + r.SetReaderBody(aws.ReadSeekCloser(r.HTTPRequest.Body)) + } // Reset the request body because dumpRequest will re-wrap the r.HTTPRequest's // Body as a NoOpCloser and will not be reset after read by the HTTP // client reader. diff --git a/vendor/github.com/aws/aws-sdk-go/aws/client/logger_test.go b/vendor/github.com/aws/aws-sdk-go/aws/client/logger_test.go index b8d600c9c..f0e06b805 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/client/logger_test.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/client/logger_test.go @@ -2,8 +2,17 @@ package client import ( "bytes" + "fmt" "io" + "io/ioutil" + "reflect" "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/client/metadata" + "github.com/aws/aws-sdk-go/aws/corehandlers" + "github.com/aws/aws-sdk-go/aws/credentials" + "github.com/aws/aws-sdk-go/aws/request" ) type mockCloser struct { @@ -55,3 +64,81 @@ func TestLogWriter(t *testing.T) { t.Errorf("Expected %q, but received %q", expected, lw.buf.String()) } } + +func TestLogRequest(t *testing.T) { + cases := []struct { + Body io.ReadSeeker + ExpectBody []byte + LogLevel aws.LogLevelType + }{ + { + Body: aws.ReadSeekCloser(bytes.NewBuffer([]byte("body content"))), + ExpectBody: []byte("body content"), + }, + { + Body: aws.ReadSeekCloser(bytes.NewBuffer([]byte("body content"))), + LogLevel: aws.LogDebugWithHTTPBody, + ExpectBody: []byte("body content"), + }, + { + Body: bytes.NewReader([]byte("body content")), + ExpectBody: []byte("body content"), + }, + { + Body: bytes.NewReader([]byte("body content")), + LogLevel: aws.LogDebugWithHTTPBody, + ExpectBody: []byte("body content"), + }, + } + + for i, c := range cases { + logW := bytes.NewBuffer(nil) + req := request.New( + aws.Config{ + Credentials: credentials.AnonymousCredentials, + Logger: &bufLogger{w: logW}, + LogLevel: aws.LogLevel(c.LogLevel), + }, + metadata.ClientInfo{ + Endpoint: "https://mock-service.mock-region.amazonaws.com", + }, + testHandlers(), + nil, + &request.Operation{ + Name: "APIName", + HTTPMethod: "POST", + HTTPPath: "/", + }, + struct{}{}, nil, + ) + req.SetReaderBody(c.Body) + req.Build() + + logRequest(req) + + b, err := ioutil.ReadAll(req.HTTPRequest.Body) + if err != nil { + t.Fatalf("%d, expect to read SDK request Body", i) + } + + if e, a := c.ExpectBody, b; !reflect.DeepEqual(e, a) { + t.Errorf("%d, expect %v body, got %v", i, e, a) + } + } +} + +type bufLogger struct { + w *bytes.Buffer +} + +func (l *bufLogger) Log(args ...interface{}) { + fmt.Fprintln(l.w, args...) +} + +func testHandlers() request.Handlers { + var handlers request.Handlers + + handlers.Build.PushBackNamed(corehandlers.SDKVersionUserAgentHandler) + + return handlers +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/config.go b/vendor/github.com/aws/aws-sdk-go/aws/config.go index ae3a28696..5421b5d4e 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/config.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/config.go @@ -151,6 +151,15 @@ type Config struct { // with accelerate. S3UseAccelerate *bool + // S3DisableContentMD5Validation config option is temporarily disabled, + // For S3 GetObject API calls, #1837. + // + // Set this to `true` to disable the S3 service client from automatically + // adding the ContentMD5 to S3 Object Put and Upload API calls. This option + // will also disable the SDK from performing object ContentMD5 validation + // on GetObject API calls. + S3DisableContentMD5Validation *bool + // Set this to `true` to disable the EC2Metadata client from overriding the // default http.Client's Timeout. This is helpful if you do not want the // EC2Metadata client to create a new http.Client. This options is only @@ -168,7 +177,7 @@ type Config struct { // EC2MetadataDisableTimeoutOverride *bool - // Instructs the endpiont to be generated for a service client to + // Instructs the endpoint to be generated for a service client to // be the dual stack endpoint. The dual stack endpoint will support // both IPv4 and IPv6 addressing. // @@ -336,6 +345,15 @@ func (c *Config) WithS3Disable100Continue(disable bool) *Config { func (c *Config) WithS3UseAccelerate(enable bool) *Config { c.S3UseAccelerate = &enable return c + +} + +// WithS3DisableContentMD5Validation sets a config +// S3DisableContentMD5Validation value returning a Config pointer for chaining. +func (c *Config) WithS3DisableContentMD5Validation(enable bool) *Config { + c.S3DisableContentMD5Validation = &enable + return c + } // WithUseDualStack sets a config UseDualStack value returning a Config @@ -435,6 +453,10 @@ func mergeInConfig(dst *Config, other *Config) { dst.S3UseAccelerate = other.S3UseAccelerate } + if other.S3DisableContentMD5Validation != nil { + dst.S3DisableContentMD5Validation = other.S3DisableContentMD5Validation + } + if other.UseDualStack != nil { dst.UseDualStack = other.UseDualStack } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/convert_types_test.go b/vendor/github.com/aws/aws-sdk-go/aws/convert_types_test.go index 0046d2206..1a9461e1b 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/convert_types_test.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/convert_types_test.go @@ -1,10 +1,9 @@ package aws import ( + "reflect" "testing" "time" - - "github.com/stretchr/testify/assert" ) var testCasesStringSlice = [][]string{ @@ -18,14 +17,22 @@ func TestStringSlice(t *testing.T) { continue } out := StringSlice(in) - assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + if e, a := len(out), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } for i := range out { - assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx) + if e, a := in[i], *(out[i]); e != a { + t.Errorf("Unexpected value at idx %d", idx) + } } out2 := StringValueSlice(out) - assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) - assert.Equal(t, in, out2, "Unexpected value at idx %d", idx) + if e, a := len(out2), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } + if e, a := in, out2; !reflect.DeepEqual(e, a) { + t.Errorf("Unexpected value at idx %d", idx) + } } } @@ -39,22 +46,34 @@ func TestStringValueSlice(t *testing.T) { continue } out := StringValueSlice(in) - assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + if e, a := len(out), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } for i := range out { if in[i] == nil { - assert.Empty(t, out[i], "Unexpected value at idx %d", idx) + if out[i] != "" { + t.Errorf("Unexpected value at idx %d", idx) + } } else { - assert.Equal(t, *(in[i]), out[i], "Unexpected value at idx %d", idx) + if e, a := *(in[i]), out[i]; e != a { + t.Errorf("Unexpected value at idx %d", idx) + } } } out2 := StringSlice(out) - assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) + if e, a := len(out2), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } for i := range out2 { if in[i] == nil { - assert.Empty(t, *(out2[i]), "Unexpected value at idx %d", idx) + if *(out2[i]) != "" { + t.Errorf("Unexpected value at idx %d", idx) + } } else { - assert.Equal(t, in[i], out2[i], "Unexpected value at idx %d", idx) + if e, a := *in[i], *out2[i]; e != a { + t.Errorf("Unexpected value at idx %d", idx) + } } } } @@ -70,14 +89,22 @@ func TestStringMap(t *testing.T) { continue } out := StringMap(in) - assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + if e, a := len(out), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } for i := range out { - assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx) + if e, a := in[i], *(out[i]); e != a { + t.Errorf("Unexpected value at idx %d", idx) + } } out2 := StringValueMap(out) - assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) - assert.Equal(t, in, out2, "Unexpected value at idx %d", idx) + if e, a := len(out2), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } + if e, a := in, out2; !reflect.DeepEqual(e, a) { + t.Errorf("Unexpected value at idx %d", idx) + } } } @@ -91,14 +118,22 @@ func TestBoolSlice(t *testing.T) { continue } out := BoolSlice(in) - assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + if e, a := len(out), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } for i := range out { - assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx) + if e, a := in[i], *(out[i]); e != a { + t.Errorf("Unexpected value at idx %d", idx) + } } out2 := BoolValueSlice(out) - assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) - assert.Equal(t, in, out2, "Unexpected value at idx %d", idx) + if e, a := len(out2), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } + if e, a := in, out2; !reflect.DeepEqual(e, a) { + t.Errorf("Unexpected value at idx %d", idx) + } } } @@ -110,22 +145,34 @@ func TestBoolValueSlice(t *testing.T) { continue } out := BoolValueSlice(in) - assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + if e, a := len(out), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } for i := range out { if in[i] == nil { - assert.Empty(t, out[i], "Unexpected value at idx %d", idx) + if out[i] { + t.Errorf("Unexpected value at idx %d", idx) + } } else { - assert.Equal(t, *(in[i]), out[i], "Unexpected value at idx %d", idx) + if e, a := *(in[i]), out[i]; e != a { + t.Errorf("Unexpected value at idx %d", idx) + } } } out2 := BoolSlice(out) - assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) + if e, a := len(out2), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } for i := range out2 { if in[i] == nil { - assert.Empty(t, *(out2[i]), "Unexpected value at idx %d", idx) + if *(out2[i]) { + t.Errorf("Unexpected value at idx %d", idx) + } } else { - assert.Equal(t, in[i], out2[i], "Unexpected value at idx %d", idx) + if e, a := in[i], out2[i]; e != a { + t.Errorf("Unexpected value at idx %d", idx) + } } } } @@ -141,14 +188,22 @@ func TestBoolMap(t *testing.T) { continue } out := BoolMap(in) - assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + if e, a := len(out), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } for i := range out { - assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx) + if e, a := in[i], *(out[i]); e != a { + t.Errorf("Unexpected value at idx %d", idx) + } } out2 := BoolValueMap(out) - assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) - assert.Equal(t, in, out2, "Unexpected value at idx %d", idx) + if e, a := len(out2), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } + if e, a := in, out2; !reflect.DeepEqual(e, a) { + t.Errorf("Unexpected value at idx %d", idx) + } } } @@ -162,14 +217,22 @@ func TestIntSlice(t *testing.T) { continue } out := IntSlice(in) - assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + if e, a := len(out), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } for i := range out { - assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx) + if e, a := in[i], *(out[i]); e != a { + t.Errorf("Unexpected value at idx %d", idx) + } } out2 := IntValueSlice(out) - assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) - assert.Equal(t, in, out2, "Unexpected value at idx %d", idx) + if e, a := len(out2), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } + if e, a := in, out2; !reflect.DeepEqual(e, a) { + t.Errorf("Unexpected value at idx %d", idx) + } } } @@ -181,22 +244,34 @@ func TestIntValueSlice(t *testing.T) { continue } out := IntValueSlice(in) - assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + if e, a := len(out), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } for i := range out { if in[i] == nil { - assert.Empty(t, out[i], "Unexpected value at idx %d", idx) + if out[i] != 0 { + t.Errorf("Unexpected value at idx %d", idx) + } } else { - assert.Equal(t, *(in[i]), out[i], "Unexpected value at idx %d", idx) + if e, a := *(in[i]), out[i]; e != a { + t.Errorf("Unexpected value at idx %d", idx) + } } } out2 := IntSlice(out) - assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) + if e, a := len(out2), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } for i := range out2 { if in[i] == nil { - assert.Empty(t, *(out2[i]), "Unexpected value at idx %d", idx) + if *(out2[i]) != 0 { + t.Errorf("Unexpected value at idx %d", idx) + } } else { - assert.Equal(t, in[i], out2[i], "Unexpected value at idx %d", idx) + if e, a := in[i], out2[i]; e != a { + t.Errorf("Unexpected value at idx %d", idx) + } } } } @@ -212,14 +287,22 @@ func TestIntMap(t *testing.T) { continue } out := IntMap(in) - assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + if e, a := len(out), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } for i := range out { - assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx) + if e, a := in[i], *(out[i]); e != a { + t.Errorf("Unexpected value at idx %d", idx) + } } out2 := IntValueMap(out) - assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) - assert.Equal(t, in, out2, "Unexpected value at idx %d", idx) + if e, a := len(out2), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } + if e, a := in, out2; !reflect.DeepEqual(e, a) { + t.Errorf("Unexpected value at idx %d", idx) + } } } @@ -233,14 +316,22 @@ func TestInt64Slice(t *testing.T) { continue } out := Int64Slice(in) - assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + if e, a := len(out), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } for i := range out { - assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx) + if e, a := in[i], *(out[i]); e != a { + t.Errorf("Unexpected value at idx %d", idx) + } } out2 := Int64ValueSlice(out) - assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) - assert.Equal(t, in, out2, "Unexpected value at idx %d", idx) + if e, a := len(out2), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } + if e, a := in, out2; !reflect.DeepEqual(e, a) { + t.Errorf("Unexpected value at idx %d", idx) + } } } @@ -252,22 +343,34 @@ func TestInt64ValueSlice(t *testing.T) { continue } out := Int64ValueSlice(in) - assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + if e, a := len(out), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } for i := range out { if in[i] == nil { - assert.Empty(t, out[i], "Unexpected value at idx %d", idx) + if out[i] != 0 { + t.Errorf("Unexpected value at idx %d", idx) + } } else { - assert.Equal(t, *(in[i]), out[i], "Unexpected value at idx %d", idx) + if e, a := *(in[i]), out[i]; e != a { + t.Errorf("Unexpected value at idx %d", idx) + } } } out2 := Int64Slice(out) - assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) + if e, a := len(out2), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } for i := range out2 { if in[i] == nil { - assert.Empty(t, *(out2[i]), "Unexpected value at idx %d", idx) + if *(out2[i]) != 0 { + t.Errorf("Unexpected value at idx %d", idx) + } } else { - assert.Equal(t, in[i], out2[i], "Unexpected value at idx %d", idx) + if e, a := in[i], out2[i]; e != a { + t.Errorf("Unexpected value at idx %d", idx) + } } } } @@ -283,14 +386,22 @@ func TestInt64Map(t *testing.T) { continue } out := Int64Map(in) - assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + if e, a := len(out), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } for i := range out { - assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx) + if e, a := in[i], *(out[i]); e != a { + t.Errorf("Unexpected value at idx %d", idx) + } } out2 := Int64ValueMap(out) - assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) - assert.Equal(t, in, out2, "Unexpected value at idx %d", idx) + if e, a := len(out2), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } + if e, a := in, out2; !reflect.DeepEqual(e, a) { + t.Errorf("Unexpected value at idx %d", idx) + } } } @@ -304,14 +415,22 @@ func TestFloat64Slice(t *testing.T) { continue } out := Float64Slice(in) - assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + if e, a := len(out), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } for i := range out { - assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx) + if e, a := in[i], *(out[i]); e != a { + t.Errorf("Unexpected value at idx %d", idx) + } } out2 := Float64ValueSlice(out) - assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) - assert.Equal(t, in, out2, "Unexpected value at idx %d", idx) + if e, a := len(out2), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } + if e, a := in, out2; !reflect.DeepEqual(e, a) { + t.Errorf("Unexpected value at idx %d", idx) + } } } @@ -323,22 +442,34 @@ func TestFloat64ValueSlice(t *testing.T) { continue } out := Float64ValueSlice(in) - assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + if e, a := len(out), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } for i := range out { if in[i] == nil { - assert.Empty(t, out[i], "Unexpected value at idx %d", idx) + if out[i] != 0 { + t.Errorf("Unexpected value at idx %d", idx) + } } else { - assert.Equal(t, *(in[i]), out[i], "Unexpected value at idx %d", idx) + if e, a := *(in[i]), out[i]; e != a { + t.Errorf("Unexpected value at idx %d", idx) + } } } out2 := Float64Slice(out) - assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) + if e, a := len(out2), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } for i := range out2 { if in[i] == nil { - assert.Empty(t, *(out2[i]), "Unexpected value at idx %d", idx) + if *(out2[i]) != 0 { + t.Errorf("Unexpected value at idx %d", idx) + } } else { - assert.Equal(t, in[i], out2[i], "Unexpected value at idx %d", idx) + if e, a := in[i], out2[i]; e != a { + t.Errorf("Unexpected value at idx %d", idx) + } } } } @@ -354,14 +485,22 @@ func TestFloat64Map(t *testing.T) { continue } out := Float64Map(in) - assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + if e, a := len(out), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } for i := range out { - assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx) + if e, a := in[i], *(out[i]); e != a { + t.Errorf("Unexpected value at idx %d", idx) + } } out2 := Float64ValueMap(out) - assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) - assert.Equal(t, in, out2, "Unexpected value at idx %d", idx) + if e, a := len(out2), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } + if e, a := in, out2; !reflect.DeepEqual(e, a) { + t.Errorf("Unexpected value at idx %d", idx) + } } } @@ -375,14 +514,22 @@ func TestTimeSlice(t *testing.T) { continue } out := TimeSlice(in) - assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + if e, a := len(out), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } for i := range out { - assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx) + if e, a := in[i], *(out[i]); e != a { + t.Errorf("Unexpected value at idx %d", idx) + } } out2 := TimeValueSlice(out) - assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) - assert.Equal(t, in, out2, "Unexpected value at idx %d", idx) + if e, a := len(out2), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } + if e, a := in, out2; !reflect.DeepEqual(e, a) { + t.Errorf("Unexpected value at idx %d", idx) + } } } @@ -394,22 +541,34 @@ func TestTimeValueSlice(t *testing.T) { continue } out := TimeValueSlice(in) - assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + if e, a := len(out), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } for i := range out { if in[i] == nil { - assert.Empty(t, out[i], "Unexpected value at idx %d", idx) + if !out[i].IsZero() { + t.Errorf("Unexpected value at idx %d", idx) + } } else { - assert.Equal(t, *(in[i]), out[i], "Unexpected value at idx %d", idx) + if e, a := *(in[i]), out[i]; e != a { + t.Errorf("Unexpected value at idx %d", idx) + } } } out2 := TimeSlice(out) - assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) + if e, a := len(out2), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } for i := range out2 { if in[i] == nil { - assert.Empty(t, *(out2[i]), "Unexpected value at idx %d", idx) + if !(*(out2[i])).IsZero() { + t.Errorf("Unexpected value at idx %d", idx) + } } else { - assert.Equal(t, in[i], out2[i], "Unexpected value at idx %d", idx) + if e, a := in[i], out2[i]; e != a { + t.Errorf("Unexpected value at idx %d", idx) + } } } } @@ -425,14 +584,22 @@ func TestTimeMap(t *testing.T) { continue } out := TimeMap(in) - assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + if e, a := len(out), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } for i := range out { - assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx) + if e, a := in[i], *(out[i]); e != a { + t.Errorf("Unexpected value at idx %d", idx) + } } out2 := TimeValueMap(out) - assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) - assert.Equal(t, in, out2, "Unexpected value at idx %d", idx) + if e, a := len(out2), len(in); e != a { + t.Errorf("Unexpected len at idx %d", idx) + } + if e, a := in, out2; !reflect.DeepEqual(e, a) { + t.Errorf("Unexpected value at idx %d", idx) + } } } @@ -458,13 +625,17 @@ var testCasesTimeValue = []TimeValueTestCase{ func TestSecondsTimeValue(t *testing.T) { for idx, testCase := range testCasesTimeValue { out := SecondsTimeValue(&testCase.in) - assert.Equal(t, testCase.outSecs, out, "Unexpected value for time value at %d", idx) + if e, a := testCase.outSecs, out; e != a { + t.Errorf("Unexpected value for time value at %d", idx) + } } } func TestMillisecondsTimeValue(t *testing.T) { for idx, testCase := range testCasesTimeValue { out := MillisecondsTimeValue(&testCase.in) - assert.Equal(t, testCase.outMillis, out, "Unexpected value for time value at %d", idx) + if e, a := testCase.outMillis, out; e != a { + t.Errorf("Unexpected value for time value at %d", idx) + } } } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers.go b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers.go index 495e3ef62..cfcddf3dc 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers.go @@ -3,12 +3,10 @@ package corehandlers import ( "bytes" "fmt" - "io" "io/ioutil" "net/http" "net/url" "regexp" - "runtime" "strconv" "time" @@ -36,18 +34,13 @@ var BuildContentLengthHandler = request.NamedHandler{Name: "core.BuildContentLen if slength := r.HTTPRequest.Header.Get("Content-Length"); slength != "" { length, _ = strconv.ParseInt(slength, 10, 64) } else { - switch body := r.Body.(type) { - case nil: - length = 0 - case lener: - length = int64(body.Len()) - case io.Seeker: - r.BodyStart, _ = body.Seek(0, 1) - end, _ := body.Seek(0, 2) - body.Seek(r.BodyStart, 0) // make sure to seek back to original location - length = end - r.BodyStart - default: - panic("Cannot get length of body, must provide `ContentLength`") + if r.Body != nil { + var err error + length, err = aws.SeekerLen(r.Body) + if err != nil { + r.Error = awserr.New(request.ErrCodeSerialization, "failed to get request body's length", err) + return + } } } @@ -60,13 +53,6 @@ var BuildContentLengthHandler = request.NamedHandler{Name: "core.BuildContentLen } }} -// SDKVersionUserAgentHandler is a request handler for adding the SDK Version to the user agent. -var SDKVersionUserAgentHandler = request.NamedHandler{ - Name: "core.SDKVersionUserAgentHandler", - Fn: request.MakeAddToUserAgentHandler(aws.SDKName, aws.SDKVersion, - runtime.Version(), runtime.GOOS, runtime.GOARCH), -} - var reStatusCode = regexp.MustCompile(`^(\d{3})`) // ValidateReqSigHandler is a request handler to ensure that the request's diff --git a/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers_test.go b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers_test.go index fe7d3c9bc..1d715c9f3 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers_test.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers_test.go @@ -7,11 +7,10 @@ import ( "net/http" "net/http/httptest" "os" + "strings" "testing" "time" - "github.com/stretchr/testify/assert" - "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/corehandlers" @@ -32,7 +31,9 @@ func TestValidateEndpointHandler(t *testing.T) { req := svc.NewRequest(&request.Operation{Name: "Operation"}, nil, nil) err := req.Build() - assert.NoError(t, err) + if err != nil { + t.Errorf("expect no error, got %v", err) + } } func TestValidateEndpointHandlerErrorRegion(t *testing.T) { @@ -45,8 +46,12 @@ func TestValidateEndpointHandlerErrorRegion(t *testing.T) { req := svc.NewRequest(&request.Operation{Name: "Operation"}, nil, nil) err := req.Build() - assert.Error(t, err) - assert.Equal(t, aws.ErrMissingRegion, err) + if err == nil { + t.Errorf("expect error, got none") + } + if e, a := aws.ErrMissingRegion, err; e != a { + t.Errorf("expect %v to be %v", e, a) + } } type mockCredsProvider struct { @@ -82,18 +87,30 @@ func TestAfterRetryRefreshCreds(t *testing.T) { }) svc.Handlers.AfterRetry.PushBackNamed(corehandlers.AfterRetryHandler) - assert.True(t, svc.Config.Credentials.IsExpired(), "Expect to start out expired") - assert.False(t, credProvider.retrieveCalled) + if !svc.Config.Credentials.IsExpired() { + t.Errorf("Expect to start out expired") + } + if credProvider.retrieveCalled { + t.Errorf("expect not called") + } req := svc.NewRequest(&request.Operation{Name: "Operation"}, nil, nil) req.Send() - assert.True(t, svc.Config.Credentials.IsExpired()) - assert.False(t, credProvider.retrieveCalled) + if !svc.Config.Credentials.IsExpired() { + t.Errorf("Expect to start out expired") + } + if credProvider.retrieveCalled { + t.Errorf("expect not called") + } _, err := svc.Config.Credentials.Get() - assert.NoError(t, err) - assert.True(t, credProvider.retrieveCalled) + if err != nil { + t.Errorf("expect no error, got %v", err) + } + if !credProvider.retrieveCalled { + t.Errorf("expect not called") + } } func TestAfterRetryWithContextCanceled(t *testing.T) { @@ -202,8 +219,12 @@ func TestSendHandlerError(t *testing.T) { r.Send() - assert.Error(t, r.Error) - assert.NotNil(t, r.HTTPResponse) + if r.Error == nil { + t.Errorf("expect error, got none") + } + if r.HTTPResponse == nil { + t.Errorf("expect response, got none") + } } func TestSendWithoutFollowRedirects(t *testing.T) { @@ -273,31 +294,47 @@ func TestValidateReqSigHandler(t *testing.T) { corehandlers.ValidateReqSigHandler.Fn(c.Req) - assert.NoError(t, c.Req.Error, "%d, expect no error", i) - assert.Equal(t, c.Resign, resigned, "%d, expected resigning to match", i) + if c.Req.Error != nil { + t.Errorf("expect no error, got %v", c.Req.Error) + } + if e, a := c.Resign, resigned; e != a { + t.Errorf("%d, expect %v to be %v", i, e, a) + } } } func setupContentLengthTestServer(t *testing.T, hasContentLength bool, contentLength int64) *httptest.Server { server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { _, ok := r.Header["Content-Length"] - assert.Equal(t, hasContentLength, ok, "expect content length to be set, %t", hasContentLength) + if e, a := hasContentLength, ok; e != a { + t.Errorf("expect %v to be %v", e, a) + } if hasContentLength { - assert.Equal(t, contentLength, r.ContentLength) + if e, a := contentLength, r.ContentLength; e != a { + t.Errorf("expect %v to be %v", e, a) + } } b, err := ioutil.ReadAll(r.Body) - assert.NoError(t, err) + if err != nil { + t.Errorf("expect no error, got %v", err) + } r.Body.Close() authHeader := r.Header.Get("Authorization") if hasContentLength { - assert.Contains(t, authHeader, "content-length") + if e, a := "content-length", authHeader; !strings.Contains(a, e) { + t.Errorf("expect %v to be in %v", e, a) + } } else { - assert.NotContains(t, authHeader, "content-length") + if e, a := "content-length", authHeader; strings.Contains(a, e) { + t.Errorf("expect %v to not be in %v", e, a) + } } - assert.Equal(t, contentLength, int64(len(b))) + if e, a := contentLength, int64(len(b)); e != a { + t.Errorf("expect %v to be %v", e, a) + } })) return server @@ -316,7 +353,9 @@ func TestBuildContentLength_ZeroBody(t *testing.T) { Key: aws.String("keyname"), }) - assert.NoError(t, err) + if err != nil { + t.Errorf("expect no error, got %v", err) + } } func TestBuildContentLength_NegativeBody(t *testing.T) { @@ -334,7 +373,9 @@ func TestBuildContentLength_NegativeBody(t *testing.T) { req.HTTPRequest.Header.Set("Content-Length", "-1") - assert.NoError(t, req.Send()) + if req.Error != nil { + t.Errorf("expect no error, got %v", req.Error) + } } func TestBuildContentLength_WithBody(t *testing.T) { @@ -351,5 +392,7 @@ func TestBuildContentLength_WithBody(t *testing.T) { Body: bytes.NewReader(make([]byte, 1024)), }) - assert.NoError(t, err) + if err != nil { + t.Errorf("expect no error, got %v", err) + } } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/param_validator_test.go b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/param_validator_test.go index 66973ca01..e1d8a08fd 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/param_validator_test.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/param_validator_test.go @@ -3,8 +3,7 @@ package corehandlers_test import ( "fmt" "testing" - - "github.com/stretchr/testify/assert" + "reflect" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" @@ -14,7 +13,6 @@ import ( "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/awstesting/unit" "github.com/aws/aws-sdk-go/service/kinesis" - "github.com/stretchr/testify/require" ) var testSvc = func() *client.Client { @@ -113,7 +111,9 @@ func TestNoErrors(t *testing.T) { req := testSvc.NewRequest(&request.Operation{}, input, nil) corehandlers.ValidateParametersHandler.Fn(req) - require.NoError(t, req.Error) + if req.Error != nil { + t.Fatalf("expect no error, got %v", req.Error) + } } func TestMissingRequiredParameters(t *testing.T) { @@ -121,17 +121,33 @@ func TestMissingRequiredParameters(t *testing.T) { req := testSvc.NewRequest(&request.Operation{}, input, nil) corehandlers.ValidateParametersHandler.Fn(req) - require.Error(t, req.Error) - assert.Equal(t, "InvalidParameter", req.Error.(awserr.Error).Code()) - assert.Equal(t, "3 validation error(s) found.", req.Error.(awserr.Error).Message()) + if req.Error == nil { + t.Fatalf("expect error") + } + if e, a := "InvalidParameter", req.Error.(awserr.Error).Code(); e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "3 validation error(s) found.", req.Error.(awserr.Error).Message(); e != a { + t.Errorf("expect %v, got %v", e, a) + } errs := req.Error.(awserr.BatchedErrors).OrigErrs() - assert.Len(t, errs, 3) - assert.Equal(t, "ParamRequiredError: missing required field, StructShape.RequiredList.", errs[0].Error()) - assert.Equal(t, "ParamRequiredError: missing required field, StructShape.RequiredMap.", errs[1].Error()) - assert.Equal(t, "ParamRequiredError: missing required field, StructShape.RequiredBool.", errs[2].Error()) + if e, a := 3, len(errs); e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "ParamRequiredError: missing required field, StructShape.RequiredList.", errs[0].Error(); e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "ParamRequiredError: missing required field, StructShape.RequiredMap.", errs[1].Error(); e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "ParamRequiredError: missing required field, StructShape.RequiredBool.", errs[2].Error(); e != a { + t.Errorf("expect %v, got %v", e, a) + } - assert.Equal(t, "InvalidParameter: 3 validation error(s) found.\n- missing required field, StructShape.RequiredList.\n- missing required field, StructShape.RequiredMap.\n- missing required field, StructShape.RequiredBool.\n", req.Error.Error()) + if e, a := "InvalidParameter: 3 validation error(s) found.\n- missing required field, StructShape.RequiredList.\n- missing required field, StructShape.RequiredMap.\n- missing required field, StructShape.RequiredBool.\n", req.Error.Error(); e != a { + t.Errorf("expect %v, got %v", e, a) + } } func TestNestedMissingRequiredParameters(t *testing.T) { @@ -148,15 +164,29 @@ func TestNestedMissingRequiredParameters(t *testing.T) { req := testSvc.NewRequest(&request.Operation{}, input, nil) corehandlers.ValidateParametersHandler.Fn(req) - require.Error(t, req.Error) - assert.Equal(t, "InvalidParameter", req.Error.(awserr.Error).Code()) - assert.Equal(t, "3 validation error(s) found.", req.Error.(awserr.Error).Message()) + if req.Error == nil { + t.Fatalf("expect error") + } + if e, a := "InvalidParameter", req.Error.(awserr.Error).Code(); e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "3 validation error(s) found.", req.Error.(awserr.Error).Message(); e != a { + t.Errorf("expect %v, got %v", e, a) + } errs := req.Error.(awserr.BatchedErrors).OrigErrs() - assert.Len(t, errs, 3) - assert.Equal(t, "ParamRequiredError: missing required field, StructShape.RequiredList[0].Name.", errs[0].Error()) - assert.Equal(t, "ParamRequiredError: missing required field, StructShape.RequiredMap[key2].Name.", errs[1].Error()) - assert.Equal(t, "ParamRequiredError: missing required field, StructShape.OptionalStruct.Name.", errs[2].Error()) + if e, a := 3, len(errs); e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "ParamRequiredError: missing required field, StructShape.RequiredList[0].Name.", errs[0].Error(); e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "ParamRequiredError: missing required field, StructShape.RequiredMap[key2].Name.", errs[1].Error(); e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "ParamRequiredError: missing required field, StructShape.OptionalStruct.Name.", errs[2].Error(); e != a { + t.Errorf("expect %v, got %v", e, a) + } } type testInput struct { @@ -226,7 +256,9 @@ func TestValidateFieldMinParameter(t *testing.T) { req := testSvc.NewRequest(&request.Operation{}, &c.in, nil) corehandlers.ValidateParametersHandler.Fn(req) - assert.Equal(t, c.err, req.Error, "%d case failed", i) + if e, a := c.err, req.Error; !reflect.DeepEqual(e,a) { + t.Errorf("%d, expect %v, got %v", i, e, a) + } } } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/user_agent.go b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/user_agent.go new file mode 100644 index 000000000..a15f496bc --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/user_agent.go @@ -0,0 +1,37 @@ +package corehandlers + +import ( + "os" + "runtime" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/request" +) + +// SDKVersionUserAgentHandler is a request handler for adding the SDK Version +// to the user agent. +var SDKVersionUserAgentHandler = request.NamedHandler{ + Name: "core.SDKVersionUserAgentHandler", + Fn: request.MakeAddToUserAgentHandler(aws.SDKName, aws.SDKVersion, + runtime.Version(), runtime.GOOS, runtime.GOARCH), +} + +const execEnvVar = `AWS_EXECUTION_ENV` +const execEnvUAKey = `exec_env` + +// AddHostExecEnvUserAgentHander is a request handler appending the SDK's +// execution environment to the user agent. +// +// If the environment variable AWS_EXECUTION_ENV is set, its value will be +// appended to the user agent string. +var AddHostExecEnvUserAgentHander = request.NamedHandler{ + Name: "core.AddHostExecEnvUserAgentHander", + Fn: func(r *request.Request) { + v := os.Getenv(execEnvVar) + if len(v) == 0 { + return + } + + request.AddToUserAgent(r, execEnvUAKey+"/"+v) + }, +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/user_agent_test.go b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/user_agent_test.go new file mode 100644 index 000000000..4f6183560 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/user_agent_test.go @@ -0,0 +1,40 @@ +package corehandlers + +import ( + "net/http" + "os" + "testing" + + "github.com/aws/aws-sdk-go/aws/request" +) + +func TestAddHostExecEnvUserAgentHander(t *testing.T) { + cases := []struct { + ExecEnv string + Expect string + }{ + {ExecEnv: "Lambda", Expect: "exec_env/Lambda"}, + {ExecEnv: "", Expect: ""}, + {ExecEnv: "someThingCool", Expect: "exec_env/someThingCool"}, + } + + for i, c := range cases { + os.Clearenv() + os.Setenv(execEnvVar, c.ExecEnv) + + req := &request.Request{ + HTTPRequest: &http.Request{ + Header: http.Header{}, + }, + } + AddHostExecEnvUserAgentHander.Fn(req) + + if err := req.Error; err != nil { + t.Fatalf("%d, expect no error, got %v", i, err) + } + + if e, a := c.Expect, req.HTTPRequest.Header.Get("User-Agent"); e != a { + t.Errorf("%d, expect %v user agent, got %v", i, e, a) + } + } +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults.go b/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults.go index 07afe3b8e..3cf1036b6 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults.go @@ -9,6 +9,7 @@ package defaults import ( "fmt" + "net" "net/http" "net/url" "os" @@ -72,6 +73,7 @@ func Handlers() request.Handlers { handlers.Validate.PushBackNamed(corehandlers.ValidateEndpointHandler) handlers.Validate.AfterEachFn = request.HandlerListStopOnError handlers.Build.PushBackNamed(corehandlers.SDKVersionUserAgentHandler) + handlers.Build.PushBackNamed(corehandlers.AddHostExecEnvUserAgentHander) handlers.Build.AfterEachFn = request.HandlerListStopOnError handlers.Sign.PushBackNamed(corehandlers.BuildContentLengthHandler) handlers.Send.PushBackNamed(corehandlers.ValidateReqSigHandler) @@ -118,14 +120,43 @@ func RemoteCredProvider(cfg aws.Config, handlers request.Handlers) credentials.P return ec2RoleProvider(cfg, handlers) } +var lookupHostFn = net.LookupHost + +func isLoopbackHost(host string) (bool, error) { + ip := net.ParseIP(host) + if ip != nil { + return ip.IsLoopback(), nil + } + + // Host is not an ip, perform lookup + addrs, err := lookupHostFn(host) + if err != nil { + return false, err + } + for _, addr := range addrs { + if !net.ParseIP(addr).IsLoopback() { + return false, nil + } + } + + return true, nil +} + func localHTTPCredProvider(cfg aws.Config, handlers request.Handlers, u string) credentials.Provider { var errMsg string parsed, err := url.Parse(u) if err != nil { errMsg = fmt.Sprintf("invalid URL, %v", err) - } else if host := aws.URLHostname(parsed); !(host == "localhost" || host == "127.0.0.1") { - errMsg = fmt.Sprintf("invalid host address, %q, only localhost and 127.0.0.1 are valid.", host) + } else { + host := aws.URLHostname(parsed) + if len(host) == 0 { + errMsg = "unable to parse host from local HTTP cred provider URL" + } else if isLoopback, loopbackErr := isLoopbackHost(host); loopbackErr != nil { + errMsg = fmt.Sprintf("failed to resolve host %q, %v", host, loopbackErr) + } else if !isLoopback { + errMsg = fmt.Sprintf("invalid endpoint host, %q, only loopback hosts are allowed.", host) + } } if len(errMsg) > 0 { diff --git a/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults_test.go b/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults_test.go index d3e4a86b6..cb0646838 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults_test.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults_test.go @@ -13,12 +13,40 @@ import ( ) func TestHTTPCredProvider(t *testing.T) { + origFn := lookupHostFn + defer func() { lookupHostFn = origFn }() + + lookupHostFn = func(host string) ([]string, error) { + m := map[string]struct { + Addrs []string + Err error + }{ + "localhost": {Addrs: []string{"::1", "127.0.0.1"}}, + "actuallylocal": {Addrs: []string{"127.0.0.2"}}, + "notlocal": {Addrs: []string{"::1", "127.0.0.1", "192.168.1.10"}}, + "www.example.com": {Addrs: []string{"10.10.10.10"}}, + } + + h, ok := m[host] + if !ok { + t.Fatalf("unknown host in test, %v", host) + return nil, fmt.Errorf("unknown host") + } + + return h.Addrs, h.Err + } + cases := []struct { Host string Fail bool }{ - {"localhost", false}, {"127.0.0.1", false}, - {"www.example.com", true}, {"169.254.170.2", true}, + {"localhost", false}, + {"actuallylocal", false}, + {"127.0.0.1", false}, + {"127.1.1.1", false}, + {"[::1]", false}, + {"www.example.com", true}, + {"169.254.170.2", true}, } defer os.Clearenv() diff --git a/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/api_test.go b/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/api_test.go index 35e75782b..7dde1fb36 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/api_test.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/api_test.go @@ -11,8 +11,6 @@ import ( "strings" "testing" - "github.com/stretchr/testify/assert" - "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/ec2metadata" @@ -71,8 +69,12 @@ func TestEndpoint(t *testing.T) { } req := c.NewRequest(op, nil, nil) - assert.Equal(t, "http://169.254.169.254/latest", req.ClientInfo.Endpoint) - assert.Equal(t, "http://169.254.169.254/latest/meta-data/testpath", req.HTTPRequest.URL.String()) + if e, a := "http://169.254.169.254/latest", req.ClientInfo.Endpoint; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "http://169.254.169.254/latest/meta-data/testpath", req.HTTPRequest.URL.String(); e != a { + t.Errorf("expect %v, got %v", e, a) + } } func TestGetMetadata(t *testing.T) { @@ -85,8 +87,12 @@ func TestGetMetadata(t *testing.T) { resp, err := c.GetMetadata("some/path") - assert.NoError(t, err) - assert.Equal(t, "success", resp) + if err != nil { + t.Errorf("expect no error, got %v", err) + } + if e, a := "success", resp; e != a { + t.Errorf("expect %v, got %v", e, a) + } } func TestGetUserData(t *testing.T) { @@ -99,8 +105,12 @@ func TestGetUserData(t *testing.T) { resp, err := c.GetUserData() - assert.NoError(t, err) - assert.Equal(t, "success", resp) + if err != nil { + t.Errorf("expect no error, got %v", err) + } + if e, a := "success", resp; e != a { + t.Errorf("expect %v, got %v", e, a) + } } func TestGetUserData_Error(t *testing.T) { @@ -126,12 +136,17 @@ func TestGetUserData_Error(t *testing.T) { c := ec2metadata.New(unit.Session, &aws.Config{Endpoint: aws.String(server.URL + "/latest")}) resp, err := c.GetUserData() - assert.Error(t, err) - assert.Empty(t, resp) + if err == nil { + t.Errorf("expect error") + } + if len(resp) != 0 { + t.Errorf("expect empty, got %v", resp) + } - aerr, ok := err.(awserr.Error) - assert.True(t, ok) - assert.Equal(t, "NotFoundError", aerr.Code()) + aerr := err.(awserr.Error) + if e, a := "NotFoundError", aerr.Code(); e != a { + t.Errorf("expect %v, got %v", e, a) + } } func TestGetRegion(t *testing.T) { @@ -144,8 +159,12 @@ func TestGetRegion(t *testing.T) { region, err := c.Region() - assert.NoError(t, err) - assert.Equal(t, "us-west-2", region) + if err != nil { + t.Errorf("expect no error, got %v", err) + } + if e, a := "us-west-2", region; e != a { + t.Errorf("expect %v, got %v", e, a) + } } func TestMetadataAvailable(t *testing.T) { @@ -156,9 +175,9 @@ func TestMetadataAvailable(t *testing.T) { defer server.Close() c := ec2metadata.New(unit.Session, &aws.Config{Endpoint: aws.String(server.URL + "/latest")}) - available := c.Available() - - assert.True(t, available) + if !c.Available() { + t.Errorf("expect available") + } } func TestMetadataIAMInfo_success(t *testing.T) { @@ -170,10 +189,18 @@ func TestMetadataIAMInfo_success(t *testing.T) { c := ec2metadata.New(unit.Session, &aws.Config{Endpoint: aws.String(server.URL + "/latest")}) iamInfo, err := c.IAMInfo() - assert.NoError(t, err) - assert.Equal(t, "Success", iamInfo.Code) - assert.Equal(t, "arn:aws:iam::123456789012:instance-profile/my-instance-profile", iamInfo.InstanceProfileArn) - assert.Equal(t, "AIPAABCDEFGHIJKLMN123", iamInfo.InstanceProfileID) + if err != nil { + t.Errorf("expect no error, got %v", err) + } + if e, a := "Success", iamInfo.Code; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "arn:aws:iam::123456789012:instance-profile/my-instance-profile", iamInfo.InstanceProfileArn; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "AIPAABCDEFGHIJKLMN123", iamInfo.InstanceProfileID; e != a { + t.Errorf("expect %v, got %v", e, a) + } } func TestMetadataIAMInfo_failure(t *testing.T) { @@ -185,10 +212,18 @@ func TestMetadataIAMInfo_failure(t *testing.T) { c := ec2metadata.New(unit.Session, &aws.Config{Endpoint: aws.String(server.URL + "/latest")}) iamInfo, err := c.IAMInfo() - assert.NotNil(t, err) - assert.Equal(t, "", iamInfo.Code) - assert.Equal(t, "", iamInfo.InstanceProfileArn) - assert.Equal(t, "", iamInfo.InstanceProfileID) + if err == nil { + t.Errorf("expect error") + } + if e, a := "", iamInfo.Code; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "", iamInfo.InstanceProfileArn; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "", iamInfo.InstanceProfileID; e != a { + t.Errorf("expect %v, got %v", e, a) + } } func TestMetadataNotAvailable(t *testing.T) { @@ -204,9 +239,9 @@ func TestMetadataNotAvailable(t *testing.T) { r.Retryable = aws.Bool(true) // network errors are retryable }) - available := c.Available() - - assert.False(t, available) + if c.Available() { + t.Errorf("expect not available") + } } func TestMetadataErrorResponse(t *testing.T) { @@ -222,8 +257,12 @@ func TestMetadataErrorResponse(t *testing.T) { }) data, err := c.GetMetadata("uri/path") - assert.Empty(t, data) - assert.Contains(t, err.Error(), "error message text") + if len(data) != 0 { + t.Errorf("expect empty, got %v", data) + } + if e, a := "error message text", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v to be in %v", e, a) + } } func TestEC2RoleProviderInstanceIdentity(t *testing.T) { @@ -235,8 +274,16 @@ func TestEC2RoleProviderInstanceIdentity(t *testing.T) { c := ec2metadata.New(unit.Session, &aws.Config{Endpoint: aws.String(server.URL + "/latest")}) doc, err := c.GetInstanceIdentityDocument() - assert.Nil(t, err, "Expect no error, %v", err) - assert.Equal(t, doc.AccountID, "123456789012") - assert.Equal(t, doc.AvailabilityZone, "us-east-1d") - assert.Equal(t, doc.Region, "us-east-1") + if err != nil { + t.Errorf("expect no error, got %v", err) + } + if e, a := doc.AccountID, "123456789012"; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := doc.AvailabilityZone, "us-east-1d"; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := doc.Region, "us-east-1"; e != a { + t.Errorf("expect %v, got %v", e, a) + } } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/service.go b/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/service.go index 5b4379dbd..ef5f73292 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/service.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/service.go @@ -1,5 +1,10 @@ // Package ec2metadata provides the client for making API calls to the // EC2 Metadata service. +// +// This package's client can be disabled completely by setting the environment +// variable "AWS_EC2_METADATA_DISABLED=true". This environment variable set to +// true instructs the SDK to disable the EC2 Metadata client. The client cannot +// be used while the environemnt variable is set to true, (case insensitive). package ec2metadata import ( @@ -7,17 +12,21 @@ import ( "errors" "io" "net/http" + "os" + "strings" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/client" "github.com/aws/aws-sdk-go/aws/client/metadata" + "github.com/aws/aws-sdk-go/aws/corehandlers" "github.com/aws/aws-sdk-go/aws/request" ) // ServiceName is the name of the service. const ServiceName = "ec2metadata" +const disableServiceEnvVar = "AWS_EC2_METADATA_DISABLED" // A EC2Metadata is an EC2 Metadata service Client. type EC2Metadata struct { @@ -75,6 +84,21 @@ func NewClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio svc.Handlers.Validate.Clear() svc.Handlers.Validate.PushBack(validateEndpointHandler) + // Disable the EC2 Metadata service if the environment variable is set. + // This shortcirctes the service's functionality to always fail to send + // requests. + if strings.ToLower(os.Getenv(disableServiceEnvVar)) == "true" { + svc.Handlers.Send.SwapNamed(request.NamedHandler{ + Name: corehandlers.SendHandler.Name, + Fn: func(r *request.Request) { + r.Error = awserr.New( + request.CanceledErrorCode, + "EC2 IMDS access disabled via "+disableServiceEnvVar+" env var", + nil) + }, + }) + } + // Add additional options to the service config for _, option := range opts { option(svc.Client) diff --git a/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/service_test.go b/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/service_test.go index c2bc21587..6902e0b1e 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/service_test.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/service_test.go @@ -3,21 +3,30 @@ package ec2metadata_test import ( "net/http" "net/http/httptest" + "os" + "strings" "sync" "testing" "time" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/ec2metadata" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/awstesting" "github.com/aws/aws-sdk-go/awstesting/unit" - "github.com/stretchr/testify/assert" ) func TestClientOverrideDefaultHTTPClientTimeout(t *testing.T) { svc := ec2metadata.New(unit.Session) - assert.NotEqual(t, http.DefaultClient, svc.Config.HTTPClient) - assert.Equal(t, 5*time.Second, svc.Config.HTTPClient.Timeout) + if e, a := http.DefaultClient, svc.Config.HTTPClient; e == a { + t.Errorf("expect %v, not to equal %v", e, a) + } + + if e, a := 5*time.Second, svc.Config.HTTPClient.Timeout; e != a { + t.Errorf("expect %v to be %v", e, a) + } } func TestClientNotOverrideDefaultHTTPClientTimeout(t *testing.T) { @@ -28,18 +37,25 @@ func TestClientNotOverrideDefaultHTTPClientTimeout(t *testing.T) { svc := ec2metadata.New(unit.Session) - assert.Equal(t, http.DefaultClient, svc.Config.HTTPClient) + if e, a := http.DefaultClient, svc.Config.HTTPClient; e != a { + t.Errorf("expect %v, got %v", e, a) + } - tr, ok := svc.Config.HTTPClient.Transport.(*http.Transport) - assert.True(t, ok) - assert.NotNil(t, tr) - assert.Nil(t, tr.Dial) + tr := svc.Config.HTTPClient.Transport.(*http.Transport) + if tr == nil { + t.Fatalf("expect transport not to be nil") + } + if tr.Dial != nil { + t.Errorf("expect dial to be nil, was not") + } } func TestClientDisableOverrideDefaultHTTPClientTimeout(t *testing.T) { svc := ec2metadata.New(unit.Session, aws.NewConfig().WithEC2MetadataDisableTimeoutOverride(true)) - assert.Equal(t, http.DefaultClient, svc.Config.HTTPClient) + if e, a := http.DefaultClient, svc.Config.HTTPClient; e != a { + t.Errorf("expect %v, got %v", e, a) + } } func TestClientOverrideDefaultHTTPClientTimeoutRace(t *testing.T) { @@ -63,6 +79,30 @@ func TestClientOverrideDefaultHTTPClientTimeoutRaceWithTransport(t *testing.T) { runEC2MetadataClients(t, cfg, 100) } +func TestClientDisableIMDS(t *testing.T) { + env := awstesting.StashEnv() + defer awstesting.PopEnv(env) + + os.Setenv("AWS_EC2_METADATA_DISABLED", "true") + + svc := ec2metadata.New(unit.Session) + resp, err := svc.Region() + if err == nil { + t.Fatalf("expect error, got none") + } + if len(resp) != 0 { + t.Errorf("expect no response, got %v", resp) + } + + aerr := err.(awserr.Error) + if e, a := request.CanceledErrorCode, aerr.Code(); e != a { + t.Errorf("expect %v error code, got %v", e, a) + } + if e, a := "AWS_EC2_METADATA_DISABLED", aerr.Message(); !strings.Contains(a, e) { + t.Errorf("expect %v in error message, got %v", e, a) + } +} + func runEC2MetadataClients(t *testing.T, cfg *aws.Config, atOnce int) { var wg sync.WaitGroup wg.Add(atOnce) @@ -70,7 +110,9 @@ func runEC2MetadataClients(t *testing.T, cfg *aws.Config, atOnce int) { go func() { svc := ec2metadata.New(unit.Session, cfg) _, err := svc.Region() - assert.NoError(t, err) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } wg.Done() }() } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go index f468de00d..564619d38 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go @@ -24,6 +24,7 @@ const ( EuCentral1RegionID = "eu-central-1" // EU (Frankfurt). EuWest1RegionID = "eu-west-1" // EU (Ireland). EuWest2RegionID = "eu-west-2" // EU (London). + EuWest3RegionID = "eu-west-3" // EU (Paris). SaEast1RegionID = "sa-east-1" // South America (Sao Paulo). UsEast1RegionID = "us-east-1" // US East (N. Virginia). UsEast2RegionID = "us-east-2" // US East (Ohio). @@ -33,7 +34,8 @@ const ( // AWS China partition's regions. const ( - CnNorth1RegionID = "cn-north-1" // China (Beijing). + CnNorth1RegionID = "cn-north-1" // China (Beijing). + CnNorthwest1RegionID = "cn-northwest-1" // China (Ningxia). ) // AWS GovCloud (US) partition's regions. @@ -43,14 +45,19 @@ const ( // Service identifiers const ( + A4bServiceID = "a4b" // A4b. AcmServiceID = "acm" // Acm. + ApiPricingServiceID = "api.pricing" // ApiPricing. ApigatewayServiceID = "apigateway" // Apigateway. ApplicationAutoscalingServiceID = "application-autoscaling" // ApplicationAutoscaling. Appstream2ServiceID = "appstream2" // Appstream2. AthenaServiceID = "athena" // Athena. AutoscalingServiceID = "autoscaling" // Autoscaling. + AutoscalingPlansServiceID = "autoscaling-plans" // AutoscalingPlans. BatchServiceID = "batch" // Batch. BudgetsServiceID = "budgets" // Budgets. + CeServiceID = "ce" // Ce. + Cloud9ServiceID = "cloud9" // Cloud9. ClouddirectoryServiceID = "clouddirectory" // Clouddirectory. CloudformationServiceID = "cloudformation" // Cloudformation. CloudfrontServiceID = "cloudfront" // Cloudfront. @@ -66,9 +73,11 @@ const ( CognitoIdentityServiceID = "cognito-identity" // CognitoIdentity. CognitoIdpServiceID = "cognito-idp" // CognitoIdp. CognitoSyncServiceID = "cognito-sync" // CognitoSync. + ComprehendServiceID = "comprehend" // Comprehend. ConfigServiceID = "config" // Config. CurServiceID = "cur" // Cur. DatapipelineServiceID = "datapipeline" // Datapipeline. + DaxServiceID = "dax" // Dax. DevicefarmServiceID = "devicefarm" // Devicefarm. DirectconnectServiceID = "directconnect" // Directconnect. DiscoveryServiceID = "discovery" // Discovery. @@ -94,6 +103,7 @@ const ( GlacierServiceID = "glacier" // Glacier. GlueServiceID = "glue" // Glue. GreengrassServiceID = "greengrass" // Greengrass. + GuarddutyServiceID = "guardduty" // Guardduty. HealthServiceID = "health" // Health. IamServiceID = "iam" // Iam. ImportexportServiceID = "importexport" // Importexport. @@ -101,12 +111,16 @@ const ( IotServiceID = "iot" // Iot. KinesisServiceID = "kinesis" // Kinesis. KinesisanalyticsServiceID = "kinesisanalytics" // Kinesisanalytics. + KinesisvideoServiceID = "kinesisvideo" // Kinesisvideo. KmsServiceID = "kms" // Kms. LambdaServiceID = "lambda" // Lambda. LightsailServiceID = "lightsail" // Lightsail. LogsServiceID = "logs" // Logs. MachinelearningServiceID = "machinelearning" // Machinelearning. MarketplacecommerceanalyticsServiceID = "marketplacecommerceanalytics" // Marketplacecommerceanalytics. + MediaconvertServiceID = "mediaconvert" // Mediaconvert. + MedialiveServiceID = "medialive" // Medialive. + MediapackageServiceID = "mediapackage" // Mediapackage. MeteringMarketplaceServiceID = "metering.marketplace" // MeteringMarketplace. MghServiceID = "mgh" // Mgh. MobileanalyticsServiceID = "mobileanalytics" // Mobileanalytics. @@ -121,12 +135,18 @@ const ( RdsServiceID = "rds" // Rds. RedshiftServiceID = "redshift" // Redshift. RekognitionServiceID = "rekognition" // Rekognition. + ResourceGroupsServiceID = "resource-groups" // ResourceGroups. Route53ServiceID = "route53" // Route53. Route53domainsServiceID = "route53domains" // Route53domains. RuntimeLexServiceID = "runtime.lex" // RuntimeLex. + RuntimeSagemakerServiceID = "runtime.sagemaker" // RuntimeSagemaker. S3ServiceID = "s3" // S3. + SagemakerServiceID = "sagemaker" // Sagemaker. SdbServiceID = "sdb" // Sdb. + SecretsmanagerServiceID = "secretsmanager" // Secretsmanager. + ServerlessrepoServiceID = "serverlessrepo" // Serverlessrepo. ServicecatalogServiceID = "servicecatalog" // Servicecatalog. + ServicediscoveryServiceID = "servicediscovery" // Servicediscovery. ShieldServiceID = "shield" // Shield. SmsServiceID = "sms" // Sms. SnowballServiceID = "snowball" // Snowball. @@ -140,9 +160,11 @@ const ( SupportServiceID = "support" // Support. SwfServiceID = "swf" // Swf. TaggingServiceID = "tagging" // Tagging. + TranslateServiceID = "translate" // Translate. WafServiceID = "waf" // Waf. WafRegionalServiceID = "waf-regional" // WafRegional. WorkdocsServiceID = "workdocs" // Workdocs. + WorkmailServiceID = "workmail" // Workmail. WorkspacesServiceID = "workspaces" // Workspaces. XrayServiceID = "xray" // Xray. ) @@ -220,6 +242,9 @@ var awsPartition = partition{ "eu-west-2": region{ Description: "EU (London)", }, + "eu-west-3": region{ + Description: "EU (Paris)", + }, "sa-east-1": region{ Description: "South America (Sao Paulo)", }, @@ -237,6 +262,12 @@ var awsPartition = partition{ }, }, Services: services{ + "a4b": service{ + + Endpoints: endpoints{ + "us-east-1": endpoint{}, + }, + }, "acm": service{ Endpoints: endpoints{ @@ -249,6 +280,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -256,6 +288,17 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, + "api.pricing": service{ + Defaults: endpoint{ + CredentialScope: credentialScope{ + Service: "pricing", + }, + }, + Endpoints: endpoints{ + "ap-south-1": endpoint{}, + "us-east-1": endpoint{}, + }, + }, "apigateway": service{ Endpoints: endpoints{ @@ -268,6 +311,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -293,6 +337,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -319,6 +364,8 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -339,6 +386,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -346,17 +394,36 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, + "autoscaling-plans": service{ + Defaults: endpoint{ + Hostname: "autoscaling.{region}.amazonaws.com", + Protocols: []string{"http", "https"}, + CredentialScope: credentialScope{ + Service: "autoscaling-plans", + }, + }, + Endpoints: endpoints{ + "ap-southeast-1": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "batch": service{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, + "us-west-1": endpoint{}, "us-west-2": endpoint{}, }, }, @@ -373,11 +440,35 @@ var awsPartition = partition{ }, }, }, + "ce": service{ + PartitionEndpoint: "aws-global", + IsRegionalized: boxedFalse, + + Endpoints: endpoints{ + "aws-global": endpoint{ + Hostname: "ce.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + }, + }, + "cloud9": service{ + + Endpoints: endpoints{ + "ap-southeast-1": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "clouddirectory": service{ Endpoints: endpoints{ "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, + "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "us-east-1": endpoint{}, @@ -397,6 +488,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -434,12 +526,23 @@ var awsPartition = partition{ }, }, "cloudhsmv2": service{ - + Defaults: endpoint{ + CredentialScope: credentialScope{ + Service: "cloudhsm", + }, + }, Endpoints: endpoints{ - "eu-west-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-2": endpoint{}, + "ap-northeast-1": endpoint{}, + "ap-south-1": endpoint{}, + "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "cloudsearch": service{ @@ -469,6 +572,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -480,16 +584,44 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, + "sa-east-1": endpoint{}, "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, + "us-east-1-fips": endpoint{ + Hostname: "codebuild-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "us-east-2": endpoint{}, + "us-east-2-fips": endpoint{ + Hostname: "codebuild-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "us-west-1": endpoint{}, + "us-west-1-fips": endpoint{ + Hostname: "codebuild-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "us-west-2": endpoint{}, + "us-west-2-fips": endpoint{ + Hostname: "codebuild-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, }, }, "codecommit": service{ @@ -523,6 +655,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -542,6 +675,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -552,8 +686,11 @@ var awsPartition = partition{ "codestar": service{ Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, @@ -611,6 +748,17 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, + "comprehend": service{ + Defaults: endpoint{ + Protocols: []string{"https"}, + }, + Endpoints: endpoints{ + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "config": service{ Endpoints: endpoints{ @@ -623,6 +771,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -646,6 +795,20 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, + "dax": service{ + + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "ap-south-1": endpoint{}, + "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "eu-west-1": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "devicefarm": service{ Endpoints: endpoints{ @@ -664,6 +827,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -689,6 +853,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -701,6 +866,7 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, "ca-central-1": endpoint{}, @@ -710,6 +876,7 @@ var awsPartition = partition{ "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, + "us-west-1": endpoint{}, "us-west-2": endpoint{}, }, }, @@ -727,6 +894,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "local": endpoint{ Hostname: "localhost:8000", Protocols: []string{"http"}, @@ -755,6 +923,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -777,12 +946,16 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, + "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, "us-west-1": endpoint{}, @@ -793,12 +966,16 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, + "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, "us-west-1": endpoint{}, @@ -817,6 +994,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -836,6 +1014,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -851,6 +1030,7 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, + "us-west-1": endpoint{}, "us-west-2": endpoint{}, }, }, @@ -868,6 +1048,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -892,6 +1073,7 @@ var awsPartition = partition{ }, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{ SSLCommonName: "{service}.{region}.{dnsSuffix}", @@ -944,6 +1126,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -963,6 +1146,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -974,10 +1158,13 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, + "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, + "us-west-1": endpoint{}, "us-west-2": endpoint{}, }, }, @@ -1014,6 +1201,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, "us-west-1": endpoint{}, @@ -1023,9 +1211,13 @@ var awsPartition = partition{ "glue": service{ Endpoints: endpoints{ - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-2": endpoint{}, + "ap-northeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, }, }, "greengrass": service{ @@ -1041,6 +1233,29 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, + "guardduty": service{ + IsRegionalized: boxedTrue, + Defaults: endpoint{ + Protocols: []string{"https"}, + }, + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, + "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "health": service{ Endpoints: endpoints{ @@ -1082,8 +1297,10 @@ var awsPartition = partition{ "ap-northeast-2": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-2": endpoint{}, + "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "us-east-1": endpoint{}, + "us-east-2": endpoint{}, "us-west-1": endpoint{}, "us-west-2": endpoint{}, }, @@ -1119,6 +1336,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -1134,6 +1352,16 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, + "kinesisvideo": service{ + + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "kms": service{ Endpoints: endpoints{ @@ -1146,6 +1374,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -1165,6 +1394,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -1199,6 +1429,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -1219,6 +1450,51 @@ var awsPartition = partition{ "us-east-1": endpoint{}, }, }, + "mediaconvert": service{ + + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, + "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, + }, + }, + "medialive": service{ + + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-west-2": endpoint{}, + }, + }, + "mediapackage": service{ + + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "eu-west-3": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "metering.marketplace": service{ Defaults: endpoint{ CredentialScope: credentialScope{ @@ -1235,6 +1511,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -1261,6 +1538,7 @@ var awsPartition = partition{ }, }, Endpoints: endpoints{ + "eu-west-1": endpoint{}, "us-east-1": endpoint{}, }, }, @@ -1278,6 +1556,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -1303,9 +1582,11 @@ var awsPartition = partition{ "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -1316,9 +1597,15 @@ var awsPartition = partition{ "opsworks-cm": service{ Endpoints: endpoints{ - "eu-west-1": endpoint{}, - "us-east-1": endpoint{}, - "us-west-2": endpoint{}, + "ap-northeast-1": endpoint{}, + "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "organizations": service{ @@ -1347,10 +1634,21 @@ var awsPartition = partition{ "polly": service{ Endpoints: endpoints{ - "eu-west-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-2": endpoint{}, + "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, + "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "rds": service{ @@ -1365,6 +1663,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{ SSLCommonName: "{service}.{dnsSuffix}", @@ -1386,6 +1685,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -1396,9 +1696,31 @@ var awsPartition = partition{ "rekognition": service{ Endpoints: endpoints{ - "eu-west-1": endpoint{}, - "us-east-1": endpoint{}, - "us-west-2": endpoint{}, + "ap-northeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, + }, + }, + "resource-groups": service{ + + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, + "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "route53": service{ @@ -1427,9 +1749,19 @@ var awsPartition = partition{ }, }, Endpoints: endpoints{ + "eu-west-1": endpoint{}, "us-east-1": endpoint{}, }, }, + "runtime.sagemaker": service{ + + Endpoints: endpoints{ + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "s3": service{ PartitionEndpoint: "us-east-1", IsRegionalized: boxedTrue, @@ -1442,26 +1774,27 @@ var awsPartition = partition{ }, Endpoints: endpoints{ "ap-northeast-1": endpoint{ - Hostname: "s3-ap-northeast-1.amazonaws.com", + Hostname: "s3.ap-northeast-1.amazonaws.com", SignatureVersions: []string{"s3", "s3v4"}, }, "ap-northeast-2": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{ - Hostname: "s3-ap-southeast-1.amazonaws.com", + Hostname: "s3.ap-southeast-1.amazonaws.com", SignatureVersions: []string{"s3", "s3v4"}, }, "ap-southeast-2": endpoint{ - Hostname: "s3-ap-southeast-2.amazonaws.com", + Hostname: "s3.ap-southeast-2.amazonaws.com", SignatureVersions: []string{"s3", "s3v4"}, }, "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{ - Hostname: "s3-eu-west-1.amazonaws.com", + Hostname: "s3.eu-west-1.amazonaws.com", SignatureVersions: []string{"s3", "s3v4"}, }, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "s3-external-1": endpoint{ Hostname: "s3-external-1.amazonaws.com", SignatureVersions: []string{"s3", "s3v4"}, @@ -1470,7 +1803,7 @@ var awsPartition = partition{ }, }, "sa-east-1": endpoint{ - Hostname: "s3-sa-east-1.amazonaws.com", + Hostname: "s3.sa-east-1.amazonaws.com", SignatureVersions: []string{"s3", "s3v4"}, }, "us-east-1": endpoint{ @@ -1479,15 +1812,24 @@ var awsPartition = partition{ }, "us-east-2": endpoint{}, "us-west-1": endpoint{ - Hostname: "s3-us-west-1.amazonaws.com", + Hostname: "s3.us-west-1.amazonaws.com", SignatureVersions: []string{"s3", "s3v4"}, }, "us-west-2": endpoint{ - Hostname: "s3-us-west-2.amazonaws.com", + Hostname: "s3.us-west-2.amazonaws.com", SignatureVersions: []string{"s3", "s3v4"}, }, }, }, + "sagemaker": service{ + + Endpoints: endpoints{ + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "sdb": service{ Defaults: endpoint{ Protocols: []string{"http", "https"}, @@ -1506,22 +1848,103 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, + "secretsmanager": service{ + + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, + "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, + }, + }, + "serverlessrepo": service{ + Defaults: endpoint{ + Protocols: []string{"https"}, + }, + Endpoints: endpoints{ + "ap-northeast-1": endpoint{ + Protocols: []string{"https"}, + }, + "ap-northeast-2": endpoint{ + Protocols: []string{"https"}, + }, + "ap-south-1": endpoint{ + Protocols: []string{"https"}, + }, + "ap-southeast-1": endpoint{ + Protocols: []string{"https"}, + }, + "ap-southeast-2": endpoint{ + Protocols: []string{"https"}, + }, + "ca-central-1": endpoint{ + Protocols: []string{"https"}, + }, + "eu-central-1": endpoint{ + Protocols: []string{"https"}, + }, + "eu-west-1": endpoint{ + Protocols: []string{"https"}, + }, + "eu-west-2": endpoint{ + Protocols: []string{"https"}, + }, + "sa-east-1": endpoint{ + Protocols: []string{"https"}, + }, + "us-east-1": endpoint{ + Protocols: []string{"https"}, + }, + "us-east-2": endpoint{ + Protocols: []string{"https"}, + }, + "us-west-1": endpoint{ + Protocols: []string{"https"}, + }, + "us-west-2": endpoint{ + Protocols: []string{"https"}, + }, + }, + }, "servicecatalog": service{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, + "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, + "us-west-1": endpoint{}, "us-west-2": endpoint{}, }, }, + "servicediscovery": service{ + + Endpoints: endpoints{ + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "shield": service{ IsRegionalized: boxedFalse, Defaults: endpoint{ @@ -1538,11 +1961,16 @@ var awsPartition = partition{ "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, "ap-south-1": endpoint{}, + "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, + "us-west-1": endpoint{}, "us-west-2": endpoint{}, }, }, @@ -1551,10 +1979,13 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, "ap-south-1": endpoint{}, + "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -1576,6 +2007,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -1598,6 +2030,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{ SSLCommonName: "queue.{dnsSuffix}", @@ -1619,6 +2052,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -1630,7 +2064,9 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, + "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, @@ -1651,6 +2087,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -1675,6 +2112,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "local": endpoint{ Hostname: "localhost:8000", Protocols: []string{"http"}, @@ -1713,6 +2151,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-1-fips": endpoint{ @@ -1762,6 +2201,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -1781,6 +2221,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -1788,6 +2229,16 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, + "translate": service{ + Defaults: endpoint{ + Protocols: []string{"https"}, + }, + Endpoints: endpoints{ + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "waf": service{ PartitionEndpoint: "aws-global", IsRegionalized: boxedFalse, @@ -1805,6 +2256,8 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "us-east-1": endpoint{}, "us-west-1": endpoint{}, @@ -1822,15 +2275,27 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, + "workmail": service{ + Defaults: endpoint{ + Protocols: []string{"https"}, + }, + Endpoints: endpoints{ + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "workspaces": service{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-west-2": endpoint{}, }, @@ -1881,8 +2346,17 @@ var awscnPartition = partition{ "cn-north-1": region{ Description: "China (Beijing)", }, + "cn-northwest-1": region{ + Description: "China (Ningxia)", + }, }, Services: services{ + "apigateway": service{ + + Endpoints: endpoints{ + "cn-north-1": endpoint{}, + }, + }, "application-autoscaling": service{ Defaults: endpoint{ Hostname: "autoscaling.{region}.amazonaws.com", @@ -1892,7 +2366,8 @@ var awscnPartition = partition{ }, }, Endpoints: endpoints{ - "cn-north-1": endpoint{}, + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, }, }, "autoscaling": service{ @@ -1900,23 +2375,33 @@ var awscnPartition = partition{ Protocols: []string{"http", "https"}, }, Endpoints: endpoints{ - "cn-north-1": endpoint{}, + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, }, }, "cloudformation": service{ Endpoints: endpoints{ - "cn-north-1": endpoint{}, + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, }, }, "cloudtrail": service{ Endpoints: endpoints{ - "cn-north-1": endpoint{}, + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, }, }, "codedeploy": service{ + Endpoints: endpoints{ + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, + }, + }, + "cognito-identity": service{ + Endpoints: endpoints{ "cn-north-1": endpoint{}, }, @@ -1924,13 +2409,15 @@ var awscnPartition = partition{ "config": service{ Endpoints: endpoints{ - "cn-north-1": endpoint{}, + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, }, }, "directconnect": service{ Endpoints: endpoints{ - "cn-north-1": endpoint{}, + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, }, }, "dynamodb": service{ @@ -1938,7 +2425,8 @@ var awscnPartition = partition{ Protocols: []string{"http", "https"}, }, Endpoints: endpoints{ - "cn-north-1": endpoint{}, + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, }, }, "ec2": service{ @@ -1946,7 +2434,8 @@ var awscnPartition = partition{ Protocols: []string{"http", "https"}, }, Endpoints: endpoints{ - "cn-north-1": endpoint{}, + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, }, }, "ec2metadata": service{ @@ -1975,13 +2464,15 @@ var awscnPartition = partition{ "elasticache": service{ Endpoints: endpoints{ - "cn-north-1": endpoint{}, + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, }, }, "elasticbeanstalk": service{ Endpoints: endpoints{ - "cn-north-1": endpoint{}, + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, }, }, "elasticloadbalancing": service{ @@ -1989,7 +2480,8 @@ var awscnPartition = partition{ Protocols: []string{"https"}, }, Endpoints: endpoints{ - "cn-north-1": endpoint{}, + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, }, }, "elasticmapreduce": service{ @@ -1997,13 +2489,21 @@ var awscnPartition = partition{ Protocols: []string{"http", "https"}, }, Endpoints: endpoints{ - "cn-north-1": endpoint{}, + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, + }, + }, + "es": service{ + + Endpoints: endpoints{ + "cn-northwest-1": endpoint{}, }, }, "events": service{ Endpoints: endpoints{ - "cn-north-1": endpoint{}, + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, }, }, "glacier": service{ @@ -2011,7 +2511,8 @@ var awscnPartition = partition{ Protocols: []string{"http", "https"}, }, Endpoints: endpoints{ - "cn-north-1": endpoint{}, + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, }, }, "iam": service{ @@ -2039,6 +2540,13 @@ var awscnPartition = partition{ }, "kinesis": service{ + Endpoints: endpoints{ + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, + }, + }, + "lambda": service{ + Endpoints: endpoints{ "cn-north-1": endpoint{}, }, @@ -2046,7 +2554,8 @@ var awscnPartition = partition{ "logs": service{ Endpoints: endpoints{ - "cn-north-1": endpoint{}, + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, }, }, "monitoring": service{ @@ -2054,19 +2563,22 @@ var awscnPartition = partition{ Protocols: []string{"http", "https"}, }, Endpoints: endpoints{ - "cn-north-1": endpoint{}, + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, }, }, "rds": service{ Endpoints: endpoints{ - "cn-north-1": endpoint{}, + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, }, }, "redshift": service{ Endpoints: endpoints{ - "cn-north-1": endpoint{}, + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, }, }, "s3": service{ @@ -2075,7 +2587,15 @@ var awscnPartition = partition{ SignatureVersions: []string{"s3v4"}, }, Endpoints: endpoints{ - "cn-north-1": endpoint{}, + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, + }, + }, + "sms": service{ + + Endpoints: endpoints{ + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, }, }, "snowball": service{ @@ -2089,7 +2609,8 @@ var awscnPartition = partition{ Protocols: []string{"http", "https"}, }, Endpoints: endpoints{ - "cn-north-1": endpoint{}, + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, }, }, "sqs": service{ @@ -2098,13 +2619,15 @@ var awscnPartition = partition{ Protocols: []string{"http", "https"}, }, Endpoints: endpoints{ - "cn-north-1": endpoint{}, + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, }, }, "ssm": service{ Endpoints: endpoints{ - "cn-north-1": endpoint{}, + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, }, }, "storagegateway": service{ @@ -2121,25 +2644,29 @@ var awscnPartition = partition{ }, }, Endpoints: endpoints{ - "cn-north-1": endpoint{}, + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, }, }, "sts": service{ Endpoints: endpoints{ - "cn-north-1": endpoint{}, + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, }, }, "swf": service{ Endpoints: endpoints{ - "cn-north-1": endpoint{}, + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, }, }, "tagging": service{ Endpoints: endpoints{ - "cn-north-1": endpoint{}, + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, }, }, }, @@ -2227,10 +2754,22 @@ var awsusgovPartition = partition{ "us-gov-west-1": endpoint{}, }, }, + "dms": service{ + + Endpoints: endpoints{ + "us-gov-west-1": endpoint{}, + }, + }, "dynamodb": service{ Endpoints: endpoints{ "us-gov-west-1": endpoint{}, + "us-gov-west-1-fips": endpoint{ + Hostname: "dynamodb.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, }, }, "ec2": service{ @@ -2250,12 +2789,30 @@ var awsusgovPartition = partition{ }, }, }, + "ecr": service{ + + Endpoints: endpoints{ + "us-gov-west-1": endpoint{}, + }, + }, + "ecs": service{ + + Endpoints: endpoints{ + "us-gov-west-1": endpoint{}, + }, + }, "elasticache": service{ Endpoints: endpoints{ "us-gov-west-1": endpoint{}, }, }, + "elasticbeanstalk": service{ + + Endpoints: endpoints{ + "us-gov-west-1": endpoint{}, + }, + }, "elasticloadbalancing": service{ Endpoints: endpoints{ @@ -2272,6 +2829,12 @@ var awsusgovPartition = partition{ }, }, }, + "es": service{ + + Endpoints: endpoints{ + "us-gov-west-1": endpoint{}, + }, + }, "events": service{ Endpoints: endpoints{ @@ -2323,12 +2886,28 @@ var awsusgovPartition = partition{ "us-gov-west-1": endpoint{}, }, }, + "metering.marketplace": service{ + Defaults: endpoint{ + CredentialScope: credentialScope{ + Service: "aws-marketplace", + }, + }, + Endpoints: endpoints{ + "us-gov-west-1": endpoint{}, + }, + }, "monitoring": service{ Endpoints: endpoints{ "us-gov-west-1": endpoint{}, }, }, + "polly": service{ + + Endpoints: endpoints{ + "us-gov-west-1": endpoint{}, + }, + }, "rds": service{ Endpoints: endpoints{ @@ -2359,7 +2938,7 @@ var awsusgovPartition = partition{ }, }, "us-gov-west-1": endpoint{ - Hostname: "s3-us-gov-west-1.amazonaws.com", + Hostname: "s3.us-gov-west-1.amazonaws.com", Protocols: []string{"http", "https"}, }, }, @@ -2407,6 +2986,12 @@ var awsusgovPartition = partition{ }, Endpoints: endpoints{ "us-gov-west-1": endpoint{}, + "us-gov-west-1-fips": endpoint{ + Hostname: "dynamodb.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, }, }, "sts": service{ @@ -2417,6 +3002,12 @@ var awsusgovPartition = partition{ }, "swf": service{ + Endpoints: endpoints{ + "us-gov-west-1": endpoint{}, + }, + }, + "tagging": service{ + Endpoints: endpoints{ "us-gov-west-1": endpoint{}, }, diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go index 9c3eedb48..d6be83c19 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go @@ -347,6 +347,10 @@ type ResolvedEndpoint struct { // The service name that should be used for signing requests. SigningName string + // States that the signing name for this endpoint was derived from metadata + // passed in, but was not explicitly modeled. + SigningNameDerived bool + // The signing method that should be used for signing requests. SigningMethod string } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model.go index 13d968a24..ff6f76db6 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model.go @@ -226,16 +226,20 @@ func (e endpoint) resolve(service, region, dnsSuffix string, defs []endpoint, op if len(signingRegion) == 0 { signingRegion = region } + signingName := e.CredentialScope.Service + var signingNameDerived bool if len(signingName) == 0 { signingName = service + signingNameDerived = true } return ResolvedEndpoint{ - URL: u, - SigningRegion: signingRegion, - SigningName: signingName, - SigningMethod: getByPriority(e.SignatureVersions, signerPriority, defaultSigner), + URL: u, + SigningRegion: signingRegion, + SigningName: signingName, + SigningNameDerived: signingNameDerived, + SigningMethod: getByPriority(e.SignatureVersions, signerPriority, defaultSigner), } } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model_test.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model_test.go index 1385cb427..0b8b00673 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model_test.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model_test.go @@ -2,10 +2,9 @@ package endpoints import ( "encoding/json" + "reflect" "regexp" "testing" - - "github.com/stretchr/testify/assert" ) func TestUnmarshalRegionRegex(t *testing.T) { @@ -16,12 +15,18 @@ func TestUnmarshalRegionRegex(t *testing.T) { p := partition{} err := json.Unmarshal(input, &p) - assert.NoError(t, err) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } expectRegexp, err := regexp.Compile(`^(us|eu|ap|sa|ca)\-\w+\-\d+$`) - assert.NoError(t, err) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } - assert.Equal(t, expectRegexp.String(), p.RegionRegex.Regexp.String()) + if e, a := expectRegexp.String(), p.RegionRegex.Regexp.String(); e != a { + t.Errorf("expect %v, got %v", e, a) + } } func TestUnmarshalRegion(t *testing.T) { @@ -37,16 +42,28 @@ func TestUnmarshalRegion(t *testing.T) { rs := regions{} err := json.Unmarshal(input, &rs) - assert.NoError(t, err) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } - assert.Len(t, rs, 2) + if e, a := 2, len(rs); e != a { + t.Errorf("expect %v len, got %v", e, a) + } r, ok := rs["aws-global"] - assert.True(t, ok) - assert.Equal(t, "AWS partition-global endpoint", r.Description) + if !ok { + t.Errorf("expect found, was not") + } + if e, a := "AWS partition-global endpoint", r.Description; e != a { + t.Errorf("expect %v, got %v", e, a) + } r, ok = rs["us-east-1"] - assert.True(t, ok) - assert.Equal(t, "US East (N. Virginia)", r.Description) + if !ok { + t.Errorf("expect found, was not") + } + if e, a := "US East (N. Virginia)", r.Description; e != a { + t.Errorf("expect %v, got %v", e, a) + } } func TestUnmarshalServices(t *testing.T) { @@ -75,23 +92,45 @@ func TestUnmarshalServices(t *testing.T) { ss := services{} err := json.Unmarshal(input, &ss) - assert.NoError(t, err) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } - assert.Len(t, ss, 3) + if e, a := 3, len(ss); e != a { + t.Errorf("expect %v len, got %v", e, a) + } s, ok := ss["acm"] - assert.True(t, ok) - assert.Len(t, s.Endpoints, 1) - assert.Equal(t, boxedBoolUnset, s.IsRegionalized) + if !ok { + t.Errorf("expect found, was not") + } + if e, a := 1, len(s.Endpoints); e != a { + t.Errorf("expect %v len, got %v", e, a) + } + if e, a := boxedBoolUnset, s.IsRegionalized; e != a { + t.Errorf("expect %v, got %v", e, a) + } s, ok = ss["apigateway"] - assert.True(t, ok) - assert.Len(t, s.Endpoints, 2) - assert.Equal(t, boxedTrue, s.IsRegionalized) + if !ok { + t.Errorf("expect found, was not") + } + if e, a := 2, len(s.Endpoints); e != a { + t.Errorf("expect %v len, got %v", e, a) + } + if e, a := boxedTrue, s.IsRegionalized; e != a { + t.Errorf("expect %v, got %v", e, a) + } s, ok = ss["notRegionalized"] - assert.True(t, ok) - assert.Len(t, s.Endpoints, 2) - assert.Equal(t, boxedFalse, s.IsRegionalized) + if !ok { + t.Errorf("expect found, was not") + } + if e, a := 2, len(s.Endpoints); e != a { + t.Errorf("expect %v len, got %v", e, a) + } + if e, a := boxedFalse, s.IsRegionalized; e != a { + t.Errorf("expect %v, got %v", e, a) + } } func TestUnmarshalEndpoints(t *testing.T) { @@ -115,16 +154,32 @@ func TestUnmarshalEndpoints(t *testing.T) { es := endpoints{} err := json.Unmarshal(inputs, &es) - assert.NoError(t, err) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } - assert.Len(t, es, 2) + if e, a := 2, len(es); e != a { + t.Errorf("expect %v len, got %v", e, a) + } s, ok := es["aws-global"] - assert.True(t, ok) - assert.Equal(t, "cloudfront.amazonaws.com", s.Hostname) - assert.Equal(t, []string{"http", "https"}, s.Protocols) - assert.Equal(t, []string{"v4"}, s.SignatureVersions) - assert.Equal(t, credentialScope{"us-east-1", "serviceName"}, s.CredentialScope) - assert.Equal(t, "commonName", s.SSLCommonName) + if !ok { + t.Errorf("expect found, was not") + } + if e, a := "cloudfront.amazonaws.com", s.Hostname; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := []string{"http", "https"}, s.Protocols; !reflect.DeepEqual(e, a) { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := []string{"v4"}, s.SignatureVersions; !reflect.DeepEqual(e, a) { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := (credentialScope{"us-east-1", "serviceName"}), s.CredentialScope; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "commonName", s.SSLCommonName; e != a { + t.Errorf("expect %v, got %v", e, a) + } } func TestEndpointResolve(t *testing.T) { @@ -155,10 +210,18 @@ func TestEndpointResolve(t *testing.T) { defs, Options{}, ) - assert.Equal(t, "https://service.region.dnsSuffix", resolved.URL) - assert.Equal(t, "signing_service", resolved.SigningName) - assert.Equal(t, "signing_region", resolved.SigningRegion) - assert.Equal(t, "v4", resolved.SigningMethod) + if e, a := "https://service.region.dnsSuffix", resolved.URL; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "signing_service", resolved.SigningName; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "signing_region", resolved.SigningRegion; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "v4", resolved.SigningMethod; e != a { + t.Errorf("expect %v, got %v", e, a) + } } func TestEndpointMergeIn(t *testing.T) { @@ -185,7 +248,9 @@ func TestEndpointMergeIn(t *testing.T) { }, }) - assert.Equal(t, expected, actual) + if e, a := expected, actual; !reflect.DeepEqual(e, a) { + t.Errorf("expect %v, got %v", e, a) + } } var testPartitions = partitions{ @@ -213,6 +278,11 @@ var testPartitions = partitions{ Services: services{ "s3": service{}, "service1": service{ + Defaults: endpoint{ + CredentialScope: credentialScope{ + Service: "service1", + }, + }, Endpoints: endpoints{ "us-east-1": {}, "us-west-2": { @@ -221,7 +291,13 @@ var testPartitions = partitions{ }, }, }, - "service2": service{}, + "service2": service{ + Defaults: endpoint{ + CredentialScope: credentialScope{ + Service: "service2", + }, + }, + }, "httpService": service{ Defaults: endpoint{ Protocols: []string{"http"}, @@ -246,109 +322,220 @@ var testPartitions = partitions{ func TestResolveEndpoint(t *testing.T) { resolved, err := testPartitions.EndpointFor("service2", "us-west-2") - assert.NoError(t, err) - assert.Equal(t, "https://service2.us-west-2.amazonaws.com", resolved.URL) - assert.Equal(t, "us-west-2", resolved.SigningRegion) - assert.Equal(t, "service2", resolved.SigningName) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + if e, a := "https://service2.us-west-2.amazonaws.com", resolved.URL; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "us-west-2", resolved.SigningRegion; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "service2", resolved.SigningName; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if resolved.SigningNameDerived { + t.Errorf("expect the signing name not to be derived, but was") + } } func TestResolveEndpoint_DisableSSL(t *testing.T) { resolved, err := testPartitions.EndpointFor("service2", "us-west-2", DisableSSLOption) - assert.NoError(t, err) - assert.Equal(t, "http://service2.us-west-2.amazonaws.com", resolved.URL) - assert.Equal(t, "us-west-2", resolved.SigningRegion) - assert.Equal(t, "service2", resolved.SigningName) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + if e, a := "http://service2.us-west-2.amazonaws.com", resolved.URL; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "us-west-2", resolved.SigningRegion; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "service2", resolved.SigningName; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if resolved.SigningNameDerived { + t.Errorf("expect the signing name not to be derived, but was") + } } func TestResolveEndpoint_UseDualStack(t *testing.T) { resolved, err := testPartitions.EndpointFor("service1", "us-west-2", UseDualStackOption) - assert.NoError(t, err) - assert.Equal(t, "https://service1.dualstack.us-west-2.amazonaws.com", resolved.URL) - assert.Equal(t, "us-west-2", resolved.SigningRegion) - assert.Equal(t, "service1", resolved.SigningName) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + if e, a := "https://service1.dualstack.us-west-2.amazonaws.com", resolved.URL; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "us-west-2", resolved.SigningRegion; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "service1", resolved.SigningName; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if resolved.SigningNameDerived { + t.Errorf("expect the signing name not to be derived, but was") + } } func TestResolveEndpoint_HTTPProtocol(t *testing.T) { resolved, err := testPartitions.EndpointFor("httpService", "us-west-2") - assert.NoError(t, err) - assert.Equal(t, "http://httpService.us-west-2.amazonaws.com", resolved.URL) - assert.Equal(t, "us-west-2", resolved.SigningRegion) - assert.Equal(t, "httpService", resolved.SigningName) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + if e, a := "http://httpService.us-west-2.amazonaws.com", resolved.URL; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "us-west-2", resolved.SigningRegion; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "httpService", resolved.SigningName; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if !resolved.SigningNameDerived { + t.Errorf("expect the signing name to be derived") + } } func TestResolveEndpoint_UnknownService(t *testing.T) { _, err := testPartitions.EndpointFor("unknownservice", "us-west-2") - assert.Error(t, err) + if err == nil { + t.Errorf("expect error, got none") + } _, ok := err.(UnknownServiceError) - assert.True(t, ok, "expect error to be UnknownServiceError") + if !ok { + t.Errorf("expect error to be UnknownServiceError") + } } func TestResolveEndpoint_ResolveUnknownService(t *testing.T) { resolved, err := testPartitions.EndpointFor("unknown-service", "us-region-1", ResolveUnknownServiceOption) - assert.NoError(t, err) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } - assert.Equal(t, "https://unknown-service.us-region-1.amazonaws.com", resolved.URL) - assert.Equal(t, "us-region-1", resolved.SigningRegion) - assert.Equal(t, "unknown-service", resolved.SigningName) + if e, a := "https://unknown-service.us-region-1.amazonaws.com", resolved.URL; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "us-region-1", resolved.SigningRegion; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "unknown-service", resolved.SigningName; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if !resolved.SigningNameDerived { + t.Errorf("expect the signing name to be derived") + } } func TestResolveEndpoint_UnknownMatchedRegion(t *testing.T) { resolved, err := testPartitions.EndpointFor("service2", "us-region-1") - assert.NoError(t, err) - assert.Equal(t, "https://service2.us-region-1.amazonaws.com", resolved.URL) - assert.Equal(t, "us-region-1", resolved.SigningRegion) - assert.Equal(t, "service2", resolved.SigningName) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + if e, a := "https://service2.us-region-1.amazonaws.com", resolved.URL; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "us-region-1", resolved.SigningRegion; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "service2", resolved.SigningName; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if resolved.SigningNameDerived { + t.Errorf("expect the signing name not to be derived, but was") + } } func TestResolveEndpoint_UnknownRegion(t *testing.T) { resolved, err := testPartitions.EndpointFor("service2", "unknownregion") - assert.NoError(t, err) - assert.Equal(t, "https://service2.unknownregion.amazonaws.com", resolved.URL) - assert.Equal(t, "unknownregion", resolved.SigningRegion) - assert.Equal(t, "service2", resolved.SigningName) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + if e, a := "https://service2.unknownregion.amazonaws.com", resolved.URL; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "unknownregion", resolved.SigningRegion; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "service2", resolved.SigningName; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if resolved.SigningNameDerived { + t.Errorf("expect the signing name not to be derived, but was") + } } func TestResolveEndpoint_StrictPartitionUnknownEndpoint(t *testing.T) { _, err := testPartitions[0].EndpointFor("service2", "unknownregion", StrictMatchingOption) - assert.Error(t, err) + if err == nil { + t.Errorf("expect error, got none") + } _, ok := err.(UnknownEndpointError) - assert.True(t, ok, "expect error to be UnknownEndpointError") + if !ok { + t.Errorf("expect error to be UnknownEndpointError") + } } func TestResolveEndpoint_StrictPartitionsUnknownEndpoint(t *testing.T) { _, err := testPartitions.EndpointFor("service2", "us-region-1", StrictMatchingOption) - assert.Error(t, err) + if err == nil { + t.Errorf("expect error, got none") + } _, ok := err.(UnknownEndpointError) - assert.True(t, ok, "expect error to be UnknownEndpointError") + if !ok { + t.Errorf("expect error to be UnknownEndpointError") + } } func TestResolveEndpoint_NotRegionalized(t *testing.T) { resolved, err := testPartitions.EndpointFor("globalService", "us-west-2") - assert.NoError(t, err) - assert.Equal(t, "https://globalService.amazonaws.com", resolved.URL) - assert.Equal(t, "us-east-1", resolved.SigningRegion) - assert.Equal(t, "globalService", resolved.SigningName) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + if e, a := "https://globalService.amazonaws.com", resolved.URL; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "us-east-1", resolved.SigningRegion; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "globalService", resolved.SigningName; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if !resolved.SigningNameDerived { + t.Errorf("expect the signing name to be derived") + } } func TestResolveEndpoint_AwsGlobal(t *testing.T) { resolved, err := testPartitions.EndpointFor("globalService", "aws-global") - assert.NoError(t, err) - assert.Equal(t, "https://globalService.amazonaws.com", resolved.URL) - assert.Equal(t, "us-east-1", resolved.SigningRegion) - assert.Equal(t, "globalService", resolved.SigningName) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + if e, a := "https://globalService.amazonaws.com", resolved.URL; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "us-east-1", resolved.SigningRegion; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := "globalService", resolved.SigningName; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if !resolved.SigningNameDerived { + t.Errorf("expect the signing name to be derived") + } } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/offset_reader.go b/vendor/github.com/aws/aws-sdk-go/aws/request/offset_reader.go index 02f07f4a4..b0c2ef4fe 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/offset_reader.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/offset_reader.go @@ -3,6 +3,8 @@ package request import ( "io" "sync" + + "github.com/aws/aws-sdk-go/internal/sdkio" ) // offsetReader is a thread-safe io.ReadCloser to prevent racing @@ -15,7 +17,7 @@ type offsetReader struct { func newOffsetReader(buf io.ReadSeeker, offset int64) *offsetReader { reader := &offsetReader{} - buf.Seek(offset, 0) + buf.Seek(offset, sdkio.SeekStart) reader.buf = buf return reader diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/offset_reader_test.go b/vendor/github.com/aws/aws-sdk-go/aws/request/offset_reader_test.go index 01856e316..e5ec043b8 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/offset_reader_test.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/offset_reader_test.go @@ -8,6 +8,7 @@ import ( "testing" "time" + "github.com/aws/aws-sdk-go/internal/sdkio" "github.com/stretchr/testify/assert" ) @@ -28,15 +29,15 @@ func TestOffsetReaderSeek(t *testing.T) { buf := []byte("testData") reader := newOffsetReader(bytes.NewReader(buf), 0) - orig, err := reader.Seek(0, 1) + orig, err := reader.Seek(0, sdkio.SeekCurrent) assert.NoError(t, err) assert.Equal(t, int64(0), orig) - n, err := reader.Seek(0, 2) + n, err := reader.Seek(0, sdkio.SeekEnd) assert.NoError(t, err) assert.Equal(t, int64(len(buf)), n) - n, err = reader.Seek(orig, 0) + n, err = reader.Seek(orig, sdkio.SeekStart) assert.NoError(t, err) assert.Equal(t, int64(0), n) } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request.go index 911c058ee..69b7a01ad 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/request.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/request.go @@ -14,6 +14,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/client/metadata" + "github.com/aws/aws-sdk-go/internal/sdkio" ) const ( @@ -28,6 +29,10 @@ const ( // during body reads. ErrCodeResponseTimeout = "ResponseTimeout" + // ErrCodeInvalidPresignExpire is returned when the expire time provided to + // presign is invalid + ErrCodeInvalidPresignExpire = "InvalidPresignExpireError" + // CanceledErrorCode is the error code that will be returned by an // API request that was canceled. Requests given a aws.Context may // return this error when canceled. @@ -42,7 +47,6 @@ type Request struct { Retryer Time time.Time - ExpireTime time.Duration Operation *Operation HTTPRequest *http.Request HTTPResponse *http.Response @@ -60,6 +64,11 @@ type Request struct { LastSignedAt time.Time DisableFollowRedirects bool + // A value greater than 0 instructs the request to be signed as Presigned URL + // You should not set this field directly. Instead use Request's + // Presign or PresignRequest methods. + ExpireTime time.Duration + context aws.Context built bool @@ -104,6 +113,8 @@ func New(cfg aws.Config, clientInfo metadata.ClientInfo, handlers Handlers, err = awserr.New("InvalidEndpointURL", "invalid endpoint uri", err) } + SanitizeHostForHeader(httpReq) + r := &Request{ Config: cfg, ClientInfo: clientInfo, @@ -214,6 +225,9 @@ func (r *Request) SetContext(ctx aws.Context) { // WillRetry returns if the request's can be retried. func (r *Request) WillRetry() bool { + if !aws.IsReaderSeekable(r.Body) && r.HTTPRequest.Body != NoBody { + return false + } return r.Error != nil && aws.BoolValue(r.Retryable) && r.RetryCount < r.MaxRetries() } @@ -245,45 +259,70 @@ func (r *Request) SetStringBody(s string) { // SetReaderBody will set the request's body reader. func (r *Request) SetReaderBody(reader io.ReadSeeker) { r.Body = reader + r.BodyStart, _ = reader.Seek(0, sdkio.SeekCurrent) // Get the Bodies current offset. r.ResetBody() } // Presign returns the request's signed URL. Error will be returned // if the signing fails. -func (r *Request) Presign(expireTime time.Duration) (string, error) { - r.ExpireTime = expireTime +// +// It is invalid to create a presigned URL with a expire duration 0 or less. An +// error is returned if expire duration is 0 or less. +func (r *Request) Presign(expire time.Duration) (string, error) { + r = r.copy() + + // Presign requires all headers be hoisted. There is no way to retrieve + // the signed headers not hoisted without this. Making the presigned URL + // useless. r.NotHoist = false - if r.Operation.BeforePresignFn != nil { - r = r.copy() - err := r.Operation.BeforePresignFn(r) - if err != nil { - return "", err - } - } - - r.Sign() - if r.Error != nil { - return "", r.Error - } - return r.HTTPRequest.URL.String(), nil + u, _, err := getPresignedURL(r, expire) + return u, err } // PresignRequest behaves just like presign, with the addition of returning a // set of headers that were signed. // +// It is invalid to create a presigned URL with a expire duration 0 or less. An +// error is returned if expire duration is 0 or less. +// // Returns the URL string for the API operation with signature in the query string, // and the HTTP headers that were included in the signature. These headers must // be included in any HTTP request made with the presigned URL. // // To prevent hoisting any headers to the query string set NotHoist to true on // this Request value prior to calling PresignRequest. -func (r *Request) PresignRequest(expireTime time.Duration) (string, http.Header, error) { - r.ExpireTime = expireTime - r.Sign() - if r.Error != nil { - return "", nil, r.Error +func (r *Request) PresignRequest(expire time.Duration) (string, http.Header, error) { + r = r.copy() + return getPresignedURL(r, expire) +} + +// IsPresigned returns true if the request represents a presigned API url. +func (r *Request) IsPresigned() bool { + return r.ExpireTime != 0 +} + +func getPresignedURL(r *Request, expire time.Duration) (string, http.Header, error) { + if expire <= 0 { + return "", nil, awserr.New( + ErrCodeInvalidPresignExpire, + "presigned URL requires an expire duration greater than 0", + nil, + ) + } + + r.ExpireTime = expire + + if r.Operation.BeforePresignFn != nil { + if err := r.Operation.BeforePresignFn(r); err != nil { + return "", nil, err + } + } + + if err := r.Sign(); err != nil { + return "", nil, err } + return r.HTTPRequest.URL.String(), r.SignedHeaderVals, nil } @@ -303,7 +342,7 @@ func debugLogReqError(r *Request, stage string, retrying bool, err error) { // Build will build the request's object so it can be signed and sent // to the service. Build will also validate all the request's parameters. -// Anny additional build Handlers set on this request will be run +// Any additional build Handlers set on this request will be run // in the order they were set. // // The request will only be built once. Multiple calls to build will have @@ -364,7 +403,7 @@ func (r *Request) getNextRequestBody() (io.ReadCloser, error) { // of the SDK if they used that field. // // Related golang/go#18257 - l, err := computeBodyLength(r.Body) + l, err := aws.SeekerLen(r.Body) if err != nil { return nil, awserr.New(ErrCodeSerialization, "failed to compute request body size", err) } @@ -382,7 +421,8 @@ func (r *Request) getNextRequestBody() (io.ReadCloser, error) { // Transfer-Encoding: chunked bodies for these methods. // // This would only happen if a aws.ReaderSeekerCloser was used with - // a io.Reader that was not also an io.Seeker. + // a io.Reader that was not also an io.Seeker, or did not implement + // Len() method. switch r.Operation.HTTPMethod { case "GET", "HEAD", "DELETE": body = NoBody @@ -394,42 +434,6 @@ func (r *Request) getNextRequestBody() (io.ReadCloser, error) { return body, nil } -// Attempts to compute the length of the body of the reader using the -// io.Seeker interface. If the value is not seekable because of being -// a ReaderSeekerCloser without an unerlying Seeker -1 will be returned. -// If no error occurs the length of the body will be returned. -func computeBodyLength(r io.ReadSeeker) (int64, error) { - seekable := true - // Determine if the seeker is actually seekable. ReaderSeekerCloser - // hides the fact that a io.Readers might not actually be seekable. - switch v := r.(type) { - case aws.ReaderSeekerCloser: - seekable = v.IsSeeker() - case *aws.ReaderSeekerCloser: - seekable = v.IsSeeker() - } - if !seekable { - return -1, nil - } - - curOffset, err := r.Seek(0, 1) - if err != nil { - return 0, err - } - - endOffset, err := r.Seek(0, 2) - if err != nil { - return 0, err - } - - _, err = r.Seek(curOffset, 0) - if err != nil { - return 0, err - } - - return endOffset - curOffset, nil -} - // GetBody will return an io.ReadSeeker of the Request's underlying // input body with a concurrency safe wrapper. func (r *Request) GetBody() io.ReadSeeker { @@ -579,3 +583,72 @@ func shouldRetryCancel(r *Request) bool { errStr != "net/http: request canceled while waiting for connection") } + +// SanitizeHostForHeader removes default port from host and updates request.Host +func SanitizeHostForHeader(r *http.Request) { + host := getHost(r) + port := portOnly(host) + if port != "" && isDefaultPort(r.URL.Scheme, port) { + r.Host = stripPort(host) + } +} + +// Returns host from request +func getHost(r *http.Request) string { + if r.Host != "" { + return r.Host + } + + return r.URL.Host +} + +// Hostname returns u.Host, without any port number. +// +// If Host is an IPv6 literal with a port number, Hostname returns the +// IPv6 literal without the square brackets. IPv6 literals may include +// a zone identifier. +// +// Copied from the Go 1.8 standard library (net/url) +func stripPort(hostport string) string { + colon := strings.IndexByte(hostport, ':') + if colon == -1 { + return hostport + } + if i := strings.IndexByte(hostport, ']'); i != -1 { + return strings.TrimPrefix(hostport[:i], "[") + } + return hostport[:colon] +} + +// Port returns the port part of u.Host, without the leading colon. +// If u.Host doesn't contain a port, Port returns an empty string. +// +// Copied from the Go 1.8 standard library (net/url) +func portOnly(hostport string) string { + colon := strings.IndexByte(hostport, ':') + if colon == -1 { + return "" + } + if i := strings.Index(hostport, "]:"); i != -1 { + return hostport[i+len("]:"):] + } + if strings.Contains(hostport, "]") { + return "" + } + return hostport[colon+len(":"):] +} + +// Returns true if the specified URI is using the standard port +// (i.e. port 80 for HTTP URIs or 443 for HTTPS URIs) +func isDefaultPort(scheme, port string) bool { + if port == "" { + return true + } + + lowerCaseScheme := strings.ToLower(scheme) + if (lowerCaseScheme == "http" && port == "80") || (lowerCaseScheme == "https" && port == "443") { + return true + } + + return false +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination.go index 59de6736b..159518a75 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination.go @@ -142,13 +142,28 @@ func (r *Request) nextPageTokens() []interface{} { tokens := []interface{}{} tokenAdded := false for _, outToken := range r.Operation.OutputTokens { - v, _ := awsutil.ValuesAtPath(r.Data, outToken) - if len(v) > 0 { - tokens = append(tokens, v[0]) - tokenAdded = true - } else { + vs, _ := awsutil.ValuesAtPath(r.Data, outToken) + if len(vs) == 0 { tokens = append(tokens, nil) + continue } + v := vs[0] + + switch tv := v.(type) { + case *string: + if len(aws.StringValue(tv)) == 0 { + tokens = append(tokens, nil) + continue + } + case string: + if len(tv) == 0 { + tokens = append(tokens, nil) + continue + } + } + + tokenAdded = true + tokens = append(tokens, v) } if !tokenAdded { return nil diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination_test.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination_test.go index 73a95bad8..b942e014f 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination_test.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination_test.go @@ -454,78 +454,93 @@ func TestPaginationWithContextNilInput(t *testing.T) { } } -type testPageInput struct { - NextToken string -} -type testPageOutput struct { - Value string - NextToken *string -} - func TestPagination_Standalone(t *testing.T) { - expect := []struct { - Value, PrevToken, NextToken string - }{ - {"FirstValue", "InitalToken", "FirstToken"}, - {"SecondValue", "FirstToken", "SecondToken"}, - {"ThirdValue", "SecondToken", ""}, + type testPageInput struct { + NextToken *string } - input := testPageInput{ - NextToken: expect[0].PrevToken, + type testPageOutput struct { + Value *string + NextToken *string + } + type testCase struct { + Value, PrevToken, NextToken *string } - c := awstesting.NewClient() - i := 0 - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - r := c.NewRequest( - &request.Operation{ - Name: "Operation", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - }, - }, - &input, &testPageOutput{}, - ) - // Setup handlers for testing - r.Handlers.Clear() - r.Handlers.Build.PushBack(func(req *request.Request) { - in := req.Params.(*testPageInput) - if e, a := expect[i].PrevToken, in.NextToken; e != a { - t.Errorf("%d, expect NextToken input %q, got %q", i, e, a) - } - }) - r.Handlers.Unmarshal.PushBack(func(req *request.Request) { - out := &testPageOutput{ - Value: expect[i].Value, - } - if len(expect[i].NextToken) > 0 { - out.NextToken = aws.String(expect[i].NextToken) - } - req.Data = out - }) - return r, nil + cases := [][]testCase{ + { + testCase{aws.String("FirstValue"), aws.String("InitalToken"), aws.String("FirstToken")}, + testCase{aws.String("SecondValue"), aws.String("FirstToken"), aws.String("SecondToken")}, + testCase{aws.String("ThirdValue"), aws.String("SecondToken"), nil}, + }, + { + testCase{aws.String("FirstValue"), aws.String("InitalToken"), aws.String("FirstToken")}, + testCase{aws.String("SecondValue"), aws.String("FirstToken"), aws.String("SecondToken")}, + testCase{aws.String("ThirdValue"), aws.String("SecondToken"), aws.String("")}, }, } - for p.Next() { - data := p.Page().(*testPageOutput) - - if e, a := expect[i].Value, data.Value; e != a { - t.Errorf("%d, expect Value to be %q, got %q", i, e, a) + for _, c := range cases { + input := testPageInput{ + NextToken: c[0].PrevToken, } - if e, a := expect[i].NextToken, aws.StringValue(data.NextToken); e != a { - t.Errorf("%d, expect NextToken to be %q, got %q", i, e, a) + + svc := awstesting.NewClient() + i := 0 + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + r := svc.NewRequest( + &request.Operation{ + Name: "Operation", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + }, + }, + &input, &testPageOutput{}, + ) + // Setup handlers for testing + r.Handlers.Clear() + r.Handlers.Build.PushBack(func(req *request.Request) { + if e, a := len(c), i+1; a > e { + t.Fatalf("expect no more than %d requests, got %d", e, a) + } + in := req.Params.(*testPageInput) + if e, a := aws.StringValue(c[i].PrevToken), aws.StringValue(in.NextToken); e != a { + t.Errorf("%d, expect NextToken input %q, got %q", i, e, a) + } + }) + r.Handlers.Unmarshal.PushBack(func(req *request.Request) { + out := &testPageOutput{ + Value: c[i].Value, + } + if c[i].NextToken != nil { + next := *c[i].NextToken + out.NextToken = aws.String(next) + } + req.Data = out + }) + return r, nil + }, } - i++ - } - if e, a := len(expect), i; e != a { - t.Errorf("expected to process %d pages, did %d", e, a) - } - if err := p.Err(); err != nil { - t.Fatalf("%d, expected no error, got %v", i, err) + for p.Next() { + data := p.Page().(*testPageOutput) + + if e, a := aws.StringValue(c[i].Value), aws.StringValue(data.Value); e != a { + t.Errorf("%d, expect Value to be %q, got %q", i, e, a) + } + if e, a := aws.StringValue(c[i].NextToken), aws.StringValue(data.NextToken); e != a { + t.Errorf("%d, expect NextToken to be %q, got %q", i, e, a) + } + + i++ + } + if e, a := len(c), i; e != a { + t.Errorf("expected to process %d pages, did %d", e, a) + } + if err := p.Err(); err != nil { + t.Fatalf("%d, expected no error, got %v", i, err) + } } } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request_resetbody_test.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request_resetbody_test.go index 4a9172480..d7845b752 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/request_resetbody_test.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/request_resetbody_test.go @@ -2,6 +2,7 @@ package request import ( "bytes" + "io" "net/http" "strings" "testing" @@ -25,21 +26,70 @@ func TestResetBody_WithBodyContents(t *testing.T) { } } -func TestResetBody_ExcludeUnseekableBodyByMethod(t *testing.T) { +type mockReader struct{} + +func (mockReader) Read([]byte) (int, error) { + return 0, io.EOF +} + +func TestResetBody_ExcludeEmptyUnseekableBodyByMethod(t *testing.T) { cases := []struct { Method string + Body io.ReadSeeker IsNoBody bool }{ - {"GET", true}, - {"HEAD", true}, - {"DELETE", true}, - {"PUT", false}, - {"PATCH", false}, - {"POST", false}, + { + Method: "GET", + IsNoBody: true, + Body: aws.ReadSeekCloser(mockReader{}), + }, + { + Method: "HEAD", + IsNoBody: true, + Body: aws.ReadSeekCloser(mockReader{}), + }, + { + Method: "DELETE", + IsNoBody: true, + Body: aws.ReadSeekCloser(mockReader{}), + }, + { + Method: "PUT", + IsNoBody: false, + Body: aws.ReadSeekCloser(mockReader{}), + }, + { + Method: "PATCH", + IsNoBody: false, + Body: aws.ReadSeekCloser(mockReader{}), + }, + { + Method: "POST", + IsNoBody: false, + Body: aws.ReadSeekCloser(mockReader{}), + }, + { + Method: "GET", + IsNoBody: false, + Body: aws.ReadSeekCloser(bytes.NewBuffer([]byte("abc"))), + }, + { + Method: "GET", + IsNoBody: true, + Body: aws.ReadSeekCloser(bytes.NewBuffer(nil)), + }, + { + Method: "POST", + IsNoBody: false, + Body: aws.ReadSeekCloser(bytes.NewBuffer([]byte("abc"))), + }, + { + Method: "POST", + IsNoBody: true, + Body: aws.ReadSeekCloser(bytes.NewBuffer(nil)), + }, } - reader := aws.ReadSeekCloser(bytes.NewBuffer([]byte("abc"))) - for i, c := range cases { r := Request{ HTTPRequest: &http.Request{}, @@ -47,8 +97,7 @@ func TestResetBody_ExcludeUnseekableBodyByMethod(t *testing.T) { HTTPMethod: c.Method, }, } - - r.SetReaderBody(reader) + r.SetReaderBody(c.Body) if a, e := r.HTTPRequest.Body == NoBody, c.IsNoBody; a != e { t.Errorf("%d, expect body to be set to noBody(%t), but was %t", i, e, a) diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request_test.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request_test.go index 4d9258c0a..0e4cef06b 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/request_test.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/request_test.go @@ -8,9 +8,11 @@ import ( "io/ioutil" "net/http" "net/http/httptest" + "net/url" "reflect" "runtime" "strconv" + "strings" "testing" "time" @@ -20,6 +22,7 @@ import ( "github.com/aws/aws-sdk-go/aws/client/metadata" "github.com/aws/aws-sdk-go/aws/corehandlers" "github.com/aws/aws-sdk-go/aws/credentials" + "github.com/aws/aws-sdk-go/aws/defaults" "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/aws/signer/v4" "github.com/aws/aws-sdk-go/awstesting" @@ -80,7 +83,7 @@ func TestRequestRecoverRetry5xx(t *testing.T) { reqNum := 0 reqs := []http.Response{ {StatusCode: 500, Body: body(`{"__type":"UnknownError","message":"An error occurred."}`)}, - {StatusCode: 501, Body: body(`{"__type":"UnknownError","message":"An error occurred."}`)}, + {StatusCode: 502, Body: body(`{"__type":"UnknownError","message":"An error occurred."}`)}, {StatusCode: 200, Body: body(`{"data":"valid"}`)}, } @@ -112,7 +115,8 @@ func TestRequestRecoverRetry4xxRetryable(t *testing.T) { reqNum := 0 reqs := []http.Response{ {StatusCode: 400, Body: body(`{"__type":"Throttling","message":"Rate exceeded."}`)}, - {StatusCode: 429, Body: body(`{"__type":"ProvisionedThroughputExceededException","message":"Rate exceeded."}`)}, + {StatusCode: 400, Body: body(`{"__type":"ProvisionedThroughputExceededException","message":"Rate exceeded."}`)}, + {StatusCode: 429, Body: body(`{"__type":"FooException","message":"Rate exceeded."}`)}, {StatusCode: 200, Body: body(`{"data":"valid"}`)}, } @@ -131,7 +135,7 @@ func TestRequestRecoverRetry4xxRetryable(t *testing.T) { if err != nil { t.Fatalf("expect no error, but got %v", err) } - if e, a := 2, int(r.RetryCount); e != a { + if e, a := 3, int(r.RetryCount); e != a { t.Errorf("expect %d retry count, got %d", e, a) } if e, a := "valid", out.Data; e != a { @@ -842,3 +846,276 @@ func TestRequest_TemporaryRetry(t *testing.T) { t.Errorf("expect temporary error, was not") } } + +func TestRequest_Presign(t *testing.T) { + presign := func(r *request.Request, expire time.Duration) (string, http.Header, error) { + u, err := r.Presign(expire) + return u, nil, err + } + presignRequest := func(r *request.Request, expire time.Duration) (string, http.Header, error) { + return r.PresignRequest(expire) + } + mustParseURL := func(v string) *url.URL { + u, err := url.Parse(v) + if err != nil { + panic(err) + } + return u + } + + cases := []struct { + Expire time.Duration + PresignFn func(*request.Request, time.Duration) (string, http.Header, error) + SignerFn func(*request.Request) + URL string + Header http.Header + Err string + }{ + { + PresignFn: presign, + Err: request.ErrCodeInvalidPresignExpire, + }, + { + PresignFn: presignRequest, + Err: request.ErrCodeInvalidPresignExpire, + }, + { + Expire: -1, + PresignFn: presign, + Err: request.ErrCodeInvalidPresignExpire, + }, + { + // Presign clear NotHoist + Expire: 1 * time.Minute, + PresignFn: func(r *request.Request, dur time.Duration) (string, http.Header, error) { + r.NotHoist = true + return presign(r, dur) + }, + SignerFn: func(r *request.Request) { + r.HTTPRequest.URL = mustParseURL("https://endpoint/presignedURL") + if r.NotHoist { + r.Error = fmt.Errorf("expect NotHoist to be cleared") + } + }, + URL: "https://endpoint/presignedURL", + }, + { + // PresignRequest does not clear NotHoist + Expire: 1 * time.Minute, + PresignFn: func(r *request.Request, dur time.Duration) (string, http.Header, error) { + r.NotHoist = true + return presignRequest(r, dur) + }, + SignerFn: func(r *request.Request) { + r.HTTPRequest.URL = mustParseURL("https://endpoint/presignedURL") + if !r.NotHoist { + r.Error = fmt.Errorf("expect NotHoist not to be cleared") + } + }, + URL: "https://endpoint/presignedURL", + }, + { + // PresignRequest returns signed headers + Expire: 1 * time.Minute, + PresignFn: presignRequest, + SignerFn: func(r *request.Request) { + r.HTTPRequest.URL = mustParseURL("https://endpoint/presignedURL") + r.HTTPRequest.Header.Set("UnsigndHeader", "abc") + r.SignedHeaderVals = http.Header{ + "X-Amzn-Header": []string{"abc", "123"}, + "X-Amzn-Header2": []string{"efg", "456"}, + } + }, + URL: "https://endpoint/presignedURL", + Header: http.Header{ + "X-Amzn-Header": []string{"abc", "123"}, + "X-Amzn-Header2": []string{"efg", "456"}, + }, + }, + } + + svc := awstesting.NewClient() + svc.Handlers.Clear() + for i, c := range cases { + req := svc.NewRequest(&request.Operation{ + Name: "name", HTTPMethod: "GET", HTTPPath: "/path", + }, &struct{}{}, &struct{}{}) + req.Handlers.Sign.PushBack(c.SignerFn) + + u, h, err := c.PresignFn(req, c.Expire) + if len(c.Err) != 0 { + if e, a := c.Err, err.Error(); !strings.Contains(a, e) { + t.Errorf("%d, expect %v to be in %v", i, e, a) + } + continue + } else if err != nil { + t.Errorf("%d, expect no error, got %v", i, err) + continue + } + if e, a := c.URL, u; e != a { + t.Errorf("%d, expect %v URL, got %v", i, e, a) + } + if e, a := c.Header, h; !reflect.DeepEqual(e, a) { + t.Errorf("%d, expect %v header got %v", i, e, a) + } + } +} + +func TestNew_EndpointWithDefaultPort(t *testing.T) { + endpoint := "https://estest.us-east-1.es.amazonaws.com:443" + expectedRequestHost := "estest.us-east-1.es.amazonaws.com" + + r := request.New( + aws.Config{}, + metadata.ClientInfo{Endpoint: endpoint}, + defaults.Handlers(), + client.DefaultRetryer{}, + &request.Operation{}, + nil, + nil, + ) + + if h := r.HTTPRequest.Host; h != expectedRequestHost { + t.Errorf("expect %v host, got %q", expectedRequestHost, h) + } +} + +func TestSanitizeHostForHeader(t *testing.T) { + cases := []struct { + url string + expectedRequestHost string + }{ + {"https://estest.us-east-1.es.amazonaws.com:443", "estest.us-east-1.es.amazonaws.com"}, + {"https://estest.us-east-1.es.amazonaws.com", "estest.us-east-1.es.amazonaws.com"}, + {"https://localhost:9200", "localhost:9200"}, + {"http://localhost:80", "localhost"}, + {"http://localhost:8080", "localhost:8080"}, + } + + for _, c := range cases { + r, _ := http.NewRequest("GET", c.url, nil) + request.SanitizeHostForHeader(r) + + if h := r.Host; h != c.expectedRequestHost { + t.Errorf("expect %v host, got %q", c.expectedRequestHost, h) + } + } +} + +func TestRequestWillRetry_ByBody(t *testing.T) { + svc := awstesting.NewClient() + + cases := []struct { + WillRetry bool + HTTPMethod string + Body io.ReadSeeker + IsReqNoBody bool + }{ + { + WillRetry: true, + HTTPMethod: "GET", + Body: bytes.NewReader([]byte{}), + IsReqNoBody: true, + }, + { + WillRetry: true, + HTTPMethod: "GET", + Body: bytes.NewReader(nil), + IsReqNoBody: true, + }, + { + WillRetry: true, + HTTPMethod: "POST", + Body: bytes.NewReader([]byte("abc123")), + }, + { + WillRetry: true, + HTTPMethod: "POST", + Body: aws.ReadSeekCloser(bytes.NewReader([]byte("abc123"))), + }, + { + WillRetry: true, + HTTPMethod: "GET", + Body: aws.ReadSeekCloser(bytes.NewBuffer(nil)), + IsReqNoBody: true, + }, + { + WillRetry: true, + HTTPMethod: "POST", + Body: aws.ReadSeekCloser(bytes.NewBuffer(nil)), + IsReqNoBody: true, + }, + { + WillRetry: false, + HTTPMethod: "POST", + Body: aws.ReadSeekCloser(bytes.NewBuffer([]byte("abc123"))), + }, + } + + for i, c := range cases { + req := svc.NewRequest(&request.Operation{ + Name: "Operation", + HTTPMethod: c.HTTPMethod, + HTTPPath: "/", + }, nil, nil) + req.SetReaderBody(c.Body) + req.Build() + + req.Error = fmt.Errorf("some error") + req.Retryable = aws.Bool(true) + req.HTTPResponse = &http.Response{ + StatusCode: 500, + } + + if e, a := c.IsReqNoBody, request.NoBody == req.HTTPRequest.Body; e != a { + t.Errorf("%d, expect request to be no body, %t, got %t, %T", i, e, a, req.HTTPRequest.Body) + } + + if e, a := c.WillRetry, req.WillRetry(); e != a { + t.Errorf("%d, expect %t willRetry, got %t", i, e, a) + } + + if req.Error == nil { + t.Fatalf("%d, expect error, got none", i) + } + if e, a := "some error", req.Error.Error(); !strings.Contains(a, e) { + t.Errorf("%d, expect %q error in %q", i, e, a) + } + if e, a := 0, req.RetryCount; e != a { + t.Errorf("%d, expect retry count to be %d, got %d", i, e, a) + } + } +} + +func Test501NotRetrying(t *testing.T) { + reqNum := 0 + reqs := []http.Response{ + {StatusCode: 500, Body: body(`{"__type":"UnknownError","message":"An error occurred."}`)}, + {StatusCode: 501, Body: body(`{"__type":"NotImplemented","message":"An error occurred."}`)}, + {StatusCode: 200, Body: body(`{"data":"valid"}`)}, + } + + s := awstesting.NewClient(aws.NewConfig().WithMaxRetries(10)) + s.Handlers.Validate.Clear() + s.Handlers.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() + if err == nil { + t.Fatal("expect error, but got none") + } + + aerr := err.(awserr.Error) + if e, a := "NotImplemented", aerr.Code(); e != a { + t.Errorf("expected error code %q, but received %q", e, a) + } + if e, a := 1, int(r.RetryCount); e != a { + t.Errorf("expect %d retry count, got %d", e, a) + } +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go b/vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go index f1adcf481..12b452177 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go @@ -5,6 +5,7 @@ import ( "strconv" "github.com/aws/aws-sdk-go/aws/credentials" + "github.com/aws/aws-sdk-go/aws/defaults" ) // EnvProviderName provides a name of the provider when config is loaded from environment. @@ -176,6 +177,13 @@ func envConfigLoad(enableSharedConfig bool) envConfig { setFromEnvVal(&cfg.SharedCredentialsFile, sharedCredsFileEnvKey) setFromEnvVal(&cfg.SharedConfigFile, sharedConfigFileEnvKey) + if len(cfg.SharedCredentialsFile) == 0 { + cfg.SharedCredentialsFile = defaults.SharedCredentialsFilename() + } + if len(cfg.SharedConfigFile) == 0 { + cfg.SharedConfigFile = defaults.SharedConfigFilename() + } + cfg.CustomCABundle = os.Getenv("AWS_CA_BUNDLE") return cfg diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/env_config_test.go b/vendor/github.com/aws/aws-sdk-go/aws/session/env_config_test.go index 10e3662a2..3a0b6464d 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/session/env_config_test.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/session/env_config_test.go @@ -7,6 +7,7 @@ import ( "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/awstesting" + "github.com/aws/aws-sdk-go/internal/shareddefaults" ) func TestLoadEnvConfig_Creds(t *testing.T) { @@ -105,6 +106,8 @@ func TestLoadEnvConfig(t *testing.T) { }, Config: envConfig{ Region: "region", Profile: "profile", + SharedCredentialsFile: shareddefaults.SharedCredentialsFilename(), + SharedConfigFile: shareddefaults.SharedConfigFilename(), }, }, { @@ -116,6 +119,8 @@ func TestLoadEnvConfig(t *testing.T) { }, Config: envConfig{ Region: "region", Profile: "profile", + SharedCredentialsFile: shareddefaults.SharedCredentialsFilename(), + SharedConfigFile: shareddefaults.SharedConfigFilename(), }, }, { @@ -128,7 +133,9 @@ func TestLoadEnvConfig(t *testing.T) { }, Config: envConfig{ Region: "region", Profile: "profile", - EnableSharedConfig: true, + EnableSharedConfig: true, + SharedCredentialsFile: shareddefaults.SharedCredentialsFilename(), + SharedConfigFile: shareddefaults.SharedConfigFilename(), }, }, { @@ -136,6 +143,10 @@ func TestLoadEnvConfig(t *testing.T) { "AWS_DEFAULT_REGION": "default_region", "AWS_DEFAULT_PROFILE": "default_profile", }, + Config: envConfig{ + SharedCredentialsFile: shareddefaults.SharedCredentialsFilename(), + SharedConfigFile: shareddefaults.SharedConfigFilename(), + }, }, { Env: map[string]string{ @@ -145,7 +156,9 @@ func TestLoadEnvConfig(t *testing.T) { }, Config: envConfig{ Region: "default_region", Profile: "default_profile", - EnableSharedConfig: true, + EnableSharedConfig: true, + SharedCredentialsFile: shareddefaults.SharedCredentialsFilename(), + SharedConfigFile: shareddefaults.SharedConfigFilename(), }, }, { @@ -155,7 +168,9 @@ func TestLoadEnvConfig(t *testing.T) { }, Config: envConfig{ Region: "region", Profile: "profile", - EnableSharedConfig: true, + EnableSharedConfig: true, + SharedCredentialsFile: shareddefaults.SharedCredentialsFilename(), + SharedConfigFile: shareddefaults.SharedConfigFilename(), }, UseSharedConfigCall: true, }, @@ -168,7 +183,9 @@ func TestLoadEnvConfig(t *testing.T) { }, Config: envConfig{ Region: "region", Profile: "profile", - EnableSharedConfig: true, + EnableSharedConfig: true, + SharedCredentialsFile: shareddefaults.SharedCredentialsFilename(), + SharedConfigFile: shareddefaults.SharedConfigFilename(), }, UseSharedConfigCall: true, }, @@ -182,7 +199,9 @@ func TestLoadEnvConfig(t *testing.T) { }, Config: envConfig{ Region: "region", Profile: "profile", - EnableSharedConfig: true, + EnableSharedConfig: true, + SharedCredentialsFile: shareddefaults.SharedCredentialsFilename(), + SharedConfigFile: shareddefaults.SharedConfigFilename(), }, UseSharedConfigCall: true, }, @@ -193,7 +212,9 @@ func TestLoadEnvConfig(t *testing.T) { }, Config: envConfig{ Region: "default_region", Profile: "default_profile", - EnableSharedConfig: true, + EnableSharedConfig: true, + SharedCredentialsFile: shareddefaults.SharedCredentialsFilename(), + SharedConfigFile: shareddefaults.SharedConfigFilename(), }, UseSharedConfigCall: true, }, @@ -205,7 +226,9 @@ func TestLoadEnvConfig(t *testing.T) { }, Config: envConfig{ Region: "default_region", Profile: "default_profile", - EnableSharedConfig: true, + EnableSharedConfig: true, + SharedCredentialsFile: shareddefaults.SharedCredentialsFilename(), + SharedConfigFile: shareddefaults.SharedConfigFilename(), }, UseSharedConfigCall: true, }, @@ -214,7 +237,9 @@ func TestLoadEnvConfig(t *testing.T) { "AWS_CA_BUNDLE": "custom_ca_bundle", }, Config: envConfig{ - CustomCABundle: "custom_ca_bundle", + CustomCABundle: "custom_ca_bundle", + SharedCredentialsFile: shareddefaults.SharedCredentialsFilename(), + SharedConfigFile: shareddefaults.SharedConfigFilename(), }, }, { @@ -222,8 +247,10 @@ func TestLoadEnvConfig(t *testing.T) { "AWS_CA_BUNDLE": "custom_ca_bundle", }, Config: envConfig{ - CustomCABundle: "custom_ca_bundle", - EnableSharedConfig: true, + CustomCABundle: "custom_ca_bundle", + EnableSharedConfig: true, + SharedCredentialsFile: shareddefaults.SharedCredentialsFilename(), + SharedConfigFile: shareddefaults.SharedConfigFilename(), }, UseSharedConfigCall: true, }, diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/session.go b/vendor/github.com/aws/aws-sdk-go/aws/session/session.go index 9f75d5ac5..259b5c0fe 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/session/session.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/session/session.go @@ -26,7 +26,7 @@ import ( // Sessions are safe to create service clients concurrently, but it is not safe // to mutate the Session concurrently. // -// The Session satisfies the service client's client.ClientConfigProvider. +// The Session satisfies the service client's client.ConfigProvider. type Session struct { Config *aws.Config Handlers request.Handlers @@ -58,7 +58,12 @@ func New(cfgs ...*aws.Config) *Session { envCfg := loadEnvConfig() if envCfg.EnableSharedConfig { - s, err := newSession(Options{}, envCfg, cfgs...) + var cfg aws.Config + cfg.MergeIn(cfgs...) + s, err := NewSessionWithOptions(Options{ + Config: cfg, + SharedConfigState: SharedConfigEnable, + }) if err != nil { // Old session.New expected all errors to be discovered when // a request is made, and would report the errors then. This @@ -243,13 +248,6 @@ func NewSessionWithOptions(opts Options) (*Session, error) { envCfg.EnableSharedConfig = true } - if len(envCfg.SharedCredentialsFile) == 0 { - envCfg.SharedCredentialsFile = defaults.SharedCredentialsFilename() - } - if len(envCfg.SharedConfigFile) == 0 { - envCfg.SharedConfigFile = defaults.SharedConfigFilename() - } - // Only use AWS_CA_BUNDLE if session option is not provided. if len(envCfg.CustomCABundle) != 0 && opts.CustomCABundle == nil { f, err := os.Open(envCfg.CustomCABundle) @@ -573,11 +571,12 @@ func (s *Session) clientConfigWithErr(serviceName string, cfgs ...*aws.Config) ( } return client.Config{ - Config: s.Config, - Handlers: s.Handlers, - Endpoint: resolved.URL, - SigningRegion: resolved.SigningRegion, - SigningName: resolved.SigningName, + Config: s.Config, + Handlers: s.Handlers, + Endpoint: resolved.URL, + SigningRegion: resolved.SigningRegion, + SigningNameDerived: resolved.SigningNameDerived, + SigningName: resolved.SigningName, }, err } @@ -597,10 +596,11 @@ func (s *Session) ClientConfigNoResolveEndpoint(cfgs ...*aws.Config) client.Conf } return client.Config{ - Config: s.Config, - Handlers: s.Handlers, - Endpoint: resolved.URL, - SigningRegion: resolved.SigningRegion, - SigningName: resolved.SigningName, + Config: s.Config, + Handlers: s.Handlers, + Endpoint: resolved.URL, + SigningRegion: resolved.SigningRegion, + SigningNameDerived: resolved.SigningNameDerived, + SigningName: resolved.SigningName, } } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/session_test.go b/vendor/github.com/aws/aws-sdk-go/aws/session/session_test.go index d0ab360e2..9612b3150 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/session/session_test.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/session/session_test.go @@ -14,6 +14,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/aws/defaults" + "github.com/aws/aws-sdk-go/aws/endpoints" "github.com/aws/aws-sdk-go/awstesting" "github.com/aws/aws-sdk-go/service/s3" ) @@ -89,14 +90,31 @@ func TestSessionCopy(t *testing.T) { } func TestSessionClientConfig(t *testing.T) { - s, err := NewSession(&aws.Config{Region: aws.String("orig_region")}) + s, err := NewSession(&aws.Config{ + Credentials: credentials.AnonymousCredentials, + Region: aws.String("orig_region"), + EndpointResolver: endpoints.ResolverFunc( + func(service, region string, opts ...func(*endpoints.Options)) (endpoints.ResolvedEndpoint, error) { + if e, a := "mock-service", service; e != a { + t.Errorf("expect %q service, got %q", e, a) + } + if e, a := "other-region", region; e != a { + t.Errorf("expect %q region, got %q", e, a) + } + return endpoints.ResolvedEndpoint{ + URL: "https://" + service + "." + region + ".amazonaws.com", + SigningRegion: region, + }, nil + }, + ), + }) assert.NoError(t, err) - cfg := s.ClientConfig("s3", &aws.Config{Region: aws.String("us-west-2")}) + cfg := s.ClientConfig("mock-service", &aws.Config{Region: aws.String("other-region")}) - assert.Equal(t, "https://s3-us-west-2.amazonaws.com", cfg.Endpoint) - assert.Equal(t, "us-west-2", cfg.SigningRegion) - assert.Equal(t, "us-west-2", *cfg.Config.Region) + assert.Equal(t, "https://mock-service.other-region.amazonaws.com", cfg.Endpoint) + assert.Equal(t, "other-region", cfg.SigningRegion) + assert.Equal(t, "other-region", *cfg.Config.Region) } func TestNewSession_NoCredentials(t *testing.T) { diff --git a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/functional_1_5_test.go b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/functional_1_5_test.go index 2d4621c64..2e591c27f 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/functional_1_5_test.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/functional_1_5_test.go @@ -10,7 +10,6 @@ import ( "github.com/aws/aws-sdk-go/aws/signer/v4" "github.com/aws/aws-sdk-go/awstesting/unit" - "github.com/stretchr/testify/assert" ) func TestStandaloneSign(t *testing.T) { @@ -22,7 +21,9 @@ func TestStandaloneSign(t *testing.T) { c.SubDomain, c.Region, c.Service) req, err := http.NewRequest("GET", host, nil) - assert.NoError(t, err) + if err != nil { + t.Errorf("expected no error, but received %v", err) + } // URL.EscapedPath() will be used by the signer to get the // escaped form of the request's URI path. @@ -30,12 +31,20 @@ func TestStandaloneSign(t *testing.T) { req.URL.RawQuery = c.OrigQuery _, err = signer.Sign(req, nil, c.Service, c.Region, time.Unix(0, 0)) - assert.NoError(t, err) + if err != nil { + t.Errorf("expected no error, but received %v", err) + } actual := req.Header.Get("Authorization") - assert.Equal(t, c.ExpSig, actual) - assert.Equal(t, c.OrigURI, req.URL.Path) - assert.Equal(t, c.EscapedURI, req.URL.EscapedPath()) + if e, a := c.ExpSig, actual; e != a { + t.Errorf("expected %v, but recieved %v", e, a) + } + if e, a := c.OrigURI, req.URL.Path; e != a { + t.Errorf("expected %v, but recieved %v", e, a) + } + if e, a := c.EscapedURI, req.URL.EscapedPath(); e != a { + t.Errorf("expected %v, but recieved %v", e, a) + } } } @@ -48,7 +57,9 @@ func TestStandaloneSign_RawPath(t *testing.T) { c.SubDomain, c.Region, c.Service) req, err := http.NewRequest("GET", host, nil) - assert.NoError(t, err) + if err != nil { + t.Errorf("expected no error, but received %v", err) + } // URL.EscapedPath() will be used by the signer to get the // escaped form of the request's URI path. @@ -57,11 +68,19 @@ func TestStandaloneSign_RawPath(t *testing.T) { req.URL.RawQuery = c.OrigQuery _, err = signer.Sign(req, nil, c.Service, c.Region, time.Unix(0, 0)) - assert.NoError(t, err) + if err != nil { + t.Errorf("expected no error, but received %v", err) + } actual := req.Header.Get("Authorization") - assert.Equal(t, c.ExpSig, actual) - assert.Equal(t, c.OrigURI, req.URL.Path) - assert.Equal(t, c.EscapedURI, req.URL.EscapedPath()) + if e, a := c.ExpSig, actual; e != a { + t.Errorf("expected %v, but recieved %v", e, a) + } + if e, a := c.OrigURI, req.URL.Path; e != a { + t.Errorf("expected %v, but recieved %v", e, a) + } + if e, a := c.EscapedURI, req.URL.EscapedPath(); e != a { + t.Errorf("expected %v, but recieved %v", e, a) + } } } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/functional_test.go b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/functional_test.go index c5341a935..93d664b23 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/functional_test.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/functional_test.go @@ -164,3 +164,91 @@ func TestStandaloneSign_CustomURIEscape(t *testing.T) { t.Errorf("expect %v, got %v", e, a) } } + +func TestStandaloneSign_WithPort(t *testing.T) { + + cases := []struct { + description string + url string + expectedSig string + }{ + { + "default HTTPS port", + "https://estest.us-east-1.es.amazonaws.com:443/_search", + "AWS4-HMAC-SHA256 Credential=AKID/19700101/us-east-1/es/aws4_request, SignedHeaders=host;x-amz-date;x-amz-security-token, Signature=e573fc9aa3a156b720976419319be98fb2824a3abc2ddd895ecb1d1611c6a82d", + }, + { + "default HTTP port", + "http://example.com:80/_search", + "AWS4-HMAC-SHA256 Credential=AKID/19700101/us-east-1/es/aws4_request, SignedHeaders=host;x-amz-date;x-amz-security-token, Signature=54ebe60c4ae03a40948b849e13c333523235f38002e2807059c64a9a8c7cb951", + }, + { + "non-standard HTTP port", + "http://example.com:9200/_search", + "AWS4-HMAC-SHA256 Credential=AKID/19700101/us-east-1/es/aws4_request, SignedHeaders=host;x-amz-date;x-amz-security-token, Signature=cd9d926a460f8d3b58b57beadbd87666dc667e014c0afaa4cea37b2867f51b4f", + }, + { + "non-standard HTTPS port", + "https://example.com:9200/_search", + "AWS4-HMAC-SHA256 Credential=AKID/19700101/us-east-1/es/aws4_request, SignedHeaders=host;x-amz-date;x-amz-security-token, Signature=cd9d926a460f8d3b58b57beadbd87666dc667e014c0afaa4cea37b2867f51b4f", + }, + } + + for _, c := range cases { + signer := v4.NewSigner(unit.Session.Config.Credentials) + req, _ := http.NewRequest("GET", c.url, nil) + _, err := signer.Sign(req, nil, "es", "us-east-1", time.Unix(0, 0)) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + actual := req.Header.Get("Authorization") + if e, a := c.expectedSig, actual; e != a { + t.Errorf("%s, expect %v, got %v", c.description, e, a) + } + } +} + +func TestStandalonePresign_WithPort(t *testing.T) { + + cases := []struct { + description string + url string + expectedSig string + }{ + { + "default HTTPS port", + "https://estest.us-east-1.es.amazonaws.com:443/_search", + "0abcf61a351063441296febf4b485734d780634fba8cf1e7d9769315c35255d6", + }, + { + "default HTTP port", + "http://example.com:80/_search", + "fce9976dd6c849c21adfa6d3f3e9eefc651d0e4a2ccd740d43efddcccfdc8179", + }, + { + "non-standard HTTP port", + "http://example.com:9200/_search", + "f33c25a81c735e42bef35ed5e9f720c43940562e3e616ff0777bf6dde75249b0", + }, + { + "non-standard HTTPS port", + "https://example.com:9200/_search", + "f33c25a81c735e42bef35ed5e9f720c43940562e3e616ff0777bf6dde75249b0", + }, + } + + for _, c := range cases { + signer := v4.NewSigner(unit.Session.Config.Credentials) + req, _ := http.NewRequest("GET", c.url, nil) + _, err := signer.Presign(req, nil, "es", "us-east-1", 5 * time.Minute, time.Unix(0, 0)) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + actual := req.URL.Query().Get("X-Amz-Signature") + if e, a := c.expectedSig, actual; e != a { + t.Errorf("%s, expect %v, got %v", c.description, e, a) + } + } +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/header_rules_test.go b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/header_rules_test.go index 7dfddc87e..f4be951ac 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/header_rules_test.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/header_rules_test.go @@ -2,8 +2,6 @@ package v4 import ( "testing" - - "github.com/stretchr/testify/assert" ) func TestRuleCheckWhitelist(t *testing.T) { @@ -13,8 +11,12 @@ func TestRuleCheckWhitelist(t *testing.T) { }, } - assert.True(t, w.IsValid("Cache-Control")) - assert.False(t, w.IsValid("Cache-")) + if !w.IsValid("Cache-Control") { + t.Error("expected true value") + } + if w.IsValid("Cache-") { + t.Error("expected false value") + } } func TestRuleCheckBlacklist(t *testing.T) { @@ -24,16 +26,26 @@ func TestRuleCheckBlacklist(t *testing.T) { }, } - assert.False(t, b.IsValid("Cache-Control")) - assert.True(t, b.IsValid("Cache-")) + if b.IsValid("Cache-Control") { + t.Error("expected false value") + } + if !b.IsValid("Cache-") { + t.Error("expected true value") + } } func TestRuleCheckPattern(t *testing.T) { p := patterns{"X-Amz-Meta-"} - assert.True(t, p.IsValid("X-Amz-Meta-")) - assert.True(t, p.IsValid("X-Amz-Meta-Star")) - assert.False(t, p.IsValid("Cache-")) + if !p.IsValid("X-Amz-Meta-") { + t.Error("expected true value") + } + if !p.IsValid("X-Amz-Meta-Star") { + t.Error("expected true value") + } + if p.IsValid("Cache-") { + t.Error("expected false value") + } } func TestRuleComplexWhitelist(t *testing.T) { @@ -50,8 +62,16 @@ func TestRuleComplexWhitelist(t *testing.T) { inclusiveRules{patterns{"X-Amz-"}, blacklist{w}}, } - assert.True(t, r.IsValid("X-Amz-Blah")) - assert.False(t, r.IsValid("X-Amz-Meta-")) - assert.False(t, r.IsValid("X-Amz-Meta-Star")) - assert.False(t, r.IsValid("Cache-Control")) + if !r.IsValid("X-Amz-Blah") { + t.Error("expected true value") + } + if r.IsValid("X-Amz-Meta-") { + t.Error("expected false value") + } + if r.IsValid("X-Amz-Meta-Star") { + t.Error("expected false value") + } + if r.IsValid("Cache-Control") { + t.Error("expected false value") + } } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go index 15da57249..6e4637612 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go @@ -71,6 +71,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/internal/sdkio" "github.com/aws/aws-sdk-go/private/protocol/rest" ) @@ -268,7 +269,7 @@ type signingCtx struct { // "X-Amz-Content-Sha256" header with a precomputed value. The signer will // only compute the hash if the request header value is empty. func (v4 Signer) Sign(r *http.Request, body io.ReadSeeker, service, region string, signTime time.Time) (http.Header, error) { - return v4.signWithBody(r, body, service, region, 0, signTime) + return v4.signWithBody(r, body, service, region, 0, false, signTime) } // Presign signs AWS v4 requests with the provided body, service name, region @@ -302,10 +303,10 @@ func (v4 Signer) Sign(r *http.Request, body io.ReadSeeker, service, region strin // presigned request's signature you can set the "X-Amz-Content-Sha256" // HTTP header and that will be included in the request's signature. func (v4 Signer) Presign(r *http.Request, body io.ReadSeeker, service, region string, exp time.Duration, signTime time.Time) (http.Header, error) { - return v4.signWithBody(r, body, service, region, exp, signTime) + return v4.signWithBody(r, body, service, region, exp, true, signTime) } -func (v4 Signer) signWithBody(r *http.Request, body io.ReadSeeker, service, region string, exp time.Duration, signTime time.Time) (http.Header, error) { +func (v4 Signer) signWithBody(r *http.Request, body io.ReadSeeker, service, region string, exp time.Duration, isPresign bool, signTime time.Time) (http.Header, error) { currentTimeFn := v4.currentTimeFn if currentTimeFn == nil { currentTimeFn = time.Now @@ -317,7 +318,7 @@ func (v4 Signer) signWithBody(r *http.Request, body io.ReadSeeker, service, regi Query: r.URL.Query(), Time: signTime, ExpireTime: exp, - isPresign: exp != 0, + isPresign: isPresign, ServiceName: service, Region: region, DisableURIPathEscaping: v4.DisableURIPathEscaping, @@ -339,8 +340,11 @@ func (v4 Signer) signWithBody(r *http.Request, body io.ReadSeeker, service, regi return http.Header{}, err } + ctx.sanitizeHostForHeader() ctx.assignAmzQueryValues() - ctx.build(v4.DisableHeaderHoisting) + if err := ctx.build(v4.DisableHeaderHoisting); err != nil { + return nil, err + } // If the request is not presigned the body should be attached to it. This // prevents the confusion of wanting to send a signed request without @@ -363,6 +367,10 @@ func (v4 Signer) signWithBody(r *http.Request, body io.ReadSeeker, service, regi return ctx.SignedHeaderVals, nil } +func (ctx *signingCtx) sanitizeHostForHeader() { + request.SanitizeHostForHeader(ctx.Request) +} + func (ctx *signingCtx) handlePresignRemoval() { if !ctx.isPresign { return @@ -467,7 +475,7 @@ func signSDKRequestWithCurrTime(req *request.Request, curTimeFn func() time.Time } signedHeaders, err := v4.signWithBody(req.HTTPRequest, req.GetBody(), - name, region, req.ExpireTime, signingTime, + name, region, req.ExpireTime, req.ExpireTime > 0, signingTime, ) if err != nil { req.Error = err @@ -498,11 +506,13 @@ func (v4 *Signer) logSigningInfo(ctx *signingCtx) { v4.Logger.Log(msg) } -func (ctx *signingCtx) build(disableHeaderHoisting bool) { +func (ctx *signingCtx) build(disableHeaderHoisting bool) error { ctx.buildTime() // no depends ctx.buildCredentialString() // no depends - ctx.buildBodyDigest() + if err := ctx.buildBodyDigest(); err != nil { + return err + } unsignedHeaders := ctx.Request.Header if ctx.isPresign { @@ -530,6 +540,8 @@ func (ctx *signingCtx) build(disableHeaderHoisting bool) { } ctx.Request.Header.Set("Authorization", strings.Join(parts, ", ")) } + + return nil } func (ctx *signingCtx) buildTime() { @@ -656,7 +668,7 @@ func (ctx *signingCtx) buildSignature() { ctx.signature = hex.EncodeToString(signature) } -func (ctx *signingCtx) buildBodyDigest() { +func (ctx *signingCtx) buildBodyDigest() error { hash := ctx.Request.Header.Get("X-Amz-Content-Sha256") if hash == "" { if ctx.unsignedPayload || (ctx.isPresign && ctx.ServiceName == "s3") { @@ -664,6 +676,9 @@ func (ctx *signingCtx) buildBodyDigest() { } else if ctx.Body == nil { hash = emptyStringSHA256 } else { + if !aws.IsReaderSeekable(ctx.Body) { + return fmt.Errorf("cannot use unseekable request body %T, for signed request with body", ctx.Body) + } hash = hex.EncodeToString(makeSha256Reader(ctx.Body)) } if ctx.unsignedPayload || ctx.ServiceName == "s3" || ctx.ServiceName == "glacier" { @@ -671,6 +686,8 @@ func (ctx *signingCtx) buildBodyDigest() { } } ctx.bodyDigest = hash + + return nil } // isRequestSigned returns if the request is currently signed or presigned @@ -710,8 +727,8 @@ func makeSha256(data []byte) []byte { func makeSha256Reader(reader io.ReadSeeker) []byte { hash := sha256.New() - start, _ := reader.Seek(0, 1) - defer reader.Seek(start, 0) + start, _ := reader.Seek(0, sdkio.SeekCurrent) + defer reader.Seek(start, sdkio.SeekStart) io.Copy(hash, reader) return hash.Sum(nil) diff --git a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4_test.go b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4_test.go index 45d0eb886..16bc7378a 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4_test.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4_test.go @@ -7,6 +7,7 @@ import ( "net/http" "net/http/httptest" "reflect" + "strconv" "strings" "testing" "time" @@ -61,17 +62,42 @@ func TestStripExcessHeaders(t *testing.T) { } func buildRequest(serviceName, region, body string) (*http.Request, io.ReadSeeker) { - endpoint := "https://" + serviceName + "." + region + ".amazonaws.com" reader := strings.NewReader(body) - req, _ := http.NewRequest("POST", endpoint, reader) + return buildRequestWithBodyReader(serviceName, region, reader) +} + +func buildRequestWithBodyReader(serviceName, region string, body io.Reader) (*http.Request, io.ReadSeeker) { + var bodyLen int + + type lenner interface { + Len() int + } + if lr, ok := body.(lenner); ok { + bodyLen = lr.Len() + } + + endpoint := "https://" + serviceName + "." + region + ".amazonaws.com" + req, _ := http.NewRequest("POST", endpoint, body) req.URL.Opaque = "//example.org/bucket/key-._~,!@#$%^&*()" - req.Header.Add("X-Amz-Target", "prefix.Operation") - req.Header.Add("Content-Type", "application/x-amz-json-1.0") - req.Header.Add("Content-Length", string(len(body))) - req.Header.Add("X-Amz-Meta-Other-Header", "some-value=!@#$%^&* (+)") + req.Header.Set("X-Amz-Target", "prefix.Operation") + req.Header.Set("Content-Type", "application/x-amz-json-1.0") + + if bodyLen > 0 { + req.Header.Set("Content-Length", strconv.Itoa(bodyLen)) + } + + req.Header.Set("X-Amz-Meta-Other-Header", "some-value=!@#$%^&* (+)") req.Header.Add("X-Amz-Meta-Other-Header_With_Underscore", "some-value=!@#$%^&* (+)") req.Header.Add("X-amz-Meta-Other-Header_With_Underscore", "some-value=!@#$%^&* (+)") - return req, reader + + var seeker io.ReadSeeker + if sr, ok := body.(io.ReadSeeker); ok { + seeker = sr + } else { + seeker = aws.ReadSeekCloser(body) + } + + return req, seeker } func buildSigner() Signer { @@ -101,7 +127,7 @@ func TestPresignRequest(t *testing.T) { expectedDate := "19700101T000000Z" expectedHeaders := "content-length;content-type;host;x-amz-meta-other-header;x-amz-meta-other-header_with_underscore" - expectedSig := "ea7856749041f727690c580569738282e99c79355fe0d8f125d3b5535d2ece83" + expectedSig := "122f0b9e091e4ba84286097e2b3404a1f1f4c4aad479adda95b7dff0ccbe5581" expectedCred := "AKID/19700101/us-east-1/dynamodb/aws4_request" expectedTarget := "prefix.Operation" @@ -135,7 +161,7 @@ func TestPresignBodyWithArrayRequest(t *testing.T) { expectedDate := "19700101T000000Z" expectedHeaders := "content-length;content-type;host;x-amz-meta-other-header;x-amz-meta-other-header_with_underscore" - expectedSig := "fef6002062400bbf526d70f1a6456abc0fb2e213fe1416012737eebd42a62924" + expectedSig := "e3ac55addee8711b76c6d608d762cff285fe8b627a057f8b5ec9268cf82c08b1" expectedCred := "AKID/19700101/us-east-1/dynamodb/aws4_request" expectedTarget := "prefix.Operation" @@ -166,14 +192,14 @@ func TestSignRequest(t *testing.T) { signer.Sign(req, body, "dynamodb", "us-east-1", time.Unix(0, 0)) expectedDate := "19700101T000000Z" - expectedSig := "AWS4-HMAC-SHA256 Credential=AKID/19700101/us-east-1/dynamodb/aws4_request, SignedHeaders=content-length;content-type;host;x-amz-date;x-amz-meta-other-header;x-amz-meta-other-header_with_underscore;x-amz-security-token;x-amz-target, Signature=ea766cabd2ec977d955a3c2bae1ae54f4515d70752f2207618396f20aa85bd21" + expectedSig := "AWS4-HMAC-SHA256 Credential=AKID/19700101/us-east-1/dynamodb/aws4_request, SignedHeaders=content-length;content-type;host;x-amz-date;x-amz-meta-other-header;x-amz-meta-other-header_with_underscore;x-amz-security-token;x-amz-target, Signature=a518299330494908a70222cec6899f6f32f297f8595f6df1776d998936652ad9" q := req.Header if e, a := expectedSig, q.Get("Authorization"); e != a { - t.Errorf("expect %v, got %v", e, a) + t.Errorf("expect\n%v\nactual\n%v\n", e, a) } if e, a := expectedDate, q.Get("X-Amz-Date"); e != a { - t.Errorf("expect %v, got %v", e, a) + t.Errorf("expect\n%v\nactual\n%v\n", e, a) } } @@ -207,6 +233,53 @@ func TestPresignEmptyBodyS3(t *testing.T) { } } +func TestSignUnseekableBody(t *testing.T) { + req, body := buildRequestWithBodyReader("mock-service", "mock-region", bytes.NewBuffer([]byte("hello"))) + signer := buildSigner() + _, err := signer.Sign(req, body, "mock-service", "mock-region", time.Now()) + if err == nil { + t.Fatalf("expect error signing request") + } + + if e, a := "unseekable request body", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %q to be in %q", e, a) + } +} + +func TestSignUnsignedPayloadUnseekableBody(t *testing.T) { + req, body := buildRequestWithBodyReader("mock-service", "mock-region", bytes.NewBuffer([]byte("hello"))) + + signer := buildSigner() + signer.UnsignedPayload = true + + _, err := signer.Sign(req, body, "mock-service", "mock-region", time.Now()) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + hash := req.Header.Get("X-Amz-Content-Sha256") + if e, a := "UNSIGNED-PAYLOAD", hash; e != a { + t.Errorf("expect %v, got %v", e, a) + } +} + +func TestSignPreComputedHashUnseekableBody(t *testing.T) { + req, body := buildRequestWithBodyReader("mock-service", "mock-region", bytes.NewBuffer([]byte("hello"))) + + signer := buildSigner() + + req.Header.Set("X-Amz-Content-Sha256", "some-content-sha256") + _, err := signer.Sign(req, body, "mock-service", "mock-region", time.Now()) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + hash := req.Header.Get("X-Amz-Content-Sha256") + if e, a := "some-content-sha256", hash; e != a { + t.Errorf("expect %v, got %v", e, a) + } +} + func TestSignPrecomputedBodyChecksum(t *testing.T) { req, body := buildRequest("dynamodb", "us-east-1", "hello") req.Header.Set("X-Amz-Content-Sha256", "PRECOMPUTED") diff --git a/vendor/github.com/aws/aws-sdk-go/aws/types.go b/vendor/github.com/aws/aws-sdk-go/aws/types.go index 0e2d864e1..8b6f23425 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/types.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/types.go @@ -3,6 +3,8 @@ package aws import ( "io" "sync" + + "github.com/aws/aws-sdk-go/internal/sdkio" ) // ReadSeekCloser wraps a io.Reader returning a ReaderSeekerCloser. Should @@ -22,6 +24,22 @@ type ReaderSeekerCloser struct { r io.Reader } +// IsReaderSeekable returns if the underlying reader type can be seeked. A +// io.Reader might not actually be seekable if it is the ReaderSeekerCloser +// type. +func IsReaderSeekable(r io.Reader) bool { + switch v := r.(type) { + case ReaderSeekerCloser: + return v.IsSeeker() + case *ReaderSeekerCloser: + return v.IsSeeker() + case io.ReadSeeker: + return true + default: + return false + } +} + // Read reads from the reader up to size of p. The number of bytes read, and // error if it occurred will be returned. // @@ -56,6 +74,71 @@ func (r ReaderSeekerCloser) IsSeeker() bool { return ok } +// HasLen returns the length of the underlying reader if the value implements +// the Len() int method. +func (r ReaderSeekerCloser) HasLen() (int, bool) { + type lenner interface { + Len() int + } + + if lr, ok := r.r.(lenner); ok { + return lr.Len(), true + } + + return 0, false +} + +// GetLen returns the length of the bytes remaining in the underlying reader. +// Checks first for Len(), then io.Seeker to determine the size of the +// underlying reader. +// +// Will return -1 if the length cannot be determined. +func (r ReaderSeekerCloser) GetLen() (int64, error) { + if l, ok := r.HasLen(); ok { + return int64(l), nil + } + + if s, ok := r.r.(io.Seeker); ok { + return seekerLen(s) + } + + return -1, nil +} + +// SeekerLen attempts to get the number of bytes remaining at the seeker's +// current position. Returns the number of bytes remaining or error. +func SeekerLen(s io.Seeker) (int64, error) { + // Determine if the seeker is actually seekable. ReaderSeekerCloser + // hides the fact that a io.Readers might not actually be seekable. + switch v := s.(type) { + case ReaderSeekerCloser: + return v.GetLen() + case *ReaderSeekerCloser: + return v.GetLen() + } + + return seekerLen(s) +} + +func seekerLen(s io.Seeker) (int64, error) { + curOffset, err := s.Seek(0, sdkio.SeekCurrent) + if err != nil { + return 0, err + } + + endOffset, err := s.Seek(0, sdkio.SeekEnd) + if err != nil { + return 0, err + } + + _, err = s.Seek(curOffset, sdkio.SeekStart) + if err != nil { + return 0, err + } + + return endOffset - curOffset, nil +} + // Close closes the ReaderSeekerCloser. // // If the ReaderSeekerCloser is not an io.Closer nothing will be done. diff --git a/vendor/github.com/aws/aws-sdk-go/aws/types_test.go b/vendor/github.com/aws/aws-sdk-go/aws/types_test.go index a7cd93b83..e399ef573 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/types_test.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/types_test.go @@ -1,32 +1,49 @@ package aws import ( + "bytes" "math/rand" "testing" - - "github.com/stretchr/testify/assert" ) func TestWriteAtBuffer(t *testing.T) { b := &WriteAtBuffer{} n, err := b.WriteAt([]byte{1}, 0) - assert.NoError(t, err) - assert.Equal(t, 1, n) + if err != nil { + t.Errorf("expected no error, but received %v", err) + } + if e, a := 1, n; e != a { + t.Errorf("expected %d, but recieved %d", e, a) + } n, err = b.WriteAt([]byte{1, 1, 1}, 5) - assert.NoError(t, err) - assert.Equal(t, 3, n) + if err != nil { + t.Errorf("expected no error, but received %v", err) + } + if e, a := 3, n; e != a { + t.Errorf("expected %d, but recieved %d", e, a) + } n, err = b.WriteAt([]byte{2}, 1) - assert.NoError(t, err) - assert.Equal(t, 1, n) + if err != nil { + t.Errorf("expected no error, but received %v", err) + } + if e, a := 1, n; e != a { + t.Errorf("expected %d, but recieved %d", e, a) + } n, err = b.WriteAt([]byte{3}, 2) - assert.NoError(t, err) - assert.Equal(t, 1, n) + if err != nil { + t.Errorf("expected no error, but received %v", err) + } + if e, a := 1, n; e != a { + t.Errorf("expected %d, but received %d", e, a) + } - assert.Equal(t, []byte{1, 2, 3, 0, 0, 1, 1, 1}, b.Bytes()) + if !bytes.Equal([]byte{1, 2, 3, 0, 0, 1, 1, 1}, b.Bytes()) { + t.Errorf("expected %v, but received %v", []byte{1, 2, 3, 0, 0, 1, 1, 1}, b.Bytes()) + } } func BenchmarkWriteAtBuffer(b *testing.B) { diff --git a/vendor/github.com/aws/aws-sdk-go/aws/version.go b/vendor/github.com/aws/aws-sdk-go/aws/version.go index 31be8fd3b..c2c7a0a4e 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/version.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/version.go @@ -5,4 +5,4 @@ package aws const SDKName = "aws-sdk-go" // SDKVersion is the version of this SDK -const SDKVersion = "1.12.1" +const SDKVersion = "1.13.31" diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/assert.go b/vendor/github.com/aws/aws-sdk-go/awstesting/assert.go index 5d095d202..510066fc5 100644 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/assert.go +++ b/vendor/github.com/aws/aws-sdk-go/awstesting/assert.go @@ -125,6 +125,22 @@ func AssertXML(t *testing.T, expect, actual string, container interface{}, msgAn return equal(t, expectVal, actualVal, msgAndArgs...) } +// DidPanic returns if the function paniced and returns true if the function paniced. +func DidPanic(fn func()) (bool, interface{}) { + var paniced bool + var msg interface{} + func() { + defer func() { + if msg = recover(); msg != nil { + paniced = true + } + }() + fn() + }() + + return paniced, msg +} + // objectsAreEqual determines if two objects are considered equal. // // This function does no assertion of any kind. diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/integration_test.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/integration_test.go index 93d5ff60f..0b7e88af9 100644 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/integration_test.go +++ b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/integration_test.go @@ -1,82 +1,42 @@ // +build integration -// Package s3_test runs integration tests for S3 -package s3_test +// Package s3 runs integration tests for S3 +package s3 import ( "bytes" - "fmt" "io/ioutil" "net/http" - "os" + "reflect" "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) + if err != nil { + t.Errorf("expect no error, got %v", err) + } resp, err := svc.GetObject(&s3.GetObjectInput{ Bucket: bucketName, Key: aws.String("key name"), }) - assert.NoError(t, err) + if err != nil { + t.Errorf("expect no error, got %v", err) + } b, _ := ioutil.ReadAll(resp.Body) - assert.Equal(t, []byte("hello world"), b) + if e, a := []byte("hello world"), b; !reflect.DeepEqual(e, a) { + t.Errorf("expect %v, got %v", e, a) + } } func TestPresignedGetPut(t *testing.T) { @@ -89,18 +49,26 @@ func TestPresignedGetPut(t *testing.T) { // Presign a PUT request var puturl string puturl, err = putreq.Presign(300 * time.Second) - assert.NoError(t, err) + if err != nil { + t.Errorf("expect no error, got %v", 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) + if err != nil { + t.Errorf("expect no error, got %v", err) + } var putresp *http.Response putresp, err = http.DefaultClient.Do(puthttpreq) - assert.NoError(t, err) - assert.Equal(t, 200, putresp.StatusCode) + if err != nil { + t.Errorf("expect put with presign url no error, got %v", err) + } + if e, a := 200, putresp.StatusCode; e != a { + t.Errorf("expect %v, got %v", e, a) + } // Presign a GET on the same URL getreq, _ := svc.GetObjectRequest(&s3.GetObjectInput{ @@ -110,15 +78,21 @@ func TestPresignedGetPut(t *testing.T) { var geturl string geturl, err = getreq.Presign(300 * time.Second) - assert.NoError(t, err) + if err != nil { + t.Errorf("expect no error, got %v", err) + } // Get the body var getresp *http.Response getresp, err = http.Get(geturl) - assert.NoError(t, err) + if err != nil { + t.Errorf("expect no error, got %v", err) + } var b []byte defer getresp.Body.Close() b, err = ioutil.ReadAll(getresp.Body) - assert.Equal(t, "hello world", string(b)) + if e, a := "hello world", string(b); e != a { + t.Errorf("expect %v, got %v", e, a) + } } diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/object_checksum_test.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/object_checksum_test.go new file mode 100644 index 000000000..949b93573 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/object_checksum_test.go @@ -0,0 +1,102 @@ +// +build integration + +package s3 + +import ( + "bytes" + "crypto/md5" + "encoding/base64" + "fmt" + "io" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/s3" +) + +func base64Sum(content []byte) string { + sum := md5.Sum(content) + return base64.StdEncoding.EncodeToString(sum[:]) +} + +func SkipTestContentMD5Validate(t *testing.T) { + body := []byte("really cool body content") + + cases := []struct { + Name string + Body []byte + Sum64 string + RangeGet []int64 + }{ + { + Body: body, + Sum64: base64Sum(body), + Name: "contentMD5validation.pop", + }, + { + Body: []byte{}, + Sum64: base64Sum([]byte{}), + Name: "contentMD5validation.empty", + }, + { + Body: body, + Sum64: base64Sum(body), + RangeGet: []int64{0, 9}, + Name: "contentMD5validation.range", + }, + } + + for i, c := range cases { + keyName := aws.String(c.Name) + req, _ := svc.PutObjectRequest(&s3.PutObjectInput{ + Bucket: bucketName, + Key: keyName, + Body: bytes.NewReader(c.Body), + }) + + req.Build() + if e, a := c.Sum64, req.HTTPRequest.Header.Get("Content-Md5"); e != a { + t.Errorf("%d, expect %v sum, got %v", i, e, a) + } + + if err := req.Send(); err != nil { + t.Fatalf("%d, expect no error, got %v", i, err) + } + + getObjIn := &s3.GetObjectInput{ + Bucket: bucketName, + Key: keyName, + } + + expectBody := c.Body + if c.RangeGet != nil { + getObjIn.Range = aws.String(fmt.Sprintf("bytes=%d-%d", c.RangeGet[0], c.RangeGet[1]-1)) + expectBody = c.Body[c.RangeGet[0]:c.RangeGet[1]] + } + + getReq, getOut := svc.GetObjectRequest(getObjIn) + + getReq.Build() + if e, a := "append-md5", getReq.HTTPRequest.Header.Get("X-Amz-Te"); e != a { + t.Errorf("%d, expect %v encoding, got %v", i, e, a) + } + if err := getReq.Send(); err != nil { + t.Fatalf("%d, expect no error, got %v", i, err) + } + defer getOut.Body.Close() + + if e, a := "append-md5", getReq.HTTPResponse.Header.Get("X-Amz-Transfer-Encoding"); e != a { + t.Fatalf("%d, expect response tx encoding header %v, got %v", i, e, a) + } + + var readBody bytes.Buffer + _, err := io.Copy(&readBody, getOut.Body) + if err != nil { + t.Fatalf("%d, expect no error, got %v", i, err) + } + + if e, a := expectBody, readBody.Bytes(); !bytes.Equal(e, a) { + t.Errorf("%d, expect %v body, got %v", i, e, a) + } + } +} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/s3crypto/stepdef.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/s3crypto/stepdef.go index 7d58e1939..5587b0fa0 100644 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/s3crypto/stepdef.go +++ b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/s3crypto/stepdef.go @@ -11,7 +11,6 @@ import ( "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" @@ -31,7 +30,9 @@ func init() { Bucket: aws.String(bucket), Prefix: aws.String(baseFolder + "/" + prefix), }) - assert.NoError(gucumber.T, err) + if err != nil { + gucumber.T.Errorf("expect no error, got %v", err) + } plaintexts := make(map[string][]byte) for _, obj := range out.Contents { @@ -40,10 +41,14 @@ func init() { Bucket: aws.String(bucket), Key: plaintextKey, }) - assert.NoError(gucumber.T, err) + if err != nil { + gucumber.T.Errorf("expect no error, got %v", err) + } caseKey := strings.TrimPrefix(*plaintextKey, baseFolder+"/"+prefix) plaintext, err := ioutil.ReadAll(ptObj.Body) - assert.NoError(gucumber.T, err) + if err != nil { + gucumber.T.Errorf("expect no error, got %v", err) + } plaintexts[caseKey] = plaintext } @@ -84,10 +89,14 @@ func init() { Key: &cipherKey, }, ) - assert.NoError(gucumber.T, err) + if err != nil { + gucumber.T.Errorf("expect no error, got %v", err) + } ciphertext, err := ioutil.ReadAll(ctObj.Body) - assert.NoError(gucumber.T, err) + if err != nil { + gucumber.T.Errorf("expect no error, got %v", err) + } ciphertexts[caseKey] = ciphertext } gucumber.World["decrypted"] = ciphertexts @@ -97,8 +106,12 @@ func init() { plaintexts := gucumber.World["plaintexts"].(map[string][]byte) ciphertexts := gucumber.World["decrypted"].(map[string][]byte) for caseKey, ciphertext := range ciphertexts { - assert.Equal(gucumber.T, len(plaintexts[caseKey]), len(ciphertext)) - assert.True(gucumber.T, bytes.Equal(plaintexts[caseKey], ciphertext)) + if e, a := len(plaintexts[caseKey]), len(ciphertext); e != a { + gucumber.T.Errorf("expect %v, got %v", e, a) + } + if e, a := plaintexts[caseKey], ciphertext; !bytes.Equal(e, a) { + gucumber.T.Errorf("expect %v, got %v", e, a) + } } }) @@ -108,16 +121,22 @@ func init() { switch kek { case "kms": arn, err := getAliasInformation(v1, v2) - assert.Nil(gucumber.T, err) + if err != nil { + gucumber.T.Errorf("expect nil, got %v", nil) + } b64Arn := base64.StdEncoding.EncodeToString([]byte(arn)) - assert.Nil(gucumber.T, err) + if err != nil { + gucumber.T.Errorf("expect nil, got %v", nil) + } gucumber.World["Masterkey"] = b64Arn handler = s3crypto.NewKMSKeyGenerator(kms.New(session.New(&aws.Config{ Region: &v2, })), arn) - assert.Nil(gucumber.T, err) + if err != nil { + gucumber.T.Errorf("expect nil, got %v", nil) + } default: gucumber.T.Skip() } @@ -157,7 +176,9 @@ func init() { } _, err := c.PutObject(input) - assert.Nil(gucumber.T, err) + if err != nil { + gucumber.T.Errorf("expect nil, got %v", nil) + } } }) } diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/s3manager/integration_test.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/s3manager/integration_test.go index 87536435e..971feee21 100644 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/s3manager/integration_test.go +++ b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/s3manager/integration_test.go @@ -12,7 +12,6 @@ import ( "regexp" "strings" "testing" - "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" @@ -52,7 +51,7 @@ func setup() error { // Create a bucket for testing bucketName = aws.String( - fmt.Sprintf("aws-sdk-go-integration-%d-%s", time.Now().Unix(), integration.UniqueID())) + fmt.Sprintf("aws-sdk-go-integration-%s", integration.UniqueID())) _, err := svc.CreateBucket(&s3.CreateBucketInput{Bucket: bucketName}) if err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/shared_test.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/shared_test.go new file mode 100644 index 000000000..5e00b46cf --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/shared_test.go @@ -0,0 +1,67 @@ +// +build integration + +package s3 + +import ( + "fmt" + "os" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/awstesting/integration" + "github.com/aws/aws-sdk-go/service/s3" +) + +const integBucketPrefix = "aws-sdk-go-integration" + +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("%s-%s", + integBucketPrefix, integration.UniqueID())) + + _, err := svc.CreateBucket(&s3.CreateBucketInput{Bucket: bucketName}) + if err != nil { + panic(fmt.Sprintf("failed to create bucket %s, %v", *bucketName, err)) + } + + err = svc.WaitUntilBucketExists(&s3.HeadBucketInput{Bucket: bucketName}) + if err != nil { + panic(fmt.Sprintf("failed waiting for bucket %s to be created", *bucketName)) + } +} + +// Delete the bucket +func teardown() { + resp, err := svc.ListObjects(&s3.ListObjectsInput{Bucket: bucketName}) + if err != nil { + panic(fmt.Sprintf("failed to list s3 bucket %s objects, %v", *bucketName, err)) + } + + errs := []error{} + for _, o := range resp.Contents { + _, err = svc.DeleteObject(&s3.DeleteObjectInput{Bucket: bucketName, Key: o.Key}) + if err != nil { + errs = append(errs, err) + } + } + + if len(errs) != 0 { + panic(fmt.Sprintf("failed to delete objects, %s", errs)) + } + + svc.DeleteBucket(&s3.DeleteBucketInput{Bucket: bucketName}) +} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/autoscalingplans/autoscalingplans.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/autoscalingplans/autoscalingplans.feature new file mode 100644 index 000000000..24d474de1 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/autoscalingplans/autoscalingplans.feature @@ -0,0 +1,7 @@ +# language: en +@autoscalingplans @client +Feature: AWS Auto Scaling Plans + + Scenario: Making a request + When I call the "DescribeScalingPlans" API + Then the request should be successful diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/autoscalingplans/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/autoscalingplans/client.go new file mode 100644 index 000000000..ddcf24fa6 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/autoscalingplans/client.go @@ -0,0 +1,16 @@ +// +build integration + +//Package autoscalingplans provides gucumber integration tests support. +package autoscalingplans + +import ( + "github.com/aws/aws-sdk-go/awstesting/integration/smoke" + "github.com/aws/aws-sdk-go/service/autoscalingplans" + "github.com/gucumber/gucumber" +) + +func init() { + gucumber.Before("@autoscalingplans", func() { + gucumber.World["client"] = autoscalingplans.New(smoke.Session) + }) +} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudhsmv2/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudhsmv2/client.go new file mode 100644 index 000000000..ca19c1066 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudhsmv2/client.go @@ -0,0 +1,16 @@ +// +build integration + +//Package cloudhsmv2 provides gucumber integration tests support. +package cloudhsmv2 + +import ( + "github.com/aws/aws-sdk-go/awstesting/integration/smoke" + "github.com/aws/aws-sdk-go/service/cloudhsmv2" + "github.com/gucumber/gucumber" +) + +func init() { + gucumber.Before("@cloudhsmv2", func() { + gucumber.World["client"] = cloudhsmv2.New(smoke.Session) + }) +} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudhsmv2/cloudhsmv2.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudhsmv2/cloudhsmv2.feature new file mode 100644 index 000000000..8fa8b7c69 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudhsmv2/cloudhsmv2.feature @@ -0,0 +1,7 @@ +# language: en +@cloudhsmv2 @client +Feature: Amazon CloudHSMv2 + + Scenario: Making a request + When I call the "DescribeBackups" API + Then the request should be successful diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/mediastore/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/mediastore/client.go new file mode 100644 index 000000000..40ef2c8bb --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/mediastore/client.go @@ -0,0 +1,16 @@ +// +build integration + +//Package mediastore provides gucumber integration tests support. +package mediastore + +import ( + "github.com/aws/aws-sdk-go/awstesting/integration/smoke" + "github.com/aws/aws-sdk-go/service/mediastore" + "github.com/gucumber/gucumber" +) + +func init() { + gucumber.Before("@mediastore", func() { + gucumber.World["client"] = mediastore.New(smoke.Session) + }) +} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/mediastore/mediastore.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/mediastore/mediastore.feature new file mode 100644 index 000000000..9bfbb1e9f --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/mediastore/mediastore.feature @@ -0,0 +1,7 @@ +# language: en +@mediastore @client +Feature: AWS Elemental MediaStore + + Scenario: Making a request + When I call the "ListContainers" API + Then the request should be successful diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/mediastoredata/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/mediastoredata/client.go new file mode 100644 index 000000000..cbfe72554 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/mediastoredata/client.go @@ -0,0 +1,34 @@ +// +build integration + +//Package mediastoredata provides gucumber integration tests support. +package mediastoredata + +import ( + "fmt" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/awstesting/integration/smoke" + "github.com/aws/aws-sdk-go/service/mediastore" + "github.com/aws/aws-sdk-go/service/mediastoredata" + "github.com/gucumber/gucumber" +) + +func init() { + const containerName = "awsgosdkteamintegcontainer" + + gucumber.Before("@mediastoredata", func() { + mediastoreSvc := mediastore.New(smoke.Session) + + resp, err := mediastoreSvc.DescribeContainer(&mediastore.DescribeContainerInput{ + ContainerName: aws.String(containerName), + }) + if err != nil { + gucumber.World["error"] = fmt.Errorf("failed to get mediastore container endpoint for test, %v", err) + return + } + + gucumber.World["client"] = mediastoredata.New(smoke.Session, &aws.Config{ + Endpoint: resp.Container.Endpoint, + }) + }) +} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/mediastoredata/mediastoredata.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/mediastoredata/mediastoredata.feature new file mode 100644 index 000000000..79cc1db8d --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/mediastoredata/mediastoredata.feature @@ -0,0 +1,7 @@ +# language: en +@mediastoredata @client +Feature: AWS Elemental MediaStore Data Plane + + Scenario: Making a request + When I call the "ListItems" API + Then the request should be successful diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/mobile/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/mobile/client.go new file mode 100644 index 000000000..6e63eb4ed --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/mobile/client.go @@ -0,0 +1,16 @@ +// +build integration + +//Package mobile provides gucumber integration tests support. +package mobile + +import ( + "github.com/aws/aws-sdk-go/awstesting/integration/smoke" + "github.com/aws/aws-sdk-go/service/mobile" + "github.com/gucumber/gucumber" +) + +func init() { + gucumber.Before("@mobile", func() { + gucumber.World["client"] = mobile.New(smoke.Session) + }) +} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/mobile/mobile.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/mobile/mobile.feature new file mode 100644 index 000000000..7fb95b077 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/mobile/mobile.feature @@ -0,0 +1,7 @@ +# language: en +@mobile @client +Feature: AWS Mobile + + Scenario: Making a request + When I call the "ListBundles" API + Then the request should be successful diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/sagemakerruntime/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/sagemakerruntime/client.go new file mode 100644 index 000000000..164c7dc40 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/sagemakerruntime/client.go @@ -0,0 +1,16 @@ +// +build integration + +//Package sagemakerruntime provides gucumber integration tests support. +package sagemakerruntime + +import ( + "github.com/aws/aws-sdk-go/awstesting/integration/smoke" + "github.com/aws/aws-sdk-go/service/sagemakerruntime" + "github.com/gucumber/gucumber" +) + +func init() { + gucumber.Before("@sagemakerruntime", func() { + gucumber.World["client"] = sagemakerruntime.New(smoke.Session) + }) +} diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/sagemakerruntime/sagemakerruntime.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/sagemakerruntime/sagemakerruntime.feature new file mode 100644 index 000000000..1aabe615d --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/sagemakerruntime/sagemakerruntime.feature @@ -0,0 +1,10 @@ +# language: en +@sagemakerruntime @client +Feature: Amazon SageMaker Runtime + + Scenario: Making a request + When I attempt to call the "InvokeEndpoint" API with JSON: + """ + {"EndpointName": "fake-endpoint", "Body": [123, 125]} + """ + Then I expect the response error code to be "ValidationError" diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/shared.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/shared.go index dbb1338f9..794854622 100644 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/shared.go +++ b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/shared.go @@ -5,7 +5,6 @@ package smoke import ( "encoding/json" - "fmt" "os" "reflect" "regexp" @@ -13,7 +12,6 @@ import ( "strings" "github.com/gucumber/gucumber" - "github.com/stretchr/testify/assert" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" @@ -47,12 +45,16 @@ func init() { gucumber.Then(`^the value at "(.+?)" should be a list$`, func(member string) { vals, _ := awsutil.ValuesAtPath(gucumber.World["response"], member) - assert.NotNil(gucumber.T, vals) + if vals == nil { + gucumber.T.Errorf("expect not nil, was") + } }) gucumber.Then(`^the response should contain a "(.+?)"$`, func(member string) { vals, _ := awsutil.ValuesAtPath(gucumber.World["response"], member) - assert.NotEmpty(gucumber.T, vals) + if len(vals) == 0 { + gucumber.T.Errorf("expect values, got none") + } }) gucumber.When(`^I attempt to call the "(.+?)" API with:$`, func(op string, args [][]string) { @@ -61,23 +63,33 @@ func init() { gucumber.Then(`^I expect the response error code to be "(.+?)"$`, func(code string) { err, ok := gucumber.World["error"].(awserr.Error) - assert.True(gucumber.T, ok, "no error returned") + if !ok { + gucumber.T.Errorf("no error returned") + } if ok { - assert.Equal(gucumber.T, code, err.Code(), "Error: %v", err) + if e, a := code, err.Code(); e != a { + gucumber.T.Errorf("Error: %v", err) + } } }) gucumber.And(`^I expect the response error message to include:$`, func(data string) { err, ok := gucumber.World["error"].(awserr.Error) - assert.True(gucumber.T, ok, "no error returned") + if !ok { + gucumber.T.Errorf("no error returned") + } if ok { - assert.Contains(gucumber.T, err.Error(), data) + if a := err.Error(); len(a) == 0 { + gucumber.T.Errorf("expect string length to be greater than zero") + } } }) gucumber.And(`^I expect the response error message to include one of:$`, func(table [][]string) { err, ok := gucumber.World["error"].(awserr.Error) - assert.True(gucumber.T, ok, "no error returned") + if !ok { + gucumber.T.Errorf("no error returned") + } if ok { found := false for _, row := range table { @@ -87,14 +99,20 @@ func init() { } } - assert.True(gucumber.T, found, fmt.Sprintf("no error messages matched: \"%s\"", err.Error())) + if !found { + gucumber.T.Errorf("no error messages matched: \"%s\"", err.Error()) + } } }) gucumber.And(`^I expect the response error message not be empty$`, func() { err, ok := gucumber.World["error"].(awserr.Error) - assert.True(gucumber.T, ok, "no error returned") - assert.NotEmpty(gucumber.T, err.Message()) + if !ok { + gucumber.T.Errorf("no error returned") + } + if len(err.Message()) == 0 { + gucumber.T.Errorf("expect values, got none") + } }) gucumber.When(`^I call the "(.+?)" API with JSON:$`, func(s1 string, data string) { @@ -107,26 +125,42 @@ func init() { gucumber.Then(`^the error code should be "(.+?)"$`, func(s1 string) { err, ok := gucumber.World["error"].(awserr.Error) - assert.True(gucumber.T, ok, "no error returned") - assert.Equal(gucumber.T, s1, err.Code()) + if !ok { + gucumber.T.Errorf("no error returned") + } + if e, a := s1, err.Code(); e != a { + gucumber.T.Errorf("expect %v, got %v", e, a) + } }) gucumber.And(`^the error message should contain:$`, func(data string) { err, ok := gucumber.World["error"].(awserr.Error) - assert.True(gucumber.T, ok, "no error returned") - assert.Contains(gucumber.T, err.Error(), data) + if !ok { + gucumber.T.Errorf("no error returned") + } + if a := err.Error(); len(a) == 0 { + gucumber.T.Errorf("expect string length to be greater than zero") + } }) gucumber.Then(`^the request should fail$`, func() { err, ok := gucumber.World["error"].(awserr.Error) - assert.True(gucumber.T, ok, "no error returned") - assert.Error(gucumber.T, err) + if !ok { + gucumber.T.Errorf("no error returned") + } + if err == nil { + gucumber.T.Errorf("expect error, got none") + } }) gucumber.Then(`^the request should be successful$`, func() { err, ok := gucumber.World["error"].(awserr.Error) - assert.False(gucumber.T, ok, "error returned") - assert.NoError(gucumber.T, err) + if ok { + gucumber.T.Errorf("error returned") + } + if err != nil { + gucumber.T.Errorf("expect no error, got %v", err) + } }) } @@ -160,10 +194,12 @@ func call(op string, args [][]string, allowError bool) { if !allowError { err, _ := gucumber.World["error"].(error) - assert.NoError(gucumber.T, err) + if err != nil { + gucumber.T.Errorf("expect no error, got %v", err) + } } } else { - assert.Fail(gucumber.T, "failed to find operation "+op) + gucumber.T.Errorf("failed to find operation " + op) } } @@ -215,10 +251,12 @@ func callWithJSON(op, j string, allowError bool) { if !allowError { err, _ := gucumber.World["error"].(error) - assert.NoError(gucumber.T, err) + if err != nil { + gucumber.T.Errorf("expect no error, got %v", err) + } } } else { - assert.Fail(gucumber.T, "failed to find operation "+op) + gucumber.T.Errorf("failed to find operation " + op) } } diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/performance/init.go b/vendor/github.com/aws/aws-sdk-go/awstesting/performance/init.go index 81596d1c8..50e2cf0d1 100644 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/performance/init.go +++ b/vendor/github.com/aws/aws-sdk-go/awstesting/performance/init.go @@ -9,7 +9,6 @@ import ( "runtime" "github.com/gucumber/gucumber" - "github.com/stretchr/testify/assert" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" @@ -32,8 +31,12 @@ func init() { gucumber.Then(`^I should not have leaked any resources$`, func() { runtime.GC() err, ok := gucumber.World["error"].(awserr.Error) - assert.False(gucumber.T, ok, "error returned") - assert.NoError(gucumber.T, err) + if ok { + gucumber.T.Errorf("error returned") + } + if err != nil { + gucumber.T.Errorf("expect no error, got %v", err) + } }) gucumber.And(`^I have a list of services$`, func() { diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/util_test.go b/vendor/github.com/aws/aws-sdk-go/awstesting/util_test.go index 4b03db019..6700eb0d3 100644 --- a/vendor/github.com/aws/aws-sdk-go/awstesting/util_test.go +++ b/vendor/github.com/aws/aws-sdk-go/awstesting/util_test.go @@ -4,8 +4,6 @@ import ( "io" "testing" - "github.com/stretchr/testify/assert" - "github.com/aws/aws-sdk-go/awstesting" ) @@ -13,9 +11,15 @@ func TestReadCloserClose(t *testing.T) { rc := awstesting.ReadCloser{Size: 1} err := rc.Close() - assert.Nil(t, err) - assert.True(t, rc.Closed) - assert.Equal(t, rc.Size, 1) + if err != nil { + t.Errorf("expect nil, got %v", err) + } + if !rc.Closed { + t.Errorf("expect closed, was not") + } + if e, a := rc.Size, 1; e != a { + t.Errorf("expect %v, got %v", e, a) + } } func TestReadCloserRead(t *testing.T) { @@ -24,16 +28,30 @@ func TestReadCloserRead(t *testing.T) { n, err := rc.Read(b) - assert.Nil(t, err) - assert.Equal(t, n, 2) - assert.False(t, rc.Closed) - assert.Equal(t, rc.Size, 3) + if err != nil { + t.Errorf("expect nil, got %v", err) + } + if e, a := n, 2; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if rc.Closed { + t.Errorf("expect not to be closed") + } + if e, a := rc.Size, 3; e != a { + t.Errorf("expect %v, got %v", e, a) + } err = rc.Close() - assert.Nil(t, err) + if err != nil { + t.Errorf("expect nil, got %v", err) + } n, err = rc.Read(b) - assert.Equal(t, err, io.EOF) - assert.Equal(t, n, 0) + if e, a := err, io.EOF; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := n, 0; e != a { + t.Errorf("expect %v, got %v", e, a) + } } func TestReadCloserReadAll(t *testing.T) { @@ -42,8 +60,16 @@ func TestReadCloserReadAll(t *testing.T) { n, err := rc.Read(b) - assert.Equal(t, err, io.EOF) - assert.Equal(t, n, 5) - assert.False(t, rc.Closed) - assert.Equal(t, rc.Size, 0) + if e, a := err, io.EOF; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := n, 5; e != a { + t.Errorf("expect %v, got %v", e, a) + } + if rc.Closed { + t.Errorf("expect not to be closed") + } + if e, a := rc.Size, 0; e != a { + t.Errorf("expect %v, got %v", e, a) + } } diff --git a/vendor/github.com/aws/aws-sdk-go/buildspec.yml b/vendor/github.com/aws/aws-sdk-go/buildspec.yml new file mode 100644 index 000000000..427208edf --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/buildspec.yml @@ -0,0 +1,21 @@ +version: 0.2 + +phases: + build: + commands: + - echo Build started on `date` + - export GOPATH=/go + - export SDK_CB_ROOT=`pwd` + - export SDK_GO_ROOT=/go/src/github.com/aws/aws-sdk-go + - mkdir -p /go/src/github.com/aws + - ln -s $SDK_CB_ROOT $SDK_GO_ROOT + - cd $SDK_GO_ROOT + - make unit + - cd $SDK_CB_ROOT + - #echo Compiling the Go code... + post_build: + commands: + - echo Build completed on `date` +#artifacts: +# files: +# - hello diff --git a/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/godoc.html b/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/godoc.html index bdaff8ac5..fbaaa8111 100644 --- a/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/godoc.html +++ b/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/godoc.html @@ -16,7 +16,7 @@ - +