From 11db8185bce3df948034d4fb511962bded8f07c3 Mon Sep 17 00:00:00 2001 From: "Frederick F. Kautz IV" Date: Mon, 23 Mar 2015 21:57:24 -0700 Subject: [PATCH] Updating MSOpenTech/azure-sdk-for-go to latest master Signed-off-by: Frederick F. Kautz IV --- Godeps/Godeps.json | 6 +++--- .../{clients => }/storage/blob.go | 0 .../{clients => }/storage/blob_test.go | 0 .../{clients => }/storage/client.go | 18 ++++++++++-------- .../{clients => }/storage/client_test.go | 0 .../{clients => }/storage/util.go | 0 .../{clients => }/storage/util_test.go | 0 registry/storage/driver/azure/azure.go | 2 +- registry/storage/driver/azure/blockblob.go | 2 +- .../storage/driver/azure/blockblob_test.go | 2 +- registry/storage/driver/azure/blockid.go | 2 +- registry/storage/driver/azure/blockid_test.go | 2 +- registry/storage/driver/azure/randomwriter.go | 2 +- .../storage/driver/azure/randomwriter_test.go | 2 +- 14 files changed, 20 insertions(+), 18 deletions(-) rename Godeps/_workspace/src/github.com/MSOpenTech/azure-sdk-for-go/{clients => }/storage/blob.go (100%) rename Godeps/_workspace/src/github.com/MSOpenTech/azure-sdk-for-go/{clients => }/storage/blob_test.go (100%) rename Godeps/_workspace/src/github.com/MSOpenTech/azure-sdk-for-go/{clients => }/storage/client.go (95%) rename Godeps/_workspace/src/github.com/MSOpenTech/azure-sdk-for-go/{clients => }/storage/client_test.go (100%) rename Godeps/_workspace/src/github.com/MSOpenTech/azure-sdk-for-go/{clients => }/storage/util.go (100%) rename Godeps/_workspace/src/github.com/MSOpenTech/azure-sdk-for-go/{clients => }/storage/util_test.go (100%) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index bf79860c..903978ee 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -1,6 +1,6 @@ { "ImportPath": "github.com/docker/distribution", - "GoVersion": "go1.4.1", + "GoVersion": "go1.4.2", "Packages": [ "./..." ], @@ -24,8 +24,8 @@ }, { "ImportPath": "github.com/MSOpenTech/azure-sdk-for-go", - "Comment": "v1.2", - "Rev": "0fbd37144de3adc2aef74db867c0e15e41c7f74a" + "Comment": "v1.2-43-gd90753b", + "Rev": "d90753bcad2ed782fcead7392d1e831df29aa2bb" }, { "ImportPath": "github.com/Sirupsen/logrus", diff --git a/Godeps/_workspace/src/github.com/MSOpenTech/azure-sdk-for-go/clients/storage/blob.go b/Godeps/_workspace/src/github.com/MSOpenTech/azure-sdk-for-go/storage/blob.go similarity index 100% rename from Godeps/_workspace/src/github.com/MSOpenTech/azure-sdk-for-go/clients/storage/blob.go rename to Godeps/_workspace/src/github.com/MSOpenTech/azure-sdk-for-go/storage/blob.go diff --git a/Godeps/_workspace/src/github.com/MSOpenTech/azure-sdk-for-go/clients/storage/blob_test.go b/Godeps/_workspace/src/github.com/MSOpenTech/azure-sdk-for-go/storage/blob_test.go similarity index 100% rename from Godeps/_workspace/src/github.com/MSOpenTech/azure-sdk-for-go/clients/storage/blob_test.go rename to Godeps/_workspace/src/github.com/MSOpenTech/azure-sdk-for-go/storage/blob_test.go diff --git a/Godeps/_workspace/src/github.com/MSOpenTech/azure-sdk-for-go/clients/storage/client.go b/Godeps/_workspace/src/github.com/MSOpenTech/azure-sdk-for-go/storage/client.go similarity index 95% rename from Godeps/_workspace/src/github.com/MSOpenTech/azure-sdk-for-go/clients/storage/client.go rename to Godeps/_workspace/src/github.com/MSOpenTech/azure-sdk-for-go/storage/client.go index 1cbabaee..2928dbab 100644 --- a/Godeps/_workspace/src/github.com/MSOpenTech/azure-sdk-for-go/clients/storage/client.go +++ b/Godeps/_workspace/src/github.com/MSOpenTech/azure-sdk-for-go/storage/client.go @@ -56,33 +56,35 @@ type StorageServiceError struct { // NewBasicClient constructs a StorageClient with given storage service name // and key. -func NewBasicClient(accountName, accountKey string) (*StorageClient, error) { +func NewBasicClient(accountName, accountKey string) (StorageClient, error) { return NewClient(accountName, accountKey, DefaultBaseUrl, DefaultApiVersion, defaultUseHttps) } // NewClient constructs a StorageClient. This should be used if the caller // wants to specify whether to use HTTPS, a specific REST API version or a // custom storage endpoint than Azure Public Cloud. -func NewClient(accountName, accountKey, blobServiceBaseUrl, apiVersion string, useHttps bool) (*StorageClient, error) { +func NewClient(accountName, accountKey, blobServiceBaseUrl, apiVersion string, useHttps bool) (StorageClient, error) { + var c StorageClient if accountName == "" { - return nil, fmt.Errorf("azure: account name required") + return c, fmt.Errorf("azure: account name required") } else if accountKey == "" { - return nil, fmt.Errorf("azure: account key required") + return c, fmt.Errorf("azure: account key required") } else if blobServiceBaseUrl == "" { - return nil, fmt.Errorf("azure: base storage service url required") + return c, fmt.Errorf("azure: base storage service url required") } key, err := base64.StdEncoding.DecodeString(accountKey) if err != nil { - return nil, err + return c, err } - return &StorageClient{ + return StorageClient{ accountName: accountName, accountKey: key, useHttps: useHttps, baseUrl: blobServiceBaseUrl, - apiVersion: apiVersion}, nil + apiVersion: apiVersion, + }, nil } func (c StorageClient) getBaseUrl(service string) string { diff --git a/Godeps/_workspace/src/github.com/MSOpenTech/azure-sdk-for-go/clients/storage/client_test.go b/Godeps/_workspace/src/github.com/MSOpenTech/azure-sdk-for-go/storage/client_test.go similarity index 100% rename from Godeps/_workspace/src/github.com/MSOpenTech/azure-sdk-for-go/clients/storage/client_test.go rename to Godeps/_workspace/src/github.com/MSOpenTech/azure-sdk-for-go/storage/client_test.go diff --git a/Godeps/_workspace/src/github.com/MSOpenTech/azure-sdk-for-go/clients/storage/util.go b/Godeps/_workspace/src/github.com/MSOpenTech/azure-sdk-for-go/storage/util.go similarity index 100% rename from Godeps/_workspace/src/github.com/MSOpenTech/azure-sdk-for-go/clients/storage/util.go rename to Godeps/_workspace/src/github.com/MSOpenTech/azure-sdk-for-go/storage/util.go diff --git a/Godeps/_workspace/src/github.com/MSOpenTech/azure-sdk-for-go/clients/storage/util_test.go b/Godeps/_workspace/src/github.com/MSOpenTech/azure-sdk-for-go/storage/util_test.go similarity index 100% rename from Godeps/_workspace/src/github.com/MSOpenTech/azure-sdk-for-go/clients/storage/util_test.go rename to Godeps/_workspace/src/github.com/MSOpenTech/azure-sdk-for-go/storage/util_test.go diff --git a/registry/storage/driver/azure/azure.go b/registry/storage/driver/azure/azure.go index 6ccbff40..20ed2e34 100644 --- a/registry/storage/driver/azure/azure.go +++ b/registry/storage/driver/azure/azure.go @@ -15,7 +15,7 @@ import ( "github.com/docker/distribution/registry/storage/driver/base" "github.com/docker/distribution/registry/storage/driver/factory" - azure "github.com/MSOpenTech/azure-sdk-for-go/clients/storage" + azure "github.com/MSOpenTech/azure-sdk-for-go/storage" ) const driverName = "azure" diff --git a/registry/storage/driver/azure/blockblob.go b/registry/storage/driver/azure/blockblob.go index d868453f..10b2bf21 100644 --- a/registry/storage/driver/azure/blockblob.go +++ b/registry/storage/driver/azure/blockblob.go @@ -4,7 +4,7 @@ import ( "fmt" "io" - azure "github.com/MSOpenTech/azure-sdk-for-go/clients/storage" + azure "github.com/MSOpenTech/azure-sdk-for-go/storage" ) // azureBlockStorage is adaptor between azure.BlobStorageClient and diff --git a/registry/storage/driver/azure/blockblob_test.go b/registry/storage/driver/azure/blockblob_test.go index f1e39027..c29b4742 100644 --- a/registry/storage/driver/azure/blockblob_test.go +++ b/registry/storage/driver/azure/blockblob_test.go @@ -6,7 +6,7 @@ import ( "io" "io/ioutil" - azure "github.com/MSOpenTech/azure-sdk-for-go/clients/storage" + azure "github.com/MSOpenTech/azure-sdk-for-go/storage" ) type StorageSimulator struct { diff --git a/registry/storage/driver/azure/blockid.go b/registry/storage/driver/azure/blockid.go index 61f41ebc..f6bda6a8 100644 --- a/registry/storage/driver/azure/blockid.go +++ b/registry/storage/driver/azure/blockid.go @@ -7,7 +7,7 @@ import ( "sync" "time" - azure "github.com/MSOpenTech/azure-sdk-for-go/clients/storage" + azure "github.com/MSOpenTech/azure-sdk-for-go/storage" ) type blockIDGenerator struct { diff --git a/registry/storage/driver/azure/blockid_test.go b/registry/storage/driver/azure/blockid_test.go index 46d52a34..6569e15d 100644 --- a/registry/storage/driver/azure/blockid_test.go +++ b/registry/storage/driver/azure/blockid_test.go @@ -4,7 +4,7 @@ import ( "math" "testing" - azure "github.com/MSOpenTech/azure-sdk-for-go/clients/storage" + azure "github.com/MSOpenTech/azure-sdk-for-go/storage" ) func Test_blockIdGenerator(t *testing.T) { diff --git a/registry/storage/driver/azure/randomwriter.go b/registry/storage/driver/azure/randomwriter.go index c89dd0a3..b570d559 100644 --- a/registry/storage/driver/azure/randomwriter.go +++ b/registry/storage/driver/azure/randomwriter.go @@ -5,7 +5,7 @@ import ( "io" "io/ioutil" - azure "github.com/MSOpenTech/azure-sdk-for-go/clients/storage" + azure "github.com/MSOpenTech/azure-sdk-for-go/storage" ) // blockStorage is the interface required from a block storage service diff --git a/registry/storage/driver/azure/randomwriter_test.go b/registry/storage/driver/azure/randomwriter_test.go index 5201e3b4..2c7480db 100644 --- a/registry/storage/driver/azure/randomwriter_test.go +++ b/registry/storage/driver/azure/randomwriter_test.go @@ -9,7 +9,7 @@ import ( "strings" "testing" - azure "github.com/MSOpenTech/azure-sdk-for-go/clients/storage" + azure "github.com/MSOpenTech/azure-sdk-for-go/storage" ) func TestRandomWriter_writeChunkToBlocks(t *testing.T) {