1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
|
## Blob Storage Container SDK for API version 2017-07-29
This package allows you to interact with the Containers Blob Storage API
### Supported Authorizers
* SharedKeyLite (Blob, File & Queue)
Note: when using the `ListBlobs` operation, only `SharedKeyLite` authentication is supported.
### Example Usage
```go
package main
import (
"context"
"fmt"
"time"
"github.com/Azure/go-autorest/autorest"
"github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/containers"
)
func Example() error {
accountName := "storageaccount1"
storageAccountKey := "ABC123...."
containerName := "mycontainer"
storageAuth := autorest.NewSharedKeyLiteAuthorizer(accountName, storageAccountKey)
containersClient := containers.New()
containersClient.Client.Authorizer = storageAuth
ctx := context.TODO()
createInput := containers.CreateInput{
AccessLevel: containers.Private,
}
if _, err := containersClient.Create(ctx, accountName, containerName, createInput); err != nil {
return fmt.Errorf("Error creating Container: %s", err)
}
return nil
}
```
|