Skip to content

Commit

Permalink
ARO-9711 update Blob Client naming and comments
Browse files Browse the repository at this point in the history
  • Loading branch information
rajdeepc2792 committed Oct 9, 2024
1 parent b5d82ac commit eea3e5d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 17 deletions.
5 changes: 3 additions & 2 deletions pkg/util/azureclient/azuresdk/azblob/blobs.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ type blobsClient struct {

var _ BlobsClient = &blobsClient{}

// NewBlobsClient creates a new BlobsClient using SAS
// NewBlobsClientUsingSAS creates a new BlobsClient using SAS
func NewBlobsClientUsingSAS(ctx context.Context, environment *azureclient.AROEnvironment, sasURL string) (*blobsClient, error) {
customRoundTripper := azureclient.NewCustomRoundTripper(http.DefaultTransport)

Expand All @@ -51,7 +51,8 @@ func NewBlobsClientUsingSAS(ctx context.Context, environment *azureclient.AROEnv
}, nil
}

func NewBlobsClient(ctx context.Context, environment *azureclient.AROEnvironment, serviceURL string, credential azcore.TokenCredential) (*blobsClient, error) {
// NewBlobsClientUsingEntra creates a new BlobsClient Microsoft Entra credentials
func NewBlobsClientUsingEntra(ctx context.Context, environment *azureclient.AROEnvironment, serviceURL string, credential azcore.TokenCredential) (*blobsClient, error) {
customRoundTripper := azureclient.NewCustomRoundTripper(http.DefaultTransport)

options := &azblob.ClientOptions{
Expand Down
14 changes: 0 additions & 14 deletions pkg/util/mocks/env/env.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/util/storage/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func getCorrectErrWhenTooManyRequests(err error) error {
func (m *manager) BlobService(ctx context.Context, resourceGroup, account string, p storagesdk.Permissions, r storagesdk.SignedResourceTypes) (blobClient azblob.BlobsClient, err error) {
serviceURL := fmt.Sprintf("https://%s.blob.%s", account, m.env.Environment().StorageEndpointSuffix)
if m.usesWorkloadIdentity {
blobClient, err = azblob.NewBlobsClient(ctx, m.env.Environment(), serviceURL, m.credential)
blobClient, err = azblob.NewBlobsClientUsingEntra(ctx, m.env.Environment(), serviceURL, m.credential)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit eea3e5d

Please sign in to comment.