Debian Codegraph @

storage/2018-11-09/queue/queues/README.md

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