vendor, internal/build: fix OpenBSD by bumping Azure libs (#17966)
* bump azure-storage-blob-go dependency to 0.3.0 release * update azure-storage-blob-go module import path * fix multiple return values on azblob.NewSharedKeyCredential * vendor: bump Azure libs to latest from upstream
This commit is contained in:
committed by
Péter Szilágyi
parent
4f56790efc
commit
57d9c93dcd
@ -22,7 +22,7 @@ import (
|
||||
"net/url"
|
||||
"os"
|
||||
|
||||
"github.com/Azure/azure-storage-blob-go/2018-03-28/azblob"
|
||||
"github.com/Azure/azure-storage-blob-go/azblob"
|
||||
)
|
||||
|
||||
// AzureBlobstoreConfig is an authentication and configuration struct containing
|
||||
@ -45,7 +45,11 @@ func AzureBlobstoreUpload(path string, name string, config AzureBlobstoreConfig)
|
||||
return nil
|
||||
}
|
||||
// Create an authenticated client against the Azure cloud
|
||||
credential := azblob.NewSharedKeyCredential(config.Account, config.Token)
|
||||
credential, err := azblob.NewSharedKeyCredential(config.Account, config.Token)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
pipeline := azblob.NewPipeline(credential, azblob.PipelineOptions{})
|
||||
|
||||
u, _ := url.Parse(fmt.Sprintf("https://%s.blob.core.windows.net", config.Account))
|
||||
@ -67,7 +71,11 @@ func AzureBlobstoreUpload(path string, name string, config AzureBlobstoreConfig)
|
||||
|
||||
// AzureBlobstoreList lists all the files contained within an azure blobstore.
|
||||
func AzureBlobstoreList(config AzureBlobstoreConfig) ([]azblob.BlobItem, error) {
|
||||
credential := azblob.NewSharedKeyCredential(config.Account, config.Token)
|
||||
credential, err := azblob.NewSharedKeyCredential(config.Account, config.Token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
pipeline := azblob.NewPipeline(credential, azblob.PipelineOptions{})
|
||||
|
||||
u, _ := url.Parse(fmt.Sprintf("https://%s.blob.core.windows.net", config.Account))
|
||||
@ -95,7 +103,11 @@ func AzureBlobstoreDelete(config AzureBlobstoreConfig, blobs []azblob.BlobItem)
|
||||
return nil
|
||||
}
|
||||
// Create an authenticated client against the Azure cloud
|
||||
credential := azblob.NewSharedKeyCredential(config.Account, config.Token)
|
||||
credential, err := azblob.NewSharedKeyCredential(config.Account, config.Token)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
pipeline := azblob.NewPipeline(credential, azblob.PipelineOptions{})
|
||||
|
||||
u, _ := url.Parse(fmt.Sprintf("https://%s.blob.core.windows.net", config.Account))
|
||||
|
Reference in New Issue
Block a user