diff options
author | =Corey Hulen <corey@hulen.com> | 2015-07-29 01:26:10 -0800 |
---|---|---|
committer | =Corey Hulen <corey@hulen.com> | 2015-07-29 01:26:10 -0800 |
commit | 9677a9f71777d75f3def0b0cb238050a30ec6a67 (patch) | |
tree | 8579fae8134ef2167a2cc97d95b0225e8acfdb46 /Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/internal/endpoints | |
parent | 81e55eb57c367a1403f693712411c0781287ea55 (diff) | |
download | chat-9677a9f71777d75f3def0b0cb238050a30ec6a67.tar.gz chat-9677a9f71777d75f3def0b0cb238050a30ec6a67.tar.bz2 chat-9677a9f71777d75f3def0b0cb238050a30ec6a67.zip |
Fixes mm-1355 adds rate limiting apis
Diffstat (limited to 'Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/internal/endpoints')
4 files changed, 0 insertions, 194 deletions
diff --git a/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/internal/endpoints/endpoints.go b/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/internal/endpoints/endpoints.go deleted file mode 100644 index 12e4fb529..000000000 --- a/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/internal/endpoints/endpoints.go +++ /dev/null @@ -1,24 +0,0 @@ -package endpoints - -//go:generate go run ../model/cli/gen-endpoints/main.go endpoints.json endpoints_map.go - -import "strings" - -func EndpointForRegion(svcName, region string) string { - derivedKeys := []string{ - region + "/" + svcName, - region + "/*", - "*/" + svcName, - "*/*", - } - - for _, key := range derivedKeys { - if val, ok := endpointsMap.Endpoints[key]; ok { - ep := val.Endpoint - ep = strings.Replace(ep, "{region}", region, -1) - ep = strings.Replace(ep, "{service}", svcName, -1) - return ep - } - } - return "" -} diff --git a/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/internal/endpoints/endpoints.json b/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/internal/endpoints/endpoints.json deleted file mode 100644 index 6c35090c6..000000000 --- a/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/internal/endpoints/endpoints.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "version": 2, - "endpoints": { - "*/*": { - "endpoint": "{service}.{region}.amazonaws.com" - }, - "cn-north-1/*": { - "endpoint": "{service}.{region}.amazonaws.com.cn", - "signatureVersion": "v4" - }, - "us-gov-west-1/iam": { - "endpoint": "iam.us-gov.amazonaws.com" - }, - "us-gov-west-1/sts": { - "endpoint": "sts.us-gov-west-1.amazonaws.com" - }, - "us-gov-west-1/s3": { - "endpoint": "s3-{region}.amazonaws.com" - }, - "*/cloudfront": { - "endpoint": "cloudfront.amazonaws.com" - }, - "*/iam": { - "endpoint": "iam.amazonaws.com" - }, - "*/importexport": { - "endpoint": "importexport.amazonaws.com" - }, - "*/route53": { - "endpoint": "route53.amazonaws.com" - }, - "*/sts": { - "endpoint": "sts.amazonaws.com" - }, - "us-east-1/sdb": { - "endpoint": "sdb.amazonaws.com" - }, - "us-east-1/s3": { - "endpoint": "s3.amazonaws.com" - }, - "us-west-1/s3": { - "endpoint": "s3-{region}.amazonaws.com" - }, - "us-west-2/s3": { - "endpoint": "s3-{region}.amazonaws.com" - }, - "eu-west-1/s3": { - "endpoint": "s3-{region}.amazonaws.com" - }, - "ap-southeast-1/s3": { - "endpoint": "s3-{region}.amazonaws.com" - }, - "ap-southeast-2/s3": { - "endpoint": "s3-{region}.amazonaws.com" - }, - "ap-northeast-1/s3": { - "endpoint": "s3-{region}.amazonaws.com" - }, - "sa-east-1/s3": { - "endpoint": "s3-{region}.amazonaws.com" - }, - "eu-central-1/s3": { - "endpoint": "{service}.{region}.amazonaws.com", - "signatureVersion": "v4" - } - } -} diff --git a/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/internal/endpoints/endpoints_map.go b/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/internal/endpoints/endpoints_map.go deleted file mode 100644 index 733d2bd28..000000000 --- a/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/internal/endpoints/endpoints_map.go +++ /dev/null @@ -1,78 +0,0 @@ -package endpoints - -// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. - -type endpointStruct struct { - Version int - Endpoints map[string]endpointEntry -} - -type endpointEntry struct { - Endpoint string -} - -var endpointsMap = endpointStruct{ - Version: 2, - Endpoints: map[string]endpointEntry{ - "*/*": endpointEntry{ - Endpoint: "{service}.{region}.amazonaws.com", - }, - "*/cloudfront": endpointEntry{ - Endpoint: "cloudfront.amazonaws.com", - }, - "*/iam": endpointEntry{ - Endpoint: "iam.amazonaws.com", - }, - "*/importexport": endpointEntry{ - Endpoint: "importexport.amazonaws.com", - }, - "*/route53": endpointEntry{ - Endpoint: "route53.amazonaws.com", - }, - "*/sts": endpointEntry{ - Endpoint: "sts.amazonaws.com", - }, - "ap-northeast-1/s3": endpointEntry{ - Endpoint: "s3-{region}.amazonaws.com", - }, - "ap-southeast-1/s3": endpointEntry{ - Endpoint: "s3-{region}.amazonaws.com", - }, - "ap-southeast-2/s3": endpointEntry{ - Endpoint: "s3-{region}.amazonaws.com", - }, - "cn-north-1/*": endpointEntry{ - Endpoint: "{service}.{region}.amazonaws.com.cn", - }, - "eu-central-1/s3": endpointEntry{ - Endpoint: "{service}.{region}.amazonaws.com", - }, - "eu-west-1/s3": endpointEntry{ - Endpoint: "s3-{region}.amazonaws.com", - }, - "sa-east-1/s3": endpointEntry{ - Endpoint: "s3-{region}.amazonaws.com", - }, - "us-east-1/s3": endpointEntry{ - Endpoint: "s3.amazonaws.com", - }, - "us-east-1/sdb": endpointEntry{ - Endpoint: "sdb.amazonaws.com", - }, - "us-gov-west-1/iam": endpointEntry{ - Endpoint: "iam.us-gov.amazonaws.com", - }, - "us-gov-west-1/s3": endpointEntry{ - Endpoint: "s3-{region}.amazonaws.com", - }, - "us-gov-west-1/sts": endpointEntry{ - Endpoint: "sts.us-gov-west-1.amazonaws.com", - }, - "us-west-1/s3": endpointEntry{ - Endpoint: "s3-{region}.amazonaws.com", - }, - "us-west-2/s3": endpointEntry{ - Endpoint: "s3-{region}.amazonaws.com", - }, - }, -} diff --git a/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/internal/endpoints/endpoints_test.go b/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/internal/endpoints/endpoints_test.go deleted file mode 100644 index 84efb893e..000000000 --- a/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/internal/endpoints/endpoints_test.go +++ /dev/null @@ -1,25 +0,0 @@ -package endpoints - -import "testing" - -func TestGlobalEndpoints(t *testing.T) { - region := "mock-region-1" - svcs := []string{"cloudfront", "iam", "importexport", "route53", "sts"} - - for _, name := range svcs { - if EndpointForRegion(name, region) != name+".amazonaws.com" { - t.Errorf("expected endpoint for %s to equal %s.amazonaws.com", name, name) - } - } -} - -func TestServicesInCN(t *testing.T) { - region := "cn-north-1" - svcs := []string{"cloudfront", "iam", "importexport", "route53", "sts", "s3"} - - for _, name := range svcs { - if EndpointForRegion(name, region) != name+"."+region+".amazonaws.com.cn" { - t.Errorf("expected endpoint for %s to equal %s.%s.amazonaws.com.cn", name, name, region) - } - } -} |