Update Azure Gateway to azure-storage-blob SDK (#8537)

The azure-sdk-for-go/storage package has been in maintenance-
only mode since February 2018 (see [1]) and will be deprecated in the future.
This commit is contained in:
Clemens Wolff
2019-12-02 12:32:19 -05:00
committed by Harshavardhana
parent 5d3d57c12a
commit 947bc8c7d3
6 changed files with 444 additions and 939 deletions

View File

@@ -23,7 +23,7 @@ import (
"net/http"
"strings"
"github.com/Azure/azure-sdk-for-go/storage"
"github.com/Azure/azure-storage-blob-go/azblob"
"github.com/aliyun/aliyun-oss-go-sdk/oss"
"google.golang.org/api/googleapi"
@@ -1796,11 +1796,11 @@ func toAPIError(ctx context.Context, err error) APIError {
apiErr.Code = e.Errors[0].Reason
}
case storage.AzureStorageServiceError:
case azblob.StorageError:
apiErr = APIError{
Code: e.Code,
Description: e.Message,
HTTPStatusCode: e.StatusCode,
Code: string(e.ServiceCode()),
Description: e.Error(),
HTTPStatusCode: e.Response().StatusCode,
}
case oss.ServiceError:
apiErr = APIError{