Documentation ¶
Index ¶
- Constants
- func UserAgent() string
- type Client
- func (client Client) Create(ctx context.Context, accountName, shareName, path string, ...) (result autorest.Response, err error)
- func (client Client) CreatePreparer(ctx context.Context, accountName, shareName, path string, ...) (*http.Request, error)
- func (client Client) CreateResponder(resp *http.Response) (result autorest.Response, err error)
- func (client Client) CreateSender(req *http.Request) (*http.Response, error)
- func (client Client) Delete(ctx context.Context, accountName, shareName, path string) (result autorest.Response, err error)
- func (client Client) DeletePreparer(ctx context.Context, accountName, shareName, path string) (*http.Request, error)
- func (client Client) DeleteResponder(resp *http.Response) (result autorest.Response, err error)
- func (client Client) DeleteSender(req *http.Request) (*http.Response, error)
- func (client Client) Get(ctx context.Context, accountName, shareName, path string) (result GetResult, err error)
- func (client Client) GetMetaData(ctx context.Context, accountName, shareName, path string) (result GetMetaDataResult, err error)
- func (client Client) GetMetaDataPreparer(ctx context.Context, accountName, shareName, path string) (*http.Request, error)
- func (client Client) GetMetaDataResponder(resp *http.Response) (result GetMetaDataResult, err error)
- func (client Client) GetMetaDataSender(req *http.Request) (*http.Response, error)
- func (client Client) GetPreparer(ctx context.Context, accountName, shareName, path string) (*http.Request, error)
- func (client Client) GetResourceID(accountName, shareName, directoryName string) string
- func (client Client) GetResponder(resp *http.Response) (result GetResult, err error)
- func (client Client) GetSender(req *http.Request) (*http.Response, error)
- func (client Client) SetMetaData(ctx context.Context, accountName, shareName, path string, ...) (result autorest.Response, err error)
- func (client Client) SetMetaDataPreparer(ctx context.Context, accountName, shareName, path string, ...) (*http.Request, error)
- func (client Client) SetMetaDataResponder(resp *http.Response) (result autorest.Response, err error)
- func (client Client) SetMetaDataSender(req *http.Request) (*http.Response, error)
- type CreateDirectoryInput
- type GetMetaDataResult
- type GetResult
- type ResourceID
- type StorageDirectory
Constants ¶
const APIVersion = "2019-12-12"
APIVersion is the version of the API used for all Storage API Operations
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
Client is the base client for File Storage Shares.
func NewWithEnvironment ¶
func NewWithEnvironment(environment azure.Environment) Client
NewWithEnvironment creates an instance of the Client client.
func (Client) Create ¶
func (client Client) Create(ctx context.Context, accountName, shareName, path string, input CreateDirectoryInput) (result autorest.Response, err error)
Create creates a new directory under the specified share or parent directory.
func (Client) CreatePreparer ¶
func (client Client) CreatePreparer(ctx context.Context, accountName, shareName, path string, input CreateDirectoryInput) (*http.Request, error)
CreatePreparer prepares the Create request.
func (Client) CreateResponder ¶
CreateResponder handles the response to the Create request. The method always closes the http.Response Body.
func (Client) CreateSender ¶
CreateSender sends the Create request. The method will close the http.Response Body if it receives an error.
func (Client) Delete ¶
func (client Client) Delete(ctx context.Context, accountName, shareName, path string) (result autorest.Response, err error)
Delete removes the specified empty directory Note that the directory must be empty before it can be deleted.
func (Client) DeletePreparer ¶
func (client Client) DeletePreparer(ctx context.Context, accountName, shareName, path string) (*http.Request, error)
DeletePreparer prepares the Delete request.
func (Client) DeleteResponder ¶
DeleteResponder handles the response to the Delete request. The method always closes the http.Response Body.
func (Client) DeleteSender ¶
DeleteSender sends the Delete request. The method will close the http.Response Body if it receives an error.
func (Client) Get ¶
func (client Client) Get(ctx context.Context, accountName, shareName, path string) (result GetResult, err error)
Get returns all system properties for the specified directory, and can also be used to check the existence of a directory.
func (Client) GetMetaData ¶
func (client Client) GetMetaData(ctx context.Context, accountName, shareName, path string) (result GetMetaDataResult, err error)
GetMetaData returns all user-defined metadata for the specified directory
func (Client) GetMetaDataPreparer ¶
func (client Client) GetMetaDataPreparer(ctx context.Context, accountName, shareName, path string) (*http.Request, error)
GetMetaDataPreparer prepares the GetMetaData request.
func (Client) GetMetaDataResponder ¶
func (client Client) GetMetaDataResponder(resp *http.Response) (result GetMetaDataResult, err error)
GetMetaDataResponder handles the response to the GetMetaData request. The method always closes the http.Response Body.
func (Client) GetMetaDataSender ¶
GetMetaDataSender sends the GetMetaData request. The method will close the http.Response Body if it receives an error.
func (Client) GetPreparer ¶
func (client Client) GetPreparer(ctx context.Context, accountName, shareName, path string) (*http.Request, error)
GetPreparer prepares the Get request.
func (Client) GetResourceID ¶
GetResourceID returns the Resource ID for the given Directory This can be useful when, for example, you're using this as a unique identifier
func (Client) GetResponder ¶
GetResponder handles the response to the Get request. The method always closes the http.Response Body.
func (Client) GetSender ¶
GetSender sends the Get request. The method will close the http.Response Body if it receives an error.
func (Client) SetMetaData ¶
func (client Client) SetMetaData(ctx context.Context, accountName, shareName, path string, metaData map[string]string) (result autorest.Response, err error)
SetMetaData updates user defined metadata for the specified directory
func (Client) SetMetaDataPreparer ¶
func (client Client) SetMetaDataPreparer(ctx context.Context, accountName, shareName, path string, metaData map[string]string) (*http.Request, error)
SetMetaDataPreparer prepares the SetMetaData request.
type CreateDirectoryInput ¶
type CreateDirectoryInput struct { // The time at which this file was created at - if omitted, this'll be set to "now" // This maps to the `x-ms-file-creation-time` field. // ... Yes I know it says File not Directory, I didn't design the API. CreatedAt *time.Time // The time at which this file was last modified - if omitted, this'll be set to "now" // This maps to the `x-ms-file-last-write-time` field. // ... Yes I know it says File not Directory, I didn't design the API. LastModified *time.Time // MetaData is a mapping of key value pairs which should be assigned to this directory MetaData map[string]string }
type GetMetaDataResult ¶
type GetResult ¶
type GetResult struct { autorest.Response // A set of name-value pairs that contain metadata for the directory. MetaData map[string]string // The value of this header is set to true if the directory metadata is completely // encrypted using the specified algorithm. Otherwise, the value is set to false. DirectoryMetaDataEncrypted bool }
type ResourceID ¶
func ParseResourceID ¶
func ParseResourceID(id string) (*ResourceID, error)
ParseResourceID parses the Resource ID into an Object which can be used to interact with the Directory within the File Share
type StorageDirectory ¶
type StorageDirectory interface { Delete(ctx context.Context, accountName, shareName, path string) (result autorest.Response, err error) GetMetaData(ctx context.Context, accountName, shareName, path string) (result GetMetaDataResult, err error) SetMetaData(ctx context.Context, accountName, shareName, path string, metaData map[string]string) (result autorest.Response, err error) Create(ctx context.Context, accountName, shareName, path string, input CreateDirectoryInput) (result autorest.Response, err error) GetResourceID(accountName, shareName, directoryName string) string Get(ctx context.Context, accountName, shareName, path string) (result GetResult, err error) }