Documentation ¶
Index ¶
- Constants
- func UserAgent() string
- type ClearByteRangeInput
- type Client
- func (client Client) AbortCopy(ctx context.Context, accountName, shareName, path, fileName, copyID string) (result autorest.Response, err error)
- func (client Client) AbortCopyPreparer(ctx context.Context, accountName, shareName, path, fileName, copyID string) (*http.Request, error)
- func (client Client) AbortCopyResponder(resp *http.Response) (result autorest.Response, err error)
- func (client Client) AbortCopySender(req *http.Request) (*http.Response, error)
- func (client Client) ClearByteRange(ctx context.Context, accountName, shareName, path, fileName string, ...) (result autorest.Response, err error)
- func (client Client) ClearByteRangePreparer(ctx context.Context, accountName, shareName, path, fileName string, ...) (*http.Request, error)
- func (client Client) ClearByteRangeResponder(resp *http.Response) (result autorest.Response, err error)
- func (client Client) ClearByteRangeSender(req *http.Request) (*http.Response, error)
- func (client Client) Copy(ctx context.Context, accountName, shareName, path, fileName string, ...) (result CopyResult, err error)
- func (client Client) CopyAndWait(ctx context.Context, accountName, shareName, path, fileName string, ...) (result CopyResult, err error)
- func (client Client) CopyPreparer(ctx context.Context, accountName, shareName, path, fileName string, ...) (*http.Request, error)
- func (client Client) CopyResponder(resp *http.Response) (result CopyResult, err error)
- func (client Client) CopySender(req *http.Request) (*http.Response, error)
- func (client Client) Create(ctx context.Context, accountName, shareName, path, fileName string, ...) (result autorest.Response, err error)
- func (client Client) CreatePreparer(ctx context.Context, accountName, shareName, path, fileName 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, fileName string) (result autorest.Response, err error)
- func (client Client) DeletePreparer(ctx context.Context, accountName, shareName, path, fileName 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) GetByteRange(ctx context.Context, accountName, shareName, path, fileName string, ...) (result GetByteRangeResult, err error)
- func (client Client) GetByteRangePreparer(ctx context.Context, accountName, shareName, path, fileName string, ...) (*http.Request, error)
- func (client Client) GetByteRangeResponder(resp *http.Response, length int64) (result GetByteRangeResult, err error)
- func (client Client) GetByteRangeSender(req *http.Request) (*http.Response, error)
- func (client Client) GetFile(ctx context.Context, accountName, shareName, path, fileName string, ...) (result autorest.Response, outputBytes []byte, err error)
- func (client Client) GetMetaData(ctx context.Context, accountName, shareName, path, fileName string) (result GetMetaDataResult, err error)
- func (client Client) GetMetaDataPreparer(ctx context.Context, accountName, shareName, path, fileName 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) GetProperties(ctx context.Context, accountName, shareName, path, fileName string) (result GetResult, err error)
- func (client Client) GetPropertiesPreparer(ctx context.Context, accountName, shareName, path, fileName string) (*http.Request, error)
- func (client Client) GetPropertiesResponder(resp *http.Response) (result GetResult, err error)
- func (client Client) GetPropertiesSender(req *http.Request) (*http.Response, error)
- func (client Client) GetResourceID(accountName, shareName, directoryName, filePath string) string
- func (client Client) ListRanges(ctx context.Context, accountName, shareName, path, fileName string) (result ListRangesResult, err error)
- func (client Client) ListRangesPreparer(ctx context.Context, accountName, shareName, path, fileName string) (*http.Request, error)
- func (client Client) ListRangesResponder(resp *http.Response) (result ListRangesResult, err error)
- func (client Client) ListRangesSender(req *http.Request) (*http.Response, error)
- func (client Client) PutByteRange(ctx context.Context, accountName, shareName, path, fileName string, ...) (result autorest.Response, err error)
- func (client Client) PutByteRangePreparer(ctx context.Context, accountName, shareName, path, fileName string, ...) (*http.Request, error)
- func (client Client) PutByteRangeResponder(resp *http.Response) (result autorest.Response, err error)
- func (client Client) PutByteRangeSender(req *http.Request) (*http.Response, error)
- func (client Client) PutFile(ctx context.Context, accountName, shareName, path, fileName string, ...) error
- func (client Client) SetMetaData(ctx context.Context, accountName, shareName, path, fileName string, ...) (result autorest.Response, err error)
- func (client Client) SetMetaDataPreparer(ctx context.Context, accountName, shareName, path, fileName 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)
- func (client Client) SetProperties(ctx context.Context, accountName, shareName, path, fileName string, ...) (result autorest.Response, err error)
- func (client Client) SetPropertiesPreparer(ctx context.Context, accountName, shareName, path, fileName string, ...) (*http.Request, error)
- func (client Client) SetPropertiesResponder(resp *http.Response) (result autorest.Response, err error)
- func (client Client) SetPropertiesSender(req *http.Request) (*http.Response, error)
- type CopyAndWaitResult
- type CopyInput
- type CopyResult
- type CreateInput
- type GetByteRangeInput
- type GetByteRangeResult
- type GetMetaDataResult
- type GetResult
- type ListRangesResult
- type PutByteRangeInput
- type Range
- type ResourceID
- type SetPropertiesInput
Constants ¶
const APIVersion = "2018-03-28"
APIVersion is the version of the API used for all Storage API Operations
const DefaultCopyPollDuration = 15 * time.Second
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ClearByteRangeInput ¶
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) AbortCopy ¶
func (client Client) AbortCopy(ctx context.Context, accountName, shareName, path, fileName, copyID string) (result autorest.Response, err error)
AbortCopy aborts a pending Copy File operation, and leaves a destination file with zero length and full metadata
func (Client) AbortCopyPreparer ¶
func (client Client) AbortCopyPreparer(ctx context.Context, accountName, shareName, path, fileName, copyID string) (*http.Request, error)
AbortCopyPreparer prepares the AbortCopy request.
func (Client) AbortCopyResponder ¶
AbortCopyResponder handles the response to the AbortCopy request. The method always closes the http.Response Body.
func (Client) AbortCopySender ¶
AbortCopySender sends the AbortCopy request. The method will close the http.Response Body if it receives an error.
func (Client) ClearByteRange ¶
func (client Client) ClearByteRange(ctx context.Context, accountName, shareName, path, fileName string, input ClearByteRangeInput) (result autorest.Response, err error)
ClearByteRange clears the specified Byte Range from within the specified File
func (Client) ClearByteRangePreparer ¶
func (client Client) ClearByteRangePreparer(ctx context.Context, accountName, shareName, path, fileName string, input ClearByteRangeInput) (*http.Request, error)
ClearByteRangePreparer prepares the ClearByteRange request.
func (Client) ClearByteRangeResponder ¶
func (client Client) ClearByteRangeResponder(resp *http.Response) (result autorest.Response, err error)
ClearByteRangeResponder handles the response to the ClearByteRange request. The method always closes the http.Response Body.
func (Client) ClearByteRangeSender ¶
ClearByteRangeSender sends the ClearByteRange request. The method will close the http.Response Body if it receives an error.
func (Client) Copy ¶
func (client Client) Copy(ctx context.Context, accountName, shareName, path, fileName string, input CopyInput) (result CopyResult, err error)
Copy copies a blob or file to a destination file within the storage account asynchronously.
func (Client) CopyAndWait ¶
func (client Client) CopyAndWait(ctx context.Context, accountName, shareName, path, fileName string, input CopyInput, pollDuration time.Duration) (result CopyResult, err error)
CopyAndWait is a convenience method which doesn't exist in the API, which copies the file and then waits for the copy to complete
func (Client) CopyPreparer ¶
func (client Client) CopyPreparer(ctx context.Context, accountName, shareName, path, fileName string, input CopyInput) (*http.Request, error)
CopyPreparer prepares the Copy request.
func (Client) CopyResponder ¶
func (client Client) CopyResponder(resp *http.Response) (result CopyResult, err error)
CopyResponder handles the response to the Copy request. The method always closes the http.Response Body.
func (Client) CopySender ¶
CopySender sends the Copy request. The method will close the http.Response Body if it receives an error.
func (Client) Create ¶
func (client Client) Create(ctx context.Context, accountName, shareName, path, fileName string, input CreateInput) (result autorest.Response, err error)
Create creates a new file or replaces a file.
func (Client) CreatePreparer ¶
func (client Client) CreatePreparer(ctx context.Context, accountName, shareName, path, fileName string, input CreateInput) (*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, fileName string) (result autorest.Response, err error)
Delete immediately deletes the file from the File Share.
func (Client) DeletePreparer ¶
func (client Client) DeletePreparer(ctx context.Context, accountName, shareName, path, fileName 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) GetByteRange ¶
func (client Client) GetByteRange(ctx context.Context, accountName, shareName, path, fileName string, input GetByteRangeInput) (result GetByteRangeResult, err error)
GetByteRange returns the specified Byte Range from the specified File.
func (Client) GetByteRangePreparer ¶
func (client Client) GetByteRangePreparer(ctx context.Context, accountName, shareName, path, fileName string, input GetByteRangeInput) (*http.Request, error)
GetByteRangePreparer prepares the GetByteRange request.
func (Client) GetByteRangeResponder ¶
func (client Client) GetByteRangeResponder(resp *http.Response, length int64) (result GetByteRangeResult, err error)
GetByteRangeResponder handles the response to the GetByteRange request. The method always closes the http.Response Body.
func (Client) GetByteRangeSender ¶
GetByteRangeSender sends the GetByteRange request. The method will close the http.Response Body if it receives an error.
func (Client) GetFile ¶
func (client Client) GetFile(ctx context.Context, accountName, shareName, path, fileName string, parallelism int) (result autorest.Response, outputBytes []byte, err error)
GetFile is a helper method to download a file by chunking it automatically
func (Client) GetMetaData ¶
func (client Client) GetMetaData(ctx context.Context, accountName, shareName, path, fileName string) (result GetMetaDataResult, err error)
GetMetaData returns the MetaData for the specified File.
func (Client) GetMetaDataPreparer ¶
func (client Client) GetMetaDataPreparer(ctx context.Context, accountName, shareName, path, fileName 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) GetProperties ¶
func (client Client) GetProperties(ctx context.Context, accountName, shareName, path, fileName string) (result GetResult, err error)
GetProperties returns the Properties for the specified file
func (Client) GetPropertiesPreparer ¶
func (client Client) GetPropertiesPreparer(ctx context.Context, accountName, shareName, path, fileName string) (*http.Request, error)
GetPropertiesPreparer prepares the GetProperties request.
func (Client) GetPropertiesResponder ¶
GetPropertiesResponder handles the response to the GetProperties request. The method always closes the http.Response Body.
func (Client) GetPropertiesSender ¶
GetPropertiesSender sends the GetProperties request. The method will close the http.Response Body if it receives an error.
func (Client) GetResourceID ¶
GetResourceID returns the Resource ID for the given File This can be useful when, for example, you're using this as a unique identifier
func (Client) ListRanges ¶
func (client Client) ListRanges(ctx context.Context, accountName, shareName, path, fileName string) (result ListRangesResult, err error)
ListRanges returns the list of valid ranges for the specified File.
func (Client) ListRangesPreparer ¶
func (client Client) ListRangesPreparer(ctx context.Context, accountName, shareName, path, fileName string) (*http.Request, error)
ListRangesPreparer prepares the ListRanges request.
func (Client) ListRangesResponder ¶
func (client Client) ListRangesResponder(resp *http.Response) (result ListRangesResult, err error)
ListRangesResponder handles the response to the ListRanges request. The method always closes the http.Response Body.
func (Client) ListRangesSender ¶
ListRangesSender sends the ListRanges request. The method will close the http.Response Body if it receives an error.
func (Client) PutByteRange ¶
func (client Client) PutByteRange(ctx context.Context, accountName, shareName, path, fileName string, input PutByteRangeInput) (result autorest.Response, err error)
PutByteRange puts the specified Byte Range in the specified File.
func (Client) PutByteRangePreparer ¶
func (client Client) PutByteRangePreparer(ctx context.Context, accountName, shareName, path, fileName string, input PutByteRangeInput) (*http.Request, error)
PutByteRangePreparer prepares the PutByteRange request.
func (Client) PutByteRangeResponder ¶
func (client Client) PutByteRangeResponder(resp *http.Response) (result autorest.Response, err error)
PutByteRangeResponder handles the response to the PutByteRange request. The method always closes the http.Response Body.
func (Client) PutByteRangeSender ¶
PutByteRangeSender sends the PutByteRange request. The method will close the http.Response Body if it receives an error.
func (Client) PutFile ¶
func (client Client) PutFile(ctx context.Context, accountName, shareName, path, fileName string, file *os.File, parallelism int) error
PutFile is a helper method which takes a file, and automatically chunks it up, rather than having to do this yourself
func (Client) SetMetaData ¶
func (client Client) SetMetaData(ctx context.Context, accountName, shareName, path, fileName string, metaData map[string]string) (result autorest.Response, err error)
SetMetaData updates the specified File to have the specified MetaData.
func (Client) SetMetaDataPreparer ¶
func (client Client) SetMetaDataPreparer(ctx context.Context, accountName, shareName, path, fileName string, metaData map[string]string) (*http.Request, error)
SetMetaDataPreparer prepares the SetMetaData request.
func (Client) SetMetaDataResponder ¶
func (client Client) SetMetaDataResponder(resp *http.Response) (result autorest.Response, err error)
SetMetaDataResponder handles the response to the SetMetaData request. The method always closes the http.Response Body.
func (Client) SetMetaDataSender ¶
SetMetaDataSender sends the SetMetaData request. The method will close the http.Response Body if it receives an error.
func (Client) SetProperties ¶
func (client Client) SetProperties(ctx context.Context, accountName, shareName, path, fileName string, input SetPropertiesInput) (result autorest.Response, err error)
SetProperties sets the specified properties on the specified File
func (Client) SetPropertiesPreparer ¶
func (client Client) SetPropertiesPreparer(ctx context.Context, accountName, shareName, path, fileName string, input SetPropertiesInput) (*http.Request, error)
SetPropertiesPreparer prepares the SetProperties request.
type CopyAndWaitResult ¶
type CopyInput ¶
type CopyInput struct { // Specifies the URL of the source file or blob, up to 2 KB in length. // // To copy a file to another file within the same storage account, you may use Shared Key to authenticate // the source file. If you are copying a file from another storage account, or if you are copying a blob from // the same storage account or another storage account, then you must authenticate the source file or blob using a // shared access signature. If the source is a public blob, no authentication is required to perform the copy // operation. A file in a share snapshot can also be specified as a copy source. CopySource string MetaData map[string]string }
type CopyResult ¶
type CreateInput ¶
type CreateInput struct { // This header specifies the maximum size for the file, up to 1 TiB. ContentLength int64 // The MIME content type of the file // If not specified, the default type is application/octet-stream. ContentType *string // Specifies which content encodings have been applied to the file. // This value is returned to the client when the Get File operation is performed // on the file resource and can be used to decode file content. ContentEncoding *string // Specifies the natural languages used by this resource. ContentLanguage *string // The File service stores this value but does not use or modify it. CacheControl *string // Sets the file's MD5 hash. ContentMD5 *string // Sets the file’s Content-Disposition header. ContentDisposition *string MetaData map[string]string }
type GetByteRangeInput ¶
type GetByteRangeResult ¶
type GetMetaDataResult ¶
type GetResult ¶
type GetResult struct { autorest.Response CacheControl string ContentDisposition string ContentEncoding string ContentLanguage string ContentLength *int64 ContentMD5 string ContentType string CopyID string CopyStatus string CopySource string CopyProgress string CopyStatusDescription string CopyCompletionTime string Encrypted bool MetaData map[string]string }
type ListRangesResult ¶
type PutByteRangeInput ¶
type ResourceID ¶
func ParseResourceID ¶ added in v0.2.0
func ParseResourceID(id string) (*ResourceID, error)
ParseResourceID parses the specified Resource ID and returns an object which can be used to interact with Files within a Storage Share.
type SetPropertiesInput ¶
type SetPropertiesInput struct { // Resizes a file to the specified size. // If the specified byte value is less than the current size of the file, // then all ranges above the specified byte value are cleared. ContentLength *int64 // Modifies the cache control string for the file. // If this property is not specified on the request, then the property will be cleared for the file. // Subsequent calls to Get File Properties will not return this property, // unless it is explicitly set on the file again. ContentControl *string // Sets the file’s Content-Disposition header. // If this property is not specified on the request, then the property will be cleared for the file. // Subsequent calls to Get File Properties will not return this property, // unless it is explicitly set on the file again. ContentDisposition *string // Sets the file's content encoding. // If this property is not specified on the request, then the property will be cleared for the file. // Subsequent calls to Get File Properties will not return this property, // unless it is explicitly set on the file again. ContentEncoding *string // Sets the file's content language. // If this property is not specified on the request, then the property will be cleared for the file. // Subsequent calls to Get File Properties will not return this property, // unless it is explicitly set on the file again. ContentLanguage *string // Sets the file's MD5 hash. // If this property is not specified on the request, then the property will be cleared for the file. // Subsequent calls to Get File Properties will not return this property, // unless it is explicitly set on the file again. ContentMD5 *string // Sets the file's content type. // If this property is not specified on the request, then the property will be cleared for the file. // Subsequent calls to Get File Properties will not return this property, // unless it is explicitly set on the file again. ContentType *string }