From 9c136efa4dbbde2c83f7a373a5e8d7bfd1bcc2e7 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Sat, 23 May 2015 16:10:58 -0700 Subject: [PATCH] Move mc to minio-go from objectstorage-go --- Godeps/Godeps.json | 8 +++---- .../.travis.yml | 0 .../CONTRIBUTING.md | 18 ++++---------- .../{objectstorage-go => minio-go}/LICENSE | 0 .../{objectstorage-go => minio-go}/README.md | 6 ++--- .../{objectstorage-go => minio-go}/api.go | 10 ++++---- .../api_objecthandlers_test.go | 2 +- .../api_test.go | 2 +- .../examples/play/get_object.go | 6 ++--- .../examples/play/list_buckets.go | 6 ++--- .../examples/play/list_objects.go | 6 ++--- .../examples/play/put_object.go | 6 ++--- .../examples/play/testfile | Bin .../examples/s3/get_object.go | 6 ++--- .../examples/s3/list_buckets.go | 6 ++--- .../examples/s3/list_objects.go | 6 ++--- .../examples/s3/multipart_abort_all.go | 6 ++--- .../examples/s3/put_object.go | 6 ++--- .../examples/s3/testfile | Bin .../low_level_api.go | 2 +- .../low_level_common.go | 2 +- .../low_level_definitions.go | 2 +- .../low_level_errors.go | 2 +- .../low_level_multipart_api.go | 2 +- .../low_level_request.go | 2 +- .../multipart.go | 2 +- pkg/client/s3/s3.go | 22 +++++++++--------- 27 files changed, 64 insertions(+), 72 deletions(-) rename Godeps/_workspace/src/github.com/minio/{objectstorage-go => minio-go}/.travis.yml (100%) rename Godeps/_workspace/src/github.com/minio/{objectstorage-go => minio-go}/CONTRIBUTING.md (53%) rename Godeps/_workspace/src/github.com/minio/{objectstorage-go => minio-go}/LICENSE (100%) rename Godeps/_workspace/src/github.com/minio/{objectstorage-go => minio-go}/README.md (69%) rename Godeps/_workspace/src/github.com/minio/{objectstorage-go => minio-go}/api.go (98%) rename Godeps/_workspace/src/github.com/minio/{objectstorage-go => minio-go}/api_objecthandlers_test.go (99%) rename Godeps/_workspace/src/github.com/minio/{objectstorage-go => minio-go}/api_test.go (99%) rename Godeps/_workspace/src/github.com/minio/{objectstorage-go => minio-go}/examples/play/get_object.go (91%) rename Godeps/_workspace/src/github.com/minio/{objectstorage-go => minio-go}/examples/play/list_buckets.go (89%) rename Godeps/_workspace/src/github.com/minio/{objectstorage-go => minio-go}/examples/play/list_objects.go (90%) rename Godeps/_workspace/src/github.com/minio/{objectstorage-go => minio-go}/examples/play/put_object.go (91%) rename Godeps/_workspace/src/github.com/minio/{objectstorage-go => minio-go}/examples/play/testfile (100%) rename Godeps/_workspace/src/github.com/minio/{objectstorage-go => minio-go}/examples/s3/get_object.go (91%) rename Godeps/_workspace/src/github.com/minio/{objectstorage-go => minio-go}/examples/s3/list_buckets.go (89%) rename Godeps/_workspace/src/github.com/minio/{objectstorage-go => minio-go}/examples/s3/list_objects.go (90%) rename Godeps/_workspace/src/github.com/minio/{objectstorage-go => minio-go}/examples/s3/multipart_abort_all.go (89%) rename Godeps/_workspace/src/github.com/minio/{objectstorage-go => minio-go}/examples/s3/put_object.go (91%) rename Godeps/_workspace/src/github.com/minio/{objectstorage-go => minio-go}/examples/s3/testfile (100%) rename Godeps/_workspace/src/github.com/minio/{objectstorage-go => minio-go}/low_level_api.go (99%) rename Godeps/_workspace/src/github.com/minio/{objectstorage-go => minio-go}/low_level_common.go (99%) rename Godeps/_workspace/src/github.com/minio/{objectstorage-go => minio-go}/low_level_definitions.go (99%) rename Godeps/_workspace/src/github.com/minio/{objectstorage-go => minio-go}/low_level_errors.go (98%) rename Godeps/_workspace/src/github.com/minio/{objectstorage-go => minio-go}/low_level_multipart_api.go (99%) rename Godeps/_workspace/src/github.com/minio/{objectstorage-go => minio-go}/low_level_request.go (99%) rename Godeps/_workspace/src/github.com/minio/{objectstorage-go => minio-go}/multipart.go (99%) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 565c0721..bf2b8057 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -31,12 +31,12 @@ "Rev": "432a1019ded42d1b34fb5f1aad60fb609245d5a1" }, { - "ImportPath": "github.com/minio/minio/pkg/iodine", - "Rev": "0f58045480309d4b13fe45878f05736c3ff20e7e" + "ImportPath": "github.com/minio/minio-go", + "Rev": "eea7789129cfc58972977dd19c4729e2e559c8fc" }, { - "ImportPath": "github.com/minio/objectstorage-go", - "Rev": "7e4b2520052fedcc40be93c93cbb13688d11285d" + "ImportPath": "github.com/minio/minio/pkg/iodine", + "Rev": "0f58045480309d4b13fe45878f05736c3ff20e7e" }, { "ImportPath": "github.com/shiena/ansicolor", diff --git a/Godeps/_workspace/src/github.com/minio/objectstorage-go/.travis.yml b/Godeps/_workspace/src/github.com/minio/minio-go/.travis.yml similarity index 100% rename from Godeps/_workspace/src/github.com/minio/objectstorage-go/.travis.yml rename to Godeps/_workspace/src/github.com/minio/minio-go/.travis.yml diff --git a/Godeps/_workspace/src/github.com/minio/objectstorage-go/CONTRIBUTING.md b/Godeps/_workspace/src/github.com/minio/minio-go/CONTRIBUTING.md similarity index 53% rename from Godeps/_workspace/src/github.com/minio/objectstorage-go/CONTRIBUTING.md rename to Godeps/_workspace/src/github.com/minio/minio-go/CONTRIBUTING.md index 08a857ac..662b7fc0 100644 --- a/Godeps/_workspace/src/github.com/minio/objectstorage-go/CONTRIBUTING.md +++ b/Godeps/_workspace/src/github.com/minio/minio-go/CONTRIBUTING.md @@ -1,15 +1,12 @@ -### Setup your objectstorage-go Github Repository -Fork [objectstorage-go upstream](https://github.com/minio/objectstorage-go/fork) source repository to your own personal repository. +### Setup your minio-go Github Repository +Fork [minio-go upstream](https://github.com/minio/minio-go/fork) source repository to your own personal repository. ```sh -$ git clone https://github.com/$USER_ID/objectstorage-go -$ cd objectstorage-go -$ make -$ objectstorage-go --help +$ godep get https://github.com/$USER_ID/minio-go ``` ### Developer Guidelines -``objectstorage-go`` welcomes your contribution. To make the process as seamless as possible, we ask for the following: +``minio-go`` welcomes your contribution. To make the process as seamless as possible, we ask for the following: * Go ahead and fork the project and make your changes. We encourage pull requests to discuss code changes. - Fork it @@ -18,11 +15,6 @@ $ objectstorage-go --help - Push to the branch (git push origin my-new-feature) - Create new Pull Request -* If you have additional dependencies for ``objectstorage-go``, ``objectstorage-go`` manages its depedencies using [godep](https://github.com/tools/godep) - - Run `go get foo/bar` - - Edit your code to import foo/bar - - Run `make save` from top-level directory (or `godep restore && godep save ./...`). - * When you're ready to create a pull request, be sure to: - Have test cases for the new code. If you have questions about how to do it, please ask in your pull request. - Run `go fmt` @@ -30,5 +22,5 @@ $ objectstorage-go --help - Make sure `go test -race ./...` and `go build` completes. * Read [Effective Go](https://github.com/golang/go/wiki/CodeReviewComments) article from Golang project - - `objectstorage-go` project is strictly conformant with Golang style + - `minio-go` project is strictly conformant with Golang style - if you happen to observe offending code, please feel free to send a pull request diff --git a/Godeps/_workspace/src/github.com/minio/objectstorage-go/LICENSE b/Godeps/_workspace/src/github.com/minio/minio-go/LICENSE similarity index 100% rename from Godeps/_workspace/src/github.com/minio/objectstorage-go/LICENSE rename to Godeps/_workspace/src/github.com/minio/minio-go/LICENSE diff --git a/Godeps/_workspace/src/github.com/minio/objectstorage-go/README.md b/Godeps/_workspace/src/github.com/minio/minio-go/README.md similarity index 69% rename from Godeps/_workspace/src/github.com/minio/objectstorage-go/README.md rename to Godeps/_workspace/src/github.com/minio/minio-go/README.md index 1eb36c3c..130c6e35 100644 --- a/Godeps/_workspace/src/github.com/minio/objectstorage-go/README.md +++ b/Godeps/_workspace/src/github.com/minio/minio-go/README.md @@ -1,16 +1,16 @@ # Minimal object storage library in Go -[![Build Status](https://travis-ci.org/minio/objectstorage-go.svg)](https://travis-ci.org/minio/objectstorage-go) +[![Build Status](https://travis-ci.org/minio/minio-go.svg)](https://travis-ci.org/minio/minio-go) ## Install ```go -# go get github.com/minio/objectstorage-go +# go get github.com/minio/minio-go ``` ## Documentation -[Objectstorage library in Go](http://godoc.org/github.com/minio/objectstorage-go) +[Minimal object storage library in Go](http://godoc.org/github.com/minio/minio-go) ## Join Community * Community hangout on Gitter [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/minio/minio?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) diff --git a/Godeps/_workspace/src/github.com/minio/objectstorage-go/api.go b/Godeps/_workspace/src/github.com/minio/minio-go/api.go similarity index 98% rename from Godeps/_workspace/src/github.com/minio/objectstorage-go/api.go rename to Godeps/_workspace/src/github.com/minio/minio-go/api.go index 5b3b5adb..6e10c564 100644 --- a/Godeps/_workspace/src/github.com/minio/objectstorage-go/api.go +++ b/Godeps/_workspace/src/github.com/minio/minio-go/api.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package objectstorage +package client import ( "errors" @@ -132,7 +132,7 @@ type Config struct { AcceptType string // specify this to get server response in non XML style if server supports it Transport http.RoundTripper // custom transport usually for debugging, by default its nil // internal - // use AddUserAgent append to default, useful when objectstorage-go is used with in your application + // use AddUserAgent append to default, useful when minio-go is used with in your application userAgent string } @@ -173,7 +173,7 @@ func (c *Config) AddUserAgent(name string, version string, comments ...string) { // Global constants const ( - LibraryName = "objectstorage-go" + LibraryName = "minio-go" LibraryVersion = "0.1" ) @@ -596,7 +596,7 @@ func (a *api) listObjectsInRoutine(bucket, prefix string, recursive bool, ch cha // If you enable recursive as 'true' this function will return back all the objects in a given bucket // // eg:- -// api := objectstorage.New(....) +// api := client.New(....) // for message := range api.ListObjects("mytestbucket", "starthere", true) { // fmt.Println(message.Data) // } @@ -635,7 +635,7 @@ func (a *api) listBucketsInRoutine(ch chan BucketOnChannel) { // requests are allowed for listing buckets // // eg:- -// api := objectstorage.New(....) +// api := client.New(....) // for message := range api.ListBuckets() { // fmt.Println(message.Data) // } diff --git a/Godeps/_workspace/src/github.com/minio/objectstorage-go/api_objecthandlers_test.go b/Godeps/_workspace/src/github.com/minio/minio-go/api_objecthandlers_test.go similarity index 99% rename from Godeps/_workspace/src/github.com/minio/objectstorage-go/api_objecthandlers_test.go rename to Godeps/_workspace/src/github.com/minio/minio-go/api_objecthandlers_test.go index eaddb584..54674ca3 100644 --- a/Godeps/_workspace/src/github.com/minio/objectstorage-go/api_objecthandlers_test.go +++ b/Godeps/_workspace/src/github.com/minio/minio-go/api_objecthandlers_test.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package objectstorage +package client // bucketHandler is an http.Handler that verifies bucket responses and validates incoming requests import ( diff --git a/Godeps/_workspace/src/github.com/minio/objectstorage-go/api_test.go b/Godeps/_workspace/src/github.com/minio/minio-go/api_test.go similarity index 99% rename from Godeps/_workspace/src/github.com/minio/objectstorage-go/api_test.go rename to Godeps/_workspace/src/github.com/minio/minio-go/api_test.go index 6c741336..ddac697e 100644 --- a/Godeps/_workspace/src/github.com/minio/objectstorage-go/api_test.go +++ b/Godeps/_workspace/src/github.com/minio/minio-go/api_test.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package objectstorage +package client import ( "bytes" diff --git a/Godeps/_workspace/src/github.com/minio/objectstorage-go/examples/play/get_object.go b/Godeps/_workspace/src/github.com/minio/minio-go/examples/play/get_object.go similarity index 91% rename from Godeps/_workspace/src/github.com/minio/objectstorage-go/examples/play/get_object.go rename to Godeps/_workspace/src/github.com/minio/minio-go/examples/play/get_object.go index 47077fdf..45db55d6 100644 --- a/Godeps/_workspace/src/github.com/minio/objectstorage-go/examples/play/get_object.go +++ b/Godeps/_workspace/src/github.com/minio/minio-go/examples/play/get_object.go @@ -23,16 +23,16 @@ import ( "log" "os" - "github.com/minio/objectstorage-go" + play "github.com/minio/minio-go" ) func main() { - config := new(objectstorage.Config) + config := new(play.Config) config.AccessKeyID = "" config.SecretAccessKey = "" config.Endpoint = "http://play.minio.io:9000" config.AcceptType = "" - m := objectstorage.New(config) + m := play.New(config) reader, size, _, err := m.GetObject("testbucket", "testfile", 0, 0) if err != nil { log.Println(err) diff --git a/Godeps/_workspace/src/github.com/minio/objectstorage-go/examples/play/list_buckets.go b/Godeps/_workspace/src/github.com/minio/minio-go/examples/play/list_buckets.go similarity index 89% rename from Godeps/_workspace/src/github.com/minio/objectstorage-go/examples/play/list_buckets.go rename to Godeps/_workspace/src/github.com/minio/minio-go/examples/play/list_buckets.go index 90e32872..ea00ffd6 100644 --- a/Godeps/_workspace/src/github.com/minio/objectstorage-go/examples/play/list_buckets.go +++ b/Godeps/_workspace/src/github.com/minio/minio-go/examples/play/list_buckets.go @@ -21,16 +21,16 @@ package main import ( "log" - "github.com/minio/objectstorage-go" + play "github.com/minio/minio-go" ) func main() { - config := new(objectstorage.Config) + config := new(play.Config) config.AccessKeyID = "" config.SecretAccessKey = "" config.Endpoint = "http://play.minio.io:9000" config.AcceptType = "" - m := objectstorage.New(config) + m := play.New(config) for message := range m.ListBuckets() { if message.Err != nil { log.Fatal(message.Err) diff --git a/Godeps/_workspace/src/github.com/minio/objectstorage-go/examples/play/list_objects.go b/Godeps/_workspace/src/github.com/minio/minio-go/examples/play/list_objects.go similarity index 90% rename from Godeps/_workspace/src/github.com/minio/objectstorage-go/examples/play/list_objects.go rename to Godeps/_workspace/src/github.com/minio/minio-go/examples/play/list_objects.go index 0f814740..e4e3a0f3 100644 --- a/Godeps/_workspace/src/github.com/minio/objectstorage-go/examples/play/list_objects.go +++ b/Godeps/_workspace/src/github.com/minio/minio-go/examples/play/list_objects.go @@ -21,16 +21,16 @@ package main import ( "log" - "github.com/minio/objectstorage-go" + play "github.com/minio/minio-go" ) func main() { - config := new(objectstorage.Config) + config := new(play.Config) config.AccessKeyID = "" config.SecretAccessKey = "" config.Endpoint = "http://play.minio.io:9000" config.AcceptType = "" - m := objectstorage.New(config) + m := play.New(config) for message := range m.ListObjects("public-bucket", "", true) { if message.Err != nil { log.Fatal(message.Err) diff --git a/Godeps/_workspace/src/github.com/minio/objectstorage-go/examples/play/put_object.go b/Godeps/_workspace/src/github.com/minio/minio-go/examples/play/put_object.go similarity index 91% rename from Godeps/_workspace/src/github.com/minio/objectstorage-go/examples/play/put_object.go rename to Godeps/_workspace/src/github.com/minio/minio-go/examples/play/put_object.go index 1c86d6ae..4cc9826f 100644 --- a/Godeps/_workspace/src/github.com/minio/objectstorage-go/examples/play/put_object.go +++ b/Godeps/_workspace/src/github.com/minio/minio-go/examples/play/put_object.go @@ -22,16 +22,16 @@ import ( "log" "os" - "github.com/minio/objectstorage-go" + play "github.com/minio/minio-go" ) func main() { - config := new(objectstorage.Config) + config := new(play.Config) config.AccessKeyID = "" config.SecretAccessKey = "" config.Endpoint = "http://play.minio.io:9000" config.AcceptType = "" - m := objectstorage.New(config) + m := play.New(config) object, err := os.Open("testfile") if err != nil { log.Fatalln(err) diff --git a/Godeps/_workspace/src/github.com/minio/objectstorage-go/examples/play/testfile b/Godeps/_workspace/src/github.com/minio/minio-go/examples/play/testfile similarity index 100% rename from Godeps/_workspace/src/github.com/minio/objectstorage-go/examples/play/testfile rename to Godeps/_workspace/src/github.com/minio/minio-go/examples/play/testfile diff --git a/Godeps/_workspace/src/github.com/minio/objectstorage-go/examples/s3/get_object.go b/Godeps/_workspace/src/github.com/minio/minio-go/examples/s3/get_object.go similarity index 91% rename from Godeps/_workspace/src/github.com/minio/objectstorage-go/examples/s3/get_object.go rename to Godeps/_workspace/src/github.com/minio/minio-go/examples/s3/get_object.go index 2275f507..0e42d965 100644 --- a/Godeps/_workspace/src/github.com/minio/objectstorage-go/examples/s3/get_object.go +++ b/Godeps/_workspace/src/github.com/minio/minio-go/examples/s3/get_object.go @@ -23,16 +23,16 @@ import ( "log" "os" - "github.com/minio/objectstorage-go" + s3 "github.com/minio/minio-go" ) func main() { - config := new(objectstorage.Config) + config := new(s3.Config) config.AccessKeyID = "" config.SecretAccessKey = "" config.Endpoint = "https://s3.amazonaws.com" config.AcceptType = "" - m := objectstorage.New(config) + m := s3.New(config) reader, size, _, err := m.GetObject("testbucket", "testfile", 0, 0) if err != nil { log.Println(err) diff --git a/Godeps/_workspace/src/github.com/minio/objectstorage-go/examples/s3/list_buckets.go b/Godeps/_workspace/src/github.com/minio/minio-go/examples/s3/list_buckets.go similarity index 89% rename from Godeps/_workspace/src/github.com/minio/objectstorage-go/examples/s3/list_buckets.go rename to Godeps/_workspace/src/github.com/minio/minio-go/examples/s3/list_buckets.go index a1dd6a13..553297dd 100644 --- a/Godeps/_workspace/src/github.com/minio/objectstorage-go/examples/s3/list_buckets.go +++ b/Godeps/_workspace/src/github.com/minio/minio-go/examples/s3/list_buckets.go @@ -21,16 +21,16 @@ package main import ( "log" - "github.com/minio/objectstorage-go" + s3 "github.com/minio/minio-go" ) func main() { - config := new(objectstorage.Config) + config := new(s3.Config) config.AccessKeyID = "" config.SecretAccessKey = "" config.Endpoint = "https://s3.amazonaws.com" config.AcceptType = "" - m := objectstorage.New(config) + m := s3.New(config) for message := range m.ListBuckets() { if message.Err != nil { log.Fatal(message.Err) diff --git a/Godeps/_workspace/src/github.com/minio/objectstorage-go/examples/s3/list_objects.go b/Godeps/_workspace/src/github.com/minio/minio-go/examples/s3/list_objects.go similarity index 90% rename from Godeps/_workspace/src/github.com/minio/objectstorage-go/examples/s3/list_objects.go rename to Godeps/_workspace/src/github.com/minio/minio-go/examples/s3/list_objects.go index 2c61f582..57edcee1 100644 --- a/Godeps/_workspace/src/github.com/minio/objectstorage-go/examples/s3/list_objects.go +++ b/Godeps/_workspace/src/github.com/minio/minio-go/examples/s3/list_objects.go @@ -21,16 +21,16 @@ package main import ( "log" - "github.com/minio/objectstorage-go" + s3 "github.com/minio/minio-go" ) func main() { - config := new(objectstorage.Config) + config := new(s3.Config) config.AccessKeyID = "" config.SecretAccessKey = "" config.Endpoint = "https://s3.amazonaws.com" config.AcceptType = "" - m := objectstorage.New(config) + m := s3.New(config) for message := range m.ListObjects("public-bucket", "", true) { if message.Err != nil { log.Fatal(message.Err) diff --git a/Godeps/_workspace/src/github.com/minio/objectstorage-go/examples/s3/multipart_abort_all.go b/Godeps/_workspace/src/github.com/minio/minio-go/examples/s3/multipart_abort_all.go similarity index 89% rename from Godeps/_workspace/src/github.com/minio/objectstorage-go/examples/s3/multipart_abort_all.go rename to Godeps/_workspace/src/github.com/minio/minio-go/examples/s3/multipart_abort_all.go index e3ca6a29..3098dd80 100644 --- a/Godeps/_workspace/src/github.com/minio/objectstorage-go/examples/s3/multipart_abort_all.go +++ b/Godeps/_workspace/src/github.com/minio/minio-go/examples/s3/multipart_abort_all.go @@ -21,16 +21,16 @@ package main import ( "log" - "github.com/minio/objectstorage-go" + s3 "github.com/minio/minio-go" ) func main() { - config := new(objectstorage.Config) + config := new(s3.Config) config.AccessKeyID = "" config.SecretAccessKey = "" config.Region = "us-east-1" config.AcceptType = "" - m := objectstorage.New(config) + m := s3.New(config) for err := range m.MultipartAbortAll("testbucket") { if err != nil { log.Fatal(err) diff --git a/Godeps/_workspace/src/github.com/minio/objectstorage-go/examples/s3/put_object.go b/Godeps/_workspace/src/github.com/minio/minio-go/examples/s3/put_object.go similarity index 91% rename from Godeps/_workspace/src/github.com/minio/objectstorage-go/examples/s3/put_object.go rename to Godeps/_workspace/src/github.com/minio/minio-go/examples/s3/put_object.go index fce00a2a..58085a09 100644 --- a/Godeps/_workspace/src/github.com/minio/objectstorage-go/examples/s3/put_object.go +++ b/Godeps/_workspace/src/github.com/minio/minio-go/examples/s3/put_object.go @@ -22,16 +22,16 @@ import ( "log" "os" - "github.com/minio/objectstorage-go" + s3 "github.com/minio/minio-go" ) func main() { - config := new(objectstorage.Config) + config := new(s3.Config) config.AccessKeyID = "" config.SecretAccessKey = "" config.Endpoint = "https://s3.amazonaws.com" config.AcceptType = "" - m := objectstorage.New(config) + m := s3.New(config) object, err := os.Open("testfile") if err != nil { log.Fatalln(err) diff --git a/Godeps/_workspace/src/github.com/minio/objectstorage-go/examples/s3/testfile b/Godeps/_workspace/src/github.com/minio/minio-go/examples/s3/testfile similarity index 100% rename from Godeps/_workspace/src/github.com/minio/objectstorage-go/examples/s3/testfile rename to Godeps/_workspace/src/github.com/minio/minio-go/examples/s3/testfile diff --git a/Godeps/_workspace/src/github.com/minio/objectstorage-go/low_level_api.go b/Godeps/_workspace/src/github.com/minio/minio-go/low_level_api.go similarity index 99% rename from Godeps/_workspace/src/github.com/minio/objectstorage-go/low_level_api.go rename to Godeps/_workspace/src/github.com/minio/minio-go/low_level_api.go index f16b88a3..a269dd2a 100644 --- a/Godeps/_workspace/src/github.com/minio/objectstorage-go/low_level_api.go +++ b/Godeps/_workspace/src/github.com/minio/minio-go/low_level_api.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package objectstorage +package client import ( "bytes" diff --git a/Godeps/_workspace/src/github.com/minio/objectstorage-go/low_level_common.go b/Godeps/_workspace/src/github.com/minio/minio-go/low_level_common.go similarity index 99% rename from Godeps/_workspace/src/github.com/minio/objectstorage-go/low_level_common.go rename to Godeps/_workspace/src/github.com/minio/minio-go/low_level_common.go index debd1b3b..a1e8cc5f 100644 --- a/Godeps/_workspace/src/github.com/minio/objectstorage-go/low_level_common.go +++ b/Godeps/_workspace/src/github.com/minio/minio-go/low_level_common.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package objectstorage +package client import ( "crypto/hmac" diff --git a/Godeps/_workspace/src/github.com/minio/objectstorage-go/low_level_definitions.go b/Godeps/_workspace/src/github.com/minio/minio-go/low_level_definitions.go similarity index 99% rename from Godeps/_workspace/src/github.com/minio/objectstorage-go/low_level_definitions.go rename to Godeps/_workspace/src/github.com/minio/minio-go/low_level_definitions.go index d640874e..4bbca24d 100644 --- a/Godeps/_workspace/src/github.com/minio/objectstorage-go/low_level_definitions.go +++ b/Godeps/_workspace/src/github.com/minio/minio-go/low_level_definitions.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package objectstorage +package client import "time" diff --git a/Godeps/_workspace/src/github.com/minio/objectstorage-go/low_level_errors.go b/Godeps/_workspace/src/github.com/minio/minio-go/low_level_errors.go similarity index 98% rename from Godeps/_workspace/src/github.com/minio/objectstorage-go/low_level_errors.go rename to Godeps/_workspace/src/github.com/minio/minio-go/low_level_errors.go index 6845ccf2..fa66b428 100644 --- a/Godeps/_workspace/src/github.com/minio/objectstorage-go/low_level_errors.go +++ b/Godeps/_workspace/src/github.com/minio/minio-go/low_level_errors.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package objectstorage +package client import ( "encoding/xml" diff --git a/Godeps/_workspace/src/github.com/minio/objectstorage-go/low_level_multipart_api.go b/Godeps/_workspace/src/github.com/minio/minio-go/low_level_multipart_api.go similarity index 99% rename from Godeps/_workspace/src/github.com/minio/objectstorage-go/low_level_multipart_api.go rename to Godeps/_workspace/src/github.com/minio/minio-go/low_level_multipart_api.go index 621d5704..8920e6a2 100644 --- a/Godeps/_workspace/src/github.com/minio/objectstorage-go/low_level_multipart_api.go +++ b/Godeps/_workspace/src/github.com/minio/minio-go/low_level_multipart_api.go @@ -1,4 +1,4 @@ -package objectstorage +package client import ( "bytes" diff --git a/Godeps/_workspace/src/github.com/minio/objectstorage-go/low_level_request.go b/Godeps/_workspace/src/github.com/minio/minio-go/low_level_request.go similarity index 99% rename from Godeps/_workspace/src/github.com/minio/objectstorage-go/low_level_request.go rename to Godeps/_workspace/src/github.com/minio/minio-go/low_level_request.go index dc72f524..3f3f711c 100644 --- a/Godeps/_workspace/src/github.com/minio/objectstorage-go/low_level_request.go +++ b/Godeps/_workspace/src/github.com/minio/minio-go/low_level_request.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package objectstorage +package client import ( "bytes" diff --git a/Godeps/_workspace/src/github.com/minio/objectstorage-go/multipart.go b/Godeps/_workspace/src/github.com/minio/minio-go/multipart.go similarity index 99% rename from Godeps/_workspace/src/github.com/minio/objectstorage-go/multipart.go rename to Godeps/_workspace/src/github.com/minio/minio-go/multipart.go index 49a10f98..8b02bcf7 100644 --- a/Godeps/_workspace/src/github.com/minio/objectstorage-go/multipart.go +++ b/Godeps/_workspace/src/github.com/minio/minio-go/multipart.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package objectstorage +package client import ( "bytes" diff --git a/pkg/client/s3/s3.go b/pkg/client/s3/s3.go index 9b222da2..164dafb0 100644 --- a/pkg/client/s3/s3.go +++ b/pkg/client/s3/s3.go @@ -24,8 +24,8 @@ import ( "time" "github.com/minio/mc/pkg/client" + s3 "github.com/minio/minio-go" "github.com/minio/minio/pkg/iodine" - "github.com/minio/objectstorage-go" ) // Config - see http://docs.amazonwebservices.com/AmazonS3/latest/dev/index.html?RESTAuthentication.html @@ -50,7 +50,7 @@ type TLSConfig struct { } type s3Client struct { - api objectstorage.API + api s3.API hostURL *client.URL } @@ -86,14 +86,14 @@ func New(config *Config) (client.Client, error) { default: transport = http.DefaultTransport } - objectstorageConf := new(objectstorage.Config) - objectstorageConf.AccessKeyID = config.AccessKeyID - objectstorageConf.SecretAccessKey = config.SecretAccessKey - objectstorageConf.Transport = transport - objectstorageConf.AddUserAgent(config.AppName, config.AppVersion, config.AppComments...) - objectstorageConf.Region = getRegion(u.Host) - objectstorageConf.Endpoint = u.Scheme + "://" + u.Host - api := objectstorage.New(objectstorageConf) + s3Conf := new(s3.Config) + s3Conf.AccessKeyID = config.AccessKeyID + s3Conf.SecretAccessKey = config.SecretAccessKey + s3Conf.Transport = transport + s3Conf.AddUserAgent(config.AppName, config.AppVersion, config.AppComments...) + s3Conf.Region = getRegion(u.Host) + s3Conf.Endpoint = u.Scheme + "://" + u.Host + api := s3.New(s3Conf) return &s3Client{api: api, hostURL: u}, nil } @@ -114,7 +114,7 @@ func (c *s3Client) PutObject(size uint64, data io.Reader) error { // invidual parts are properly verified bucket, object := c.url2BucketAndObject() // TODO - bump individual part size from default, if needed - // objectstorage.DefaultPartSize = 1024 * 1024 * 100 + // s3.DefaultPartSize = 1024 * 1024 * 100 err := c.api.PutObject(bucket, object, size, data) if err != nil { return iodine.New(err, nil)