Documentation
¶
Overview ¶
Package bfsaz abstracts Azure Blob Storage.
When imported, it registers a global `az://` scheme resolver and can be used like:
import (
"github.com/bsm/bfs"
_ "github.com/bsm/bfs/bfsaz"
)
func main() {
ctx := context.Background()
b, _ := bfs.Connect(ctx, "az://account.blob.core.windows.net/container?access_key=" + os.Getenv("AZURE_STORAGE_ACCESS_KEY"))
f, _ := b.Open(ctx, "b/c.txt") // opens a blob for reading
...
}
bfs.Connect supports the following query parameters:
access_key - the Azure storage access key
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
// An optional path prefix
Prefix string
// Custom credentials. By default it will look for
// AZURE_STORAGE_ACCESS_KEY env variable and fallback on anonymous access
// if not found.
Credential azblob.Credential
}
Config is passed to New to configure the S3 connection.
Click to show internal directories.
Click to hide internal directories.