Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(460)

Delta Between Two Patch Sets: aws/aws.go

Issue 6343080: s3: fix regions that require lowercase buckets. (Closed)
Left Patch Set: Created 12 years, 9 months ago
Right Patch Set: s3: fix regions that require lowercase buckets. Created 12 years, 8 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « [revision details] ('k') | s3/s3.go » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 // 1 //
2 // goamz - Go packages to interact with the Amazon Web Services. 2 // goamz - Go packages to interact with the Amazon Web Services.
3 // 3 //
4 // https://wiki.ubuntu.com/goamz 4 // https://wiki.ubuntu.com/goamz
5 // 5 //
6 // Copyright (c) 2011 Canonical Ltd. 6 // Copyright (c) 2011 Canonical Ltd.
7 // 7 //
8 // Written by Gustavo Niemeyer <gustavo.niemeyer@canonical.com> 8 // Written by Gustavo Niemeyer <gustavo.niemeyer@canonical.com>
9 // 9 //
10 package aws 10 package aws
11 11
12 import ( 12 import (
13 "errors" 13 "errors"
14 "os" 14 "os"
15 ) 15 )
16 16
17 // Region defines the URLs where AWS services may be accessed. 17 // Region defines the URLs where AWS services may be accessed.
18 // 18 //
19 // See http://goo.gl/d8BP1 for more details. 19 // See http://goo.gl/d8BP1 for more details.
20 type Region struct { 20 type Region struct {
21 Name string // the canonical name of this region. 21 Name string // the canonical name of this region.
22 EC2Endpoint string 22 EC2Endpoint string
23 S3Endpoint string 23 S3Endpoint string
24 S3BucketEndpoint string // Not needed by AWS S3. Use ${bucket} for b ucket name. 24 S3BucketEndpoint string // Not needed by AWS S3. Use ${bucket} for b ucket name.
25 » S3LocationConstraint bool // true if this region requires a LocationCo nstraint declaration 25 » S3LocationConstraint bool // true if this region requires a LocationCo nstraint declaration.
26 » S3LowercaseBucket bool // true if the region requires bucket names to be lower case.
26 SDBEndpoint string 27 SDBEndpoint string
27 SNSEndpoint string 28 SNSEndpoint string
28 SQSEndpoint string 29 SQSEndpoint string
29 } 30 }
30 31
31 var USEast = Region{ 32 var USEast = Region{
32 "us-east-1", 33 "us-east-1",
33 "https://ec2.us-east-1.amazonaws.com", 34 "https://ec2.us-east-1.amazonaws.com",
34 "https://s3.amazonaws.com", 35 "https://s3.amazonaws.com",
35 "", 36 "",
36 false, 37 false,
38 false,
37 "https://sdb.amazonaws.com", 39 "https://sdb.amazonaws.com",
38 "https://sns.us-east-1.amazonaws.com", 40 "https://sns.us-east-1.amazonaws.com",
39 "https://sqs.us-east-1.amazonaws.com", 41 "https://sqs.us-east-1.amazonaws.com",
40 } 42 }
41 43
42 var USWest = Region{ 44 var USWest = Region{
43 "us-west-1", 45 "us-west-1",
44 "https://ec2.us-west-1.amazonaws.com", 46 "https://ec2.us-west-1.amazonaws.com",
45 "https://s3-us-west-1.amazonaws.com", 47 "https://s3-us-west-1.amazonaws.com",
46 "", 48 "",
47 » false, 49 » true,
50 » true,
48 "https://sdb.us-west-1.amazonaws.com", 51 "https://sdb.us-west-1.amazonaws.com",
49 "https://sns.us-west-1.amazonaws.com", 52 "https://sns.us-west-1.amazonaws.com",
50 "https://sqs.us-west-1.amazonaws.com", 53 "https://sqs.us-west-1.amazonaws.com",
51 } 54 }
52 55
53 var EUWest = Region{ 56 var EUWest = Region{
54 "eu-west-1", 57 "eu-west-1",
55 "https://ec2.eu-west-1.amazonaws.com", 58 "https://ec2.eu-west-1.amazonaws.com",
56 "https://s3-eu-west-1.amazonaws.com", 59 "https://s3-eu-west-1.amazonaws.com",
57 "", 60 "",
61 true,
58 true, 62 true,
59 "https://sdb.eu-west-1.amazonaws.com", 63 "https://sdb.eu-west-1.amazonaws.com",
60 "https://sns.eu-west-1.amazonaws.com", 64 "https://sns.eu-west-1.amazonaws.com",
61 "https://sqs.eu-west-1.amazonaws.com", 65 "https://sqs.eu-west-1.amazonaws.com",
62 } 66 }
63 67
64 var APSoutheast = Region{ 68 var APSoutheast = Region{
65 "ap-southeast-1", 69 "ap-southeast-1",
66 "https://ec2.ap-southeast-1.amazonaws.com", 70 "https://ec2.ap-southeast-1.amazonaws.com",
67 "https://s3-ap-southeast-1.amazonaws.com", 71 "https://s3-ap-southeast-1.amazonaws.com",
68 "", 72 "",
69 true, 73 true,
74 true,
70 "https://sdb.ap-southeast-1.amazonaws.com", 75 "https://sdb.ap-southeast-1.amazonaws.com",
71 "https://sns.ap-southeast-1.amazonaws.com", 76 "https://sns.ap-southeast-1.amazonaws.com",
72 "https://sqs.ap-southeast-1.amazonaws.com", 77 "https://sqs.ap-southeast-1.amazonaws.com",
73 } 78 }
74 79
75 var APNortheast = Region{ 80 var APNortheast = Region{
76 "ap-northeast-1", 81 "ap-northeast-1",
77 "https://ec2.ap-northeast-1.amazonaws.com", 82 "https://ec2.ap-northeast-1.amazonaws.com",
78 "https://s3-ap-northeast-1.amazonaws.com", 83 "https://s3-ap-northeast-1.amazonaws.com",
79 "", 84 "",
85 true,
80 true, 86 true,
81 "https://sdb.ap-northeast-1.amazonaws.com", 87 "https://sdb.ap-northeast-1.amazonaws.com",
82 "https://sns.ap-northeast-1.amazonaws.com", 88 "https://sns.ap-northeast-1.amazonaws.com",
83 "https://sqs.ap-northeast-1.amazonaws.com", 89 "https://sqs.ap-northeast-1.amazonaws.com",
84 } 90 }
85 91
86 var Regions = map[string]Region{ 92 var Regions = map[string]Region{
87 APNortheast.Name: APNortheast, 93 APNortheast.Name: APNortheast,
88 APSoutheast.Name: APSoutheast, 94 APSoutheast.Name: APSoutheast,
89 EUWest.Name: EUWest, 95 EUWest.Name: EUWest,
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 e[ei+1] = hex[c>>4] 150 e[ei+1] = hex[c>>4]
145 e[ei+2] = hex[c&0xF] 151 e[ei+2] = hex[c&0xF]
146 ei += 3 152 ei += 3
147 } else { 153 } else {
148 e[ei] = c 154 e[ei] = c
149 ei += 1 155 ei += 1
150 } 156 }
151 } 157 }
152 return string(e[:ei]) 158 return string(e[:ei])
153 } 159 }
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b