in internal/output/azureblobstorage/azure_blob_storage.go [26:36]
func New(opts *output.Options) (output.Output, error) {
if opts.Addr == "" {
return nil, errors.New("azure blob storage address is required")
}
// A connection string is used for multiple reasons, its easier to bypass the URL endpoint, and the hardcoded credentials can easily be passed.
// These credentials are the defaults for the Azurite Emulator, which is why they can simply be hardcoded.
connectionString := fmt.Sprintf("DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://%s:%s/devstoreaccount1;", opts.Addr, opts.AzureBlobStorageOptions.Port)
serviceClient, _ := azblob.NewClientFromConnectionString(connectionString, nil)
return &Output{opts: opts, client: serviceClient}, nil
}