Documentation ¶
Index ¶
- type Client
- func (c Client) Create(ctx context.Context, shareName, path string, input CreateDirectoryInput) (result CreateDirectoryResponse, err error)
- func (c Client) Delete(ctx context.Context, shareName, path string) (result DeleteResponse, err error)
- func (c Client) Get(ctx context.Context, shareName, path string) (result GetResponse, err error)
- func (c Client) GetMetaData(ctx context.Context, shareName, path string) (result GetMetaDataResponse, err error)
- func (c Client) SetMetaData(ctx context.Context, shareName, path string, input SetMetaDataInput) (result SetMetaDataResponse, err error)
- type CreateDirectoryInput
- type CreateDirectoryResponse
- type CreateOptions
- type DeleteResponse
- type DirectoryId
- type ErrorResponse
- type GetMetaDataOptions
- type GetMetaDataResponse
- type GetResponse
- type SetMetaDataInput
- type SetMetaDataOptions
- type SetMetaDataResponse
- type StorageDirectory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client is the base client for File Storage Shares.
func NewWithBaseUri ¶
func (Client) Create ¶
func (c Client) Create(ctx context.Context, shareName, path string, input CreateDirectoryInput) (result CreateDirectoryResponse, err error)
Create creates a new directory under the specified share or parent directory.
func (Client) Delete ¶
func (c Client) Delete(ctx context.Context, shareName, path string) (result DeleteResponse, err error)
Delete removes the specified empty directory Note that the directory must be empty before it can be deleted.
func (Client) Get ¶
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 (c Client) GetMetaData(ctx context.Context, shareName, path string) (result GetMetaDataResponse, err error)
GetMetaData returns all user-defined metadata for the specified directory
func (Client) SetMetaData ¶
func (c Client) SetMetaData(ctx context.Context, shareName, path string, input SetMetaDataInput) (result SetMetaDataResponse, err error)
SetMetaData updates user defined metadata for the specified directory
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 CreateDirectoryResponse ¶
type CreateOptions ¶
type CreateOptions struct {
// contains filtered or unexported fields
}
func (CreateOptions) ToHeaders ¶
func (c CreateOptions) ToHeaders() *client.Headers
func (CreateOptions) ToOData ¶
func (c CreateOptions) ToOData() *odata.Query
func (CreateOptions) ToQuery ¶
func (c CreateOptions) ToQuery() *client.QueryParams
type DeleteResponse ¶
type DirectoryId ¶
type DirectoryId struct { // AccountId specifies the ID of the Storage Account where this Directory exists. AccountId accounts.AccountId ShareName string // DirectoryPath specifies the path representing this Directory. DirectoryPath string }
func NewDirectoryID ¶
func NewDirectoryID(accountId accounts.AccountId, shareName, directoryPath string) DirectoryId
func ParseDirectoryID ¶
func ParseDirectoryID(input, domainSuffix string) (*DirectoryId, error)
ParseDirectoryID parses `input` into a Directory ID using a known `domainSuffix`
func (DirectoryId) ID ¶
func (b DirectoryId) ID() string
func (DirectoryId) String ¶
func (b DirectoryId) String() string
type ErrorResponse ¶
type GetMetaDataOptions ¶
type GetMetaDataOptions struct{}
func (GetMetaDataOptions) ToHeaders ¶
func (g GetMetaDataOptions) ToHeaders() *client.Headers
func (GetMetaDataOptions) ToOData ¶
func (g GetMetaDataOptions) ToOData() *odata.Query
func (GetMetaDataOptions) ToQuery ¶
func (g GetMetaDataOptions) ToQuery() *client.QueryParams
type GetMetaDataResponse ¶
type GetResponse ¶
type GetResponse struct { HttpResponse *http.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 SetMetaDataInput ¶
type SetMetaDataOptions ¶
type SetMetaDataOptions struct {
// contains filtered or unexported fields
}
func (SetMetaDataOptions) ToHeaders ¶
func (s SetMetaDataOptions) ToHeaders() *client.Headers
func (SetMetaDataOptions) ToOData ¶
func (s SetMetaDataOptions) ToOData() *odata.Query
func (SetMetaDataOptions) ToQuery ¶
func (s SetMetaDataOptions) ToQuery() *client.QueryParams
type SetMetaDataResponse ¶
type StorageDirectory ¶
type StorageDirectory interface { Delete(ctx context.Context, shareName, path string) (resp DeleteResponse, err error) GetMetaData(ctx context.Context, shareName, path string) (resp GetMetaDataResponse, err error) SetMetaData(ctx context.Context, shareName, path string, input SetMetaDataInput) (resp SetMetaDataResponse, err error) Create(ctx context.Context, shareName, path string, input CreateDirectoryInput) (resp CreateDirectoryResponse, err error) Get(ctx context.Context, shareName, path string) (resp GetResponse, err error) }
Click to show internal directories.
Click to hide internal directories.