Documentation ¶
Index ¶
- Constants
- func UserAgent() string
- type AccessLevel
- type AcquireLeaseInput
- type AcquireLeaseResponse
- type BlobDetails
- type BlobPrefix
- type BlobProperties
- type Blobs
- type BreakLeaseInput
- type BreakLeaseResponse
- type ChangeLeaseInput
- type ChangeLeaseResponse
- type Client
- func (client Client) AcquireLease(ctx context.Context, accountName, containerName string, ...) (result AcquireLeaseResponse, err error)
- func (client Client) AcquireLeasePreparer(ctx context.Context, accountName string, containerName string, ...) (*http.Request, error)
- func (client Client) AcquireLeaseResponder(resp *http.Response) (result AcquireLeaseResponse, err error)
- func (client Client) AcquireLeaseSender(req *http.Request) (*http.Response, error)
- func (client Client) BreakLease(ctx context.Context, accountName, containerName string, input BreakLeaseInput) (result BreakLeaseResponse, err error)
- func (client Client) BreakLeasePreparer(ctx context.Context, accountName string, containerName string, ...) (*http.Request, error)
- func (client Client) BreakLeaseResponder(resp *http.Response) (result BreakLeaseResponse, err error)
- func (client Client) BreakLeaseSender(req *http.Request) (*http.Response, error)
- func (client Client) ChangeLease(ctx context.Context, accountName, containerName string, input ChangeLeaseInput) (result ChangeLeaseResponse, err error)
- func (client Client) ChangeLeasePreparer(ctx context.Context, accountName string, containerName string, ...) (*http.Request, error)
- func (client Client) ChangeLeaseResponder(resp *http.Response) (result ChangeLeaseResponse, err error)
- func (client Client) ChangeLeaseSender(req *http.Request) (*http.Response, error)
- func (client Client) Create(ctx context.Context, accountName, containerName string, input CreateInput) (result CreateResponse, err error)
- func (client Client) CreatePreparer(ctx context.Context, accountName string, containerName string, ...) (*http.Request, error)
- func (client Client) CreateResponder(resp *http.Response) (result CreateResponse, err error)
- func (client Client) CreateSender(req *http.Request) (*http.Response, error)
- func (client Client) Delete(ctx context.Context, accountName, containerName string) (result autorest.Response, err error)
- func (client Client) DeletePreparer(ctx context.Context, accountName string, containerName string) (*http.Request, error)
- func (client Client) DeleteResponder(resp *http.Response) (result autorest.Response, err error)
- func (client Client) DeleteSender(req *http.Request) (*http.Response, error)
- func (client Client) GetProperties(ctx context.Context, accountName, containerName string) (ContainerProperties, error)
- func (client Client) GetPropertiesWithLeaseID(ctx context.Context, accountName, containerName, leaseID string) (result ContainerProperties, err error)
- func (client Client) GetPropertiesWithLeaseIDPreparer(ctx context.Context, accountName, containerName, leaseID string) (*http.Request, error)
- func (client Client) GetPropertiesWithLeaseIDResponder(resp *http.Response) (result ContainerProperties, err error)
- func (client Client) GetPropertiesWithLeaseIDSender(req *http.Request) (*http.Response, error)
- func (client Client) GetResourceID(accountName, containerName string) string
- func (client Client) ListBlobs(ctx context.Context, accountName, containerName string, input ListBlobsInput) (result ListBlobsResult, err error)
- func (client Client) ListBlobsPreparer(ctx context.Context, accountName, containerName string, input ListBlobsInput) (*http.Request, error)
- func (client Client) ListBlobsResponder(resp *http.Response) (result ListBlobsResult, err error)
- func (client Client) ListBlobsSender(req *http.Request) (*http.Response, error)
- func (client Client) ReleaseLease(ctx context.Context, accountName, containerName, leaseID string) (result autorest.Response, err error)
- func (client Client) ReleaseLeasePreparer(ctx context.Context, accountName string, containerName string, leaseID string) (*http.Request, error)
- func (client Client) ReleaseLeaseResponder(resp *http.Response) (result autorest.Response, err error)
- func (client Client) ReleaseLeaseSender(req *http.Request) (*http.Response, error)
- func (client Client) RenewLease(ctx context.Context, accountName, containerName, leaseID string) (result autorest.Response, err error)
- func (client Client) RenewLeasePreparer(ctx context.Context, accountName string, containerName string, leaseID string) (*http.Request, error)
- func (client Client) RenewLeaseResponder(resp *http.Response) (result autorest.Response, err error)
- func (client Client) RenewLeaseSender(req *http.Request) (*http.Response, error)
- func (client Client) SetAccessControl(ctx context.Context, accountName, containerName string, level AccessLevel) (autorest.Response, error)
- func (client Client) SetAccessControlWithLeaseID(ctx context.Context, accountName, containerName, leaseID string, ...) (result autorest.Response, err error)
- func (client Client) SetAccessControlWithLeaseIDPreparer(ctx context.Context, accountName, containerName, leaseID string, ...) (*http.Request, error)
- func (client Client) SetAccessControlWithLeaseIDResponder(resp *http.Response) (result autorest.Response, err error)
- func (client Client) SetAccessControlWithLeaseIDSender(req *http.Request) (*http.Response, error)
- func (client Client) SetMetaData(ctx context.Context, accountName, containerName string, ...) (autorest.Response, error)
- func (client Client) SetMetaDataWithLeaseID(ctx context.Context, accountName, containerName, leaseID string, ...) (result autorest.Response, err error)
- func (client Client) SetMetaDataWithLeaseIDPreparer(ctx context.Context, accountName, containerName, leaseID string, ...) (*http.Request, error)
- func (client Client) SetMetaDataWithLeaseIDResponder(resp *http.Response) (result autorest.Response, err error)
- func (client Client) SetMetaDataWithLeaseIDSender(req *http.Request) (*http.Response, error)
- type ContainerProperties
- type CreateInput
- type CreateResponse
- type Dataset
- type ErrorResponse
- type LeaseDuration
- type LeaseState
- type LeaseStatus
- type ListBlobsInput
- type ListBlobsResult
- type ResourceID
Constants ¶
const APIVersion = "2018-03-28"
APIVersion is the version of the API used for all Storage API Operations
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AccessLevel ¶
type AccessLevel string
var ( // Blob specifies public read access for blobs. // Blob data within this container can be read via anonymous request, // but container data is not available. // Clients cannot enumerate blobs within the container via anonymous request. Blob AccessLevel = "blob" // Container specifies full public read access for container and blob data. // Clients can enumerate blobs within the container via anonymous request, // but cannot enumerate containers within the storage account. Container AccessLevel = "container" // Private specifies that container data is private to the account owner Private AccessLevel = "" )
type AcquireLeaseInput ¶
type AcquireLeaseResponse ¶
type BlobDetails ¶
type BlobDetails struct { Name string `xml:"Name"` Deleted bool `xml:"Deleted,omitempty"` MetaData map[string]interface{} `map:"Metadata,omitempty"` Properties *BlobProperties `xml:"Properties,omitempty"` Snapshot *string `xml:"Snapshot,omitempty"` }
type BlobPrefix ¶
type BlobPrefix struct {
Name string `xml:"Name"`
}
type BlobProperties ¶
type BlobProperties struct { AccessTier *string `xml:"AccessTier,omitempty"` AccessTierInferred *bool `xml:"AccessTierInferred,omitempty"` AccessTierChangeTime *string `xml:"AccessTierChangeTime,omitempty"` BlobType *string `xml:"BlobType,omitempty"` BlobSequenceNumber *string `xml:"x-ms-blob-sequence-number,omitempty"` CacheControl *string `xml:"Cache-Control,omitempty"` ContentEncoding *string `xml:"ContentEncoding,omitempty"` ContentLanguage *string `xml:"Content-Language,omitempty"` ContentLength *int64 `xml:"Content-Length,omitempty"` ContentMD5 *string `xml:"Content-MD5,omitempty"` ContentType *string `xml:"Content-Type,omitempty"` CopyCompletionTime *string `xml:"CopyCompletionTime,omitempty"` CopyId *string `xml:"CopyId,omitempty"` CopyStatus *string `xml:"CopyStatus,omitempty"` CopySource *string `xml:"CopySource,omitempty"` CopyProgress *string `xml:"CopyProgress,omitempty"` CopyStatusDescription *string `xml:"CopyStatusDescription,omitempty"` CreationTime *string `xml:"CreationTime,omitempty"` ETag *string `xml:"Etag,omitempty"` DeletedTime *string `xml:"DeletedTime,omitempty"` IncrementalCopy *bool `xml:"IncrementalCopy,omitempty"` LastModified *string `xml:"Last-Modified,omitempty"` LeaseDuration *string `xml:"LeaseDuration,omitempty"` LeaseState *string `xml:"LeaseState,omitempty"` LeaseStatus *string `xml:"LeaseStatus,omitempty"` RemainingRetentionDays *string `xml:"RemainingRetentionDays,omitempty"` ServerEncrypted *bool `xml:"ServerEncrypted,omitempty"` }
type Blobs ¶
type Blobs struct { Blobs []BlobDetails `xml:"Blob"` BlobPrefix *BlobPrefix `xml:"BlobPrefix"` }
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 Containers.
func NewWithEnvironment ¶
func NewWithEnvironment(environment azure.Environment) Client
NewWithBaseURI creates an instance of the Client client.
func (Client) AcquireLease ¶
func (client Client) AcquireLease(ctx context.Context, accountName, containerName string, input AcquireLeaseInput) (result AcquireLeaseResponse, err error)
AcquireLease establishes and manages a lock on a container for delete operations.
func (Client) AcquireLeasePreparer ¶
func (client Client) AcquireLeasePreparer(ctx context.Context, accountName string, containerName string, input AcquireLeaseInput) (*http.Request, error)
AcquireLeasePreparer prepares the AcquireLease request.
func (Client) AcquireLeaseResponder ¶
func (client Client) AcquireLeaseResponder(resp *http.Response) (result AcquireLeaseResponse, err error)
AcquireLeaseResponder handles the response to the AcquireLease request. The method always closes the http.Response Body.
func (Client) AcquireLeaseSender ¶
AcquireLeaseSender sends the AcquireLease 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 string, input BreakLeaseInput) (result BreakLeaseResponse, err error)
BreakLease breaks a lock based on it's Lease ID
func (Client) BreakLeasePreparer ¶
func (client Client) BreakLeasePreparer(ctx context.Context, accountName string, containerName string, input BreakLeaseInput) (*http.Request, error)
BreakLeasePreparer prepares the BreakLease request.
func (Client) BreakLeaseResponder ¶
func (client Client) BreakLeaseResponder(resp *http.Response) (result BreakLeaseResponse, err error)
BreakLeaseResponder handles the response to the BreakLease request. The method always closes the http.Response Body.
func (Client) BreakLeaseSender ¶
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 string, input ChangeLeaseInput) (result ChangeLeaseResponse, err error)
ChangeLease changes the lock from one Lease ID to another Lease ID
func (Client) ChangeLeasePreparer ¶
func (client Client) ChangeLeasePreparer(ctx context.Context, accountName string, containerName 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 ¶
ChangeLeaseSender sends the ChangeLease request. The method will close the http.Response Body if it receives an error.
func (Client) Create ¶
func (client Client) Create(ctx context.Context, accountName, containerName string, input CreateInput) (result CreateResponse, err error)
Create creates a new container under the specified account. If the container with the same name already exists, the operation fails.
func (Client) CreatePreparer ¶
func (client Client) CreatePreparer(ctx context.Context, accountName string, containerName string, input CreateInput) (*http.Request, error)
CreatePreparer prepares the Create request.
func (Client) CreateResponder ¶
func (client Client) CreateResponder(resp *http.Response) (result CreateResponse, err error)
CreateResponder handles the response to the Create request. The method always closes the http.Response Body.
func (Client) CreateSender ¶
CreateSender sends the Create request. The method will close the http.Response Body if it receives an error.
func (Client) Delete ¶
func (client Client) Delete(ctx context.Context, accountName, containerName string) (result autorest.Response, err error)
Delete marks the specified container for deletion. The container and any blobs contained within it are later deleted during garbage collection.
func (Client) DeletePreparer ¶
func (client Client) DeletePreparer(ctx context.Context, accountName string, containerName string) (*http.Request, error)
DeletePreparer prepares the Delete request.
func (Client) DeleteResponder ¶
DeleteResponder handles the response to the Delete request. The method always closes the http.Response Body.
func (Client) DeleteSender ¶
DeleteSender sends the Delete request. The method will close the http.Response Body if it receives an error.
func (Client) GetProperties ¶
func (client Client) GetProperties(ctx context.Context, accountName, containerName string) (ContainerProperties, error)
GetProperties returns the properties for this Container without a Lease
func (Client) GetPropertiesWithLeaseID ¶
func (client Client) GetPropertiesWithLeaseID(ctx context.Context, accountName, containerName, leaseID string) (result ContainerProperties, err error)
GetPropertiesWithLeaseID returns the properties for this Container using the specified LeaseID
func (Client) GetPropertiesWithLeaseIDPreparer ¶
func (client Client) GetPropertiesWithLeaseIDPreparer(ctx context.Context, accountName, containerName, leaseID string) (*http.Request, error)
GetPropertiesWithLeaseIDPreparer prepares the GetPropertiesWithLeaseID request.
func (Client) GetPropertiesWithLeaseIDResponder ¶
func (client Client) GetPropertiesWithLeaseIDResponder(resp *http.Response) (result ContainerProperties, err error)
GetPropertiesWithLeaseIDResponder handles the response to the GetPropertiesWithLeaseID request. The method always closes the http.Response Body.
func (Client) GetPropertiesWithLeaseIDSender ¶
GetPropertiesWithLeaseIDSender sends the GetPropertiesWithLeaseID request. The method will close the http.Response Body if it receives an error.
func (Client) GetResourceID ¶
GetResourceID returns the Resource ID for the given Container This can be useful when, for example, you're using this as a unique identifier
func (Client) ListBlobs ¶
func (client Client) ListBlobs(ctx context.Context, accountName, containerName string, input ListBlobsInput) (result ListBlobsResult, err error)
ListBlobs lists the blobs matching the specified query within the specified Container
func (Client) ListBlobsPreparer ¶
func (client Client) ListBlobsPreparer(ctx context.Context, accountName, containerName string, input ListBlobsInput) (*http.Request, error)
ListBlobsPreparer prepares the ListBlobs request.
func (Client) ListBlobsResponder ¶
func (client Client) ListBlobsResponder(resp *http.Response) (result ListBlobsResult, err error)
ListBlobsResponder handles the response to the ListBlobs request. The method always closes the http.Response Body.
func (Client) ListBlobsSender ¶
ListBlobsSender sends the ListBlobs 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, leaseID string) (result autorest.Response, err error)
ReleaseLease releases the lock based on the Lease ID
func (Client) ReleaseLeasePreparer ¶
func (client Client) ReleaseLeasePreparer(ctx context.Context, accountName string, containerName string, 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 ¶
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, leaseID string) (result autorest.Response, err error)
RenewLease renewes the lock based on the Lease ID
func (Client) RenewLeasePreparer ¶
func (client Client) RenewLeasePreparer(ctx context.Context, accountName string, containerName string, leaseID string) (*http.Request, error)
RenewLeasePreparer prepares the RenewLease request.
func (Client) RenewLeaseResponder ¶
RenewLeaseResponder handles the response to the RenewLease request. The method always closes the http.Response Body.
func (Client) RenewLeaseSender ¶
RenewLeaseSender sends the RenewLease request. The method will close the http.Response Body if it receives an error.
func (Client) SetAccessControl ¶
func (client Client) SetAccessControl(ctx context.Context, accountName, containerName string, level AccessLevel) (autorest.Response, error)
SetAccessControl sets the Access Control for a Container without a Lease ID
func (Client) SetAccessControlWithLeaseID ¶
func (client Client) SetAccessControlWithLeaseID(ctx context.Context, accountName, containerName, leaseID string, level AccessLevel) (result autorest.Response, err error)
SetAccessControlWithLeaseID sets the Access Control for a Container using the specified Lease ID
func (Client) SetAccessControlWithLeaseIDPreparer ¶
func (client Client) SetAccessControlWithLeaseIDPreparer(ctx context.Context, accountName, containerName, leaseID string, level AccessLevel) (*http.Request, error)
SetAccessControlWithLeaseIDPreparer prepares the SetAccessControlWithLeaseID request.
func (Client) SetAccessControlWithLeaseIDResponder ¶
func (client Client) SetAccessControlWithLeaseIDResponder(resp *http.Response) (result autorest.Response, err error)
SetAccessControlWithLeaseIDResponder handles the response to the SetAccessControlWithLeaseID request. The method always closes the http.Response Body.
func (Client) SetAccessControlWithLeaseIDSender ¶
SetAccessControlWithLeaseIDSender sends the SetAccessControlWithLeaseID 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 string, metaData map[string]string) (autorest.Response, error)
SetMetaData sets the specified MetaData on the Container without a Lease ID
func (Client) SetMetaDataWithLeaseID ¶
func (client Client) SetMetaDataWithLeaseID(ctx context.Context, accountName, containerName, leaseID string, metaData map[string]string) (result autorest.Response, err error)
SetMetaDataWithLeaseID sets the specified MetaData on the Container using the specified Lease ID
func (Client) SetMetaDataWithLeaseIDPreparer ¶
func (client Client) SetMetaDataWithLeaseIDPreparer(ctx context.Context, accountName, containerName, leaseID string, metaData map[string]string) (*http.Request, error)
SetMetaDataWithLeaseIDPreparer prepares the SetMetaDataWithLeaseID request.
func (Client) SetMetaDataWithLeaseIDResponder ¶
func (client Client) SetMetaDataWithLeaseIDResponder(resp *http.Response) (result autorest.Response, err error)
SetMetaDataWithLeaseIDResponder handles the response to the SetMetaDataWithLeaseID request. The method always closes the http.Response Body.
type ContainerProperties ¶
type ContainerProperties struct { autorest.Response AccessLevel AccessLevel LeaseStatus LeaseStatus LeaseState LeaseState LeaseDuration *LeaseDuration MetaData map[string]string HasImmutabilityPolicy bool HasLegalHold bool }
type CreateInput ¶
type CreateInput struct { // Specifies whether data in the container may be accessed publicly and the level of access AccessLevel AccessLevel // A name-value pair to associate with the container as metadata. MetaData map[string]string }
type CreateResponse ¶
type CreateResponse struct { autorest.Response Error *ErrorResponse `xml:"Error"` }
type ErrorResponse ¶
type LeaseDuration ¶
type LeaseDuration string
var ( // If this lease is for a Fixed Duration Fixed LeaseDuration = "fixed" // If this lease is for an Indefinite Duration 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 ListBlobsInput ¶
type ListBlobsResult ¶
type ResourceID ¶
func ParseResourceID ¶ added in v0.2.0
func ParseResourceID(id string) (*ResourceID, error)
ParseResourceID parses the Resource ID and returns an object which can be used to interact with the Container Resource