| 1 | ## Queue Storage Queues SDK for API version 2017-07-29 |
| 2 | |
| 3 | This package allows you to interact with the Queues Queue Storage API |
| 4 | |
| 5 | ### Supported Authorizers |
| 6 | |
| 7 | * SharedKeyLite (Blob, File & Queue) |
| 8 | |
| 9 | ### Example Usage |
| 10 | |
| 11 | ```go |
| 12 | package main |
| 13 | |
| 14 | import ( |
| 15 | "context" |
| 16 | "fmt" |
| 17 | "time" |
| 18 | |
| 19 | "github.com/Azure/go-autorest/autorest" |
| 20 | "github.com/tombuildsstuff/giovanni/storage/2017-07-29/queue/queues" |
| 21 | ) |
| 22 | |
| 23 | func Example() error { |
| 24 | accountName := "storageaccount1" |
| 25 | storageAccountKey := "ABC123...." |
| 26 | queueName := "myqueue" |
| 27 | |
| 28 | storageAuth := autorest.NewSharedKeyLiteAuthorizer(accountName, storageAccountKey) |
| 29 | queuesClient := queues.New() |
| 30 | queuesClient.Client.Authorizer = storageAuth |
| 31 | |
| 32 | ctx := context.TODO() |
| 33 | metadata := map[string]string{ |
| 34 | "hello": "world", |
| 35 | } |
| 36 | if _, err := queuesClient.Create(ctx, accountName, queueName, metadata); err != nil { |
| 37 | return fmt.Errorf("Error creating Queue: %s", err) |
| 38 | } |
| 39 | |
| 40 | return nil |
| 41 | } |
| 42 | ``` |