Debian Codegraph @

storage/2017-07-29/file/directories/README.md

raw
1 ## File Storage Directories SDK for API version 2017-07-29
2
3 This package allows you to interact with the Directories File 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/file/directories"
21 )
22
23 func Example() error {
24 accountName := "storageaccount1"
25 storageAccountKey := "ABC123...."
26 shareName := "myshare"
27 directoryName := "myfiles"
28
29 storageAuth := autorest.NewSharedKeyLiteAuthorizer(accountName, storageAccountKey)
30 directoriesClient := directories.New()
31 directoriesClient.Client.Authorizer = storageAuth
32
33 ctx := context.TODO()
34 metadata := map[string]string{
35 "hello": "world",
36 }
37 if _, err := directoriesClient.Create(ctx, accountName, shareName, directoryName, metadata); err != nil {
38 return fmt.Errorf("Error creating Directory: %s", err)
39 }
40
41 return nil
42 }
43 ```