Documentation ¶
Index ¶
- func NewCopyAndWaitPoller(client *Client, shareName, path, fileName string) *copyAndWaitPoller
- type ClearByteRangeInput
- type ClearByteRangeOptions
- type ClearByteRangeResponse
- type Client
- func (c Client) AbortCopy(ctx context.Context, shareName, path, fileName string, input CopyAbortInput) (resp CopyAbortResponse, err error)
- func (c Client) ClearByteRange(ctx context.Context, shareName, path, fileName string, ...) (resp ClearByteRangeResponse, err error)
- func (c Client) Copy(ctx context.Context, shareName, path, fileName string, input CopyInput) (resp CopyResponse, err error)
- func (c Client) CopyAndWait(ctx context.Context, shareName, path, fileName string, input CopyInput) (resp CopyResponse, err error)
- func (c Client) Create(ctx context.Context, shareName, path, fileName string, input CreateInput) (resp CreateResponse, err error)
- func (c Client) Delete(ctx context.Context, shareName, path, fileName string) (resp DeleteResponse, err error)
- func (c Client) GetByteRange(ctx context.Context, shareName, path, fileName string, input GetByteRangeInput) (resp GetByteRangeResponse, err error)
- func (c Client) GetFile(ctx context.Context, shareName, path, fileName string, input GetFileInput) (resp GetFileResponse, err error)
- func (c Client) GetMetaData(ctx context.Context, shareName, path, fileName string) (resp GetMetaDataResponse, err error)
- func (c Client) GetProperties(ctx context.Context, shareName, path, fileName string) (resp GetResponse, err error)
- func (c Client) ListRanges(ctx context.Context, shareName, path, fileName string) (resp ListRangesResponse, err error)
- func (c Client) PutByteRange(ctx context.Context, shareName, path, fileName string, input PutByteRangeInput) (resp PutRangeResponse, err error)
- func (c Client) PutFile(ctx context.Context, shareName, path, fileName string, file *os.File, ...) error
- func (c Client) SetMetaData(ctx context.Context, shareName, path, fileName string, input SetMetaDataInput) (resp SetMetaDataResponse, err error)
- func (c Client) SetProperties(ctx context.Context, shareName, path, fileName string, ...) (resp SetPropertiesResponse, err error)
- type CopyAbortInput
- type CopyAbortOptions
- type CopyAbortResponse
- type CopyInput
- type CopyOptions
- type CopyResponse
- type CreateInput
- type CreateOptions
- type CreateResponse
- type DeleteResponse
- type FileId
- type GetByteRangeInput
- type GetByteRangeOptions
- type GetByteRangeResponse
- type GetFileInput
- type GetFileResponse
- type GetMetaDataResponse
- type GetMetadataOptions
- type GetResponse
- type ListRangeOptions
- type ListRangesResponse
- type PutByteRangeInput
- type PutRangeOptions
- type PutRangeResponse
- type Range
- type SetMetaDataInput
- type SetMetaDataOptions
- type SetMetaDataResponse
- type SetPropertiesInput
- type SetPropertiesOptions
- type SetPropertiesResponse
- type StorageFile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCopyAndWaitPoller ¶
Types ¶
type ClearByteRangeInput ¶
type ClearByteRangeOptions ¶
type ClearByteRangeOptions struct {
// contains filtered or unexported fields
}
func (ClearByteRangeOptions) ToHeaders ¶
func (c ClearByteRangeOptions) ToHeaders() *client.Headers
func (ClearByteRangeOptions) ToOData ¶
func (c ClearByteRangeOptions) ToOData() *odata.Query
func (ClearByteRangeOptions) ToQuery ¶
func (c ClearByteRangeOptions) ToQuery() *client.QueryParams
type ClearByteRangeResponse ¶
type Client ¶
Client is the base client for File Storage Shares.
func NewWithBaseUri ¶
func (Client) AbortCopy ¶
func (c Client) AbortCopy(ctx context.Context, shareName, path, fileName string, input CopyAbortInput) (resp CopyAbortResponse, err error)
AbortCopy aborts a pending Copy File operation, and leaves a destination file with zero length and full metadata
func (Client) ClearByteRange ¶
func (c Client) ClearByteRange(ctx context.Context, shareName, path, fileName string, input ClearByteRangeInput) (resp ClearByteRangeResponse, err error)
ClearByteRange clears the specified Byte Range from within the specified File
func (Client) Copy ¶
func (c Client) Copy(ctx context.Context, shareName, path, fileName string, input CopyInput) (resp CopyResponse, err error)
Copy copies a blob or file to a destination file within the storage account asynchronously.
func (Client) CopyAndWait ¶
func (c Client) CopyAndWait(ctx context.Context, shareName, path, fileName string, input CopyInput) (resp CopyResponse, 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) Create ¶
func (c Client) Create(ctx context.Context, shareName, path, fileName string, input CreateInput) (resp CreateResponse, err error)
Create creates a new file or replaces a file.
func (Client) Delete ¶
func (c Client) Delete(ctx context.Context, shareName, path, fileName string) (resp DeleteResponse, err error)
Delete immediately deletes the file from the File Share.
func (Client) GetByteRange ¶
func (c Client) GetByteRange(ctx context.Context, shareName, path, fileName string, input GetByteRangeInput) (resp GetByteRangeResponse, err error)
GetByteRange returns the specified Byte Range from the specified File.
func (Client) GetFile ¶
func (c Client) GetFile(ctx context.Context, shareName, path, fileName string, input GetFileInput) (resp GetFileResponse, err error)
GetFile is a helper method to download a file by chunking it automatically
func (Client) GetMetaData ¶
func (c Client) GetMetaData(ctx context.Context, shareName, path, fileName string) (resp GetMetaDataResponse, err error)
GetMetaData returns the MetaData for the specified File.
func (Client) GetProperties ¶
func (c Client) GetProperties(ctx context.Context, shareName, path, fileName string) (resp GetResponse, err error)
GetProperties returns the Properties for the specified file
func (Client) ListRanges ¶
func (c Client) ListRanges(ctx context.Context, shareName, path, fileName string) (resp ListRangesResponse, err error)
ListRanges returns the list of valid ranges for the specified File.
func (Client) PutByteRange ¶
func (c Client) PutByteRange(ctx context.Context, shareName, path, fileName string, input PutByteRangeInput) (resp PutRangeResponse, err error)
PutByteRange puts the specified Byte Range in the specified File.
func (Client) PutFile ¶
func (c Client) PutFile(ctx context.Context, 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 (c Client) SetMetaData(ctx context.Context, shareName, path, fileName string, input SetMetaDataInput) (resp SetMetaDataResponse, err error)
SetMetaData updates the specified File to have the specified MetaData.
func (Client) SetProperties ¶
func (c Client) SetProperties(ctx context.Context, shareName, path, fileName string, input SetPropertiesInput) (resp SetPropertiesResponse, err error)
SetProperties sets the specified properties on the specified File
type CopyAbortInput ¶
type CopyAbortInput struct {
// contains filtered or unexported fields
}
type CopyAbortOptions ¶
type CopyAbortOptions struct {
// contains filtered or unexported fields
}
func (CopyAbortOptions) ToHeaders ¶
func (c CopyAbortOptions) ToHeaders() *client.Headers
func (CopyAbortOptions) ToOData ¶
func (c CopyAbortOptions) ToOData() *odata.Query
func (CopyAbortOptions) ToQuery ¶
func (c CopyAbortOptions) ToQuery() *client.QueryParams
type CopyAbortResponse ¶
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 CopyOptions ¶
type CopyOptions struct {
// contains filtered or unexported fields
}
func (CopyOptions) ToHeaders ¶
func (c CopyOptions) ToHeaders() *client.Headers
func (CopyOptions) ToOData ¶
func (c CopyOptions) ToOData() *odata.Query
func (CopyOptions) ToQuery ¶
func (c CopyOptions) ToQuery() *client.QueryParams
type CopyResponse ¶
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 // 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. 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. LastModified *time.Time // MetaData is a mapping of key value pairs which should be assigned to this file MetaData map[string]string }
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 CreateResponse ¶
type DeleteResponse ¶
type FileId ¶
type FileId struct { // AccountId specifies the ID of the Storage Account where this File exists. AccountId accounts.AccountId ShareName string // DirectoryPath specifies the path representing the Directory where this File exists. DirectoryPath string // FileName specifies the name of the File. FileName string }
func ParseFileID ¶
ParseFileID parses `input` into a File ID using a known `domainSuffix`
type GetByteRangeInput ¶
type GetByteRangeOptions ¶
type GetByteRangeOptions struct {
// contains filtered or unexported fields
}
func (GetByteRangeOptions) ToHeaders ¶
func (g GetByteRangeOptions) ToHeaders() *client.Headers
func (GetByteRangeOptions) ToOData ¶
func (g GetByteRangeOptions) ToOData() *odata.Query
func (GetByteRangeOptions) ToQuery ¶
func (g GetByteRangeOptions) ToQuery() *client.QueryParams
type GetByteRangeResponse ¶
type GetFileInput ¶
type GetFileInput struct {
Parallelism int
}
type GetFileResponse ¶
type GetMetaDataResponse ¶
type GetMetadataOptions ¶
type GetMetadataOptions struct{}
func (GetMetadataOptions) ToHeaders ¶
func (m GetMetadataOptions) ToHeaders() *client.Headers
func (GetMetadataOptions) ToOData ¶
func (m GetMetadataOptions) ToOData() *odata.Query
func (GetMetadataOptions) ToQuery ¶
func (m GetMetadataOptions) ToQuery() *client.QueryParams
type GetResponse ¶
type GetResponse struct { HttpResponse *client.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 ListRangeOptions ¶
type ListRangeOptions struct{}
func (ListRangeOptions) ToHeaders ¶
func (l ListRangeOptions) ToHeaders() *client.Headers
func (ListRangeOptions) ToOData ¶
func (l ListRangeOptions) ToOData() *odata.Query
func (ListRangeOptions) ToQuery ¶
func (l ListRangeOptions) ToQuery() *client.QueryParams
type ListRangesResponse ¶
type PutByteRangeInput ¶
type PutRangeOptions ¶
type PutRangeOptions struct {
// contains filtered or unexported fields
}
func (PutRangeOptions) ToHeaders ¶
func (p PutRangeOptions) ToHeaders() *client.Headers
func (PutRangeOptions) ToOData ¶
func (p PutRangeOptions) ToOData() *odata.Query
func (PutRangeOptions) ToQuery ¶
func (p PutRangeOptions) ToQuery() *client.QueryParams
type PutRangeResponse ¶
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 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 // 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. 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. LastModified *time.Time // MetaData is a mapping of key value pairs which should be assigned to this file MetaData map[string]string }
type SetPropertiesOptions ¶
type SetPropertiesOptions struct {
// contains filtered or unexported fields
}
func (SetPropertiesOptions) ToHeaders ¶
func (s SetPropertiesOptions) ToHeaders() *client.Headers
func (SetPropertiesOptions) ToOData ¶
func (s SetPropertiesOptions) ToOData() *odata.Query
func (SetPropertiesOptions) ToQuery ¶
func (s SetPropertiesOptions) ToQuery() *client.QueryParams
type SetPropertiesResponse ¶
type StorageFile ¶
type StorageFile interface { PutByteRange(ctx context.Context, shareName string, path string, fileName string, input PutByteRangeInput) (PutRangeResponse, error) GetByteRange(ctx context.Context, shareName string, path string, fileName string, input GetByteRangeInput) (GetByteRangeResponse, error) ClearByteRange(ctx context.Context, shareName string, path string, fileName string, input ClearByteRangeInput) (ClearByteRangeResponse, error) SetProperties(ctx context.Context, shareName string, path string, fileName string, input SetPropertiesInput) (SetPropertiesResponse, error) PutFile(ctx context.Context, shareName string, path string, fileName string, file *os.File, parallelism int) error Copy(ctx context.Context, shareName, path, fileName string, input CopyInput) (CopyResponse, error) SetMetaData(ctx context.Context, shareName string, path string, fileName string, input SetMetaDataInput) (SetMetaDataResponse, error) GetMetaData(ctx context.Context, shareName string, path string, fileName string) (GetMetaDataResponse, error) AbortCopy(ctx context.Context, shareName string, path string, fileName string, input CopyAbortInput) (CopyAbortResponse, error) GetFile(ctx context.Context, shareName string, path string, fileName string, input GetFileInput) (GetFileResponse, error) ListRanges(ctx context.Context, shareName, path, fileName string) (ListRangesResponse, error) GetProperties(ctx context.Context, shareName string, path string, fileName string) (GetResponse, error) Delete(ctx context.Context, shareName string, path string, fileName string) (DeleteResponse, error) Create(ctx context.Context, shareName string, path string, fileName string, input CreateInput) (CreateResponse, error) CopyAndWait(ctx context.Context, shareName, path, fileName string, input CopyInput) (CopyResponse, error) }