blobs

package
v0.20.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

README

Blob Storage Blobs SDK for API version 2019-12-12

This package allows you to interact with the Blobs Blob Storage API

Supported Authorizers

  • Azure Active Directory (for the Resource Endpoint https://storage.azure.com)
  • SharedKeyLite (Blob, File & Queue)

Example Usage

package main

import (
	"context"
	"fmt"
	"time"
	
	"github.com/Azure/go-autorest/autorest"
	"github.com/tombuildsstuff/giovanni/storage/2019-12-12/blob/blobs"
)

func Example() error {
	accountName := "storageaccount1"
    storageAccountKey := "ABC123...."
    containerName := "mycontainer"
    fileName := "example-large-file.iso"
    
    storageAuth := autorest.NewSharedKeyLiteAuthorizer(accountName, storageAccountKey)
    blobClient := blobs.New()
    blobClient.Client.Authorizer = storageAuth
    
    ctx := context.TODO()
    copyInput := blobs.CopyInput{
        CopySource: "http://releases.ubuntu.com/14.04/ubuntu-14.04.6-desktop-amd64.iso",
    }
    refreshInterval := 5 * time.Second
    if err := blobClient.CopyAndWait(ctx, accountName, containerName, fileName, copyInput, refreshInterval); err != nil {
        return fmt.Errorf("Error copying: %s", err)
    }
    
    return nil 
}

Documentation

Index

Constants

View Source
const APIVersion = "2019-12-12"

APIVersion is the version of the API used for all Storage API Operations

Variables

This section is empty.

Functions

func UserAgent

func UserAgent() string

Types

type AbortCopyInput

type AbortCopyInput struct {
	// The Copy ID which should be aborted
	CopyID string

	// 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 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 AcquireLeaseResult

type AcquireLeaseResult struct {
	autorest.Response

	LeaseID string
}

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 AppendBlockResult

type AppendBlockResult struct {
	autorest.Response

	BlobAppendOffset        string
	BlobCommittedBlockCount int64
	ContentMD5              string
	ETag                    string
	LastModified            string
}

type ArchiveStatus

type ArchiveStatus string
var (
	None                   ArchiveStatus = ""
	RehydratePendingToCool ArchiveStatus = "rehydrate-pending-to-cool"
	RehydratePendingToHot  ArchiveStatus = "rehydrate-pending-to-hot"
)

type BlobType

type BlobType string
var (
	AppendBlob BlobType = "AppendBlob"
	BlockBlob  BlobType = "BlockBlob"
	PageBlob   BlobType = "PageBlob"
)

type Block

type Block struct {
	// The base64-encoded Block ID
	Name string `xml:"Name"`

	// The size of the Block in Bytes
	Size int64 `xml:"Size"`
}

type BlockID

type BlockID struct {
	Value string `xml:",chardata"`
}

type BlockList

type BlockList struct {
	CommittedBlockIDs   []BlockID `xml:"Committed,omitempty"`
	UncommittedBlockIDs []BlockID `xml:"Uncommitted,omitempty"`
	LatestBlockIDs      []BlockID `xml:"Latest,omitempty"`
}

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 BreakLeaseResponse struct {
	autorest.Response

	// Approximate time remaining in the lease period, in seconds.
	// If the break is immediate, 0 is returned.
	LeaseTime int
}

type ChangeLeaseInput

type ChangeLeaseInput struct {
	ExistingLeaseID string
	ProposedLeaseID string
}

type ChangeLeaseResponse

type ChangeLeaseResponse struct {
	autorest.Response

	LeaseID string
}

type Client

type Client struct {
	autorest.Client
	BaseURI string
}

Client is the base client for Blob Storage Blobs.

func New

func New() Client

New creates an instance of the Client client.

func NewWithEnvironment

func NewWithEnvironment(environment azure.Environment) Client

NewWithBaseURI creates an instance of the Client client.

func (Client) AbortCopy

func (client Client) AbortCopy(ctx context.Context, accountName, containerName, blobName string, input AbortCopyInput) (result autorest.Response, err error)

AbortCopy aborts a pending Copy Blob operation, and leaves a destination blob with zero length and full metadata.

func (Client) AbortCopyPreparer

func (client Client) AbortCopyPreparer(ctx context.Context, accountName, containerName, blobName string, input AbortCopyInput) (*http.Request, error)

AbortCopyPreparer prepares the AbortCopy request.

func (Client) AbortCopyResponder

func (client Client) AbortCopyResponder(resp *http.Response) (result autorest.Response, err error)

AbortCopyResponder handles the response to the AbortCopy request. The method always closes the http.Response Body.

func (Client) AbortCopySender

func (client Client) AbortCopySender(req *http.Request) (*http.Response, error)

AbortCopySender sends the AbortCopy request. The method will close the http.Response Body if it receives an error.

func (Client) AcquireLease

func (client Client) AcquireLease(ctx context.Context, accountName, containerName, blobName string, input AcquireLeaseInput) (result AcquireLeaseResult, err error)

AcquireLease establishes and manages a lock on a blob for write and delete operations.

func (Client) AcquireLeasePreparer

func (client Client) AcquireLeasePreparer(ctx context.Context, accountName, containerName, blobName string, input AcquireLeaseInput) (*http.Request, error)

AcquireLeasePreparer prepares the AcquireLease request.

func (Client) AcquireLeaseResponder

func (client Client) AcquireLeaseResponder(resp *http.Response) (result AcquireLeaseResult, err error)

AcquireLeaseResponder handles the response to the AcquireLease request. The method always closes the http.Response Body.

func (Client) AcquireLeaseSender

func (client Client) AcquireLeaseSender(req *http.Request) (*http.Response, error)

AcquireLeaseSender sends the AcquireLease request. The method will close the http.Response Body if it receives an error.

func (Client) AppendBlock

func (client Client) AppendBlock(ctx context.Context, accountName, containerName, blobName string, input AppendBlockInput) (result AppendBlockResult, err error)

AppendBlock commits a new block of data to the end of an existing append blob.

func (Client) AppendBlockPreparer

func (client Client) AppendBlockPreparer(ctx context.Context, accountName, containerName, blobName string, input AppendBlockInput) (*http.Request, error)

AppendBlockPreparer prepares the AppendBlock request.

func (Client) AppendBlockResponder

func (client Client) AppendBlockResponder(resp *http.Response) (result AppendBlockResult, err error)

AppendBlockResponder handles the response to the AppendBlock request. The method always closes the http.Response Body.

func (Client) AppendBlockSender

func (client Client) AppendBlockSender(req *http.Request) (*http.Response, error)

AppendBlockSender sends the AppendBlock request. The method will close the http.Response Body if it receives an error.

func (Client) BreakLease

func (client Client) BreakLease(ctx context.Context, accountName, containerName, blobName string, input BreakLeaseInput) (result autorest.Response, err error)

BreakLease breaks an existing lock on a blob using the LeaseID.

func (Client) BreakLeasePreparer

func (client Client) BreakLeasePreparer(ctx context.Context, accountName, containerName, blobName string, input BreakLeaseInput) (*http.Request, error)

BreakLeasePreparer prepares the BreakLease request.

func (Client) BreakLeaseResponder

func (client Client) BreakLeaseResponder(resp *http.Response) (result autorest.Response, err error)

BreakLeaseResponder handles the response to the BreakLease request. The method always closes the http.Response Body.

func (Client) BreakLeaseSender

func (client Client) BreakLeaseSender(req *http.Request) (*http.Response, error)

BreakLeaseSender sends the BreakLease request. The method will close the http.Response Body if it receives an error.

func (Client) ChangeLease

func (client Client) ChangeLease(ctx context.Context, accountName, containerName, blobName string, input ChangeLeaseInput) (result ChangeLeaseResponse, err error)

ChangeLease changes an existing lock on a blob for another lock.

func (Client) ChangeLeasePreparer

func (client Client) ChangeLeasePreparer(ctx context.Context, accountName, containerName, blobName string, input ChangeLeaseInput) (*http.Request, error)

ChangeLeasePreparer prepares the ChangeLease request.

func (Client) ChangeLeaseResponder

func (client Client) ChangeLeaseResponder(resp *http.Response) (result ChangeLeaseResponse, err error)

ChangeLeaseResponder handles the response to the ChangeLease request. The method always closes the http.Response Body.

func (Client) ChangeLeaseSender

func (client Client) ChangeLeaseSender(req *http.Request) (*http.Response, error)

ChangeLeaseSender sends the ChangeLease 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, containerName, blobName string, input CopyInput) (result CopyResult, err error)

Copy copies a blob to a destination within the storage account asynchronously.

func (Client) CopyAndWait

func (client Client) CopyAndWait(ctx context.Context, accountName, containerName, blobName string, input CopyInput, pollingInterval time.Duration) error

CopyAndWait copies a blob to a destination within the storage account and waits for it to finish copying.

func (Client) CopyPreparer

func (client Client) CopyPreparer(ctx context.Context, accountName, containerName, blobName 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

func (client Client) CopySender(req *http.Request) (*http.Response, error)

CopySender sends the Copy 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, containerName, blobName string, input DeleteInput) (result autorest.Response, err error)

Delete marks the specified blob or snapshot for deletion. The blob is later deleted during garbage collection.

func (Client) DeletePreparer

func (client Client) DeletePreparer(ctx context.Context, accountName, containerName, blobName string, input DeleteInput) (*http.Request, error)

DeletePreparer prepares the Delete request.

func (Client) DeleteResponder

func (client Client) DeleteResponder(resp *http.Response) (result autorest.Response, err error)

DeleteResponder handles the response to the Delete request. The method always closes the http.Response Body.

func (Client) DeleteSender

func (client Client) DeleteSender(req *http.Request) (*http.Response, error)

DeleteSender sends the Delete request. The method will close the http.Response Body if it receives an error.

func (Client) DeleteSnapshot

func (client Client) DeleteSnapshot(ctx context.Context, accountName, containerName, blobName string, input DeleteSnapshotInput) (result autorest.Response, 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) DeleteSnapshotPreparer

func (client Client) DeleteSnapshotPreparer(ctx context.Context, accountName, containerName, blobName string, input DeleteSnapshotInput) (*http.Request, error)

DeleteSnapshotPreparer prepares the DeleteSnapshot request.

func (Client) DeleteSnapshotResponder

func (client Client) DeleteSnapshotResponder(resp *http.Response) (result autorest.Response, err error)

DeleteSnapshotResponder handles the response to the DeleteSnapshot request. The method always closes the http.Response Body.

func (Client) DeleteSnapshotSender

func (client Client) DeleteSnapshotSender(req *http.Request) (*http.Response, error)

DeleteSnapshotSender sends the DeleteSnapshot request. The method will close the http.Response Body if it receives an error.

func (Client) DeleteSnapshots

func (client Client) DeleteSnapshots(ctx context.Context, accountName, containerName, blobName string, input DeleteSnapshotsInput) (result autorest.Response, err error)

DeleteSnapshots marks all Snapshots of a Blob for Deletion, which will be deleted during the next Garbage Collection Cycle.

func (Client) DeleteSnapshotsPreparer

func (client Client) DeleteSnapshotsPreparer(ctx context.Context, accountName, containerName, blobName string, input DeleteSnapshotsInput) (*http.Request, error)

DeleteSnapshotsPreparer prepares the DeleteSnapshots request.

func (Client) DeleteSnapshotsResponder

func (client Client) DeleteSnapshotsResponder(resp *http.Response) (result autorest.Response, err error)

DeleteSnapshotsResponder handles the response to the DeleteSnapshots request. The method always closes the http.Response Body.

func (Client) DeleteSnapshotsSender

func (client Client) DeleteSnapshotsSender(req *http.Request) (*http.Response, error)

DeleteSnapshotsSender sends the DeleteSnapshots 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, containerName, blobName string, input GetInput) (result GetResult, err error)

Get reads or downloads a blob from the system, including its metadata and properties.

func (Client) GetBlockList

func (client Client) GetBlockList(ctx context.Context, accountName, containerName, blobName string, input GetBlockListInput) (result GetBlockListResult, err error)

GetBlockList retrieves the list of blocks that have been uploaded as part of a block blob.

func (Client) GetBlockListPreparer

func (client Client) GetBlockListPreparer(ctx context.Context, accountName, containerName, blobName string, input GetBlockListInput) (*http.Request, error)

GetBlockListPreparer prepares the GetBlockList request.

func (Client) GetBlockListResponder

func (client Client) GetBlockListResponder(resp *http.Response) (result GetBlockListResult, err error)

GetBlockListResponder handles the response to the GetBlockList request. The method always closes the http.Response Body.

func (Client) GetBlockListSender

func (client Client) GetBlockListSender(req *http.Request) (*http.Response, error)

GetBlockListSender sends the GetBlockList request. The method will close the http.Response Body if it receives an error.

func (Client) GetPageRanges

func (client Client) GetPageRanges(ctx context.Context, accountName, containerName, blobName string, input GetPageRangesInput) (result GetPageRangesResult, err error)

GetPageRanges returns the list of valid page ranges for a page blob or snapshot of a page blob.

func (Client) GetPageRangesPreparer

func (client Client) GetPageRangesPreparer(ctx context.Context, accountName, containerName, blobName string, input GetPageRangesInput) (*http.Request, error)

GetPageRangesPreparer prepares the GetPageRanges request.

func (Client) GetPageRangesResponder

func (client Client) GetPageRangesResponder(resp *http.Response) (result GetPageRangesResult, err error)

GetPageRangesResponder handles the response to the GetPageRanges request. The method always closes the http.Response Body.

func (Client) GetPageRangesSender

func (client Client) GetPageRangesSender(req *http.Request) (*http.Response, error)

GetPageRangesSender sends the GetPageRanges 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, containerName, blobName string, input GetInput) (*http.Request, error)

GetPreparer prepares the Get request.

func (Client) GetProperties

func (client Client) GetProperties(ctx context.Context, accountName, containerName, blobName string, input GetPropertiesInput) (result GetPropertiesResult, err error)

GetProperties returns all user-defined metadata, standard HTTP properties, and system properties for the blob

func (Client) GetPropertiesPreparer

func (client Client) GetPropertiesPreparer(ctx context.Context, accountName, containerName, blobName string, input GetPropertiesInput) (*http.Request, error)

GetPropertiesPreparer prepares the GetProperties request.

func (Client) GetPropertiesResponder

func (client Client) GetPropertiesResponder(resp *http.Response) (result GetPropertiesResult, err error)

GetPropertiesResponder handles the response to the GetProperties request. The method always closes the http.Response Body.

func (Client) GetPropertiesSender

func (client Client) GetPropertiesSender(req *http.Request) (*http.Response, error)

GetPropertiesSender sends the GetProperties request. The method will close the http.Response Body if it receives an error.

func (Client) GetResourceID

func (client Client) GetResourceID(accountName, containerName, blobName string) string

GetResourceID returns the Resource ID for the given Blob This can be useful when, for example, you're using this as a unique identifier

func (Client) GetResponder

func (client Client) GetResponder(resp *http.Response) (result GetResult, err error)

GetResponder handles the response to the Get request. The method always closes the http.Response Body.

func (Client) GetSender

func (client Client) GetSender(req *http.Request) (*http.Response, error)

GetSender sends the Get request. The method will close the http.Response Body if it receives an error.

func (Client) GetSnapshotProperties

func (client Client) GetSnapshotProperties(ctx context.Context, accountName, containerName, blobName string, input GetSnapshotPropertiesInput) (result GetPropertiesResult, err error)

GetSnapshotProperties returns all user-defined metadata, standard HTTP properties, and system properties for the specified snapshot of a blob

func (Client) GetSnapshotPropertiesPreparer

func (client Client) GetSnapshotPropertiesPreparer(ctx context.Context, accountName, containerName, blobName string, input GetSnapshotPropertiesInput) (*http.Request, error)

GetSnapshotPreparer prepares the GetSnapshot request.

func (Client) IncrementalCopyBlob

func (client Client) IncrementalCopyBlob(ctx context.Context, accountName, containerName, blobName string, input IncrementalCopyBlobInput) (result autorest.Response, 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) IncrementalCopyBlobPreparer

func (client Client) IncrementalCopyBlobPreparer(ctx context.Context, accountName, containerName, blobName string, input IncrementalCopyBlobInput) (*http.Request, error)

IncrementalCopyBlobPreparer prepares the IncrementalCopyBlob request.

func (Client) IncrementalCopyBlobResponder

func (client Client) IncrementalCopyBlobResponder(resp *http.Response) (result autorest.Response, err error)

IncrementalCopyBlobResponder handles the response to the IncrementalCopyBlob request. The method always closes the http.Response Body.

func (Client) IncrementalCopyBlobSender

func (client Client) IncrementalCopyBlobSender(req *http.Request) (*http.Response, error)

IncrementalCopyBlobSender sends the IncrementalCopyBlob request. The method will close the http.Response Body if it receives an error.

func (Client) PutAppendBlob

func (client Client) PutAppendBlob(ctx context.Context, accountName, containerName, blobName string, input PutAppendBlobInput) (result autorest.Response, 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) PutAppendBlobPreparer

func (client Client) PutAppendBlobPreparer(ctx context.Context, accountName, containerName, blobName string, input PutAppendBlobInput) (*http.Request, error)

PutAppendBlobPreparer prepares the PutAppendBlob request.

func (Client) PutAppendBlobResponder

func (client Client) PutAppendBlobResponder(resp *http.Response) (result autorest.Response, err error)

PutAppendBlobResponder handles the response to the PutAppendBlob request. The method always closes the http.Response Body.

func (Client) PutAppendBlobSender

func (client Client) PutAppendBlobSender(req *http.Request) (*http.Response, error)

PutAppendBlobSender sends the PutAppendBlob request. The method will close the http.Response Body if it receives an error.

func (Client) PutBlock

func (client Client) PutBlock(ctx context.Context, accountName, containerName, blobName string, input PutBlockInput) (result PutBlockResult, err error)

PutBlock creates a new block to be committed as part of a blob.

func (Client) PutBlockBlob

func (client Client) PutBlockBlob(ctx context.Context, accountName, containerName, blobName string, input PutBlockBlobInput) (result autorest.Response, 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 (client Client) PutBlockBlobFromFile(ctx context.Context, accountName, 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) PutBlockBlobPreparer

func (client Client) PutBlockBlobPreparer(ctx context.Context, accountName, containerName, blobName string, input PutBlockBlobInput) (*http.Request, error)

PutBlockBlobPreparer prepares the PutBlockBlob request.

func (Client) PutBlockBlobResponder

func (client Client) PutBlockBlobResponder(resp *http.Response) (result autorest.Response, err error)

PutBlockBlobResponder handles the response to the PutBlockBlob request. The method always closes the http.Response Body.

func (Client) PutBlockBlobSender

func (client Client) PutBlockBlobSender(req *http.Request) (*http.Response, error)

PutBlockBlobSender sends the PutBlockBlob request. The method will close the http.Response Body if it receives an error.

func (Client) PutBlockFromURL

func (client Client) PutBlockFromURL(ctx context.Context, accountName, containerName, blobName string, input PutBlockFromURLInput) (result PutBlockFromURLResult, 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) PutBlockFromURLPreparer

func (client Client) PutBlockFromURLPreparer(ctx context.Context, accountName, containerName, blobName string, input PutBlockFromURLInput) (*http.Request, error)

PutBlockFromURLPreparer prepares the PutBlockFromURL request.

func (Client) PutBlockFromURLResponder

func (client Client) PutBlockFromURLResponder(resp *http.Response) (result PutBlockFromURLResult, err error)

PutBlockFromURLResponder handles the response to the PutBlockFromURL request. The method always closes the http.Response Body.

func (Client) PutBlockFromURLSender

func (client Client) PutBlockFromURLSender(req *http.Request) (*http.Response, error)

PutBlockFromURLSender sends the PutBlockFromURL request. The method will close the http.Response Body if it receives an error.

func (Client) PutBlockList

func (client Client) PutBlockList(ctx context.Context, accountName, containerName, blobName string, input PutBlockListInput) (result PutBlockListResult, 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) PutBlockListPreparer

func (client Client) PutBlockListPreparer(ctx context.Context, accountName, containerName, blobName string, input PutBlockListInput) (*http.Request, error)

PutBlockListPreparer prepares the PutBlockList request.

func (Client) PutBlockListResponder

func (client Client) PutBlockListResponder(resp *http.Response) (result PutBlockListResult, err error)

PutBlockListResponder handles the response to the PutBlockList request. The method always closes the http.Response Body.

func (Client) PutBlockListSender

func (client Client) PutBlockListSender(req *http.Request) (*http.Response, error)

PutBlockListSender sends the PutBlockList request. The method will close the http.Response Body if it receives an error.

func (Client) PutBlockPreparer

func (client Client) PutBlockPreparer(ctx context.Context, accountName, containerName, blobName string, input PutBlockInput) (*http.Request, error)

PutBlockPreparer prepares the PutBlock request.

func (Client) PutBlockResponder

func (client Client) PutBlockResponder(resp *http.Response) (result PutBlockResult, err error)

PutBlockResponder handles the response to the PutBlock request. The method always closes the http.Response Body.

func (Client) PutBlockSender

func (client Client) PutBlockSender(req *http.Request) (*http.Response, error)

PutBlockSender sends the PutBlock request. The method will close the http.Response Body if it receives an error.

func (Client) PutPageBlob

func (client Client) PutPageBlob(ctx context.Context, accountName, containerName, blobName string, input PutPageBlobInput) (result autorest.Response, 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) PutPageBlobPreparer

func (client Client) PutPageBlobPreparer(ctx context.Context, accountName, containerName, blobName string, input PutPageBlobInput) (*http.Request, error)

PutPageBlobPreparer prepares the PutPageBlob request.

func (Client) PutPageBlobResponder

func (client Client) PutPageBlobResponder(resp *http.Response) (result autorest.Response, err error)

PutPageBlobResponder handles the response to the PutPageBlob request. The method always closes the http.Response Body.

func (Client) PutPageBlobSender

func (client Client) PutPageBlobSender(req *http.Request) (*http.Response, error)

PutPageBlobSender sends the PutPageBlob request. The method will close the http.Response Body if it receives an error.

func (Client) PutPageClear

func (client Client) PutPageClear(ctx context.Context, accountName, containerName, blobName string, input PutPageClearInput) (result autorest.Response, err error)

PutPageClear clears a range of pages within a page blob.

func (Client) PutPageClearPreparer

func (client Client) PutPageClearPreparer(ctx context.Context, accountName, containerName, blobName string, input PutPageClearInput) (*http.Request, error)

PutPageClearPreparer prepares the PutPageClear request.

func (Client) PutPageClearResponder

func (client Client) PutPageClearResponder(resp *http.Response) (result autorest.Response, err error)

PutPageClearResponder handles the response to the PutPageClear request. The method always closes the http.Response Body.

func (Client) PutPageClearSender

func (client Client) PutPageClearSender(req *http.Request) (*http.Response, error)

PutPageClearSender sends the PutPageClear request. The method will close the http.Response Body if it receives an error.

func (Client) PutPageUpdate

func (client Client) PutPageUpdate(ctx context.Context, accountName, containerName, blobName string, input PutPageUpdateInput) (result PutPageUpdateResult, err error)

PutPageUpdate writes a range of pages to a page blob.

func (Client) PutPageUpdatePreparer

func (client Client) PutPageUpdatePreparer(ctx context.Context, accountName, containerName, blobName string, input PutPageUpdateInput) (*http.Request, error)

PutPageUpdatePreparer prepares the PutPageUpdate request.

func (Client) PutPageUpdateResponder

func (client Client) PutPageUpdateResponder(resp *http.Response) (result PutPageUpdateResult, err error)

PutPageUpdateResponder handles the response to the PutPageUpdate request. The method always closes the http.Response Body.

func (Client) PutPageUpdateSender

func (client Client) PutPageUpdateSender(req *http.Request) (*http.Response, error)

PutPageUpdateSender sends the PutPageUpdate request. The method will close the http.Response Body if it receives an error.

func (Client) ReleaseLease

func (client Client) ReleaseLease(ctx context.Context, accountName, containerName, blobName, leaseID string) (result autorest.Response, err error)

ReleaseLease releases a lock based on the Lease ID.

func (Client) ReleaseLeasePreparer

func (client Client) ReleaseLeasePreparer(ctx context.Context, accountName, containerName, blobName, leaseID string) (*http.Request, error)

ReleaseLeasePreparer prepares the ReleaseLease request.

func (Client) ReleaseLeaseResponder

func (client Client) ReleaseLeaseResponder(resp *http.Response) (result autorest.Response, err error)

ReleaseLeaseResponder handles the response to the ReleaseLease request. The method always closes the http.Response Body.

func (Client) ReleaseLeaseSender

func (client Client) ReleaseLeaseSender(req *http.Request) (*http.Response, error)

ReleaseLeaseSender sends the ReleaseLease request. The method will close the http.Response Body if it receives an error.

func (Client) RenewLease

func (client Client) RenewLease(ctx context.Context, accountName, containerName, blobName, leaseID string) (result autorest.Response, err error)

func (Client) RenewLeasePreparer

func (client Client) RenewLeasePreparer(ctx context.Context, accountName, containerName, blobName, leaseID string) (*http.Request, error)

RenewLeasePreparer prepares the RenewLease request.

func (Client) RenewLeaseResponder

func (client Client) RenewLeaseResponder(resp *http.Response) (result autorest.Response, err error)

RenewLeaseResponder handles the response to the RenewLease request. The method always closes the http.Response Body.

func (Client) RenewLeaseSender

func (client Client) RenewLeaseSender(req *http.Request) (*http.Response, error)

RenewLeaseSender sends the RenewLease 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, containerName, blobName string, input SetMetaDataInput) (result autorest.Response, err error)

SetMetaData marks the specified blob or snapshot for deletion. The blob is later deleted during garbage collection.

func (Client) SetMetaDataPreparer

func (client Client) SetMetaDataPreparer(ctx context.Context, accountName, containerName, blobName string, input SetMetaDataInput) (*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

func (client Client) SetMetaDataSender(req *http.Request) (*http.Response, error)

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, containerName, blobName string, input SetPropertiesInput) (result SetPropertiesResult, err error)

SetProperties sets system properties on the blob.

func (Client) SetPropertiesPreparer

func (client Client) SetPropertiesPreparer(ctx context.Context, accountName, containerName, blobName string, input SetPropertiesInput) (*http.Request, error)

SetPropertiesPreparer prepares the SetProperties request.

func (Client) SetPropertiesResponder

func (client Client) SetPropertiesResponder(resp *http.Response) (result SetPropertiesResult, err error)

SetPropertiesResponder handles the response to the SetProperties request. The method always closes the http.Response Body.

func (Client) SetPropertiesSender

func (client Client) SetPropertiesSender(req *http.Request) (*http.Response, error)

SetPropertiesSender sends the SetProperties request. The method will close the http.Response Body if it receives an error.

func (Client) SetTier

func (client Client) SetTier(ctx context.Context, accountName, containerName, blobName string, tier AccessTier) (result autorest.Response, err error)

SetTier sets the tier on a blob.

func (Client) SetTierPreparer

func (client Client) SetTierPreparer(ctx context.Context, accountName, containerName, blobName string, tier AccessTier) (*http.Request, error)

SetTierPreparer prepares the SetTier request.

func (Client) SetTierResponder

func (client Client) SetTierResponder(resp *http.Response) (result autorest.Response, err error)

SetTierResponder handles the response to the SetTier request. The method always closes the http.Response Body.

func (Client) SetTierSender

func (client Client) SetTierSender(req *http.Request) (*http.Response, error)

SetTierSender sends the SetTier request. The method will close the http.Response Body if it receives an error.

func (Client) Snapshot

func (client Client) Snapshot(ctx context.Context, accountName, containerName, blobName string, input SnapshotInput) (result SnapshotResult, err error)

Snapshot captures a Snapshot of a given Blob

func (Client) SnapshotPreparer

func (client Client) SnapshotPreparer(ctx context.Context, accountName, containerName, blobName string, input SnapshotInput) (*http.Request, error)

SnapshotPreparer prepares the Snapshot request.

func (Client) SnapshotResponder

func (client Client) SnapshotResponder(resp *http.Response) (result SnapshotResult, err error)

SnapshotResponder handles the response to the Snapshot request. The method always closes the http.Response Body.

func (Client) SnapshotSender

func (client Client) SnapshotSender(req *http.Request) (*http.Response, error)

SnapshotSender sends the Snapshot request. The method will close the http.Response Body if it receives an error.

func (Client) Undelete

func (client Client) Undelete(ctx context.Context, accountName, containerName, blobName string) (result autorest.Response, err error)

Undelete restores the contents and metadata of soft deleted blob and any associated soft deleted snapshots.

func (Client) UndeletePreparer

func (client Client) UndeletePreparer(ctx context.Context, accountName, containerName, blobName string) (*http.Request, error)

UndeletePreparer prepares the Undelete request.

func (Client) UndeleteResponder

func (client Client) UndeleteResponder(resp *http.Response) (result autorest.Response, err error)

UndeleteResponder handles the response to the Undelete request. The method always closes the http.Response Body.

func (Client) UndeleteSender

func (client Client) UndeleteSender(req *http.Request) (*http.Response, error)

UndeleteSender sends the Undelete request. The method will close the http.Response Body if it receives an error.

type CommittedBlocks

type CommittedBlocks struct {
	Blocks []Block `xml:"Block"`
}

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 CopyResult

type CopyResult struct {
	autorest.Response

	CopyID     string
	CopyStatus string
}

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 DeleteSnapshotInput

type DeleteSnapshotInput 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

	// The DateTime of the Snapshot which should be marked for Deletion
	SnapshotDateTime string
}

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 GetBlockListInput

type GetBlockListInput struct {
	BlockListType BlockListType
	LeaseID       *string
}

type GetBlockListResult

type GetBlockListResult struct {
	autorest.Response

	// The size of the blob in bytes
	ContentLength *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 GetInput

type GetInput struct {
	LeaseID   *string
	StartByte *int64
	EndByte   *int64
}

type GetPageRangesInput

type GetPageRangesInput struct {
	LeaseID *string

	StartByte *int64
	EndByte   *int64
}

type GetPageRangesResult

type GetPageRangesResult struct {
	autorest.Response

	// The size of the blob in bytes
	ContentLength *int64

	// The Content Type of the blob
	ContentType string

	// The ETag associated with this blob
	ETag string

	PageRanges []PageRange `xml:"PageRange"`
}

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 GetPropertiesResult

type GetPropertiesResult struct {
	autorest.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 GetResult

type GetResult struct {
	autorest.Response

	Contents []byte
}

type GetSnapshotPropertiesInput

type GetSnapshotPropertiesInput 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

	// The ID of the Snapshot which should be retrieved
	SnapshotID string
}

type IncrementalCopyBlobInput

type IncrementalCopyBlobInput struct {
	CopySource        string
	IfModifiedSince   *string
	IfUnmodifiedSince *string
	IfMatch           *string
	IfNoneMatch       *string
}

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 PageRange

type PageRange struct {
	// The start byte offset for this range, inclusive
	Start int64 `xml:"Start"`

	// The end byte offset for this range, inclusive
	End int64 `xml:"End"`
}

type PutAppendBlobInput

type PutAppendBlobInput struct {
	CacheControl       *string
	ContentDisposition *string
	ContentEncoding    *string
	ContentLanguage    *string
	ContentMD5         *string
	ContentType        *string
	LeaseID            *string
	MetaData           map[string]string
}

type PutBlockBlobInput

type PutBlockBlobInput struct {
	CacheControl       *string
	Content            *[]byte
	ContentDisposition *string
	ContentEncoding    *string
	ContentLanguage    *string
	ContentMD5         *string
	ContentType        *string
	LeaseID            *string
	MetaData           map[string]string
}

type PutBlockFromURLInput

type PutBlockFromURLInput struct {
	BlockID    string
	CopySource string

	ContentMD5 *string
	LeaseID    *string
	Range      *string
}

type PutBlockFromURLResult

type PutBlockFromURLResult struct {
	autorest.Response
	ContentMD5 string
}

type PutBlockInput

type PutBlockInput struct {
	BlockID    string
	Content    []byte
	ContentMD5 *string
	LeaseID    *string
}

type PutBlockListInput

type PutBlockListInput struct {
	BlockList          BlockList
	CacheControl       *string
	ContentDisposition *string
	ContentEncoding    *string
	ContentLanguage    *string
	ContentMD5         *string
	ContentType        *string
	MetaData           map[string]string
	LeaseID            *string
}

type PutBlockListResult

type PutBlockListResult struct {
	autorest.Response

	ContentMD5   string
	ETag         string
	LastModified string
}

type PutBlockResult

type PutBlockResult struct {
	autorest.Response

	ContentMD5 string
}

type PutPageBlobInput

type PutPageBlobInput struct {
	CacheControl       *string
	ContentDisposition *string
	ContentEncoding    *string
	ContentLanguage    *string
	ContentMD5         *string
	ContentType        *string
	LeaseID            *string
	MetaData           map[string]string

	BlobContentLengthBytes int64
	BlobSequenceNumber     *int64
	AccessTier             *AccessTier
}

type PutPageClearInput

type PutPageClearInput struct {
	StartByte int64
	EndByte   int64

	LeaseID *string
}

type PutPageUpdateInput

type PutPageUpdateInput struct {
	StartByte int64
	EndByte   int64
	Content   []byte

	IfSequenceNumberEQ *string
	IfSequenceNumberLE *string
	IfSequenceNumberLT *string
	IfModifiedSince    *string
	IfUnmodifiedSince  *string
	IfMatch            *string
	IfNoneMatch        *string
	LeaseID            *string
}

type PutPageUpdateResult

type PutPageUpdateResult struct {
	autorest.Response

	BlobSequenceNumber string
	ContentMD5         string
	LastModified       string
}

type ResourceID

type ResourceID struct {
	AccountName   string
	ContainerName string
	BlobName      string
}

func ParseResourceID

func ParseResourceID(id string) (*ResourceID, error)

ParseResourceID parses the Resource ID and returns an object which can be used to interact with the Blob Resource

type SequenceNumberAction

type SequenceNumberAction string
var (
	Increment SequenceNumberAction = "increment"
	Max       SequenceNumberAction = "max"
	Update    SequenceNumberAction = "update"
)

type SetMetaDataInput

type SetMetaDataInput 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

	// Any metadata which should be added to this blob
	MetaData map[string]string
}

type SetPropertiesInput

type SetPropertiesInput struct {
	CacheControl         *string
	ContentType          *string
	ContentMD5           *string
	ContentEncoding      *string
	ContentLanguage      *string
	LeaseID              *string
	ContentDisposition   *string
	ContentLength        *int64
	SequenceNumberAction *SequenceNumberAction
	BlobSequenceNumber   *string
}

type SetPropertiesResult

type SetPropertiesResult struct {
	autorest.Response

	BlobSequenceNumber string
	Etag               string
}

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 SnapshotResult

type SnapshotResult struct {
	autorest.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, accountName, containerName, blobName string, input AppendBlockInput) (result AppendBlockResult, err error)
	Copy(ctx context.Context, accountName, containerName, blobName string, input CopyInput) (result CopyResult, err error)
	AbortCopy(ctx context.Context, accountName, containerName, blobName string, input AbortCopyInput) (result autorest.Response, err error)
	CopyAndWait(ctx context.Context, accountName, containerName, blobName string, input CopyInput, pollingInterval time.Duration) error
	Delete(ctx context.Context, accountName, containerName, blobName string, input DeleteInput) (result autorest.Response, err error)
	DeleteSnapshot(ctx context.Context, accountName, containerName, blobName string, input DeleteSnapshotInput) (result autorest.Response, err error)
	DeleteSnapshots(ctx context.Context, accountName, containerName, blobName string, input DeleteSnapshotsInput) (result autorest.Response, err error)
	Get(ctx context.Context, accountName, containerName, blobName string, input GetInput) (result GetResult, err error)
	GetBlockList(ctx context.Context, accountName, containerName, blobName string, input GetBlockListInput) (result GetBlockListResult, err error)
	GetPageRanges(ctx context.Context, accountName, containerName, blobName string, input GetPageRangesInput) (result GetPageRangesResult, err error)
	IncrementalCopyBlob(ctx context.Context, accountName, containerName, blobName string, input IncrementalCopyBlobInput) (result autorest.Response, err error)
	AcquireLease(ctx context.Context, accountName, containerName, blobName string, input AcquireLeaseInput) (result AcquireLeaseResult, err error)
	BreakLease(ctx context.Context, accountName, containerName, blobName string, input BreakLeaseInput) (result autorest.Response, err error)
	ChangeLease(ctx context.Context, accountName, containerName, blobName string, input ChangeLeaseInput) (result ChangeLeaseResponse, err error)
	ReleaseLease(ctx context.Context, accountName, containerName, blobName, leaseID string) (result autorest.Response, err error)
	RenewLease(ctx context.Context, accountName, containerName, blobName, leaseID string) (result autorest.Response, err error)
	SetMetaData(ctx context.Context, accountName, containerName, blobName string, input SetMetaDataInput) (result autorest.Response, err error)
	GetProperties(ctx context.Context, accountName, containerName, blobName string, input GetPropertiesInput) (result GetPropertiesResult, err error)
	SetProperties(ctx context.Context, accountName, containerName, blobName string, input SetPropertiesInput) (result SetPropertiesResult, err error)
	PutAppendBlob(ctx context.Context, accountName, containerName, blobName string, input PutAppendBlobInput) (result autorest.Response, err error)
	PutBlock(ctx context.Context, accountName, containerName, blobName string, input PutBlockInput) (result PutBlockResult, err error)
	PutBlockBlob(ctx context.Context, accountName, containerName, blobName string, input PutBlockBlobInput) (result autorest.Response, err error)
	PutBlockBlobFromFile(ctx context.Context, accountName, containerName, blobName string, file *os.File, input PutBlockBlobInput) error
	PutBlockList(ctx context.Context, accountName, containerName, blobName string, input PutBlockListInput) (result PutBlockListResult, err error)
	PutBlockFromURL(ctx context.Context, accountName, containerName, blobName string, input PutBlockFromURLInput) (result PutBlockFromURLResult, err error)
	PutPageBlob(ctx context.Context, accountName, containerName, blobName string, input PutPageBlobInput) (result autorest.Response, err error)
	PutPageClear(ctx context.Context, accountName, containerName, blobName string, input PutPageClearInput) (result autorest.Response, err error)
	PutPageUpdate(ctx context.Context, accountName, containerName, blobName string, input PutPageUpdateInput) (result PutPageUpdateResult, err error)
	GetResourceID(accountName, containerName, blobName string) string
	SetTier(ctx context.Context, accountName, containerName, blobName string, tier AccessTier) (result autorest.Response, err error)
	Snapshot(ctx context.Context, accountName, containerName, blobName string, input SnapshotInput) (result SnapshotResult, err error)
	GetSnapshotProperties(ctx context.Context, accountName, containerName, blobName string, input GetSnapshotPropertiesInput) (result GetPropertiesResult, err error)
	Undelete(ctx context.Context, accountName, containerName, blobName string) (result autorest.Response, err error)
}

type UncommittedBlocks

type UncommittedBlocks struct {
	Blocks []Block `xml:"Block"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL