Documentation ¶
Index ¶
- func NewCopyAndWaitPoller(client *Client, containerName, blobName string, ...) *copyAndWaitPoller
- type AbortCopyInput
- type AccessTier
- type AcquireLeaseInput
- type AcquireLeaseResponse
- type AppendBlockInput
- type AppendBlockResponse
- type ArchiveStatus
- type BlobId
- type BlobType
- type Block
- type BlockID
- type BlockList
- type BlockListType
- type BreakLeaseInput
- type BreakLeaseResponse
- type ChangeLeaseInput
- type ChangeLeaseResponse
- type Client
- func (c Client) AbortCopy(ctx context.Context, containerName, blobName string, input AbortCopyInput) (resp CopyAbortResponse, err error)
- func (c Client) AcquireLease(ctx context.Context, containerName, blobName string, input AcquireLeaseInput) (resp AcquireLeaseResponse, err error)
- func (c Client) AppendBlock(ctx context.Context, containerName, blobName string, input AppendBlockInput) (resp AppendBlockResponse, err error)
- func (c Client) BreakLease(ctx context.Context, containerName, blobName string, input BreakLeaseInput) (resp BreakLeaseResponse, err error)
- func (c Client) ChangeLease(ctx context.Context, containerName, blobName string, input ChangeLeaseInput) (resp ChangeLeaseResponse, err error)
- func (c Client) Copy(ctx context.Context, containerName, blobName string, input CopyInput) (resp CopyResponse, err error)
- func (c Client) CopyAndWait(ctx context.Context, containerName, blobName string, input CopyInput) error
- func (c Client) Delete(ctx context.Context, containerName, blobName string, input DeleteInput) (resp DeleteResponse, err error)
- func (c Client) DeleteSnapshot(ctx context.Context, containerName, blobName string, input DeleteSnapshotInput) (resp DeleteSnapshotResponse, err error)
- func (c Client) DeleteSnapshots(ctx context.Context, containerName, blobName string, ...) (resp DeleteSnapshotsResponse, err error)
- func (c Client) Get(ctx context.Context, containerName, blobName string, input GetInput) (resp GetResponse, err error)
- func (c Client) GetBlockList(ctx context.Context, containerName, blobName string, input GetBlockListInput) (resp GetBlockListResponse, err error)
- func (c Client) GetPageRanges(ctx context.Context, containerName, blobName string, input GetPageRangesInput) (resp GetPageRangesResponse, err error)
- func (c Client) GetProperties(ctx context.Context, containerName, blobName string, input GetPropertiesInput) (resp GetPropertiesResponse, err error)
- func (c Client) GetSnapshotProperties(ctx context.Context, containerName, blobName string, ...) (resp GetPropertiesResponse, err error)
- func (c Client) IncrementalCopyBlob(ctx context.Context, containerName, blobName string, ...) (resp IncrementalCopyBlob, err error)
- func (c Client) PutAppendBlob(ctx context.Context, containerName, blobName string, input PutAppendBlobInput) (resp PutAppendBlobResponse, err error)
- func (c Client) PutBlock(ctx context.Context, containerName, blobName string, input PutBlockInput) (resp PutBlockResponse, err error)
- func (c Client) PutBlockBlob(ctx context.Context, containerName, blobName string, input PutBlockBlobInput) (resp PutBlockBlobResponse, err error)
- func (c Client) PutBlockBlobFromFile(ctx context.Context, containerName, blobName string, file *os.File, ...) error
- func (c Client) PutBlockFromURL(ctx context.Context, containerName, blobName string, ...) (resp PutBlockFromURLResponse, err error)
- func (c Client) PutBlockList(ctx context.Context, containerName, blobName string, input PutBlockListInput) (resp PutBlockListResponse, err error)
- func (c Client) PutPageBlob(ctx context.Context, containerName, blobName string, input PutPageBlobInput) (resp PutPageBlobResponse, err error)
- func (c Client) PutPageClear(ctx context.Context, containerName, blobName string, input PutPageClearInput) (resp PutPageClearResponse, err error)
- func (c Client) PutPageUpdate(ctx context.Context, containerName, blobName string, input PutPageUpdateInput) (resp PutPageUpdateResponse, err error)
- func (c Client) ReleaseLease(ctx context.Context, containerName, blobName string, input ReleaseLeaseInput) (resp ReleaseLeaseResponse, err error)
- func (c Client) RenewLease(ctx context.Context, containerName, blobName string, input RenewLeaseInput) (resp RenewLeaseResponse, err error)
- func (c Client) SetMetaData(ctx context.Context, containerName, blobName string, input SetMetaDataInput) (resp SetMetaDataResponse, err error)
- func (c Client) SetProperties(ctx context.Context, containerName, blobName string, input SetPropertiesInput) (resp SetPropertiesResponse, err error)
- func (c Client) SetTier(ctx context.Context, containerName, blobName string, input SetTierInput) (resp SetTierResponse, err error)
- func (c Client) Snapshot(ctx context.Context, containerName, blobName string, input SnapshotInput) (resp SnapshotResponse, err error)
- func (c Client) Undelete(ctx context.Context, containerName, blobName string) (resp UndeleteResponse, err error)
- type CommittedBlocks
- type CopyAbortResponse
- type CopyInput
- type CopyResponse
- type CopyStatus
- type DeleteInput
- type DeleteResponse
- type DeleteSnapshotInput
- type DeleteSnapshotResponse
- type DeleteSnapshotsInput
- type DeleteSnapshotsResponse
- type GetBlockListInput
- type GetBlockListResponse
- type GetInput
- type GetPageRangesInput
- type GetPageRangesResponse
- type GetPropertiesInput
- type GetPropertiesResponse
- type GetResponse
- type GetSnapshotPropertiesInput
- type IncrementalCopyBlob
- type IncrementalCopyBlobInput
- type LeaseDuration
- type LeaseState
- type LeaseStatus
- type PageRange
- type PutAppendBlobInput
- type PutAppendBlobResponse
- type PutBlockBlobInput
- type PutBlockBlobResponse
- type PutBlockFromURLInput
- type PutBlockFromURLResponse
- type PutBlockInput
- type PutBlockListInput
- type PutBlockListResponse
- type PutBlockResponse
- type PutPageBlobInput
- type PutPageBlobResponse
- type PutPageClearInput
- type PutPageClearResponse
- type PutPageUpdateInput
- type PutPageUpdateResponse
- type ReleaseLeaseInput
- type ReleaseLeaseResponse
- type RenewLeaseInput
- type RenewLeaseResponse
- type SequenceNumberAction
- type SetMetaDataInput
- type SetMetaDataResponse
- type SetPropertiesInput
- type SetPropertiesResponse
- type SetTierInput
- type SetTierResponse
- type SnapshotInput
- type SnapshotResponse
- type StorageBlob
- type UncommittedBlocks
- type UndeleteResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCopyAndWaitPoller ¶ added in v0.21.0
func NewCopyAndWaitPoller(client *Client, containerName, blobName string, getPropertiesInput GetPropertiesInput) *copyAndWaitPoller
Types ¶
type AbortCopyInput ¶
type AccessTier ¶
type AccessTier string
var ( Archive AccessTier = "Archive" Cool AccessTier = "Cool" Hot AccessTier = "Hot" )
type AcquireLeaseInput ¶
type AcquireLeaseInput struct { // The ID of the existing Lease, if leased LeaseID *string // Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never expires. // A non-infinite lease can be between 15 and 60 seconds LeaseDuration int // The Proposed new ID for the Lease ProposedLeaseID *string }
type AcquireLeaseResponse ¶ added in v0.21.0
type AppendBlockInput ¶
type AppendBlockInput struct { // A number indicating the byte offset to compare. // Append Block will succeed only if the append position is equal to this number. // If it is not, the request will fail with an AppendPositionConditionNotMet // error (HTTP status code 412 – Precondition Failed) BlobConditionAppendPosition *int64 // The max length in bytes permitted for the append blob. // If the Append Block operation would cause the blob to exceed that limit or if the blob size // is already greater than the value specified in this header, the request will fail with // an MaxBlobSizeConditionNotMet error (HTTP status code 412 – Precondition Failed). BlobConditionMaxSize *int64 // The Bytes which should be appended to the end of this Append Blob. // This can either be nil, which creates an empty blob, or a byte array Content *[]byte // An MD5 hash of the block content. // This hash is used to verify the integrity of the block during transport. // When this header is specified, the storage service compares the hash of the content // that has arrived with this header value. // // Note that this MD5 hash is not stored with the blob. // If the two hashes do not match, the operation will fail with error code 400 (Bad Request). ContentMD5 *string // Required if the blob has an active lease. // To perform this operation on a blob with an active lease, specify the valid lease ID for this header. LeaseID *string }
type AppendBlockResponse ¶ added in v0.21.0
type ArchiveStatus ¶
type ArchiveStatus string
var ( None ArchiveStatus = "" RehydratePendingToCool ArchiveStatus = "rehydrate-pending-to-cool" RehydratePendingToHot ArchiveStatus = "rehydrate-pending-to-hot" )
type BlobId ¶ added in v0.22.0
type BlobId struct { // AccountId specifies the ID of the Storage Account where this Blob exists. AccountId accounts.AccountId // ContainerName specifies the name of the Container within this Storage Account where this // Blob exists. ContainerName string // BlobName specifies the name of this Blob. BlobName string }
func ParseBlobID ¶ added in v0.22.0
ParseBlobID parses `input` into a Blob ID using a known `domainSuffix`
type BlockListType ¶
type BlockListType string
var ( All BlockListType = "all" Committed BlockListType = "committed" Uncommitted BlockListType = "uncommitted" )
type BreakLeaseInput ¶
type BreakLeaseInput struct { // For a break operation, proposed duration the lease should continue // before it is broken, in seconds, between 0 and 60. // This break period is only used if it is shorter than the time remaining on the lease. // If longer, the time remaining on the lease is used. // A new lease will not be available before the break period has expired, // but the lease may be held for longer than the break period. // If this header does not appear with a break operation, a fixed-duration lease breaks // after the remaining lease period elapses, and an infinite lease breaks immediately. BreakPeriod *int LeaseID string }
type BreakLeaseResponse ¶
type ChangeLeaseInput ¶
type ChangeLeaseResponse ¶
type Client ¶
Client is the base client for Blob Storage Blobs.
func NewWithBaseUri ¶ added in v0.21.0
func (Client) AbortCopy ¶
func (c Client) AbortCopy(ctx context.Context, containerName, blobName string, input AbortCopyInput) (resp CopyAbortResponse, err error)
AbortCopy aborts a pending Copy Blob operation, and leaves a destination blob with zero length and full metadata.
func (Client) AcquireLease ¶
func (c Client) AcquireLease(ctx context.Context, containerName, blobName string, input AcquireLeaseInput) (resp AcquireLeaseResponse, err error)
AcquireLease establishes and manages a lock on a blob for write and delete operations.
func (Client) AppendBlock ¶
func (c Client) AppendBlock(ctx context.Context, containerName, blobName string, input AppendBlockInput) (resp AppendBlockResponse, err error)
AppendBlock commits a new block of data to the end of an existing append blob.
func (Client) BreakLease ¶
func (c Client) BreakLease(ctx context.Context, containerName, blobName string, input BreakLeaseInput) (resp BreakLeaseResponse, err error)
BreakLease breaks an existing lock on a blob using the LeaseID.
func (Client) ChangeLease ¶
func (c Client) ChangeLease(ctx context.Context, containerName, blobName string, input ChangeLeaseInput) (resp ChangeLeaseResponse, err error)
ChangeLease changes an existing lock on a blob for another lock.
func (Client) Copy ¶
func (c Client) Copy(ctx context.Context, containerName, blobName string, input CopyInput) (resp CopyResponse, err error)
Copy copies a blob to a destination within the storage account asynchronously.
func (Client) CopyAndWait ¶
func (c Client) CopyAndWait(ctx context.Context, containerName, blobName string, input CopyInput) error
CopyAndWait copies a blob to a destination within the storage account and waits for it to finish copying.
func (Client) Delete ¶
func (c Client) Delete(ctx context.Context, containerName, blobName string, input DeleteInput) (resp DeleteResponse, err error)
Delete marks the specified blob or snapshot for deletion. The blob is later deleted during garbage collection.
func (Client) DeleteSnapshot ¶
func (c Client) DeleteSnapshot(ctx context.Context, containerName, blobName string, input DeleteSnapshotInput) (resp DeleteSnapshotResponse, err error)
DeleteSnapshot marks a single Snapshot of a Blob for Deletion based on it's DateTime, which will be deleted during the next Garbage Collection cycle.
func (Client) DeleteSnapshots ¶
func (c Client) DeleteSnapshots(ctx context.Context, containerName, blobName string, input DeleteSnapshotsInput) (resp DeleteSnapshotsResponse, err error)
DeleteSnapshots marks all Snapshots of a Blob for Deletion, which will be deleted during the next Garbage Collection Cycle.
func (Client) Get ¶
func (c Client) Get(ctx context.Context, containerName, blobName string, input GetInput) (resp GetResponse, err error)
Get reads or downloads a blob from the system, including its metadata and properties.
func (Client) GetBlockList ¶
func (c Client) GetBlockList(ctx context.Context, containerName, blobName string, input GetBlockListInput) (resp GetBlockListResponse, err error)
GetBlockList retrieves the list of blocks that have been uploaded as part of a block blob.
func (Client) GetPageRanges ¶
func (c Client) GetPageRanges(ctx context.Context, containerName, blobName string, input GetPageRangesInput) (resp GetPageRangesResponse, err error)
GetPageRanges returns the list of valid page ranges for a page blob or snapshot of a page blob.
func (Client) GetProperties ¶
func (c Client) GetProperties(ctx context.Context, containerName, blobName string, input GetPropertiesInput) (resp GetPropertiesResponse, err error)
GetProperties returns all user-defined metadata, standard HTTP properties, and system properties for the blob
func (Client) GetSnapshotProperties ¶
func (c Client) GetSnapshotProperties(ctx context.Context, containerName, blobName string, input GetSnapshotPropertiesInput) (resp GetPropertiesResponse, err error)
GetSnapshotProperties returns all user-defined metadata, standard HTTP properties, and system properties for the specified snapshot of a blob
func (Client) IncrementalCopyBlob ¶
func (c Client) IncrementalCopyBlob(ctx context.Context, containerName, blobName string, input IncrementalCopyBlobInput) (resp IncrementalCopyBlob, err error)
IncrementalCopyBlob copies a snapshot of the source page blob to a destination page blob. The snapshot is copied such that only the differential changes between the previously copied snapshot are transferred to the destination. The copied snapshots are complete copies of the original snapshot and can be read or copied from as usual.
func (Client) PutAppendBlob ¶
func (c Client) PutAppendBlob(ctx context.Context, containerName, blobName string, input PutAppendBlobInput) (resp PutAppendBlobResponse, err error)
PutAppendBlob is a wrapper around the Put API call (with a stricter input object) which creates a new append blob, or updates the content of an existing blob.
func (Client) PutBlock ¶
func (c Client) PutBlock(ctx context.Context, containerName, blobName string, input PutBlockInput) (resp PutBlockResponse, err error)
PutBlock creates a new block to be committed as part of a blob.
func (Client) PutBlockBlob ¶
func (c Client) PutBlockBlob(ctx context.Context, containerName, blobName string, input PutBlockBlobInput) (resp PutBlockBlobResponse, err error)
PutBlockBlob is a wrapper around the Put API call (with a stricter input object) which creates a new block append blob, or updates the content of an existing block blob.
func (Client) PutBlockBlobFromFile ¶
func (c Client) PutBlockBlobFromFile(ctx context.Context, containerName, blobName string, file *os.File, input PutBlockBlobInput) error
PutBlockBlobFromFile is a helper method which takes a file, and automatically chunks it up, rather than having to do this yourself
func (Client) PutBlockFromURL ¶
func (c Client) PutBlockFromURL(ctx context.Context, containerName, blobName string, input PutBlockFromURLInput) (resp PutBlockFromURLResponse, err error)
PutBlockFromURL creates a new block to be committed as part of a blob where the contents are read from a URL
func (Client) PutBlockList ¶
func (c Client) PutBlockList(ctx context.Context, containerName, blobName string, input PutBlockListInput) (resp PutBlockListResponse, err error)
PutBlockList writes a blob by specifying the list of block IDs that make up the blob. In order to be written as part of a blob, a block must have been successfully written to the server in a prior Put Block operation.
func (Client) PutPageBlob ¶
func (c Client) PutPageBlob(ctx context.Context, containerName, blobName string, input PutPageBlobInput) (resp PutPageBlobResponse, err error)
PutPageBlob is a wrapper around the Put API call (with a stricter input object) which creates a new block blob, or updates the content of an existing page blob.
func (Client) PutPageClear ¶
func (c Client) PutPageClear(ctx context.Context, containerName, blobName string, input PutPageClearInput) (resp PutPageClearResponse, err error)
PutPageClear clears a range of pages within a page blob.
func (Client) PutPageUpdate ¶
func (c Client) PutPageUpdate(ctx context.Context, containerName, blobName string, input PutPageUpdateInput) (resp PutPageUpdateResponse, err error)
PutPageUpdate writes a range of pages to a page blob.
func (Client) ReleaseLease ¶
func (c Client) ReleaseLease(ctx context.Context, containerName, blobName string, input ReleaseLeaseInput) (resp ReleaseLeaseResponse, err error)
ReleaseLease releases a lock based on the Lease ID.
func (Client) RenewLease ¶
func (c Client) RenewLease(ctx context.Context, containerName, blobName string, input RenewLeaseInput) (resp RenewLeaseResponse, err error)
func (Client) SetMetaData ¶
func (c Client) SetMetaData(ctx context.Context, containerName, blobName string, input SetMetaDataInput) (resp SetMetaDataResponse, err error)
SetMetaData marks the specified blob or snapshot for deletion. The blob is later deleted during garbage collection.
func (Client) SetProperties ¶
func (c Client) SetProperties(ctx context.Context, containerName, blobName string, input SetPropertiesInput) (resp SetPropertiesResponse, err error)
SetProperties sets system properties on the blob.
func (Client) SetTier ¶
func (c Client) SetTier(ctx context.Context, containerName, blobName string, input SetTierInput) (resp SetTierResponse, err error)
SetTier sets the tier on a blob.
func (Client) Snapshot ¶
func (c Client) Snapshot(ctx context.Context, containerName, blobName string, input SnapshotInput) (resp SnapshotResponse, err error)
Snapshot captures a Snapshot of a given Blob
type CommittedBlocks ¶
type CommittedBlocks struct {
Blocks []Block `xml:"Block"`
}
type CopyAbortResponse ¶ added in v0.21.0
type CopyInput ¶
type CopyInput struct { // Specifies the name of the source blob or file. // Beginning with version 2012-02-12, this value may be a URL of up to 2 KB in length that specifies a blob. // The value should be URL-encoded as it would appear in a request URI. // A source blob in the same storage account can be authenticated via Shared Key. // However, if the source is a blob in another account, // the source blob must either be public or must be authenticated via a shared access signature. // If the source blob is public, no authentication is required to perform the copy operation. // // Beginning with version 2015-02-21, the source object may be a file in the Azure File service. // If the source object is a file that is to be copied to a blob, then the source file must be authenticated // using a shared access signature, whether it resides in the same account or in a different account. // // Only storage accounts created on or after June 7th, 2012 allow the Copy Blob operation to // copy from another storage account. CopySource string // The ID of the Lease // Required if the destination blob has an active lease. // The lease ID specified for this header must match the lease ID of the destination blob. // If the request does not include the lease ID or it is not valid, // the operation fails with status code 412 (Precondition Failed). // // If this header is specified and the destination blob does not currently have an active lease, // the operation will also fail with status code 412 (Precondition Failed). LeaseID *string // The ID of the Lease on the Source Blob // Specify to perform the Copy Blob operation only if the lease ID matches the active lease ID of the source blob. SourceLeaseID *string // For page blobs on a premium account only. Specifies the tier to be set on the target blob AccessTier *AccessTier // A user-defined name-value pair associated with the blob. // If no name-value pairs are specified, the operation will copy the metadata from the source blob or // file to the destination blob. // If one or more name-value pairs are specified, the destination blob is created with the specified metadata, // and metadata is not copied from the source blob or file. MetaData map[string]string // An ETag value. // Specify an ETag value for this conditional header to copy the blob only if the specified // ETag value matches the ETag value for an existing destination blob. // If the ETag for the destination blob does not match the ETag specified for If-Match, // the Blob service returns status code 412 (Precondition Failed). IfMatch *string // An ETag value, or the wildcard character (*). // Specify an ETag value for this conditional header to copy the blob only if the specified // ETag value does not match the ETag value for the destination blob. // Specify the wildcard character (*) to perform the operation only if the destination blob does not exist. // If the specified condition isn't met, the Blob service returns status code 412 (Precondition Failed). IfNoneMatch *string // A DateTime value. // Specify this conditional header to copy the blob only if the destination blob // has been modified since the specified date/time. // If the destination blob has not been modified, the Blob service returns status code 412 (Precondition Failed). IfModifiedSince *string // A DateTime value. // Specify this conditional header to copy the blob only if the destination blob // has not been modified since the specified date/time. // If the destination blob has been modified, the Blob service returns status code 412 (Precondition Failed). IfUnmodifiedSince *string // An ETag value. // Specify this conditional header to copy the source blob only if its ETag matches the value specified. // If the ETag values do not match, the Blob service returns status code 412 (Precondition Failed). // This cannot be specified if the source is an Azure File. SourceIfMatch *string // An ETag value. // Specify this conditional header to copy the blob only if its ETag does not match the value specified. // If the values are identical, the Blob service returns status code 412 (Precondition Failed). // This cannot be specified if the source is an Azure File. SourceIfNoneMatch *string // A DateTime value. // Specify this conditional header to copy the blob only if the source blob has been modified // since the specified date/time. // If the source blob has not been modified, the Blob service returns status code 412 (Precondition Failed). // This cannot be specified if the source is an Azure File. SourceIfModifiedSince *string // A DateTime value. // Specify this conditional header to copy the blob only if the source blob has not been modified // since the specified date/time. // If the source blob has been modified, the Blob service returns status code 412 (Precondition Failed). // This header cannot be specified if the source is an Azure File. SourceIfUnmodifiedSince *string }
type CopyResponse ¶ added in v0.21.0
type CopyStatus ¶
type CopyStatus string
var ( Aborted CopyStatus = "aborted" Failed CopyStatus = "failed" Pending CopyStatus = "pending" Success CopyStatus = "success" )
type DeleteInput ¶
type DeleteInput struct { // Should any Snapshots for this Blob also be deleted? // If the Blob has Snapshots and this is set to False a 409 Conflict will be returned DeleteSnapshots bool // The ID of the Lease // This must be specified if a Lease is present on the Blob, else a 403 is returned LeaseID *string }
type DeleteResponse ¶ added in v0.21.0
type DeleteSnapshotInput ¶
type DeleteSnapshotResponse ¶ added in v0.21.0
type DeleteSnapshotsInput ¶
type DeleteSnapshotsInput struct { // The ID of the Lease // This must be specified if a Lease is present on the Blob, else a 403 is returned LeaseID *string }
type DeleteSnapshotsResponse ¶ added in v0.21.0
type GetBlockListInput ¶
type GetBlockListInput struct { BlockListType BlockListType LeaseID *string }
type GetBlockListResponse ¶ added in v0.21.0
type GetBlockListResponse struct { HttpResponse *client.Response // The size of the blob in bytes BlobContentLength *int64 // The Content Type of the blob ContentType string // The ETag associated with this blob ETag string // A list of blocks which have been committed CommittedBlocks CommittedBlocks `xml:"CommittedBlocks,omitempty"` // A list of blocks which have not yet been committed UncommittedBlocks UncommittedBlocks `xml:"UncommittedBlocks,omitempty"` }
type GetPageRangesInput ¶
type GetPageRangesResponse ¶ added in v0.21.0
type GetPropertiesInput ¶
type GetPropertiesInput struct { // The ID of the Lease // This must be specified if a Lease is present on the Blob, else a 403 is returned LeaseID *string }
type GetPropertiesResponse ¶ added in v0.21.0
type GetPropertiesResponse struct { HttpResponse *client.Response // The tier of page blob on a premium storage account or tier of block blob on blob storage or general purpose v2 account. AccessTier AccessTier // This gives the last time tier was changed on the object. // This header is returned only if tier on block blob was ever set. // The date format follows RFC 1123 AccessTierChangeTime string // For page blobs on a premium storage account only. // If the access tier is not explicitly set on the blob, the tier is inferred based on its content length // and this header will be returned with true value. // For block blobs on Blob Storage or general purpose v2 account, if the blob does not have the access tier // set then we infer the tier from the storage account properties. This header is set only if the block blob // tier is inferred AccessTierInferred bool // For blob storage or general purpose v2 account. // If the blob is being rehydrated and is not complete then this header is returned indicating // that rehydrate is pending and also tells the destination tier ArchiveStatus ArchiveStatus // The number of committed blocks present in the blob. // This header is returned only for append blobs. BlobCommittedBlockCount string // The current sequence number for a page blob. // This header is not returned for block blobs or append blobs. // This header is not returned for block blobs. BlobSequenceNumber string // The blob type. BlobType BlobType // If the Cache-Control request header has previously been set for the blob, that value is returned in this header. CacheControl string // The Content-Disposition response header field conveys additional information about how to process // the response payload, and also can be used to attach additional metadata. // For example, if set to attachment, it indicates that the user-agent should not display the response, // but instead show a Save As dialog. ContentDisposition string // If the Content-Encoding request header has previously been set for the blob, // that value is returned in this header. ContentEncoding string // If the Content-Language request header has previously been set for the blob, // that value is returned in this header. ContentLanguage string // The size of the blob in bytes. // For a page blob, this header returns the value of the x-ms-blob-content-length header stored with the blob. ContentLength int64 // The content type specified for the blob. // If no content type was specified, the default content type is `application/octet-stream`. ContentType string // If the Content-MD5 header has been set for the blob, this response header is returned so that // the client can check for message content integrity. ContentMD5 string // Conclusion time of the last attempted Copy Blob operation where this blob was the destination blob. // This value can specify the time of a completed, aborted, or failed copy attempt. // This header does not appear if a copy is pending, if this blob has never been the // destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob // operation using Set Blob Properties, Put Blob, or Put Block List. CopyCompletionTime string // Included if the blob is incremental copy blob or incremental copy snapshot, if x-ms-copy-status is success. // Snapshot time of the last successful incremental copy snapshot for this blob CopyDestinationSnapshot string // String identifier for the last attempted Copy Blob operation where this blob was the destination blob. // This header does not appear if this blob has never been the destination in a Copy Blob operation, // or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, // Put Blob, or Put Block List. CopyID string // Contains the number of bytes copied and the total bytes in the source in the last attempted // Copy Blob operation where this blob was the destination blob. // Can show between 0 and Content-Length bytes copied. // This header does not appear if this blob has never been the destination in a Copy Blob operation, // or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, // Put Blob, or Put Block List. CopyProgress string // URL up to 2 KB in length that specifies the source blob used in the last attempted Copy Blob operation // where this blob was the destination blob. // This header does not appear if this blob has never been the destination in a Copy Blob operation, // or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, // Put Blob, or Put Block List CopySource string // State of the copy operation identified by x-ms-copy-id, with these values: // - success: Copy completed successfully. // - pending: Copy is in progress. // Check x-ms-copy-status-description if intermittent, non-fatal errors // impede copy progress but don’t cause failure. // - aborted: Copy was ended by Abort Copy Blob. // - failed: Copy failed. See x-ms- copy-status-description for failure details. // This header does not appear if this blob has never been the destination in a Copy Blob operation, // or if this blob has been modified after a completed Copy Blob operation using Set Blob Properties, // Put Blob, or Put Block List. CopyStatus CopyStatus // Describes cause of fatal or non-fatal copy operation failure. // This header does not appear if this blob has never been the destination in a Copy Blob operation, // or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, // Put Blob, or Put Block List. CopyStatusDescription string // The date/time at which the blob was created. The date format follows RFC 1123 CreationTime string // The ETag contains a value that you can use to perform operations conditionally ETag string // Included if the blob is incremental copy blob. IncrementalCopy bool // The date/time that the blob was last modified. The date format follows RFC 1123. LastModified string // When a blob is leased, specifies whether the lease is of infinite or fixed duration LeaseDuration LeaseDuration // The lease state of the blob LeaseState LeaseState LeaseStatus LeaseStatus // A set of name-value pairs that correspond to the user-defined metadata associated with this blob MetaData map[string]string // Is the Storage Account encrypted using server-side encryption? This should always return true ServerEncrypted bool }
type GetResponse ¶ added in v0.21.0
type IncrementalCopyBlob ¶ added in v0.21.0
type LeaseDuration ¶
type LeaseDuration string
var ( Fixed LeaseDuration = "fixed" Infinite LeaseDuration = "infinite" )
type LeaseState ¶
type LeaseState string
var ( Available LeaseState = "available" Breaking LeaseState = "breaking" Broken LeaseState = "broken" Expired LeaseState = "expired" Leased LeaseState = "leased" )
type LeaseStatus ¶
type LeaseStatus string
var ( Locked LeaseStatus = "locked" Unlocked LeaseStatus = "unlocked" )
type PutAppendBlobInput ¶
type PutAppendBlobResponse ¶ added in v0.21.0
type PutBlockBlobInput ¶
type PutBlockBlobResponse ¶ added in v0.21.0
type PutBlockFromURLInput ¶
type PutBlockFromURLResponse ¶ added in v0.21.0
type PutBlockInput ¶
type PutBlockListInput ¶
type PutBlockListResponse ¶ added in v0.21.0
type PutBlockResponse ¶ added in v0.21.0
type PutPageBlobInput ¶
type PutPageBlobResponse ¶ added in v0.21.0
type PutPageClearInput ¶
type PutPageClearResponse ¶ added in v0.21.0
type PutPageUpdateInput ¶
type PutPageUpdateResponse ¶ added in v0.21.0
type ReleaseLeaseInput ¶ added in v0.21.0
type ReleaseLeaseInput struct {
LeaseID string
}
type ReleaseLeaseResponse ¶ added in v0.21.0
type RenewLeaseInput ¶ added in v0.21.0
type RenewLeaseInput struct {
LeaseID string
}
type RenewLeaseResponse ¶ added in v0.21.0
type SequenceNumberAction ¶
type SequenceNumberAction string
var ( Increment SequenceNumberAction = "increment" Max SequenceNumberAction = "max" Update SequenceNumberAction = "update" )
type SetMetaDataInput ¶
type SetMetaDataResponse ¶ added in v0.21.0
type SetPropertiesInput ¶
type SetPropertiesResponse ¶ added in v0.21.0
type SetTierInput ¶ added in v0.21.0
type SetTierInput struct {
Tier AccessTier
}
type SetTierResponse ¶ added in v0.21.0
type SnapshotInput ¶
type SnapshotInput struct { // The ID of the Lease // This must be specified if a Lease is present on the Blob, else a 403 is returned LeaseID *string // MetaData is a user-defined name-value pair associated with the blob. // If no name-value pairs are specified, the operation will copy the base blob metadata to the snapshot. // If one or more name-value pairs are specified, the snapshot is created with the specified metadata, // and metadata is not copied from the base blob. MetaData map[string]string // A DateTime value which will only snapshot the blob if it has been modified since the specified date/time // If the base blob has not been modified, the Blob service returns status code 412 (Precondition Failed). IfModifiedSince *string // A DateTime value which will only snapshot the blob if it has not been modified since the specified date/time // If the base blob has been modified, the Blob service returns status code 412 (Precondition Failed). IfUnmodifiedSince *string // An ETag value to snapshot the blob only if its ETag value matches the value specified. // If the values do not match, the Blob service returns status code 412 (Precondition Failed). IfMatch *string // An ETag value for this conditional header to snapshot the blob only if its ETag value // does not match the value specified. // If the values are identical, the Blob service returns status code 412 (Precondition Failed). IfNoneMatch *string }
type SnapshotResponse ¶ added in v0.21.0
type SnapshotResponse struct { HttpResponse *client.Response // The ETag of the snapshot ETag string // A DateTime value that uniquely identifies the snapshot. // The value of this header indicates the snapshot version, // and may be used in subsequent requests to access the snapshot. SnapshotDateTime string }
type StorageBlob ¶
type StorageBlob interface { AppendBlock(ctx context.Context, containerName string, blobName string, input AppendBlockInput) (AppendBlockResponse, error) Copy(ctx context.Context, containerName string, blobName string, input CopyInput) (CopyResponse, error) AbortCopy(ctx context.Context, containerName string, blobName string, input AbortCopyInput) (CopyAbortResponse, error) CopyAndWait(ctx context.Context, containerName string, blobName string, input CopyInput) error Delete(ctx context.Context, containerName string, blobName string, input DeleteInput) (DeleteResponse, error) DeleteSnapshot(ctx context.Context, containerName string, blobName string, input DeleteSnapshotInput) (DeleteSnapshotResponse, error) DeleteSnapshots(ctx context.Context, containerName string, blobName string, input DeleteSnapshotsInput) (DeleteSnapshotsResponse, error) Get(ctx context.Context, containerName string, blobName string, input GetInput) (GetResponse, error) GetBlockList(ctx context.Context, containerName string, blobName string, input GetBlockListInput) (GetBlockListResponse, error) GetPageRanges(ctx context.Context, containerName, blobName string, input GetPageRangesInput) (GetPageRangesResponse, error) IncrementalCopyBlob(ctx context.Context, containerName string, blobName string, input IncrementalCopyBlobInput) (IncrementalCopyBlob, error) AcquireLease(ctx context.Context, containerName string, blobName string, input AcquireLeaseInput) (AcquireLeaseResponse, error) BreakLease(ctx context.Context, containerName string, blobName string, input BreakLeaseInput) (BreakLeaseResponse, error) ChangeLease(ctx context.Context, containerName string, blobName string, input ChangeLeaseInput) (ChangeLeaseResponse, error) ReleaseLease(ctx context.Context, containerName string, blobName string, input ReleaseLeaseInput) (ReleaseLeaseResponse, error) RenewLease(ctx context.Context, containerName string, blobName string, input RenewLeaseInput) (RenewLeaseResponse, error) SetMetaData(ctx context.Context, containerName string, blobName string, input SetMetaDataInput) (SetMetaDataResponse, error) GetProperties(ctx context.Context, containerName string, blobName string, input GetPropertiesInput) (GetPropertiesResponse, error) SetProperties(ctx context.Context, containerName string, blobName string, input SetPropertiesInput) (SetPropertiesResponse, error) PutAppendBlob(ctx context.Context, containerName string, blobName string, input PutAppendBlobInput) (PutAppendBlobResponse, error) PutBlock(ctx context.Context, containerName string, blobName string, input PutBlockInput) (PutBlockResponse, error) PutBlockBlob(ctx context.Context, containerName string, blobName string, input PutBlockBlobInput) (PutBlockBlobResponse, error) PutBlockBlobFromFile(ctx context.Context, containerName string, blobName string, file *os.File, input PutBlockBlobInput) error PutBlockList(ctx context.Context, containerName string, blobName string, input PutBlockListInput) (PutBlockListResponse, error) PutBlockFromURL(ctx context.Context, containerName string, blobName string, input PutBlockFromURLInput) (PutBlockFromURLResponse, error) PutPageBlob(ctx context.Context, containerName string, blobName string, input PutPageBlobInput) (PutPageBlobResponse, error) PutPageClear(ctx context.Context, containerName string, blobName string, input PutPageClearInput) (PutPageClearResponse, error) PutPageUpdate(ctx context.Context, containerName string, blobName string, input PutPageUpdateInput) (PutPageUpdateResponse, error) SetTier(ctx context.Context, containerName string, blobName string, input SetTierInput) (SetTierResponse, error) Snapshot(ctx context.Context, containerName string, blobName string, input SnapshotInput) (SnapshotResponse, error) GetSnapshotProperties(ctx context.Context, containerName string, blobName string, input GetSnapshotPropertiesInput) (GetPropertiesResponse, error) Undelete(ctx context.Context, containerName string, blobName string) (UndeleteResponse, error) }
type UncommittedBlocks ¶
type UncommittedBlocks struct {
Blocks []Block `xml:"Block"`
}
type UndeleteResponse ¶ added in v0.21.0
Source Files ¶
- api.go
- append_block.go
- client.go
- copy.go
- copy_abort.go
- copy_and_wait.go
- copy_and_wait_poller.go
- delete.go
- delete_snapshot.go
- delete_snapshots.go
- get.go
- get_block_list.go
- get_page_ranges.go
- incremental_copy_blob.go
- lease_acquire.go
- lease_break.go
- lease_change.go
- lease_release.go
- lease_renew.go
- metadata_set.go
- models.go
- properties_get.go
- properties_set.go
- put_append_blob.go
- put_block.go
- put_block_blob.go
- put_block_blob_file.go
- put_block_list.go
- put_block_url.go
- put_page_blob.go
- put_page_clear.go
- put_page_update.go
- resource_id.go
- set_tier.go
- snapshot.go
- snapshot_get_properties.go
- undelete.go
- version.go