Merge lp://staging/~nick-craig-wood/goamz/list-buckets into lp://staging/~gophers/goamz/trunk

Proposed by Nick Craig-Wood
Status: Needs review
Proposed branch: lp://staging/~nick-craig-wood/goamz/list-buckets
Merge into: lp://staging/~gophers/goamz/trunk
Diff against target: 429 lines (+173/-34)
12 files modified
aws/aws.go (+7/-1)
aws/aws_test.go (+9/-0)
ec2/ec2_test.go (+4/-0)
exp/mturk/mturk_test.go (+4/-0)
exp/sdb/sdb_test.go (+4/-0)
exp/sns/sns_test.go (+4/-0)
iam/iam_test.go (+6/-2)
s3/multi.go (+3/-2)
s3/responses_test.go (+19/-0)
s3/s3.go (+69/-27)
s3/s3_test.go (+30/-0)
testutil/http.go (+14/-2)
To merge this branch: bzr merge lp://staging/~nick-craig-wood/goamz/list-buckets
Reviewer Review Type Date Requested Status
The Go Language Gophers Pending
Review via email: mp+146925@code.staging.launchpad.net

Description of the change

s3: Implement ListBuckets method

https://codereview.appspot.com/7305051/

To post a comment you must log in.
Revision history for this message
Gustavo Niemeyer (niemeyer) wrote :

Looking good, thanks for this. Just a few trivial details to sort out.

https://codereview.appspot.com/7305051/diff/1/s3/s3.go
File s3/s3.go (right):

https://codereview.appspot.com/7305051/diff/1/s3/s3.go#newcode43
s3/s3.go:43: // The following fields are only set on Buckets returned
from the ListBuckets call
s/Buckets/buckets/

https://codereview.appspot.com/7305051/diff/1/s3/s3.go#newcode45
s3/s3.go:45: CreationDate string // Date the bucket was created, e.g.,
2009-02-03T16:45:09.000Z
Seems like this should be a native time.Time.

https://codereview.appspot.com/7305051/diff/1/s3/s3.go#newcode74
s3/s3.go:74: type BucketInfo struct {
s/BucketInfo/bucketInfo/

This is used only internally, so doesn't have to be exposed in the
public API.

https://codereview.appspot.com/7305051/diff/1/s3/s3.go#newcode80
s3/s3.go:80: type Buckets struct {
s/Buckets/bucketInfoResp/, for the same reason.

The doc also needs fixing.

https://codereview.appspot.com/7305051/diff/1/s3/s3.go#newcode444
s3/s3.go:444: if req.baseurl == "" {
That logic is changed in trunk, both due to retries and to fix a bug.
Trunk needs to be merged back so we can see what the actual change
needed is here.

https://codereview.appspot.com/7305051/

Revision history for this message
Nick Craig-Wood (nick-craig-wood) wrote :

Arg, I've messed something up - probably this branch!

bzr diff -c38 | diffstat
 responses_test.go | 19 +++++++++++++++
 s3.go | 68 ++++++++++++++++++++++++++++++++++++++++++------------
 s3_test.go | 29 +++++++++++++++++++++++
 3 files changed, 102 insertions(+), 14 deletions(-)

Will try a new branch

Unmerged revisions

38. By Nick Craig-Wood

Implement S3.List to list all Buckets

37. By Ian Booth

Support EC2_ env variables

Allow the user to specify their auth credentials using EC2_ style
environment variables. I ran go fmt and it also made some changes.

The tests failed to run due to a test http server not being closed when
each test suite finished. I added a fix for this also, so now all tests
pass when go test ./... is run from the project's root directory.

R=jameinel, Danilo
CC=
https://codereview.appspot.com/9545045

36. By Gustavo Niemeyer

s3: close http response Body properly

The interface of the run method was error prone.

R=dfc, anacrolix
CC=
https://codereview.appspot.com/9611047

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches