initial commit
This commit is contained in:
17
internal/pkg/azure/azblob/azblob.go
Normal file
17
internal/pkg/azure/azblob/azblob.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package azblob
|
||||
|
||||
import (
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
|
||||
"github.com/rs/zerolog"
|
||||
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/storage/azblob"
|
||||
)
|
||||
|
||||
func New(logger zerolog.Logger, cred *azidentity.DefaultAzureCredential) (*azblob.Client, error) {
|
||||
client, err := azblob.NewClientFromConnectionString("", nil)
|
||||
if err != nil {
|
||||
logger.Error().Err(err).Msg("failed to create azure blob storage client")
|
||||
return nil, err
|
||||
}
|
||||
return client, nil
|
||||
}
|
||||
Reference in New Issue
Block a user