Documentation ¶
Overview ¶
Package azblob allows you to manipulate Azure Storage containers and blobs objects.
URL Types ¶
The most common types you'll work with are the XxxURL types. The methods of these types make requests against the Azure Storage Service.
- ServiceURL's methods perform operations on a storage account.
- ContainerURL's methods perform operations on an account's container.
- BlockBlobURL's methods perform operations on a container's block blob.
- AppendBlobURL's methods perform operations on a container's append blob.
- PageBlobURL's methods perform operations on a container's page blob.
- BlobURL's methods perform operations on a container's blob regardless of the blob's type.
Internally, each XxxURL object contains a URL and a request pipeline. The URL indicates the endpoint where each HTTP request is sent and the pipeline indicates how the outgoing HTTP request and incoming HTTP response is processed. The pipeline specifies things like retry policies, logging, deserialization of HTTP response payloads, and more.
Pipelines are threadsafe and may be shared by multiple XxxURL objects. When you create a ServiceURL, you pass an initial pipeline. When you call ServiceURL's NewContainerURL method, the new ContainerURL object has its own URL but it shares the same pipeline as the parent ServiceURL object.
To work with a blob, call one of ContainerURL's 4 NewXxxBlobURL methods depending on how you want to treat the blob. To treat the blob as a block blob, append blob, or page blob, call NewBlockBlobURL, NewAppendBlobURL, or NewPageBlobURL respectively. These three types are all identical except for the methods they expose; each type exposes the methods relevant to the type of blob represented. If you're not sure how you want to treat a blob, you can call NewBlobURL; this returns an object whose methods are relevant to any kind of blob. When you call ContainerURL's NewXxxBlobURL, the new XxxBlobURL object has its own URL but it shares the same pipeline as the parent ContainerURL object. You can easily switch between blob types (method sets) by calling a ToXxxBlobURL method.
If you'd like to use a different pipeline with a ServiceURL, ContainerURL, or XxxBlobURL object, then call the XxxURL object's WithPipeline method passing in the desired pipeline. The WithPipeline methods create a new XxxURL object with the same URL as the original but with the specified pipeline.
Note that XxxURL objects use little memory, are goroutine-safe, and many objects share the same pipeline. This means that XxxURL objects share a lot of system resources making them very efficient.
All of XxxURL's methods that make HTTP requests return rich error handling information so you can discern network failures, transient failures, timeout failures, service failures, etc. See the StorageError interface for more information and an example of how to do deal with errors.
URL and Shared Access Signature Manipulation ¶
The library includes a BlobURLParts type for deconstructing and reconstructing URLs. And you can use the following types for generating and parsing Shared Access Signature (SAS)
- Use the AccountSASSignatureValues type to create a SAS for a storage account.
- Use the BlobSASSignatureValues type to create a SAS for a container or blob.
- Use the SASQueryParameters type to turn signature values in to query parameres or to parse query parameters.
To generate a SAS, you must use the SharedKeyCredential type.
Credentials ¶
When creating a request pipeline, you must specify one of this package's credential types.
- Call the NewAnonymousCredential function for requests that contain a Shared Access Signature (SAS).
- Call the NewSharedKeyCredential function (with an account name & key) to access any account resources. You must also use this to generate Shared Access Signatures.
HTTP Request Policy Factories ¶
This package defines several request policy factories for use with the pipeline package. Most applications will not use these factories directly; instead, the NewPipeline function creates these factories, initializes them (via the PipelineOptions type) and returns a pipeline object for use by the XxxURL objects.
However, for advanced scenarios, developers can access these policy factories directly and even create their own and then construct their own pipeline in order to affect HTTP requests and responses performed by the XxxURL objects. For example, developers can introduce their own logging, random failures, request recording & playback for fast testing, HTTP request pacing, alternate retry mechanisms, metering, metrics, etc. The possibilities are endless!
Below are the request pipeline policy factory functions that are provided with this package:
- NewRetryPolicyFactory Enables rich retry semantics for failed HTTP requests.
- NewRequestLogPolicyFactory Enables rich logging support for HTTP requests/responses & failures.
- NewTelemetryPolicyFactory Enables simple modification of the HTTP request's User-Agent header so each request reports the SDK version & language/runtime making the requests.
- NewUniqueRequestIDPolicyFactory Adds a x-ms-client-request-id header with a unique UUID value to an HTTP request to help with diagnosing failures.
Also, note that all the NewXxxCredential functions return request policy factory objects which get injected into the pipeline.
Example ¶
This example shows how to get started using the Azure Storage Blob SDK for Go.
// From the Azure portal, get your Storage account's name and account key. accountName, accountKey := accountInfo() // Use your Storage account's name and key to create a credential object; this is used to access your account. credential, err := NewSharedKeyCredential(accountName, accountKey) if err != nil { log.Fatal(err) } // Create a request pipeline that is used to process HTTP(S) requests and responses. It requires // your account credentials. In more advanced scenarios, you can configure telemetry, retry policies, // logging, and other options. Also, you can configure multiple request pipelines for different scenarios. p := NewPipeline(credential, PipelineOptions{}) // From the Azure portal, get your Storage account blob service URL endpoint. // The URL typically looks like this: u, _ := url.Parse(fmt.Sprintf("https://%s.blob.core.windows.net", accountName)) // Create an ServiceURL object that wraps the service URL and a request pipeline. serviceURL := NewServiceURL(*u, p) // Now, you can use the serviceURL to perform various container and blob operations. // All HTTP operations allow you to specify a Go context.Context object to control cancellation/timeout. ctx := context.Background() // This example uses a never-expiring context. // This example shows several common operations just to get you started. // Create a URL that references a to-be-created container in your Azure Storage account. // This returns a ContainerURL object that wraps the container's URL and a request pipeline (inherited from serviceURL) containerURL := serviceURL.NewContainerURL("mycontainer") // Container names require lowercase // Create the container on the service (with no metadata and no public access) _, err = containerURL.Create(ctx, Metadata{}, PublicAccessNone) if err != nil { log.Fatal(err) } // Create a URL that references a to-be-created blob in your Azure Storage account's container. // This returns a BlockBlobURL object that wraps the blob's URL and a request pipeline (inherited from containerURL) blobURL := containerURL.NewBlockBlobURL("HelloWorld.txt") // Blob names can be mixed case // Create the blob with string (plain text) content. data := "Hello World!" _, err = blobURL.Upload(ctx, strings.NewReader(data), BlobHTTPHeaders{ContentType: "text/plain"}, Metadata{}, BlobAccessConditions{}, DefaultAccessTier, nil, ClientProvidedKeyOptions{}, ImmutabilityPolicyOptions{}) if err != nil { log.Fatal(err) } // Download the blob's contents and verify that it worked correctly get, err := blobURL.Download(ctx, 0, 0, BlobAccessConditions{}, false, ClientProvidedKeyOptions{}) if err != nil { log.Fatal(err) } downloadedData := &bytes.Buffer{} reader := get.Body(RetryReaderOptions{}) downloadedData.ReadFrom(reader) reader.Close() // The client must close the response body when finished with it if data != downloadedData.String() { log.Fatal("downloaded data doesn't match uploaded data") } // List the blob(s) in our container; since a container may hold millions of blobs, this is done 1 segment at a time. for marker := (Marker{}); marker.NotDone(); { // The parens around Marker{} are required to avoid compiler error. // Get a result segment starting with the blob indicated by the current Marker. listBlob, err := containerURL.ListBlobsFlatSegment(ctx, marker, ListBlobsSegmentOptions{}) if err != nil { log.Fatal(err) } // IMPORTANT: ListBlobs returns the start of the next segment; you MUST use this to get // the next segment (after processing the current result segment). marker = listBlob.NextMarker // Process the blobs returned in this result segment (if the segment is empty, the loop body won't execute) for _, blobInfo := range listBlob.Segment.BlobItems { fmt.Print("Blob name: " + blobInfo.Name + "\n") } } // Delete the blob we created earlier. _, err = blobURL.Delete(ctx, DeleteSnapshotsOptionNone, BlobAccessConditions{}) if err != nil { log.Fatal(err) } // Delete the container we created earlier. _, err = containerURL.Delete(ctx, ContainerAccessConditions{}) if err != nil { log.Fatal(err) }
Output:
Example (BlobSnapshots) ¶
This example show how to create a blob, take a snapshot of it, update the base blob, read from the blob snapshot, list blobs with their snapshots, and hot to delete blob snapshots.
// From the Azure portal, get your Storage account blob service URL endpoint. accountName, accountKey := accountInfo() // Create a ContainerURL object to a container where we'll create a blob and its snapshot. u, _ := url.Parse(fmt.Sprintf("https://%s.blob.core.windows.net/mycontainer", accountName)) credential, err := NewSharedKeyCredential(accountName, accountKey) if err != nil { log.Fatal(err) } containerURL := NewContainerURL(*u, NewPipeline(credential, PipelineOptions{})) // Create a BlockBlobURL object to a blob in the container. baseBlobURL := containerURL.NewBlockBlobURL("Original.txt") ctx := context.Background() // This example uses a never-expiring context // Create the original blob: _, err = baseBlobURL.Upload(ctx, strings.NewReader("Some text"), BlobHTTPHeaders{}, Metadata{}, BlobAccessConditions{}, DefaultAccessTier, nil, ClientProvidedKeyOptions{}, ImmutabilityPolicyOptions{}) if err != nil { log.Fatal(err) } // Create a snapshot of the original blob & save its timestamp: createSnapshot, err := baseBlobURL.CreateSnapshot(ctx, Metadata{}, BlobAccessConditions{}, ClientProvidedKeyOptions{}) snapshot := createSnapshot.Snapshot() // Modify the original blob & show it: _, err = baseBlobURL.Upload(ctx, strings.NewReader("New text"), BlobHTTPHeaders{}, Metadata{}, BlobAccessConditions{}, DefaultAccessTier, nil, ClientProvidedKeyOptions{}, ImmutabilityPolicyOptions{}) if err != nil { log.Fatal(err) } get, err := baseBlobURL.Download(ctx, 0, 0, BlobAccessConditions{}, false, ClientProvidedKeyOptions{}) b := bytes.Buffer{} reader := get.Body(RetryReaderOptions{}) b.ReadFrom(reader) reader.Close() // The client must close the response body when finished with it fmt.Println(b.String()) // Show snapshot blob via original blob URI & snapshot time: snapshotBlobURL := baseBlobURL.WithSnapshot(snapshot) get, err = snapshotBlobURL.Download(ctx, 0, 0, BlobAccessConditions{}, false, ClientProvidedKeyOptions{}) b.Reset() reader = get.Body(RetryReaderOptions{}) b.ReadFrom(reader) reader.Close() // The client must close the response body when finished with it fmt.Println(b.String()) // FYI: You can get the base blob URL from one of its snapshot by passing "" to WithSnapshot: baseBlobURL = snapshotBlobURL.WithSnapshot("") // Show all blobs in the container with their snapshots: // List the blob(s) in our container; since a container may hold millions of blobs, this is done 1 segment at a time. for marker := (Marker{}); marker.NotDone(); { // The parens around Marker{} are required to avoid compiler error. // Get a result segment starting with the blob indicated by the current Marker. listBlobs, err := containerURL.ListBlobsFlatSegment(ctx, marker, ListBlobsSegmentOptions{ Details: BlobListingDetails{Snapshots: true}}) if err != nil { log.Fatal(err) } // IMPORTANT: ListBlobs returns the start of the next segment; you MUST use this to get // the next segment (after processing the current result segment). marker = listBlobs.NextMarker // Process the blobs returned in this result segment (if the segment is empty, the loop body won't execute) for _, blobInfo := range listBlobs.Segment.BlobItems { snaptime := "N/A" if blobInfo.Snapshot != "" { snaptime = blobInfo.Snapshot } fmt.Printf("Blob name: %s, Snapshot: %s\n", blobInfo.Name, snaptime) } } // Promote read-only snapshot to writable base blob: _, err = baseBlobURL.StartCopyFromURL(ctx, snapshotBlobURL.URL(), Metadata{}, ModifiedAccessConditions{}, BlobAccessConditions{}, DefaultAccessTier, nil) if err != nil { log.Fatal(err) } // When calling Delete on a base blob: // DeleteSnapshotsOptionOnly deletes all the base blob's snapshots but not the base blob itself // DeleteSnapshotsOptionInclude deletes the base blob & all its snapshots. // DeleteSnapshotOptionNone produces an error if the base blob has any snapshots. _, err = baseBlobURL.Delete(ctx, DeleteSnapshotsOptionInclude, BlobAccessConditions{}) if err != nil { log.Fatal(err) }
Output:
Example (ProgressUploadDownload) ¶
// Create a request pipeline using your Storage account's name and account key. accountName, accountKey := accountInfo() credential, err := NewSharedKeyCredential(accountName, accountKey) if err != nil { log.Fatal(err) } p := NewPipeline(credential, PipelineOptions{}) // From the Azure portal, get your Storage account blob service URL endpoint. cURL, _ := url.Parse(fmt.Sprintf("https://%s.blob.core.windows.net/mycontainer", accountName)) // Create an ServiceURL object that wraps the service URL and a request pipeline to making requests. containerURL := NewContainerURL(*cURL, p) ctx := context.Background() // This example uses a never-expiring context // Here's how to create a blob with HTTP headers and metadata (I'm using the same metadata that was put on the container): blobURL := containerURL.NewBlockBlobURL("Data.bin") // requestBody is the stream of data to write requestBody := strings.NewReader("Some text to write") // Wrap the request body in a RequestBodyProgress and pass a callback function for progress reporting. _, err = blobURL.Upload(ctx, pipeline.NewRequestBodyProgress(requestBody, func(bytesTransferred int64) { fmt.Printf("Wrote %d of %d bytes.", bytesTransferred, requestBody.Size()) }), BlobHTTPHeaders{ ContentType: "text/html; charset=utf-8", ContentDisposition: "attachment", }, Metadata{}, BlobAccessConditions{}, DefaultAccessTier, nil, ClientProvidedKeyOptions{}, ImmutabilityPolicyOptions{}) if err != nil { log.Fatal(err) } // Here's how to read the blob's data with progress reporting: get, err := blobURL.Download(ctx, 0, 0, BlobAccessConditions{}, false, ClientProvidedKeyOptions{}) if err != nil { log.Fatal(err) } // Wrap the response body in a ResponseBodyProgress and pass a callback function for progress reporting. responseBody := pipeline.NewResponseBodyProgress(get.Body(RetryReaderOptions{}), func(bytesTransferred int64) { fmt.Printf("Read %d of %d bytes.", bytesTransferred, get.ContentLength()) }) downloadedData := &bytes.Buffer{} downloadedData.ReadFrom(responseBody) responseBody.Close() // The client must close the response body when finished with it // The downloaded blob data is in downloadData's buffer
Output:
Index ¶
- Constants
- Variables
- func DoBatchTransfer(ctx context.Context, o BatchTransferOptions) error
- func DownloadBlobToBuffer(ctx context.Context, blobURL BlobURL, offset int64, count int64, b []byte, ...) error
- func DownloadBlobToFile(ctx context.Context, blobURL BlobURL, offset int64, count int64, file *os.File, ...) error
- func FormatTimesForSASSigning(startTime, expiryTime, snapshotTime time.Time) (string, string, string)
- func NewPipeline(c Credential, o PipelineOptions) pipeline.Pipeline
- func NewRequestLogPolicyFactory(o RequestLogOptions) pipeline.Factory
- func NewResponseError(cause error, response *http.Response, description string) error
- func NewRetryPolicyFactory(o RetryOptions) pipeline.Factory
- func NewRetryReader(ctx context.Context, initialResponse *http.Response, info HTTPGetterInfo, ...) io.ReadCloser
- func NewTelemetryPolicyFactory(o TelemetryOptions) pipeline.Factory
- func NewUniqueRequestIDPolicyFactory() pipeline.Factory
- func RedactSigQueryParam(rawQuery string) (bool, string)
- func SerializeBlobTagsHeader(blobTagsMap BlobTagsMap) *string
- func UserAgent() string
- func Version() string
- type AccessPolicy
- type AccessPolicyPermission
- type AccessTierType
- type AccountKindType
- type AccountSASPermissions
- type AccountSASResourceTypes
- type AccountSASServices
- type AccountSASSignatureValues
- type AppendBlobAccessConditions
- type AppendBlobAppendBlockFromURLResponse
- func (ababfur AppendBlobAppendBlockFromURLResponse) BlobAppendOffset() string
- func (ababfur AppendBlobAppendBlockFromURLResponse) BlobCommittedBlockCount() int32
- func (ababfur AppendBlobAppendBlockFromURLResponse) ContentMD5() []byte
- func (ababfur AppendBlobAppendBlockFromURLResponse) Date() time.Time
- func (ababfur AppendBlobAppendBlockFromURLResponse) ETag() ETag
- func (ababfur AppendBlobAppendBlockFromURLResponse) EncryptionKeySha256() string
- func (ababfur AppendBlobAppendBlockFromURLResponse) EncryptionScope() string
- func (ababfur AppendBlobAppendBlockFromURLResponse) ErrorCode() string
- func (ababfur AppendBlobAppendBlockFromURLResponse) IsServerEncrypted() string
- func (ababfur AppendBlobAppendBlockFromURLResponse) LastModified() time.Time
- func (ababfur AppendBlobAppendBlockFromURLResponse) RequestID() string
- func (ababfur AppendBlobAppendBlockFromURLResponse) Response() *http.Response
- func (ababfur AppendBlobAppendBlockFromURLResponse) Status() string
- func (ababfur AppendBlobAppendBlockFromURLResponse) StatusCode() int
- func (ababfur AppendBlobAppendBlockFromURLResponse) Version() string
- func (ababfur AppendBlobAppendBlockFromURLResponse) XMsContentCrc64() []byte
- type AppendBlobAppendBlockResponse
- func (ababr AppendBlobAppendBlockResponse) BlobAppendOffset() string
- func (ababr AppendBlobAppendBlockResponse) BlobCommittedBlockCount() int32
- func (ababr AppendBlobAppendBlockResponse) ClientRequestID() string
- func (ababr AppendBlobAppendBlockResponse) ContentMD5() []byte
- func (ababr AppendBlobAppendBlockResponse) Date() time.Time
- func (ababr AppendBlobAppendBlockResponse) ETag() ETag
- func (ababr AppendBlobAppendBlockResponse) EncryptionKeySha256() string
- func (ababr AppendBlobAppendBlockResponse) EncryptionScope() string
- func (ababr AppendBlobAppendBlockResponse) ErrorCode() string
- func (ababr AppendBlobAppendBlockResponse) IsServerEncrypted() string
- func (ababr AppendBlobAppendBlockResponse) LastModified() time.Time
- func (ababr AppendBlobAppendBlockResponse) RequestID() string
- func (ababr AppendBlobAppendBlockResponse) Response() *http.Response
- func (ababr AppendBlobAppendBlockResponse) Status() string
- func (ababr AppendBlobAppendBlockResponse) StatusCode() int
- func (ababr AppendBlobAppendBlockResponse) Version() string
- func (ababr AppendBlobAppendBlockResponse) XMsContentCrc64() []byte
- type AppendBlobCreateResponse
- func (abcr AppendBlobCreateResponse) ClientRequestID() string
- func (abcr AppendBlobCreateResponse) ContentMD5() []byte
- func (abcr AppendBlobCreateResponse) Date() time.Time
- func (abcr AppendBlobCreateResponse) ETag() ETag
- func (abcr AppendBlobCreateResponse) EncryptionKeySha256() string
- func (abcr AppendBlobCreateResponse) EncryptionScope() string
- func (abcr AppendBlobCreateResponse) ErrorCode() string
- func (abcr AppendBlobCreateResponse) IsServerEncrypted() string
- func (abcr AppendBlobCreateResponse) LastModified() time.Time
- func (abcr AppendBlobCreateResponse) RequestID() string
- func (abcr AppendBlobCreateResponse) Response() *http.Response
- func (abcr AppendBlobCreateResponse) Status() string
- func (abcr AppendBlobCreateResponse) StatusCode() int
- func (abcr AppendBlobCreateResponse) Version() string
- func (abcr AppendBlobCreateResponse) VersionID() string
- type AppendBlobSealResponse
- func (absr AppendBlobSealResponse) ClientRequestID() string
- func (absr AppendBlobSealResponse) Date() time.Time
- func (absr AppendBlobSealResponse) ETag() ETag
- func (absr AppendBlobSealResponse) ErrorCode() string
- func (absr AppendBlobSealResponse) IsSealed() string
- func (absr AppendBlobSealResponse) LastModified() time.Time
- func (absr AppendBlobSealResponse) RequestID() string
- func (absr AppendBlobSealResponse) Response() *http.Response
- func (absr AppendBlobSealResponse) Status() string
- func (absr AppendBlobSealResponse) StatusCode() int
- func (absr AppendBlobSealResponse) Version() string
- type AppendBlobURL
- func (ab AppendBlobURL) AppendBlock(ctx context.Context, body io.ReadSeeker, ac AppendBlobAccessConditions, ...) (*AppendBlobAppendBlockResponse, error)
- func (ab AppendBlobURL) AppendBlockFromURL(ctx context.Context, sourceURL url.URL, offset int64, count int64, ...) (*AppendBlobAppendBlockFromURLResponse, error)
- func (ab AppendBlobURL) Create(ctx context.Context, h BlobHTTPHeaders, metadata Metadata, ...) (*AppendBlobCreateResponse, error)
- func (ab AppendBlobURL) GetAccountInfo(ctx context.Context) (*BlobGetAccountInfoResponse, error)
- func (ab AppendBlobURL) WithPipeline(p pipeline.Pipeline) AppendBlobURL
- func (ab AppendBlobURL) WithSnapshot(snapshot string) AppendBlobURL
- func (ab AppendBlobURL) WithVersionID(versionId string) AppendBlobURL
- type AppendPositionAccessConditions
- type ArchiveStatusType
- type ArrowConfiguration
- type ArrowField
- type BatchTransferOptions
- type BlobAbortCopyFromURLResponse
- func (bacfur BlobAbortCopyFromURLResponse) ClientRequestID() string
- func (bacfur BlobAbortCopyFromURLResponse) Date() time.Time
- func (bacfur BlobAbortCopyFromURLResponse) ErrorCode() string
- func (bacfur BlobAbortCopyFromURLResponse) RequestID() string
- func (bacfur BlobAbortCopyFromURLResponse) Response() *http.Response
- func (bacfur BlobAbortCopyFromURLResponse) Status() string
- func (bacfur BlobAbortCopyFromURLResponse) StatusCode() int
- func (bacfur BlobAbortCopyFromURLResponse) Version() string
- type BlobAccessConditions
- type BlobAcquireLeaseResponse
- func (balr BlobAcquireLeaseResponse) ClientRequestID() string
- func (balr BlobAcquireLeaseResponse) Date() time.Time
- func (balr BlobAcquireLeaseResponse) ETag() ETag
- func (balr BlobAcquireLeaseResponse) ErrorCode() string
- func (balr BlobAcquireLeaseResponse) LastModified() time.Time
- func (balr BlobAcquireLeaseResponse) LeaseID() string
- func (balr BlobAcquireLeaseResponse) RequestID() string
- func (balr BlobAcquireLeaseResponse) Response() *http.Response
- func (balr BlobAcquireLeaseResponse) Status() string
- func (balr BlobAcquireLeaseResponse) StatusCode() int
- func (balr BlobAcquireLeaseResponse) Version() string
- type BlobBreakLeaseResponse
- func (bblr BlobBreakLeaseResponse) ClientRequestID() string
- func (bblr BlobBreakLeaseResponse) Date() time.Time
- func (bblr BlobBreakLeaseResponse) ETag() ETag
- func (bblr BlobBreakLeaseResponse) ErrorCode() string
- func (bblr BlobBreakLeaseResponse) LastModified() time.Time
- func (bblr BlobBreakLeaseResponse) LeaseTime() int32
- func (bblr BlobBreakLeaseResponse) RequestID() string
- func (bblr BlobBreakLeaseResponse) Response() *http.Response
- func (bblr BlobBreakLeaseResponse) Status() string
- func (bblr BlobBreakLeaseResponse) StatusCode() int
- func (bblr BlobBreakLeaseResponse) Version() string
- type BlobChangeLeaseResponse
- func (bclr BlobChangeLeaseResponse) ClientRequestID() string
- func (bclr BlobChangeLeaseResponse) Date() time.Time
- func (bclr BlobChangeLeaseResponse) ETag() ETag
- func (bclr BlobChangeLeaseResponse) ErrorCode() string
- func (bclr BlobChangeLeaseResponse) LastModified() time.Time
- func (bclr BlobChangeLeaseResponse) LeaseID() string
- func (bclr BlobChangeLeaseResponse) RequestID() string
- func (bclr BlobChangeLeaseResponse) Response() *http.Response
- func (bclr BlobChangeLeaseResponse) Status() string
- func (bclr BlobChangeLeaseResponse) StatusCode() int
- func (bclr BlobChangeLeaseResponse) Version() string
- type BlobCopyFromURLResponse
- func (bcfur BlobCopyFromURLResponse) ClientRequestID() string
- func (bcfur BlobCopyFromURLResponse) ContentMD5() []byte
- func (bcfur BlobCopyFromURLResponse) CopyID() string
- func (bcfur BlobCopyFromURLResponse) CopyStatus() SyncCopyStatusType
- func (bcfur BlobCopyFromURLResponse) Date() time.Time
- func (bcfur BlobCopyFromURLResponse) ETag() ETag
- func (bcfur BlobCopyFromURLResponse) ErrorCode() string
- func (bcfur BlobCopyFromURLResponse) LastModified() time.Time
- func (bcfur BlobCopyFromURLResponse) RequestID() string
- func (bcfur BlobCopyFromURLResponse) Response() *http.Response
- func (bcfur BlobCopyFromURLResponse) Status() string
- func (bcfur BlobCopyFromURLResponse) StatusCode() int
- func (bcfur BlobCopyFromURLResponse) Version() string
- func (bcfur BlobCopyFromURLResponse) VersionID() string
- func (bcfur BlobCopyFromURLResponse) XMsContentCrc64() []byte
- type BlobCreateSnapshotResponse
- func (bcsr BlobCreateSnapshotResponse) ClientRequestID() string
- func (bcsr BlobCreateSnapshotResponse) Date() time.Time
- func (bcsr BlobCreateSnapshotResponse) ETag() ETag
- func (bcsr BlobCreateSnapshotResponse) ErrorCode() string
- func (bcsr BlobCreateSnapshotResponse) IsServerEncrypted() string
- func (bcsr BlobCreateSnapshotResponse) LastModified() time.Time
- func (bcsr BlobCreateSnapshotResponse) RequestID() string
- func (bcsr BlobCreateSnapshotResponse) Response() *http.Response
- func (bcsr BlobCreateSnapshotResponse) Snapshot() string
- func (bcsr BlobCreateSnapshotResponse) Status() string
- func (bcsr BlobCreateSnapshotResponse) StatusCode() int
- func (bcsr BlobCreateSnapshotResponse) Version() string
- func (bcsr BlobCreateSnapshotResponse) VersionID() string
- type BlobDeleteImmutabilityPolicyResponse
- func (bdipr BlobDeleteImmutabilityPolicyResponse) ClientRequestID() string
- func (bdipr BlobDeleteImmutabilityPolicyResponse) Date() time.Time
- func (bdipr BlobDeleteImmutabilityPolicyResponse) ErrorCode() string
- func (bdipr BlobDeleteImmutabilityPolicyResponse) RequestID() string
- func (bdipr BlobDeleteImmutabilityPolicyResponse) Response() *http.Response
- func (bdipr BlobDeleteImmutabilityPolicyResponse) Status() string
- func (bdipr BlobDeleteImmutabilityPolicyResponse) StatusCode() int
- func (bdipr BlobDeleteImmutabilityPolicyResponse) Version() string
- type BlobDeleteResponse
- func (bdr BlobDeleteResponse) ClientRequestID() string
- func (bdr BlobDeleteResponse) Date() time.Time
- func (bdr BlobDeleteResponse) ErrorCode() string
- func (bdr BlobDeleteResponse) RequestID() string
- func (bdr BlobDeleteResponse) Response() *http.Response
- func (bdr BlobDeleteResponse) Status() string
- func (bdr BlobDeleteResponse) StatusCode() int
- func (bdr BlobDeleteResponse) Version() string
- type BlobDeleteType
- type BlobExpiryOptionsType
- type BlobFlatListSegment
- type BlobGetAccountInfoResponse
- func (bgair BlobGetAccountInfoResponse) AccountKind() AccountKindType
- func (bgair BlobGetAccountInfoResponse) ClientRequestID() string
- func (bgair BlobGetAccountInfoResponse) Date() time.Time
- func (bgair BlobGetAccountInfoResponse) ErrorCode() string
- func (bgair BlobGetAccountInfoResponse) RequestID() string
- func (bgair BlobGetAccountInfoResponse) Response() *http.Response
- func (bgair BlobGetAccountInfoResponse) SkuName() SkuNameType
- func (bgair BlobGetAccountInfoResponse) Status() string
- func (bgair BlobGetAccountInfoResponse) StatusCode() int
- func (bgair BlobGetAccountInfoResponse) Version() string
- type BlobGetPropertiesResponse
- func (bgpr BlobGetPropertiesResponse) AcceptRanges() string
- func (bgpr BlobGetPropertiesResponse) AccessTier() string
- func (bgpr BlobGetPropertiesResponse) AccessTierChangeTime() time.Time
- func (bgpr BlobGetPropertiesResponse) AccessTierInferred() string
- func (bgpr BlobGetPropertiesResponse) ArchiveStatus() string
- func (bgpr BlobGetPropertiesResponse) BlobCommittedBlockCount() int32
- func (bgpr BlobGetPropertiesResponse) BlobSequenceNumber() int64
- func (bgpr BlobGetPropertiesResponse) BlobType() BlobType
- func (bgpr BlobGetPropertiesResponse) CacheControl() string
- func (bgpr BlobGetPropertiesResponse) ClientRequestID() string
- func (bgpr BlobGetPropertiesResponse) ContentDisposition() string
- func (bgpr BlobGetPropertiesResponse) ContentEncoding() string
- func (bgpr BlobGetPropertiesResponse) ContentLanguage() string
- func (bgpr BlobGetPropertiesResponse) ContentLength() int64
- func (bgpr BlobGetPropertiesResponse) ContentMD5() []byte
- func (bgpr BlobGetPropertiesResponse) ContentType() string
- func (bgpr BlobGetPropertiesResponse) CopyCompletionTime() time.Time
- func (bgpr BlobGetPropertiesResponse) CopyID() string
- func (bgpr BlobGetPropertiesResponse) CopyProgress() string
- func (bgpr BlobGetPropertiesResponse) CopySource() string
- func (bgpr BlobGetPropertiesResponse) CopyStatus() CopyStatusType
- func (bgpr BlobGetPropertiesResponse) CopyStatusDescription() string
- func (bgpr BlobGetPropertiesResponse) CreationTime() time.Time
- func (bgpr BlobGetPropertiesResponse) Date() time.Time
- func (bgpr BlobGetPropertiesResponse) DestinationSnapshot() string
- func (bgpr BlobGetPropertiesResponse) ETag() ETag
- func (bgpr BlobGetPropertiesResponse) EncryptionKeySha256() string
- func (bgpr BlobGetPropertiesResponse) EncryptionScope() string
- func (bgpr BlobGetPropertiesResponse) ErrorCode() string
- func (bgpr BlobGetPropertiesResponse) ExpiresOn() time.Time
- func (bgpr BlobGetPropertiesResponse) ImmutabilityPolicyExpiresOn() time.Time
- func (bgpr BlobGetPropertiesResponse) ImmutabilityPolicyMode() BlobImmutabilityPolicyModeType
- func (bgpr BlobGetPropertiesResponse) IsCurrentVersion() string
- func (bgpr BlobGetPropertiesResponse) IsIncrementalCopy() string
- func (bgpr BlobGetPropertiesResponse) IsSealed() string
- func (bgpr BlobGetPropertiesResponse) IsServerEncrypted() string
- func (bgpr BlobGetPropertiesResponse) LastAccessed() time.Time
- func (bgpr BlobGetPropertiesResponse) LastModified() time.Time
- func (bgpr BlobGetPropertiesResponse) LeaseDuration() LeaseDurationType
- func (bgpr BlobGetPropertiesResponse) LeaseState() LeaseStateType
- func (bgpr BlobGetPropertiesResponse) LeaseStatus() LeaseStatusType
- func (bgpr BlobGetPropertiesResponse) LegalHold() string
- func (bgpr BlobGetPropertiesResponse) NewHTTPHeaders() BlobHTTPHeaders
- func (bgpr BlobGetPropertiesResponse) NewMetadata() Metadata
- func (bgpr BlobGetPropertiesResponse) ObjectReplicationPolicyID() string
- func (bgpr BlobGetPropertiesResponse) ObjectReplicationRules() string
- func (bgpr BlobGetPropertiesResponse) RehydratePriority() string
- func (bgpr BlobGetPropertiesResponse) RequestID() string
- func (bgpr BlobGetPropertiesResponse) Response() *http.Response
- func (bgpr BlobGetPropertiesResponse) Status() string
- func (bgpr BlobGetPropertiesResponse) StatusCode() int
- func (bgpr BlobGetPropertiesResponse) TagCount() int64
- func (bgpr BlobGetPropertiesResponse) Version() string
- func (bgpr BlobGetPropertiesResponse) VersionID() string
- type BlobHTTPHeaders
- type BlobHierarchyListSegment
- type BlobImmutabilityPolicyModeType
- type BlobItemInternal
- type BlobListingDetails
- type BlobPrefix
- type BlobPropertiesInternal
- type BlobReleaseLeaseResponse
- func (brlr BlobReleaseLeaseResponse) ClientRequestID() string
- func (brlr BlobReleaseLeaseResponse) Date() time.Time
- func (brlr BlobReleaseLeaseResponse) ETag() ETag
- func (brlr BlobReleaseLeaseResponse) ErrorCode() string
- func (brlr BlobReleaseLeaseResponse) LastModified() time.Time
- func (brlr BlobReleaseLeaseResponse) RequestID() string
- func (brlr BlobReleaseLeaseResponse) Response() *http.Response
- func (brlr BlobReleaseLeaseResponse) Status() string
- func (brlr BlobReleaseLeaseResponse) StatusCode() int
- func (brlr BlobReleaseLeaseResponse) Version() string
- type BlobRenewLeaseResponse
- func (brlr BlobRenewLeaseResponse) ClientRequestID() string
- func (brlr BlobRenewLeaseResponse) Date() time.Time
- func (brlr BlobRenewLeaseResponse) ETag() ETag
- func (brlr BlobRenewLeaseResponse) ErrorCode() string
- func (brlr BlobRenewLeaseResponse) LastModified() time.Time
- func (brlr BlobRenewLeaseResponse) LeaseID() string
- func (brlr BlobRenewLeaseResponse) RequestID() string
- func (brlr BlobRenewLeaseResponse) Response() *http.Response
- func (brlr BlobRenewLeaseResponse) Status() string
- func (brlr BlobRenewLeaseResponse) StatusCode() int
- func (brlr BlobRenewLeaseResponse) Version() string
- type BlobSASPermissions
- type BlobSASSignatureValues
- type BlobSetExpiryResponse
- func (bser BlobSetExpiryResponse) ClientRequestID() string
- func (bser BlobSetExpiryResponse) Date() time.Time
- func (bser BlobSetExpiryResponse) ETag() ETag
- func (bser BlobSetExpiryResponse) ErrorCode() string
- func (bser BlobSetExpiryResponse) LastModified() time.Time
- func (bser BlobSetExpiryResponse) RequestID() string
- func (bser BlobSetExpiryResponse) Response() *http.Response
- func (bser BlobSetExpiryResponse) Status() string
- func (bser BlobSetExpiryResponse) StatusCode() int
- func (bser BlobSetExpiryResponse) Version() string
- type BlobSetHTTPHeadersResponse
- func (bshhr BlobSetHTTPHeadersResponse) BlobSequenceNumber() int64
- func (bshhr BlobSetHTTPHeadersResponse) ClientRequestID() string
- func (bshhr BlobSetHTTPHeadersResponse) Date() time.Time
- func (bshhr BlobSetHTTPHeadersResponse) ETag() ETag
- func (bshhr BlobSetHTTPHeadersResponse) ErrorCode() string
- func (bshhr BlobSetHTTPHeadersResponse) LastModified() time.Time
- func (bshhr BlobSetHTTPHeadersResponse) RequestID() string
- func (bshhr BlobSetHTTPHeadersResponse) Response() *http.Response
- func (bshhr BlobSetHTTPHeadersResponse) Status() string
- func (bshhr BlobSetHTTPHeadersResponse) StatusCode() int
- func (bshhr BlobSetHTTPHeadersResponse) Version() string
- type BlobSetImmutabilityPolicyResponse
- func (bsipr BlobSetImmutabilityPolicyResponse) ClientRequestID() string
- func (bsipr BlobSetImmutabilityPolicyResponse) Date() time.Time
- func (bsipr BlobSetImmutabilityPolicyResponse) ErrorCode() string
- func (bsipr BlobSetImmutabilityPolicyResponse) ImmutabilityPolicyExpiry() time.Time
- func (bsipr BlobSetImmutabilityPolicyResponse) ImmutabilityPolicyMode() BlobImmutabilityPolicyModeType
- func (bsipr BlobSetImmutabilityPolicyResponse) RequestID() string
- func (bsipr BlobSetImmutabilityPolicyResponse) Response() *http.Response
- func (bsipr BlobSetImmutabilityPolicyResponse) Status() string
- func (bsipr BlobSetImmutabilityPolicyResponse) StatusCode() int
- func (bsipr BlobSetImmutabilityPolicyResponse) Version() string
- type BlobSetLegalHoldResponse
- func (bslhr BlobSetLegalHoldResponse) ClientRequestID() string
- func (bslhr BlobSetLegalHoldResponse) Date() time.Time
- func (bslhr BlobSetLegalHoldResponse) ErrorCode() string
- func (bslhr BlobSetLegalHoldResponse) LegalHold() string
- func (bslhr BlobSetLegalHoldResponse) RequestID() string
- func (bslhr BlobSetLegalHoldResponse) Response() *http.Response
- func (bslhr BlobSetLegalHoldResponse) Status() string
- func (bslhr BlobSetLegalHoldResponse) StatusCode() int
- func (bslhr BlobSetLegalHoldResponse) Version() string
- type BlobSetMetadataResponse
- func (bsmr BlobSetMetadataResponse) ClientRequestID() string
- func (bsmr BlobSetMetadataResponse) Date() time.Time
- func (bsmr BlobSetMetadataResponse) ETag() ETag
- func (bsmr BlobSetMetadataResponse) EncryptionKeySha256() string
- func (bsmr BlobSetMetadataResponse) EncryptionScope() string
- func (bsmr BlobSetMetadataResponse) ErrorCode() string
- func (bsmr BlobSetMetadataResponse) IsServerEncrypted() string
- func (bsmr BlobSetMetadataResponse) LastModified() time.Time
- func (bsmr BlobSetMetadataResponse) RequestID() string
- func (bsmr BlobSetMetadataResponse) Response() *http.Response
- func (bsmr BlobSetMetadataResponse) Status() string
- func (bsmr BlobSetMetadataResponse) StatusCode() int
- func (bsmr BlobSetMetadataResponse) Version() string
- func (bsmr BlobSetMetadataResponse) VersionID() string
- type BlobSetTagsResponse
- func (bstr BlobSetTagsResponse) ClientRequestID() string
- func (bstr BlobSetTagsResponse) Date() time.Time
- func (bstr BlobSetTagsResponse) ErrorCode() string
- func (bstr BlobSetTagsResponse) RequestID() string
- func (bstr BlobSetTagsResponse) Response() *http.Response
- func (bstr BlobSetTagsResponse) Status() string
- func (bstr BlobSetTagsResponse) StatusCode() int
- func (bstr BlobSetTagsResponse) Version() string
- type BlobSetTierResponse
- func (bstr BlobSetTierResponse) ClientRequestID() string
- func (bstr BlobSetTierResponse) ErrorCode() string
- func (bstr BlobSetTierResponse) RequestID() string
- func (bstr BlobSetTierResponse) Response() *http.Response
- func (bstr BlobSetTierResponse) Status() string
- func (bstr BlobSetTierResponse) StatusCode() int
- func (bstr BlobSetTierResponse) Version() string
- type BlobStartCopyFromURLResponse
- func (bscfur BlobStartCopyFromURLResponse) ClientRequestID() string
- func (bscfur BlobStartCopyFromURLResponse) CopyID() string
- func (bscfur BlobStartCopyFromURLResponse) CopyStatus() CopyStatusType
- func (bscfur BlobStartCopyFromURLResponse) Date() time.Time
- func (bscfur BlobStartCopyFromURLResponse) ETag() ETag
- func (bscfur BlobStartCopyFromURLResponse) ErrorCode() string
- func (bscfur BlobStartCopyFromURLResponse) LastModified() time.Time
- func (bscfur BlobStartCopyFromURLResponse) RequestID() string
- func (bscfur BlobStartCopyFromURLResponse) Response() *http.Response
- func (bscfur BlobStartCopyFromURLResponse) Status() string
- func (bscfur BlobStartCopyFromURLResponse) StatusCode() int
- func (bscfur BlobStartCopyFromURLResponse) Version() string
- func (bscfur BlobStartCopyFromURLResponse) VersionID() string
- type BlobTag
- type BlobTags
- func (bt BlobTags) ClientRequestID() string
- func (bt BlobTags) Date() time.Time
- func (bt BlobTags) ErrorCode() string
- func (bt BlobTags) RequestID() string
- func (bt BlobTags) Response() *http.Response
- func (bt BlobTags) Status() string
- func (bt BlobTags) StatusCode() int
- func (bt BlobTags) Version() string
- type BlobTagsMap
- type BlobType
- type BlobURL
- func (b BlobURL) AbortCopyFromURL(ctx context.Context, copyID string, ac LeaseAccessConditions) (*BlobAbortCopyFromURLResponse, error)
- func (b BlobURL) AcquireLease(ctx context.Context, proposedID string, duration int32, ...) (*BlobAcquireLeaseResponse, error)
- func (b BlobURL) BreakLease(ctx context.Context, breakPeriodInSeconds int32, ac ModifiedAccessConditions) (*BlobBreakLeaseResponse, error)
- func (b BlobURL) ChangeLease(ctx context.Context, leaseID string, proposedID string, ...) (*BlobChangeLeaseResponse, error)
- func (b BlobURL) CreateSnapshot(ctx context.Context, metadata Metadata, ac BlobAccessConditions, ...) (*BlobCreateSnapshotResponse, error)
- func (b BlobURL) Delete(ctx context.Context, deleteOptions DeleteSnapshotsOptionType, ...) (*BlobDeleteResponse, error)
- func (b BlobURL) DeleteImmutabilityPolicy(ctx context.Context) (*BlobDeleteImmutabilityPolicyResponse, error)
- func (b BlobURL) Download(ctx context.Context, offset int64, count int64, ac BlobAccessConditions, ...) (*DownloadResponse, error)
- func (b BlobURL) GetAccountInfo(ctx context.Context) (*BlobGetAccountInfoResponse, error)
- func (b BlobURL) GetProperties(ctx context.Context, ac BlobAccessConditions, cpk ClientProvidedKeyOptions) (*BlobGetPropertiesResponse, error)
- func (b BlobURL) GetTags(ctx context.Context, ifTags *string) (*BlobTags, error)
- func (b BlobURL) PermanentDelete(ctx context.Context, deleteOptions DeleteSnapshotsOptionType, ...) (*BlobDeleteResponse, error)
- func (b BlobURL) ReleaseLease(ctx context.Context, leaseID string, ac ModifiedAccessConditions) (*BlobReleaseLeaseResponse, error)
- func (b BlobURL) RenewLease(ctx context.Context, leaseID string, ac ModifiedAccessConditions) (*BlobRenewLeaseResponse, error)
- func (b BlobURL) SetHTTPHeaders(ctx context.Context, h BlobHTTPHeaders, ac BlobAccessConditions) (*BlobSetHTTPHeadersResponse, error)
- func (b BlobURL) SetImmutabilityPolicy(ctx context.Context, expiry time.Time, mode BlobImmutabilityPolicyModeType, ...) (*BlobSetImmutabilityPolicyResponse, error)
- func (b BlobURL) SetLegalHold(ctx context.Context, legalHold bool) (*BlobSetLegalHoldResponse, error)
- func (b BlobURL) SetMetadata(ctx context.Context, metadata Metadata, ac BlobAccessConditions, ...) (*BlobSetMetadataResponse, error)
- func (b BlobURL) SetTags(ctx context.Context, transactionalContentMD5 []byte, ...) (*BlobSetTagsResponse, error)
- func (b BlobURL) SetTier(ctx context.Context, tier AccessTierType, lac LeaseAccessConditions, ...) (*BlobSetTierResponse, error)
- func (b BlobURL) StartCopyFromURL(ctx context.Context, source url.URL, metadata Metadata, ...) (*BlobStartCopyFromURLResponse, error)
- func (b BlobURL) String() string
- func (b BlobURL) ToAppendBlobURL() AppendBlobURL
- func (b BlobURL) ToBlockBlobURL() BlockBlobURL
- func (b BlobURL) ToPageBlobURL() PageBlobURL
- func (b BlobURL) URL() url.URL
- func (b BlobURL) Undelete(ctx context.Context) (*BlobUndeleteResponse, error)
- func (b BlobURL) WithPipeline(p pipeline.Pipeline) BlobURL
- func (b BlobURL) WithSnapshot(snapshot string) BlobURL
- func (b BlobURL) WithVersionID(versionID string) BlobURL
- type BlobURLParts
- type BlobUndeleteResponse
- func (bur BlobUndeleteResponse) ClientRequestID() string
- func (bur BlobUndeleteResponse) Date() time.Time
- func (bur BlobUndeleteResponse) ErrorCode() string
- func (bur BlobUndeleteResponse) RequestID() string
- func (bur BlobUndeleteResponse) Response() *http.Response
- func (bur BlobUndeleteResponse) Status() string
- func (bur BlobUndeleteResponse) StatusCode() int
- func (bur BlobUndeleteResponse) Version() string
- type Block
- type BlockBlobCommitBlockListResponse
- func (bbcblr BlockBlobCommitBlockListResponse) ClientRequestID() string
- func (bbcblr BlockBlobCommitBlockListResponse) ContentMD5() []byte
- func (bbcblr BlockBlobCommitBlockListResponse) Date() time.Time
- func (bbcblr BlockBlobCommitBlockListResponse) ETag() ETag
- func (bbcblr BlockBlobCommitBlockListResponse) EncryptionKeySha256() string
- func (bbcblr BlockBlobCommitBlockListResponse) EncryptionScope() string
- func (bbcblr BlockBlobCommitBlockListResponse) ErrorCode() string
- func (bbcblr BlockBlobCommitBlockListResponse) IsServerEncrypted() string
- func (bbcblr BlockBlobCommitBlockListResponse) LastModified() time.Time
- func (bbcblr BlockBlobCommitBlockListResponse) RequestID() string
- func (bbcblr BlockBlobCommitBlockListResponse) Response() *http.Response
- func (bbcblr BlockBlobCommitBlockListResponse) Status() string
- func (bbcblr BlockBlobCommitBlockListResponse) StatusCode() int
- func (bbcblr BlockBlobCommitBlockListResponse) Version() string
- func (bbcblr BlockBlobCommitBlockListResponse) VersionID() string
- func (bbcblr BlockBlobCommitBlockListResponse) XMsContentCrc64() []byte
- type BlockBlobPutBlobFromURLResponse
- func (bbpbfur BlockBlobPutBlobFromURLResponse) ClientRequestID() string
- func (bbpbfur BlockBlobPutBlobFromURLResponse) ContentMD5() []byte
- func (bbpbfur BlockBlobPutBlobFromURLResponse) Date() time.Time
- func (bbpbfur BlockBlobPutBlobFromURLResponse) ETag() ETag
- func (bbpbfur BlockBlobPutBlobFromURLResponse) EncryptionKeySha256() string
- func (bbpbfur BlockBlobPutBlobFromURLResponse) EncryptionScope() string
- func (bbpbfur BlockBlobPutBlobFromURLResponse) ErrorCode() string
- func (bbpbfur BlockBlobPutBlobFromURLResponse) IsServerEncrypted() string
- func (bbpbfur BlockBlobPutBlobFromURLResponse) LastModified() time.Time
- func (bbpbfur BlockBlobPutBlobFromURLResponse) RequestID() string
- func (bbpbfur BlockBlobPutBlobFromURLResponse) Response() *http.Response
- func (bbpbfur BlockBlobPutBlobFromURLResponse) Status() string
- func (bbpbfur BlockBlobPutBlobFromURLResponse) StatusCode() int
- func (bbpbfur BlockBlobPutBlobFromURLResponse) Version() string
- func (bbpbfur BlockBlobPutBlobFromURLResponse) VersionID() string
- type BlockBlobStageBlockFromURLResponse
- func (bbsbfur BlockBlobStageBlockFromURLResponse) ClientRequestID() string
- func (bbsbfur BlockBlobStageBlockFromURLResponse) ContentMD5() []byte
- func (bbsbfur BlockBlobStageBlockFromURLResponse) Date() time.Time
- func (bbsbfur BlockBlobStageBlockFromURLResponse) EncryptionKeySha256() string
- func (bbsbfur BlockBlobStageBlockFromURLResponse) EncryptionScope() string
- func (bbsbfur BlockBlobStageBlockFromURLResponse) ErrorCode() string
- func (bbsbfur BlockBlobStageBlockFromURLResponse) IsServerEncrypted() string
- func (bbsbfur BlockBlobStageBlockFromURLResponse) RequestID() string
- func (bbsbfur BlockBlobStageBlockFromURLResponse) Response() *http.Response
- func (bbsbfur BlockBlobStageBlockFromURLResponse) Status() string
- func (bbsbfur BlockBlobStageBlockFromURLResponse) StatusCode() int
- func (bbsbfur BlockBlobStageBlockFromURLResponse) Version() string
- func (bbsbfur BlockBlobStageBlockFromURLResponse) XMsContentCrc64() []byte
- type BlockBlobStageBlockResponse
- func (bbsbr BlockBlobStageBlockResponse) ClientRequestID() string
- func (bbsbr BlockBlobStageBlockResponse) ContentMD5() []byte
- func (bbsbr BlockBlobStageBlockResponse) Date() time.Time
- func (bbsbr BlockBlobStageBlockResponse) EncryptionKeySha256() string
- func (bbsbr BlockBlobStageBlockResponse) EncryptionScope() string
- func (bbsbr BlockBlobStageBlockResponse) ErrorCode() string
- func (bbsbr BlockBlobStageBlockResponse) IsServerEncrypted() string
- func (bbsbr BlockBlobStageBlockResponse) RequestID() string
- func (bbsbr BlockBlobStageBlockResponse) Response() *http.Response
- func (bbsbr BlockBlobStageBlockResponse) Status() string
- func (bbsbr BlockBlobStageBlockResponse) StatusCode() int
- func (bbsbr BlockBlobStageBlockResponse) Version() string
- func (bbsbr BlockBlobStageBlockResponse) XMsContentCrc64() []byte
- type BlockBlobURL
- func (bb BlockBlobURL) CommitBlockList(ctx context.Context, base64BlockIDs []string, h BlobHTTPHeaders, ...) (*BlockBlobCommitBlockListResponse, error)
- func (bb BlockBlobURL) CopyFromURL(ctx context.Context, source url.URL, metadata Metadata, ...) (*BlobCopyFromURLResponse, error)
- func (bb BlockBlobURL) GetAccountInfo(ctx context.Context) (*BlobGetAccountInfoResponse, error)
- func (bb BlockBlobURL) GetBlockList(ctx context.Context, listType BlockListType, ac LeaseAccessConditions) (*BlockList, error)
- func (bb BlockBlobURL) PutBlobFromURL(ctx context.Context, h BlobHTTPHeaders, source url.URL, metadata Metadata, ...) (*BlockBlobPutBlobFromURLResponse, error)
- func (bb BlockBlobURL) StageBlock(ctx context.Context, base64BlockID string, body io.ReadSeeker, ...) (*BlockBlobStageBlockResponse, error)
- func (bb BlockBlobURL) StageBlockFromURL(ctx context.Context, base64BlockID string, sourceURL url.URL, offset int64, ...) (*BlockBlobStageBlockFromURLResponse, error)
- func (bb BlockBlobURL) Upload(ctx context.Context, body io.ReadSeeker, h BlobHTTPHeaders, metadata Metadata, ...) (*BlockBlobUploadResponse, error)
- func (bb BlockBlobURL) WithPipeline(p pipeline.Pipeline) BlockBlobURL
- func (bb BlockBlobURL) WithSnapshot(snapshot string) BlockBlobURL
- func (bb BlockBlobURL) WithVersionID(versionId string) BlockBlobURL
- type BlockBlobUploadResponse
- func (bbur BlockBlobUploadResponse) ClientRequestID() string
- func (bbur BlockBlobUploadResponse) ContentMD5() []byte
- func (bbur BlockBlobUploadResponse) Date() time.Time
- func (bbur BlockBlobUploadResponse) ETag() ETag
- func (bbur BlockBlobUploadResponse) EncryptionKeySha256() string
- func (bbur BlockBlobUploadResponse) EncryptionScope() string
- func (bbur BlockBlobUploadResponse) ErrorCode() string
- func (bbur BlockBlobUploadResponse) IsServerEncrypted() string
- func (bbur BlockBlobUploadResponse) LastModified() time.Time
- func (bbur BlockBlobUploadResponse) RequestID() string
- func (bbur BlockBlobUploadResponse) Response() *http.Response
- func (bbur BlockBlobUploadResponse) Status() string
- func (bbur BlockBlobUploadResponse) StatusCode() int
- func (bbur BlockBlobUploadResponse) Version() string
- func (bbur BlockBlobUploadResponse) VersionID() string
- type BlockList
- func (bl BlockList) BlobContentLength() int64
- func (bl BlockList) ClientRequestID() string
- func (bl BlockList) ContentType() string
- func (bl BlockList) Date() time.Time
- func (bl BlockList) ETag() ETag
- func (bl BlockList) ErrorCode() string
- func (bl BlockList) LastModified() time.Time
- func (bl BlockList) RequestID() string
- func (bl BlockList) Response() *http.Response
- func (bl BlockList) Status() string
- func (bl BlockList) StatusCode() int
- func (bl BlockList) Version() string
- type BlockListType
- type BlockLookupList
- type ClearRange
- type ClientProvidedKeyOptions
- type CommonResponse
- func UploadBufferToBlockBlob(ctx context.Context, b []byte, blockBlobURL BlockBlobURL, ...) (CommonResponse, error)
- func UploadFileToBlockBlob(ctx context.Context, file *os.File, blockBlobURL BlockBlobURL, ...) (CommonResponse, error)
- func UploadStreamToBlockBlob(ctx context.Context, reader io.Reader, blockBlobURL BlockBlobURL, ...) (CommonResponse, error)
- type ContainerAccessConditions
- type ContainerAcquireLeaseResponse
- func (calr ContainerAcquireLeaseResponse) ClientRequestID() string
- func (calr ContainerAcquireLeaseResponse) Date() time.Time
- func (calr ContainerAcquireLeaseResponse) ETag() ETag
- func (calr ContainerAcquireLeaseResponse) ErrorCode() string
- func (calr ContainerAcquireLeaseResponse) LastModified() time.Time
- func (calr ContainerAcquireLeaseResponse) LeaseID() string
- func (calr ContainerAcquireLeaseResponse) RequestID() string
- func (calr ContainerAcquireLeaseResponse) Response() *http.Response
- func (calr ContainerAcquireLeaseResponse) Status() string
- func (calr ContainerAcquireLeaseResponse) StatusCode() int
- func (calr ContainerAcquireLeaseResponse) Version() string
- type ContainerBreakLeaseResponse
- func (cblr ContainerBreakLeaseResponse) ClientRequestID() string
- func (cblr ContainerBreakLeaseResponse) Date() time.Time
- func (cblr ContainerBreakLeaseResponse) ETag() ETag
- func (cblr ContainerBreakLeaseResponse) ErrorCode() string
- func (cblr ContainerBreakLeaseResponse) LastModified() time.Time
- func (cblr ContainerBreakLeaseResponse) LeaseTime() int32
- func (cblr ContainerBreakLeaseResponse) RequestID() string
- func (cblr ContainerBreakLeaseResponse) Response() *http.Response
- func (cblr ContainerBreakLeaseResponse) Status() string
- func (cblr ContainerBreakLeaseResponse) StatusCode() int
- func (cblr ContainerBreakLeaseResponse) Version() string
- type ContainerChangeLeaseResponse
- func (cclr ContainerChangeLeaseResponse) ClientRequestID() string
- func (cclr ContainerChangeLeaseResponse) Date() time.Time
- func (cclr ContainerChangeLeaseResponse) ETag() ETag
- func (cclr ContainerChangeLeaseResponse) ErrorCode() string
- func (cclr ContainerChangeLeaseResponse) LastModified() time.Time
- func (cclr ContainerChangeLeaseResponse) LeaseID() string
- func (cclr ContainerChangeLeaseResponse) RequestID() string
- func (cclr ContainerChangeLeaseResponse) Response() *http.Response
- func (cclr ContainerChangeLeaseResponse) Status() string
- func (cclr ContainerChangeLeaseResponse) StatusCode() int
- func (cclr ContainerChangeLeaseResponse) Version() string
- type ContainerCreateResponse
- func (ccr ContainerCreateResponse) ClientRequestID() string
- func (ccr ContainerCreateResponse) Date() time.Time
- func (ccr ContainerCreateResponse) ETag() ETag
- func (ccr ContainerCreateResponse) ErrorCode() string
- func (ccr ContainerCreateResponse) LastModified() time.Time
- func (ccr ContainerCreateResponse) RequestID() string
- func (ccr ContainerCreateResponse) Response() *http.Response
- func (ccr ContainerCreateResponse) Status() string
- func (ccr ContainerCreateResponse) StatusCode() int
- func (ccr ContainerCreateResponse) Version() string
- type ContainerDeleteResponse
- func (cdr ContainerDeleteResponse) ClientRequestID() string
- func (cdr ContainerDeleteResponse) Date() time.Time
- func (cdr ContainerDeleteResponse) ErrorCode() string
- func (cdr ContainerDeleteResponse) RequestID() string
- func (cdr ContainerDeleteResponse) Response() *http.Response
- func (cdr ContainerDeleteResponse) Status() string
- func (cdr ContainerDeleteResponse) StatusCode() int
- func (cdr ContainerDeleteResponse) Version() string
- type ContainerGetAccountInfoResponse
- func (cgair ContainerGetAccountInfoResponse) AccountKind() AccountKindType
- func (cgair ContainerGetAccountInfoResponse) ClientRequestID() string
- func (cgair ContainerGetAccountInfoResponse) Date() time.Time
- func (cgair ContainerGetAccountInfoResponse) ErrorCode() string
- func (cgair ContainerGetAccountInfoResponse) RequestID() string
- func (cgair ContainerGetAccountInfoResponse) Response() *http.Response
- func (cgair ContainerGetAccountInfoResponse) SkuName() SkuNameType
- func (cgair ContainerGetAccountInfoResponse) Status() string
- func (cgair ContainerGetAccountInfoResponse) StatusCode() int
- func (cgair ContainerGetAccountInfoResponse) Version() string
- type ContainerGetPropertiesResponse
- func (cgpr ContainerGetPropertiesResponse) BlobPublicAccess() PublicAccessType
- func (cgpr ContainerGetPropertiesResponse) ClientRequestID() string
- func (cgpr ContainerGetPropertiesResponse) Date() time.Time
- func (cgpr ContainerGetPropertiesResponse) DefaultEncryptionScope() string
- func (cgpr ContainerGetPropertiesResponse) DenyEncryptionScopeOverride() string
- func (cgpr ContainerGetPropertiesResponse) ETag() ETag
- func (cgpr ContainerGetPropertiesResponse) ErrorCode() string
- func (cgpr ContainerGetPropertiesResponse) HasImmutabilityPolicy() string
- func (cgpr ContainerGetPropertiesResponse) HasLegalHold() string
- func (cgpr ContainerGetPropertiesResponse) IsImmutableStorageWithVersioningEnabled() string
- func (cgpr ContainerGetPropertiesResponse) LastModified() time.Time
- func (cgpr ContainerGetPropertiesResponse) LeaseDuration() LeaseDurationType
- func (cgpr ContainerGetPropertiesResponse) LeaseState() LeaseStateType
- func (cgpr ContainerGetPropertiesResponse) LeaseStatus() LeaseStatusType
- func (cgpr ContainerGetPropertiesResponse) NewMetadata() Metadata
- func (cgpr ContainerGetPropertiesResponse) RequestID() string
- func (cgpr ContainerGetPropertiesResponse) Response() *http.Response
- func (cgpr ContainerGetPropertiesResponse) Status() string
- func (cgpr ContainerGetPropertiesResponse) StatusCode() int
- func (cgpr ContainerGetPropertiesResponse) Version() string
- type ContainerItem
- type ContainerProperties
- type ContainerReleaseLeaseResponse
- func (crlr ContainerReleaseLeaseResponse) ClientRequestID() string
- func (crlr ContainerReleaseLeaseResponse) Date() time.Time
- func (crlr ContainerReleaseLeaseResponse) ETag() ETag
- func (crlr ContainerReleaseLeaseResponse) ErrorCode() string
- func (crlr ContainerReleaseLeaseResponse) LastModified() time.Time
- func (crlr ContainerReleaseLeaseResponse) RequestID() string
- func (crlr ContainerReleaseLeaseResponse) Response() *http.Response
- func (crlr ContainerReleaseLeaseResponse) Status() string
- func (crlr ContainerReleaseLeaseResponse) StatusCode() int
- func (crlr ContainerReleaseLeaseResponse) Version() string
- type ContainerRenameResponse
- func (crr ContainerRenameResponse) ClientRequestID() string
- func (crr ContainerRenameResponse) Date() time.Time
- func (crr ContainerRenameResponse) ErrorCode() string
- func (crr ContainerRenameResponse) RequestID() string
- func (crr ContainerRenameResponse) Response() *http.Response
- func (crr ContainerRenameResponse) Status() string
- func (crr ContainerRenameResponse) StatusCode() int
- func (crr ContainerRenameResponse) Version() string
- type ContainerRenewLeaseResponse
- func (crlr ContainerRenewLeaseResponse) ClientRequestID() string
- func (crlr ContainerRenewLeaseResponse) Date() time.Time
- func (crlr ContainerRenewLeaseResponse) ETag() ETag
- func (crlr ContainerRenewLeaseResponse) ErrorCode() string
- func (crlr ContainerRenewLeaseResponse) LastModified() time.Time
- func (crlr ContainerRenewLeaseResponse) LeaseID() string
- func (crlr ContainerRenewLeaseResponse) RequestID() string
- func (crlr ContainerRenewLeaseResponse) Response() *http.Response
- func (crlr ContainerRenewLeaseResponse) Status() string
- func (crlr ContainerRenewLeaseResponse) StatusCode() int
- func (crlr ContainerRenewLeaseResponse) Version() string
- type ContainerRestoreResponse
- func (crr ContainerRestoreResponse) ClientRequestID() string
- func (crr ContainerRestoreResponse) Date() time.Time
- func (crr ContainerRestoreResponse) ErrorCode() string
- func (crr ContainerRestoreResponse) RequestID() string
- func (crr ContainerRestoreResponse) Response() *http.Response
- func (crr ContainerRestoreResponse) Status() string
- func (crr ContainerRestoreResponse) StatusCode() int
- func (crr ContainerRestoreResponse) Version() string
- type ContainerSASPermissions
- type ContainerSetAccessPolicyResponse
- func (csapr ContainerSetAccessPolicyResponse) ClientRequestID() string
- func (csapr ContainerSetAccessPolicyResponse) Date() time.Time
- func (csapr ContainerSetAccessPolicyResponse) ETag() ETag
- func (csapr ContainerSetAccessPolicyResponse) ErrorCode() string
- func (csapr ContainerSetAccessPolicyResponse) LastModified() time.Time
- func (csapr ContainerSetAccessPolicyResponse) RequestID() string
- func (csapr ContainerSetAccessPolicyResponse) Response() *http.Response
- func (csapr ContainerSetAccessPolicyResponse) Status() string
- func (csapr ContainerSetAccessPolicyResponse) StatusCode() int
- func (csapr ContainerSetAccessPolicyResponse) Version() string
- type ContainerSetMetadataResponse
- func (csmr ContainerSetMetadataResponse) ClientRequestID() string
- func (csmr ContainerSetMetadataResponse) Date() time.Time
- func (csmr ContainerSetMetadataResponse) ETag() ETag
- func (csmr ContainerSetMetadataResponse) ErrorCode() string
- func (csmr ContainerSetMetadataResponse) LastModified() time.Time
- func (csmr ContainerSetMetadataResponse) RequestID() string
- func (csmr ContainerSetMetadataResponse) Response() *http.Response
- func (csmr ContainerSetMetadataResponse) Status() string
- func (csmr ContainerSetMetadataResponse) StatusCode() int
- func (csmr ContainerSetMetadataResponse) Version() string
- type ContainerURL
- func (c ContainerURL) AcquireLease(ctx context.Context, proposedID string, duration int32, ...) (*ContainerAcquireLeaseResponse, error)
- func (c ContainerURL) BreakLease(ctx context.Context, period int32, ac ModifiedAccessConditions) (*ContainerBreakLeaseResponse, error)
- func (c ContainerURL) ChangeLease(ctx context.Context, leaseID string, proposedID string, ...) (*ContainerChangeLeaseResponse, error)
- func (c ContainerURL) Create(ctx context.Context, metadata Metadata, publicAccessType PublicAccessType) (*ContainerCreateResponse, error)
- func (c ContainerURL) Delete(ctx context.Context, ac ContainerAccessConditions) (*ContainerDeleteResponse, error)
- func (c ContainerURL) GetAccessPolicy(ctx context.Context, ac LeaseAccessConditions) (*SignedIdentifiers, error)
- func (c ContainerURL) GetAccountInfo(ctx context.Context) (*ContainerGetAccountInfoResponse, error)
- func (c ContainerURL) GetProperties(ctx context.Context, ac LeaseAccessConditions) (*ContainerGetPropertiesResponse, error)
- func (c ContainerURL) ListBlobsFlatSegment(ctx context.Context, marker Marker, o ListBlobsSegmentOptions) (*ListBlobsFlatSegmentResponse, error)
- func (c ContainerURL) ListBlobsHierarchySegment(ctx context.Context, marker Marker, delimiter string, ...) (*ListBlobsHierarchySegmentResponse, error)
- func (c ContainerURL) NewAppendBlobURL(blobName string) AppendBlobURL
- func (c ContainerURL) NewBlobURL(blobName string) BlobURL
- func (c ContainerURL) NewBlockBlobURL(blobName string) BlockBlobURL
- func (c ContainerURL) NewPageBlobURL(blobName string) PageBlobURL
- func (c ContainerURL) ReleaseLease(ctx context.Context, leaseID string, ac ModifiedAccessConditions) (*ContainerReleaseLeaseResponse, error)
- func (c ContainerURL) RenewLease(ctx context.Context, leaseID string, ac ModifiedAccessConditions) (*ContainerRenewLeaseResponse, error)
- func (c ContainerURL) SetAccessPolicy(ctx context.Context, accessType PublicAccessType, si []SignedIdentifier, ...) (*ContainerSetAccessPolicyResponse, error)
- func (c ContainerURL) SetMetadata(ctx context.Context, metadata Metadata, ac ContainerAccessConditions) (*ContainerSetMetadataResponse, error)
- func (c ContainerURL) String() string
- func (c ContainerURL) URL() url.URL
- func (c ContainerURL) WithPipeline(p pipeline.Pipeline) ContainerURL
- type CopyStatusType
- type CorsRule
- type Credential
- type DeleteSnapshotsOptionType
- type DelimitedTextConfiguration
- type DownloadFromBlobOptions
- type DownloadResponse
- func (r DownloadResponse) AcceptRanges() string
- func (r DownloadResponse) BlobCommittedBlockCount() int32
- func (r DownloadResponse) BlobContentMD5() []byte
- func (r DownloadResponse) BlobSequenceNumber() int64
- func (r DownloadResponse) BlobType() BlobType
- func (r *DownloadResponse) Body(o RetryReaderOptions) io.ReadCloser
- func (r DownloadResponse) CacheControl() string
- func (r DownloadResponse) ContentDisposition() string
- func (r DownloadResponse) ContentEncoding() string
- func (r DownloadResponse) ContentLanguage() string
- func (r DownloadResponse) ContentLength() int64
- func (r DownloadResponse) ContentMD5() []byte
- func (r DownloadResponse) ContentRange() string
- func (r DownloadResponse) ContentType() string
- func (r DownloadResponse) CopyCompletionTime() time.Time
- func (r DownloadResponse) CopyID() string
- func (r DownloadResponse) CopyProgress() string
- func (r DownloadResponse) CopySource() string
- func (r DownloadResponse) CopyStatus() CopyStatusType
- func (r DownloadResponse) CopyStatusDescription() string
- func (r DownloadResponse) Date() time.Time
- func (r DownloadResponse) ETag() ETag
- func (r DownloadResponse) IsServerEncrypted() string
- func (r DownloadResponse) LastModified() time.Time
- func (r DownloadResponse) LeaseDuration() LeaseDurationType
- func (r DownloadResponse) LeaseState() LeaseStateType
- func (r DownloadResponse) LeaseStatus() LeaseStatusType
- func (r DownloadResponse) NewHTTPHeaders() BlobHTTPHeaders
- func (r DownloadResponse) NewMetadata() Metadata
- func (r DownloadResponse) RequestID() string
- func (r DownloadResponse) Response() *http.Response
- func (r DownloadResponse) Status() string
- func (r DownloadResponse) StatusCode() int
- func (r DownloadResponse) Version() string
- type ETag
- type EncryptionAlgorithmType
- type FailedReadNotifier
- type FilterBlobItem
- type FilterBlobSegment
- func (fbs FilterBlobSegment) ClientRequestID() string
- func (fbs FilterBlobSegment) Date() time.Time
- func (fbs FilterBlobSegment) ErrorCode() string
- func (fbs FilterBlobSegment) RequestID() string
- func (fbs FilterBlobSegment) Response() *http.Response
- func (fbs FilterBlobSegment) Status() string
- func (fbs FilterBlobSegment) StatusCode() int
- func (fbs FilterBlobSegment) Version() string
- type GeoReplication
- type GeoReplicationStatusType
- type HTTPGetter
- type HTTPGetterInfo
- type IPEndpointStyleInfo
- type IPRange
- type ImmutabilityPolicyOptions
- type JSONTextConfiguration
- type KeyInfo
- type LeaseAccessConditions
- type LeaseDurationType
- type LeaseStateType
- type LeaseStatusType
- type ListBlobsFlatSegmentResponse
- func (lbfsr ListBlobsFlatSegmentResponse) ClientRequestID() string
- func (lbfsr ListBlobsFlatSegmentResponse) ContentType() string
- func (lbfsr ListBlobsFlatSegmentResponse) Date() time.Time
- func (lbfsr ListBlobsFlatSegmentResponse) ErrorCode() string
- func (lbfsr ListBlobsFlatSegmentResponse) RequestID() string
- func (lbfsr ListBlobsFlatSegmentResponse) Response() *http.Response
- func (lbfsr ListBlobsFlatSegmentResponse) Status() string
- func (lbfsr ListBlobsFlatSegmentResponse) StatusCode() int
- func (lbfsr ListBlobsFlatSegmentResponse) Version() string
- type ListBlobsHierarchySegmentResponse
- func (lbhsr ListBlobsHierarchySegmentResponse) ClientRequestID() string
- func (lbhsr ListBlobsHierarchySegmentResponse) ContentType() string
- func (lbhsr ListBlobsHierarchySegmentResponse) Date() time.Time
- func (lbhsr ListBlobsHierarchySegmentResponse) ErrorCode() string
- func (lbhsr ListBlobsHierarchySegmentResponse) RequestID() string
- func (lbhsr ListBlobsHierarchySegmentResponse) Response() *http.Response
- func (lbhsr ListBlobsHierarchySegmentResponse) Status() string
- func (lbhsr ListBlobsHierarchySegmentResponse) StatusCode() int
- func (lbhsr ListBlobsHierarchySegmentResponse) Version() string
- type ListBlobsIncludeItemType
- type ListBlobsSegmentOptions
- type ListContainersDetail
- type ListContainersIncludeType
- type ListContainersSegmentOptions
- type ListContainersSegmentResponse
- func (lcsr ListContainersSegmentResponse) ClientRequestID() string
- func (lcsr ListContainersSegmentResponse) ErrorCode() string
- func (lcsr ListContainersSegmentResponse) RequestID() string
- func (lcsr ListContainersSegmentResponse) Response() *http.Response
- func (lcsr ListContainersSegmentResponse) Status() string
- func (lcsr ListContainersSegmentResponse) StatusCode() int
- func (lcsr ListContainersSegmentResponse) Version() string
- type Logging
- type Marker
- type Metadata
- type Metrics
- type ModifiedAccessConditions
- type PageBlobAccessConditions
- type PageBlobClearPagesResponse
- func (pbcpr PageBlobClearPagesResponse) BlobSequenceNumber() int64
- func (pbcpr PageBlobClearPagesResponse) ClientRequestID() string
- func (pbcpr PageBlobClearPagesResponse) ContentMD5() []byte
- func (pbcpr PageBlobClearPagesResponse) Date() time.Time
- func (pbcpr PageBlobClearPagesResponse) ETag() ETag
- func (pbcpr PageBlobClearPagesResponse) ErrorCode() string
- func (pbcpr PageBlobClearPagesResponse) LastModified() time.Time
- func (pbcpr PageBlobClearPagesResponse) RequestID() string
- func (pbcpr PageBlobClearPagesResponse) Response() *http.Response
- func (pbcpr PageBlobClearPagesResponse) Status() string
- func (pbcpr PageBlobClearPagesResponse) StatusCode() int
- func (pbcpr PageBlobClearPagesResponse) Version() string
- func (pbcpr PageBlobClearPagesResponse) XMsContentCrc64() []byte
- type PageBlobCopyIncrementalResponse
- func (pbcir PageBlobCopyIncrementalResponse) ClientRequestID() string
- func (pbcir PageBlobCopyIncrementalResponse) CopyID() string
- func (pbcir PageBlobCopyIncrementalResponse) CopyStatus() CopyStatusType
- func (pbcir PageBlobCopyIncrementalResponse) Date() time.Time
- func (pbcir PageBlobCopyIncrementalResponse) ETag() ETag
- func (pbcir PageBlobCopyIncrementalResponse) ErrorCode() string
- func (pbcir PageBlobCopyIncrementalResponse) LastModified() time.Time
- func (pbcir PageBlobCopyIncrementalResponse) RequestID() string
- func (pbcir PageBlobCopyIncrementalResponse) Response() *http.Response
- func (pbcir PageBlobCopyIncrementalResponse) Status() string
- func (pbcir PageBlobCopyIncrementalResponse) StatusCode() int
- func (pbcir PageBlobCopyIncrementalResponse) Version() string
- type PageBlobCreateResponse
- func (pbcr PageBlobCreateResponse) ClientRequestID() string
- func (pbcr PageBlobCreateResponse) ContentMD5() []byte
- func (pbcr PageBlobCreateResponse) Date() time.Time
- func (pbcr PageBlobCreateResponse) ETag() ETag
- func (pbcr PageBlobCreateResponse) EncryptionKeySha256() string
- func (pbcr PageBlobCreateResponse) EncryptionScope() string
- func (pbcr PageBlobCreateResponse) ErrorCode() string
- func (pbcr PageBlobCreateResponse) IsServerEncrypted() string
- func (pbcr PageBlobCreateResponse) LastModified() time.Time
- func (pbcr PageBlobCreateResponse) RequestID() string
- func (pbcr PageBlobCreateResponse) Response() *http.Response
- func (pbcr PageBlobCreateResponse) Status() string
- func (pbcr PageBlobCreateResponse) StatusCode() int
- func (pbcr PageBlobCreateResponse) Version() string
- func (pbcr PageBlobCreateResponse) VersionID() string
- type PageBlobResizeResponse
- func (pbrr PageBlobResizeResponse) BlobSequenceNumber() int64
- func (pbrr PageBlobResizeResponse) ClientRequestID() string
- func (pbrr PageBlobResizeResponse) Date() time.Time
- func (pbrr PageBlobResizeResponse) ETag() ETag
- func (pbrr PageBlobResizeResponse) ErrorCode() string
- func (pbrr PageBlobResizeResponse) LastModified() time.Time
- func (pbrr PageBlobResizeResponse) RequestID() string
- func (pbrr PageBlobResizeResponse) Response() *http.Response
- func (pbrr PageBlobResizeResponse) Status() string
- func (pbrr PageBlobResizeResponse) StatusCode() int
- func (pbrr PageBlobResizeResponse) Version() string
- type PageBlobURL
- func (pb PageBlobURL) ClearPages(ctx context.Context, offset int64, count int64, ac PageBlobAccessConditions, ...) (*PageBlobClearPagesResponse, error)
- func (pb PageBlobURL) Create(ctx context.Context, size int64, sequenceNumber int64, h BlobHTTPHeaders, ...) (*PageBlobCreateResponse, error)
- func (pb PageBlobURL) GetAccountInfo(ctx context.Context) (*BlobGetAccountInfoResponse, error)
- func (pb PageBlobURL) GetManagedDiskPageRangesDiff(ctx context.Context, offset int64, count int64, prevSnapshot *string, ...) (*PageList, error)
- func (pb PageBlobURL) GetPageRanges(ctx context.Context, offset int64, count int64, ac BlobAccessConditions) (*PageList, error)
- func (pb PageBlobURL) GetPageRangesDiff(ctx context.Context, offset int64, count int64, prevSnapshot string, ...) (*PageList, error)
- func (pb PageBlobURL) Resize(ctx context.Context, size int64, ac BlobAccessConditions, ...) (*PageBlobResizeResponse, error)
- func (pb PageBlobURL) StartCopyIncremental(ctx context.Context, source url.URL, snapshot string, ac BlobAccessConditions) (*PageBlobCopyIncrementalResponse, error)
- func (pb PageBlobURL) UpdateSequenceNumber(ctx context.Context, action SequenceNumberActionType, sequenceNumber int64, ...) (*PageBlobUpdateSequenceNumberResponse, error)
- func (pb PageBlobURL) UploadPages(ctx context.Context, offset int64, body io.ReadSeeker, ...) (*PageBlobUploadPagesResponse, error)
- func (pb PageBlobURL) UploadPagesFromURL(ctx context.Context, sourceURL url.URL, sourceOffset int64, destOffset int64, ...) (*PageBlobUploadPagesFromURLResponse, error)
- func (pb PageBlobURL) WithPipeline(p pipeline.Pipeline) PageBlobURL
- func (pb PageBlobURL) WithSnapshot(snapshot string) PageBlobURL
- func (pb PageBlobURL) WithVersionID(versionId string) PageBlobURL
- type PageBlobUpdateSequenceNumberResponse
- func (pbusnr PageBlobUpdateSequenceNumberResponse) BlobSequenceNumber() int64
- func (pbusnr PageBlobUpdateSequenceNumberResponse) ClientRequestID() string
- func (pbusnr PageBlobUpdateSequenceNumberResponse) Date() time.Time
- func (pbusnr PageBlobUpdateSequenceNumberResponse) ETag() ETag
- func (pbusnr PageBlobUpdateSequenceNumberResponse) ErrorCode() string
- func (pbusnr PageBlobUpdateSequenceNumberResponse) LastModified() time.Time
- func (pbusnr PageBlobUpdateSequenceNumberResponse) RequestID() string
- func (pbusnr PageBlobUpdateSequenceNumberResponse) Response() *http.Response
- func (pbusnr PageBlobUpdateSequenceNumberResponse) Status() string
- func (pbusnr PageBlobUpdateSequenceNumberResponse) StatusCode() int
- func (pbusnr PageBlobUpdateSequenceNumberResponse) Version() string
- type PageBlobUploadPagesFromURLResponse
- func (pbupfur PageBlobUploadPagesFromURLResponse) BlobSequenceNumber() int64
- func (pbupfur PageBlobUploadPagesFromURLResponse) ContentMD5() []byte
- func (pbupfur PageBlobUploadPagesFromURLResponse) Date() time.Time
- func (pbupfur PageBlobUploadPagesFromURLResponse) ETag() ETag
- func (pbupfur PageBlobUploadPagesFromURLResponse) EncryptionKeySha256() string
- func (pbupfur PageBlobUploadPagesFromURLResponse) EncryptionScope() string
- func (pbupfur PageBlobUploadPagesFromURLResponse) ErrorCode() string
- func (pbupfur PageBlobUploadPagesFromURLResponse) IsServerEncrypted() string
- func (pbupfur PageBlobUploadPagesFromURLResponse) LastModified() time.Time
- func (pbupfur PageBlobUploadPagesFromURLResponse) RequestID() string
- func (pbupfur PageBlobUploadPagesFromURLResponse) Response() *http.Response
- func (pbupfur PageBlobUploadPagesFromURLResponse) Status() string
- func (pbupfur PageBlobUploadPagesFromURLResponse) StatusCode() int
- func (pbupfur PageBlobUploadPagesFromURLResponse) Version() string
- func (pbupfur PageBlobUploadPagesFromURLResponse) XMsContentCrc64() []byte
- type PageBlobUploadPagesResponse
- func (pbupr PageBlobUploadPagesResponse) BlobSequenceNumber() int64
- func (pbupr PageBlobUploadPagesResponse) ClientRequestID() string
- func (pbupr PageBlobUploadPagesResponse) ContentMD5() []byte
- func (pbupr PageBlobUploadPagesResponse) Date() time.Time
- func (pbupr PageBlobUploadPagesResponse) ETag() ETag
- func (pbupr PageBlobUploadPagesResponse) EncryptionKeySha256() string
- func (pbupr PageBlobUploadPagesResponse) EncryptionScope() string
- func (pbupr PageBlobUploadPagesResponse) ErrorCode() string
- func (pbupr PageBlobUploadPagesResponse) IsServerEncrypted() string
- func (pbupr PageBlobUploadPagesResponse) LastModified() time.Time
- func (pbupr PageBlobUploadPagesResponse) RequestID() string
- func (pbupr PageBlobUploadPagesResponse) Response() *http.Response
- func (pbupr PageBlobUploadPagesResponse) Status() string
- func (pbupr PageBlobUploadPagesResponse) StatusCode() int
- func (pbupr PageBlobUploadPagesResponse) Version() string
- func (pbupr PageBlobUploadPagesResponse) XMsContentCrc64() []byte
- type PageList
- func (pl PageList) BlobContentLength() int64
- func (pl PageList) ClientRequestID() string
- func (pl PageList) Date() time.Time
- func (pl PageList) ETag() ETag
- func (pl PageList) ErrorCode() string
- func (pl PageList) LastModified() time.Time
- func (pl PageList) RequestID() string
- func (pl PageList) Response() *http.Response
- func (pl PageList) Status() string
- func (pl PageList) StatusCode() int
- func (pl PageList) Version() string
- type PageRange
- type PipelineOptions
- type PremiumPageBlobAccessTierType
- type PublicAccessType
- type QueryFormat
- type QueryFormatType
- type QueryRequest
- type QueryResponse
- func (qr QueryResponse) AcceptRanges() string
- func (qr QueryResponse) BlobCommittedBlockCount() int32
- func (qr QueryResponse) BlobContentMD5() []byte
- func (qr QueryResponse) BlobSequenceNumber() int64
- func (qr QueryResponse) BlobType() BlobType
- func (qr QueryResponse) Body() io.ReadCloser
- func (qr QueryResponse) CacheControl() string
- func (qr QueryResponse) ClientRequestID() string
- func (qr QueryResponse) ContentCrc64() []byte
- func (qr QueryResponse) ContentDisposition() string
- func (qr QueryResponse) ContentEncoding() string
- func (qr QueryResponse) ContentLanguage() string
- func (qr QueryResponse) ContentLength() int64
- func (qr QueryResponse) ContentMD5() []byte
- func (qr QueryResponse) ContentRange() string
- func (qr QueryResponse) ContentType() string
- func (qr QueryResponse) CopyCompletionTime() time.Time
- func (qr QueryResponse) CopyID() string
- func (qr QueryResponse) CopyProgress() string
- func (qr QueryResponse) CopySource() string
- func (qr QueryResponse) CopyStatus() CopyStatusType
- func (qr QueryResponse) CopyStatusDescription() string
- func (qr QueryResponse) Date() time.Time
- func (qr QueryResponse) ETag() ETag
- func (qr QueryResponse) EncryptionKeySha256() string
- func (qr QueryResponse) EncryptionScope() string
- func (qr QueryResponse) ErrorCode() string
- func (qr QueryResponse) IsServerEncrypted() string
- func (qr QueryResponse) LastModified() time.Time
- func (qr QueryResponse) LeaseDuration() LeaseDurationType
- func (qr QueryResponse) LeaseState() LeaseStateType
- func (qr QueryResponse) LeaseStatus() LeaseStatusType
- func (qr QueryResponse) NewMetadata() Metadata
- func (qr QueryResponse) RequestID() string
- func (qr QueryResponse) Response() *http.Response
- func (qr QueryResponse) Status() string
- func (qr QueryResponse) StatusCode() int
- func (qr QueryResponse) Version() string
- type QuerySerialization
- type RehydratePriorityType
- type RequestLogOptions
- type ResponseError
- type RetentionPolicy
- type RetryOptions
- type RetryPolicy
- type RetryReaderOptions
- type SASProtocol
- type SASQueryParameters
- func (p *SASQueryParameters) AgentObjectId() string
- func (p *SASQueryParameters) CacheControl() string
- func (p *SASQueryParameters) ContentDisposition() string
- func (p *SASQueryParameters) ContentEncoding() string
- func (p *SASQueryParameters) ContentLanguage() string
- func (p *SASQueryParameters) ContentType() string
- func (p *SASQueryParameters) Encode() string
- func (p *SASQueryParameters) ExpiryTime() time.Time
- func (p *SASQueryParameters) IPRange() IPRange
- func (p *SASQueryParameters) Identifier() string
- func (p *SASQueryParameters) Permissions() string
- func (p *SASQueryParameters) PreauthorizedAgentObjectId() string
- func (p *SASQueryParameters) Protocol() SASProtocol
- func (p *SASQueryParameters) Resource() string
- func (p *SASQueryParameters) ResourceTypes() string
- func (p *SASQueryParameters) Services() string
- func (p *SASQueryParameters) Signature() string
- func (p *SASQueryParameters) SignedCorrelationId() string
- func (p *SASQueryParameters) SignedDirectoryDepth() string
- func (p *SASQueryParameters) SignedExpiry() time.Time
- func (p *SASQueryParameters) SignedService() string
- func (p *SASQueryParameters) SignedStart() time.Time
- func (p *SASQueryParameters) SignedTid() string
- func (p *SASQueryParameters) SignedVersion() string
- func (p *SASQueryParameters) SnapshotTime() time.Time
- func (p *SASQueryParameters) StartTime() time.Time
- func (p *SASQueryParameters) Version() string
- type SequenceNumberAccessConditions
- type SequenceNumberActionType
- type ServiceCodeType
- type ServiceGetAccountInfoResponse
- func (sgair ServiceGetAccountInfoResponse) AccountKind() AccountKindType
- func (sgair ServiceGetAccountInfoResponse) ClientRequestID() string
- func (sgair ServiceGetAccountInfoResponse) Date() time.Time
- func (sgair ServiceGetAccountInfoResponse) ErrorCode() string
- func (sgair ServiceGetAccountInfoResponse) IsHierarchicalNamespaceEnabled() string
- func (sgair ServiceGetAccountInfoResponse) RequestID() string
- func (sgair ServiceGetAccountInfoResponse) Response() *http.Response
- func (sgair ServiceGetAccountInfoResponse) SkuName() SkuNameType
- func (sgair ServiceGetAccountInfoResponse) Status() string
- func (sgair ServiceGetAccountInfoResponse) StatusCode() int
- func (sgair ServiceGetAccountInfoResponse) Version() string
- type ServiceSetPropertiesResponse
- func (sspr ServiceSetPropertiesResponse) ClientRequestID() string
- func (sspr ServiceSetPropertiesResponse) ErrorCode() string
- func (sspr ServiceSetPropertiesResponse) RequestID() string
- func (sspr ServiceSetPropertiesResponse) Response() *http.Response
- func (sspr ServiceSetPropertiesResponse) Status() string
- func (sspr ServiceSetPropertiesResponse) StatusCode() int
- func (sspr ServiceSetPropertiesResponse) Version() string
- type ServiceURL
- func (bsu ServiceURL) FindBlobsByTags(ctx context.Context, timeout *int32, requestID *string, where *string, ...) (*FilterBlobSegment, error)
- func (s ServiceURL) GetAccountInfo(ctx context.Context) (*ServiceGetAccountInfoResponse, error)
- func (bsu ServiceURL) GetProperties(ctx context.Context) (*StorageServiceProperties, error)
- func (bsu ServiceURL) GetStatistics(ctx context.Context) (*StorageServiceStats, error)
- func (s ServiceURL) GetUserDelegationCredential(ctx context.Context, info KeyInfo, timeout *int32, requestID *string) (UserDelegationCredential, error)
- func (s ServiceURL) ListContainersSegment(ctx context.Context, marker Marker, o ListContainersSegmentOptions) (*ListContainersSegmentResponse, error)
- func (s ServiceURL) NewContainerURL(containerName string) ContainerURL
- func (bsu ServiceURL) SetProperties(ctx context.Context, properties StorageServiceProperties) (*ServiceSetPropertiesResponse, error)
- func (s ServiceURL) String() string
- func (s ServiceURL) URL() url.URL
- func (s ServiceURL) WithPipeline(p pipeline.Pipeline) ServiceURL
- type SharedKeyCredential
- type SignedIdentifier
- type SignedIdentifiers
- func (si SignedIdentifiers) BlobPublicAccess() PublicAccessType
- func (si SignedIdentifiers) ClientRequestID() string
- func (si SignedIdentifiers) Date() time.Time
- func (si SignedIdentifiers) ETag() ETag
- func (si SignedIdentifiers) ErrorCode() string
- func (si SignedIdentifiers) LastModified() time.Time
- func (si SignedIdentifiers) RequestID() string
- func (si SignedIdentifiers) Response() *http.Response
- func (si SignedIdentifiers) Status() string
- func (si SignedIdentifiers) StatusCode() int
- func (si SignedIdentifiers) Version() string
- type SkuNameType
- type StaticWebsite
- type StorageAccountCredential
- type StorageError
- type StorageErrorCodeType
- type StorageServiceProperties
- func (ssp StorageServiceProperties) ClientRequestID() string
- func (ssp StorageServiceProperties) ErrorCode() string
- func (ssp StorageServiceProperties) RequestID() string
- func (ssp StorageServiceProperties) Response() *http.Response
- func (ssp StorageServiceProperties) Status() string
- func (ssp StorageServiceProperties) StatusCode() int
- func (ssp StorageServiceProperties) Version() string
- type StorageServiceStats
- func (sss StorageServiceStats) ClientRequestID() string
- func (sss StorageServiceStats) Date() time.Time
- func (sss StorageServiceStats) ErrorCode() string
- func (sss StorageServiceStats) RequestID() string
- func (sss StorageServiceStats) Response() *http.Response
- func (sss StorageServiceStats) Status() string
- func (sss StorageServiceStats) StatusCode() int
- func (sss StorageServiceStats) Version() string
- type SubmitBatchResponse
- func (sbr SubmitBatchResponse) Body() io.ReadCloser
- func (sbr SubmitBatchResponse) ContentType() string
- func (sbr SubmitBatchResponse) ErrorCode() string
- func (sbr SubmitBatchResponse) RequestID() string
- func (sbr SubmitBatchResponse) Response() *http.Response
- func (sbr SubmitBatchResponse) Status() string
- func (sbr SubmitBatchResponse) StatusCode() int
- func (sbr SubmitBatchResponse) Version() string
- type SyncCopyStatusType
- type TelemetryOptions
- type TokenCredential
- type TokenRefresher
- type TransferManager
- type UploadStreamOptions
- type UploadStreamToBlockBlobOptions
- type UploadToBlockBlobOptions
- type UserDelegationCredential
- type UserDelegationKey
- func (udk UserDelegationKey) ClientRequestID() string
- func (udk UserDelegationKey) Date() time.Time
- func (udk UserDelegationKey) ErrorCode() string
- func (udk UserDelegationKey) MarshalXML(e *xml.Encoder, start xml.StartElement) error
- func (udk UserDelegationKey) RequestID() string
- func (udk UserDelegationKey) Response() *http.Response
- func (udk UserDelegationKey) Status() string
- func (udk UserDelegationKey) StatusCode() int
- func (udk *UserDelegationKey) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
- func (udk UserDelegationKey) Version() string
Examples ¶
- Package
- Package (BlobSnapshots)
- Package (ProgressUploadDownload)
- AccountSASSignatureValues
- AppendBlobURL
- BlobAccessConditions
- BlobHTTPHeaders
- BlobSASSignatureValues
- BlobURL (StartCopy)
- BlobURLParts
- BlockBlobURL
- Metadata (Blobs)
- Metadata (Containers)
- NewPipeline
- PageBlobURL
- StorageError
- UploadStreamToBlockBlob
Constants ¶
const ( // AppendBlobMaxAppendBlockBytes indicates the maximum number of bytes that can be sent in a call to AppendBlock. AppendBlobMaxAppendBlockBytes = 4 * 1024 * 1024 // 4MB // AppendBlobMaxBlocks indicates the maximum number of blocks allowed in an append blob. AppendBlobMaxBlocks = 50000 )
const ( // BlockBlobMaxUploadBlobBytes indicates the maximum number of bytes that can be sent in a call to Upload. BlockBlobMaxUploadBlobBytes = 256 * 1024 * 1024 // 256MB // BlockBlobMaxStageBlockBytes indicates the maximum number of bytes that can be sent in a call to StageBlock. BlockBlobMaxStageBlockBytes = 4000 * 1024 * 1024 // 4000MiB // BlockBlobMaxBlocks indicates the maximum number of blocks allowed in a block blob. BlockBlobMaxBlocks = 50000 )
const ( // PageBlobPageBytes indicates the number of bytes in a page (512). PageBlobPageBytes = 512 // PageBlobMaxUploadPagesBytes indicates the maximum number of bytes that can be sent in a call to PutPage. PageBlobMaxUploadPagesBytes = 4 * 1024 * 1024 // 4MB )
const ( // ContainerNameRoot is the special Azure Storage name used to identify a storage account's root container. ContainerNameRoot = "$root" // ContainerNameLogs is the special Azure Storage name used to identify a storage account's logs container. ContainerNameLogs = "$logs" )
const BlobDefaultDownloadBlockSize = int64(4 * 1024 * 1024) // 4MB
const CountToEnd = 0
const LeaseBreakNaturally = -1
LeaseBreakNaturally tells ContainerURL's or BlobURL's BreakLease method to break the lease using service semantics.
const ReadOnClosedBodyMessage = "read on closed response body"
const SASTimeFormat = "2006-01-02T15:04:05Z" //"2017-07-27T00:00:00Z" // ISO 8601
SASTimeFormat represents the format of a SAS start or expiry time. Use it when formatting/parsing a time.Time.
const SASVersion = ServiceVersion
SASVersion indicates the SAS version.
const (
// ServiceVersion specifies the version of the operations used in this package.
ServiceVersion = "2020-10-02"
)
const (
SnapshotTimeFormat = "2006-01-02T15:04:05.0000000Z07:00"
)
Variables ¶
var DefaultAccessTier = AccessTierNone
var DefaultPremiumBlobAccessTier = PremiumPageBlobAccessTierNone
var SASTimeFormats = []string{"2006-01-02T15:04:05.0000000Z", SASTimeFormat, "2006-01-02T15:04Z", "2006-01-02"} // ISO 8601 formats, please refer to https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas for more details.
Functions ¶
func DoBatchTransfer ¶ added in v0.8.0
func DoBatchTransfer(ctx context.Context, o BatchTransferOptions) error
DoBatchTransfer helps to execute operations in a batch manner. Can be used by users to customize batch works (for other scenarios that the SDK does not provide)
func DownloadBlobToBuffer ¶
func DownloadBlobToBuffer(ctx context.Context, blobURL BlobURL, offset int64, count int64, b []byte, o DownloadFromBlobOptions) error
DownloadBlobToBuffer downloads an Azure blob to a buffer with parallel. Offset and count are optional, pass 0 for both to download the entire blob.
func DownloadBlobToFile ¶
func DownloadBlobToFile(ctx context.Context, blobURL BlobURL, offset int64, count int64, file *os.File, o DownloadFromBlobOptions) error
DownloadBlobToFile downloads an Azure blob to a local file. The file would be truncated if the size doesn't match. Offset and count are optional, pass 0 for both to download the entire blob.
func FormatTimesForSASSigning ¶
func FormatTimesForSASSigning(startTime, expiryTime, snapshotTime time.Time) (string, string, string)
FormatTimesForSASSigning converts a time.Time to a snapshotTimeFormat string suitable for a SASField's StartTime or ExpiryTime fields. Returns "" if value.IsZero().
func NewPipeline ¶
func NewPipeline(c Credential, o PipelineOptions) pipeline.Pipeline
NewPipeline creates a Pipeline using the specified credentials and options.
Example ¶
This example shows how you can configure a pipeline for making HTTP requests to the Azure Storage Blob Service.
// This example shows how to wire in your own logging mechanism (this example uses // Go's standard logger to write log information to standard error) logger := log.New(os.Stderr, "", log.Ldate|log.Lmicroseconds) // Create/configure a request pipeline options object. // All PipelineOptions' fields are optional; reasonable defaults are set for anything you do not specify po := PipelineOptions{ // Set RetryOptions to control how HTTP request are retried when retryable failures occur Retry: RetryOptions{ Policy: RetryPolicyExponential, // Use exponential backoff as opposed to linear MaxTries: 3, // Try at most 3 times to perform the operation (set to 1 to disable retries) TryTimeout: time.Second * 3, // Maximum time allowed for any single try RetryDelay: time.Second * 1, // Backoff amount for each retry (exponential or linear) MaxRetryDelay: time.Second * 3, // Max delay between retries }, // Set RequestLogOptions to control how each HTTP request & its response is logged RequestLog: RequestLogOptions{ LogWarningIfTryOverThreshold: time.Millisecond * 200, // A successful response taking more than this time to arrive is logged as a warning SyslogDisabled: true, }, // Set LogOptions to control what & where all pipeline log events go Log: pipeline.LogOptions{ Log: func(s pipeline.LogLevel, m string) { // This func is called to log each event // This method is not called for filtered-out severities. logger.Output(2, m) // This example uses Go's standard logger }, ShouldLog: func(level pipeline.LogLevel) bool { return level <= pipeline.LogWarning // Log all events from warning to more severe }, }, // Set HTTPSender to override the default HTTP Sender that sends the request over the network HTTPSender: pipeline.FactoryFunc(func(next pipeline.Policy, po *pipeline.PolicyOptions) pipeline.PolicyFunc { return func(ctx context.Context, request pipeline.Request) (pipeline.Response, error) { // Implement the HTTP client that will override the default sender. // For example, below HTTP client uses a transport that is different from http.DefaultTransport client := http.Client{ Transport: &http.Transport{ Proxy: nil, DialContext: (&net.Dialer{ Timeout: 30 * time.Second, KeepAlive: 30 * time.Second, DualStack: true, }).DialContext, MaxIdleConns: 100, IdleConnTimeout: 180 * time.Second, TLSHandshakeTimeout: 10 * time.Second, ExpectContinueTimeout: 1 * time.Second, }, } // Send the request over the network resp, err := client.Do(request.WithContext(ctx)) return pipeline.NewHTTPResponse(resp), err } }), } // Create a request pipeline object configured with credentials and with pipeline options. Once created, // a pipeline object is goroutine-safe and can be safely used with many XxxURL objects simultaneously. p := NewPipeline(NewAnonymousCredential(), po) // A pipeline always requires some credential object // Once you've created a pipeline object, associate it with an XxxURL object so that you can perform HTTP requests with it. u, _ := url.Parse("https://myaccount.blob.core.windows.net") serviceURL := NewServiceURL(*u, p) // Use the serviceURL as desired... // NOTE: When you use an XxxURL object to create another XxxURL object, the new XxxURL object inherits the // same pipeline object as its parent. For example, the containerURL and blobURL objects (created below) // all share the same pipeline. Any HTTP operations you perform with these objects share the behavior (retry, logging, etc.) containerURL := serviceURL.NewContainerURL("mycontainer") blobURL := containerURL.NewBlockBlobURL("ReadMe.txt") // If you'd like to perform some operations with different behavior, create a new pipeline object and // associate it with a new XxxURL object by passing the new pipeline to the XxxURL object's WithPipeline method. // In this example, I reconfigure the retry policies, create a new pipeline, and then create a new // ContainerURL object that has the same URL as its parent. po.Retry = RetryOptions{ Policy: RetryPolicyFixed, // Use fixed time backoff MaxTries: 4, // Try at most 3 times to perform the operation (set to 1 to disable retries) TryTimeout: time.Minute * 1, // Maximum time allowed for any single try RetryDelay: time.Second * 5, // Backoff amount for each retry (exponential or linear) MaxRetryDelay: time.Second * 10, // Max delay between retries } newContainerURL := containerURL.WithPipeline(NewPipeline(NewAnonymousCredential(), po)) // Now, any XxxBlobURL object created using newContainerURL inherits the pipeline with the new retry policy. newBlobURL := newContainerURL.NewBlockBlobURL("ReadMe.txt") _, _ = blobURL, newBlobURL // Avoid compiler's "declared and not used" error
Output:
func NewRequestLogPolicyFactory ¶
func NewRequestLogPolicyFactory(o RequestLogOptions) pipeline.Factory
NewRequestLogPolicyFactory creates a RequestLogPolicyFactory object configured using the specified options.
func NewResponseError ¶
NewResponseError creates an error object that implements the error interface.
func NewRetryPolicyFactory ¶
func NewRetryPolicyFactory(o RetryOptions) pipeline.Factory
NewRetryPolicyFactory creates a RetryPolicyFactory object configured using the specified options.
func NewRetryReader ¶
func NewRetryReader(ctx context.Context, initialResponse *http.Response, info HTTPGetterInfo, o RetryReaderOptions, getter HTTPGetter) io.ReadCloser
NewRetryReader creates a retry reader.
func NewTelemetryPolicyFactory ¶
func NewTelemetryPolicyFactory(o TelemetryOptions) pipeline.Factory
NewTelemetryPolicyFactory creates a factory that can create telemetry policy objects which add telemetry information to outgoing HTTP requests.
func NewUniqueRequestIDPolicyFactory ¶
NewUniqueRequestIDPolicyFactory creates a UniqueRequestIDPolicyFactory object that sets the request's x-ms-client-request-id header if it doesn't already exist.
func RedactSigQueryParam ¶
RedactSigQueryParam redacts the 'sig' query parameter in URL's raw query to protect secret.
func SerializeBlobTagsHeader ¶ added in v0.11.0
func SerializeBlobTagsHeader(blobTagsMap BlobTagsMap) *string
func UserAgent ¶
func UserAgent() string
UserAgent returns the UserAgent string to use when sending http.Requests.
func Version ¶
func Version() string
Version returns the semantic version (see http://semver.org) of the client.
Types ¶
type AccessPolicy ¶
type AccessPolicy struct { // Start - the date-time the policy is active Start *time.Time `xml:"Start"` // Expiry - the date-time the policy expires Expiry *time.Time `xml:"Expiry"` // Permission - the permissions for the acl policy Permission *string `xml:"Permission"` }
AccessPolicy - An Access policy
func (AccessPolicy) MarshalXML ¶
func (ap AccessPolicy) MarshalXML(e *xml.Encoder, start xml.StartElement) error
MarshalXML implements the xml.Marshaler interface for AccessPolicy.
func (*AccessPolicy) UnmarshalXML ¶
func (ap *AccessPolicy) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
UnmarshalXML implements the xml.Unmarshaler interface for AccessPolicy.
type AccessPolicyPermission ¶
type AccessPolicyPermission struct {
Read, Add, Create, Write, Delete, List bool
}
The AccessPolicyPermission type simplifies creating the permissions string for a container's access policy. Initialize an instance of this type and then call its String method to set AccessPolicy's Permission field.
func (*AccessPolicyPermission) Parse ¶
func (p *AccessPolicyPermission) Parse(s string) error
Parse initializes the AccessPolicyPermission's fields from a string.
func (AccessPolicyPermission) String ¶
func (p AccessPolicyPermission) String() string
String produces the access policy permission string for an Azure Storage container. Call this method to set AccessPolicy's Permission field.
type AccessTierType ¶
type AccessTierType string
AccessTierType enumerates the values for access tier type.
const ( // AccessTierArchive ... AccessTierArchive AccessTierType = "Archive" // AccessTierCool ... AccessTierCool AccessTierType = "Cool" // AccessTierHot ... AccessTierHot AccessTierType = "Hot" // AccessTierNone represents an empty AccessTierType. AccessTierNone AccessTierType = "" // AccessTierP10 ... AccessTierP10 AccessTierType = "P10" // AccessTierP15 ... AccessTierP15 AccessTierType = "P15" // AccessTierP20 ... AccessTierP20 AccessTierType = "P20" // AccessTierP30 ... AccessTierP30 AccessTierType = "P30" // AccessTierP4 ... AccessTierP4 AccessTierType = "P4" // AccessTierP40 ... AccessTierP40 AccessTierType = "P40" // AccessTierP50 ... AccessTierP50 AccessTierType = "P50" // AccessTierP6 ... AccessTierP6 AccessTierType = "P6" // AccessTierP60 ... AccessTierP60 AccessTierType = "P60" // AccessTierP70 ... AccessTierP70 AccessTierType = "P70" // AccessTierP80 ... AccessTierP80 AccessTierType = "P80" )
func PossibleAccessTierTypeValues ¶
func PossibleAccessTierTypeValues() []AccessTierType
PossibleAccessTierTypeValues returns an array of possible values for the AccessTierType const type.
type AccountKindType ¶
type AccountKindType string
AccountKindType enumerates the values for account kind type.
const ( // AccountKindBlobStorage ... AccountKindBlobStorage AccountKindType = "BlobStorage" // AccountKindBlockBlobStorage ... AccountKindBlockBlobStorage AccountKindType = "BlockBlobStorage" // AccountKindFileStorage ... AccountKindFileStorage AccountKindType = "FileStorage" // AccountKindNone represents an empty AccountKindType. AccountKindNone AccountKindType = "" // AccountKindStorage ... AccountKindStorage AccountKindType = "Storage" // AccountKindStorageV2 ... AccountKindStorageV2 AccountKindType = "StorageV2" )
func PossibleAccountKindTypeValues ¶
func PossibleAccountKindTypeValues() []AccountKindType
PossibleAccountKindTypeValues returns an array of possible values for the AccountKindType const type.
type AccountSASPermissions ¶
type AccountSASPermissions struct {
Read, Write, Delete, DeletePreviousVersion, List, Add, Create, Update, Process, Tag, FilterByTags, PermanentDelete, Immutability bool
}
The AccountSASPermissions type simplifies creating the permissions string for an Azure Storage Account SAS. Initialize an instance of this type and then call its String method to set AccountSASSignatureValues's Permissions field.
func (*AccountSASPermissions) Parse ¶
func (p *AccountSASPermissions) Parse(s string) error
Parse initializes the AccountSASPermissions's fields from a string.
func (AccountSASPermissions) String ¶
func (p AccountSASPermissions) String() string
String produces the SAS permissions string for an Azure Storage account. Call this method to set AccountSASSignatureValues's Permissions field.
type AccountSASResourceTypes ¶
type AccountSASResourceTypes struct {
Service, Container, Object bool
}
The AccountSASResourceTypes type simplifies creating the resource types string for an Azure Storage Account SAS. Initialize an instance of this type and then call its String method to set AccountSASSignatureValues's ResourceTypes field.
func (*AccountSASResourceTypes) Parse ¶
func (rt *AccountSASResourceTypes) Parse(s string) error
Parse initializes the AccountSASResourceType's fields from a string.
func (AccountSASResourceTypes) String ¶
func (rt AccountSASResourceTypes) String() string
String produces the SAS resource types string for an Azure Storage account. Call this method to set AccountSASSignatureValues's ResourceTypes field.
type AccountSASServices ¶
type AccountSASServices struct {
Blob, Queue, File bool
}
The AccountSASServices type simplifies creating the services string for an Azure Storage Account SAS. Initialize an instance of this type and then call its String method to set AccountSASSignatureValues's Services field.
func (*AccountSASServices) Parse ¶
func (a *AccountSASServices) Parse(s string) error
Parse initializes the AccountSASServices' fields from a string.
func (AccountSASServices) String ¶
func (s AccountSASServices) String() string
String produces the SAS services string for an Azure Storage account. Call this method to set AccountSASSignatureValues's Services field.
type AccountSASSignatureValues ¶
type AccountSASSignatureValues struct { Version string `param:"sv"` // If not specified, this defaults to SASVersion Protocol SASProtocol `param:"spr"` // See the SASProtocol* constants StartTime time.Time `param:"st"` // Not specified if IsZero ExpiryTime time.Time `param:"se"` // Not specified if IsZero Permissions string `param:"sp"` // Create by initializing a AccountSASPermissions and then call String() IPRange IPRange `param:"sip"` Services string `param:"ss"` // Create by initializing AccountSASServices and then call String() ResourceTypes string `param:"srt"` // Create by initializing AccountSASResourceTypes and then call String() }
AccountSASSignatureValues is used to generate a Shared Access Signature (SAS) for an Azure Storage account. For more information, see https://docs.microsoft.com/rest/api/storageservices/constructing-an-account-sas
Example ¶
This example shows how to create and use an Azure Storage account Shared Access Signature (SAS).
// From the Azure portal, get your Storage account's name and account key. accountName, accountKey := accountInfo() // Use your Storage account's name and key to create a credential object; this is required to sign a SAS. credential, err := NewSharedKeyCredential(accountName, accountKey) if err != nil { log.Fatal(err) } // Set the desired SAS signature values and sign them with the shared key credentials to get the SAS query parameters. sasQueryParams, err := AccountSASSignatureValues{ Protocol: SASProtocolHTTPS, // Users MUST use HTTPS (not HTTP) ExpiryTime: time.Now().UTC().Add(48 * time.Hour), // 48-hours before expiration Permissions: AccountSASPermissions{Read: true, List: true}.String(), Services: AccountSASServices{Blob: true}.String(), ResourceTypes: AccountSASResourceTypes{Container: true, Object: true}.String(), }.NewSASQueryParameters(credential) if err != nil { log.Fatal(err) } qp := sasQueryParams.Encode() urlToSendToSomeone := fmt.Sprintf("https://%s.blob.core.windows.net?%s", accountName, qp) // At this point, you can send the urlToSendToSomeone to someone via email or any other mechanism you choose. // ************************************************************************************************ // When someone receives the URL, they access the SAS-protected resource with code like this: u, _ := url.Parse(urlToSendToSomeone) // Create an ServiceURL object that wraps the service URL (and its SAS) and a pipeline. // When using a SAS URLs, anonymous credentials are required. serviceURL := NewServiceURL(*u, NewPipeline(NewAnonymousCredential(), PipelineOptions{})) // Now, you can use this serviceURL just like any other to make requests of the resource. // You can parse a URL into its constituent parts: blobURLParts := NewBlobURLParts(serviceURL.URL()) fmt.Printf("SAS expiry time=%v", blobURLParts.SAS.ExpiryTime()) _ = serviceURL // Avoid compiler's "declared and not used" error
Output:
func (AccountSASSignatureValues) NewSASQueryParameters ¶
func (v AccountSASSignatureValues) NewSASQueryParameters(sharedKeyCredential *SharedKeyCredential) (SASQueryParameters, error)
NewSASQueryParameters uses an account's shared key credential to sign this signature values to produce the proper SAS query parameters.
type AppendBlobAccessConditions ¶
type AppendBlobAccessConditions struct { ModifiedAccessConditions LeaseAccessConditions AppendPositionAccessConditions }
type AppendBlobAppendBlockFromURLResponse ¶
type AppendBlobAppendBlockFromURLResponse struct {
// contains filtered or unexported fields
}
AppendBlobAppendBlockFromURLResponse ...
func (AppendBlobAppendBlockFromURLResponse) BlobAppendOffset ¶
func (ababfur AppendBlobAppendBlockFromURLResponse) BlobAppendOffset() string
BlobAppendOffset returns the value for header x-ms-blob-append-offset.
func (AppendBlobAppendBlockFromURLResponse) BlobCommittedBlockCount ¶
func (ababfur AppendBlobAppendBlockFromURLResponse) BlobCommittedBlockCount() int32
BlobCommittedBlockCount returns the value for header x-ms-blob-committed-block-count.
func (AppendBlobAppendBlockFromURLResponse) ContentMD5 ¶
func (ababfur AppendBlobAppendBlockFromURLResponse) ContentMD5() []byte
ContentMD5 returns the value for header Content-MD5.
func (AppendBlobAppendBlockFromURLResponse) Date ¶
func (ababfur AppendBlobAppendBlockFromURLResponse) Date() time.Time
Date returns the value for header Date.
func (AppendBlobAppendBlockFromURLResponse) ETag ¶
func (ababfur AppendBlobAppendBlockFromURLResponse) ETag() ETag
ETag returns the value for header ETag.
func (AppendBlobAppendBlockFromURLResponse) EncryptionKeySha256 ¶ added in v0.10.0
func (ababfur AppendBlobAppendBlockFromURLResponse) EncryptionKeySha256() string
EncryptionKeySha256 returns the value for header x-ms-encryption-key-sha256.
func (AppendBlobAppendBlockFromURLResponse) EncryptionScope ¶ added in v0.11.0
func (ababfur AppendBlobAppendBlockFromURLResponse) EncryptionScope() string
EncryptionScope returns the value for header x-ms-encryption-scope.
func (AppendBlobAppendBlockFromURLResponse) ErrorCode ¶
func (ababfur AppendBlobAppendBlockFromURLResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (AppendBlobAppendBlockFromURLResponse) IsServerEncrypted ¶ added in v0.10.0
func (ababfur AppendBlobAppendBlockFromURLResponse) IsServerEncrypted() string
IsServerEncrypted returns the value for header x-ms-request-server-encrypted.
func (AppendBlobAppendBlockFromURLResponse) LastModified ¶
func (ababfur AppendBlobAppendBlockFromURLResponse) LastModified() time.Time
LastModified returns the value for header Last-Modified.
func (AppendBlobAppendBlockFromURLResponse) RequestID ¶
func (ababfur AppendBlobAppendBlockFromURLResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (AppendBlobAppendBlockFromURLResponse) Response ¶
func (ababfur AppendBlobAppendBlockFromURLResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (AppendBlobAppendBlockFromURLResponse) Status ¶
func (ababfur AppendBlobAppendBlockFromURLResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (AppendBlobAppendBlockFromURLResponse) StatusCode ¶
func (ababfur AppendBlobAppendBlockFromURLResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (AppendBlobAppendBlockFromURLResponse) Version ¶
func (ababfur AppendBlobAppendBlockFromURLResponse) Version() string
Version returns the value for header x-ms-version.
func (AppendBlobAppendBlockFromURLResponse) XMsContentCrc64 ¶ added in v0.10.0
func (ababfur AppendBlobAppendBlockFromURLResponse) XMsContentCrc64() []byte
XMsContentCrc64 returns the value for header x-ms-content-crc64.
type AppendBlobAppendBlockResponse ¶
type AppendBlobAppendBlockResponse struct {
// contains filtered or unexported fields
}
AppendBlobAppendBlockResponse ...
func (AppendBlobAppendBlockResponse) BlobAppendOffset ¶
func (ababr AppendBlobAppendBlockResponse) BlobAppendOffset() string
BlobAppendOffset returns the value for header x-ms-blob-append-offset.
func (AppendBlobAppendBlockResponse) BlobCommittedBlockCount ¶
func (ababr AppendBlobAppendBlockResponse) BlobCommittedBlockCount() int32
BlobCommittedBlockCount returns the value for header x-ms-blob-committed-block-count.
func (AppendBlobAppendBlockResponse) ClientRequestID ¶ added in v0.10.0
func (ababr AppendBlobAppendBlockResponse) ClientRequestID() string
ClientRequestID returns the value for header x-ms-client-request-id.
func (AppendBlobAppendBlockResponse) ContentMD5 ¶
func (ababr AppendBlobAppendBlockResponse) ContentMD5() []byte
ContentMD5 returns the value for header Content-MD5.
func (AppendBlobAppendBlockResponse) Date ¶
func (ababr AppendBlobAppendBlockResponse) Date() time.Time
Date returns the value for header Date.
func (AppendBlobAppendBlockResponse) ETag ¶
func (ababr AppendBlobAppendBlockResponse) ETag() ETag
ETag returns the value for header ETag.
func (AppendBlobAppendBlockResponse) EncryptionKeySha256 ¶ added in v0.10.0
func (ababr AppendBlobAppendBlockResponse) EncryptionKeySha256() string
EncryptionKeySha256 returns the value for header x-ms-encryption-key-sha256.
func (AppendBlobAppendBlockResponse) EncryptionScope ¶ added in v0.11.0
func (ababr AppendBlobAppendBlockResponse) EncryptionScope() string
EncryptionScope returns the value for header x-ms-encryption-scope.
func (AppendBlobAppendBlockResponse) ErrorCode ¶
func (ababr AppendBlobAppendBlockResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (AppendBlobAppendBlockResponse) IsServerEncrypted ¶ added in v0.7.0
func (ababr AppendBlobAppendBlockResponse) IsServerEncrypted() string
IsServerEncrypted returns the value for header x-ms-request-server-encrypted.
func (AppendBlobAppendBlockResponse) LastModified ¶
func (ababr AppendBlobAppendBlockResponse) LastModified() time.Time
LastModified returns the value for header Last-Modified.
func (AppendBlobAppendBlockResponse) RequestID ¶
func (ababr AppendBlobAppendBlockResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (AppendBlobAppendBlockResponse) Response ¶
func (ababr AppendBlobAppendBlockResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (AppendBlobAppendBlockResponse) Status ¶
func (ababr AppendBlobAppendBlockResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (AppendBlobAppendBlockResponse) StatusCode ¶
func (ababr AppendBlobAppendBlockResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (AppendBlobAppendBlockResponse) Version ¶
func (ababr AppendBlobAppendBlockResponse) Version() string
Version returns the value for header x-ms-version.
func (AppendBlobAppendBlockResponse) XMsContentCrc64 ¶ added in v0.10.0
func (ababr AppendBlobAppendBlockResponse) XMsContentCrc64() []byte
XMsContentCrc64 returns the value for header x-ms-content-crc64.
type AppendBlobCreateResponse ¶
type AppendBlobCreateResponse struct {
// contains filtered or unexported fields
}
AppendBlobCreateResponse ...
func (AppendBlobCreateResponse) ClientRequestID ¶ added in v0.10.0
func (abcr AppendBlobCreateResponse) ClientRequestID() string
ClientRequestID returns the value for header x-ms-client-request-id.
func (AppendBlobCreateResponse) ContentMD5 ¶
func (abcr AppendBlobCreateResponse) ContentMD5() []byte
ContentMD5 returns the value for header Content-MD5.
func (AppendBlobCreateResponse) Date ¶
func (abcr AppendBlobCreateResponse) Date() time.Time
Date returns the value for header Date.
func (AppendBlobCreateResponse) ETag ¶
func (abcr AppendBlobCreateResponse) ETag() ETag
ETag returns the value for header ETag.
func (AppendBlobCreateResponse) EncryptionKeySha256 ¶ added in v0.10.0
func (abcr AppendBlobCreateResponse) EncryptionKeySha256() string
EncryptionKeySha256 returns the value for header x-ms-encryption-key-sha256.
func (AppendBlobCreateResponse) EncryptionScope ¶ added in v0.11.0
func (abcr AppendBlobCreateResponse) EncryptionScope() string
EncryptionScope returns the value for header x-ms-encryption-scope.
func (AppendBlobCreateResponse) ErrorCode ¶
func (abcr AppendBlobCreateResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (AppendBlobCreateResponse) IsServerEncrypted ¶
func (abcr AppendBlobCreateResponse) IsServerEncrypted() string
IsServerEncrypted returns the value for header x-ms-request-server-encrypted.
func (AppendBlobCreateResponse) LastModified ¶
func (abcr AppendBlobCreateResponse) LastModified() time.Time
LastModified returns the value for header Last-Modified.
func (AppendBlobCreateResponse) RequestID ¶
func (abcr AppendBlobCreateResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (AppendBlobCreateResponse) Response ¶
func (abcr AppendBlobCreateResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (AppendBlobCreateResponse) Status ¶
func (abcr AppendBlobCreateResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (AppendBlobCreateResponse) StatusCode ¶
func (abcr AppendBlobCreateResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (AppendBlobCreateResponse) Version ¶
func (abcr AppendBlobCreateResponse) Version() string
Version returns the value for header x-ms-version.
func (AppendBlobCreateResponse) VersionID ¶ added in v0.11.0
func (abcr AppendBlobCreateResponse) VersionID() string
VersionID returns the value for header x-ms-version-id.
type AppendBlobSealResponse ¶ added in v0.11.0
type AppendBlobSealResponse struct {
// contains filtered or unexported fields
}
AppendBlobSealResponse ...
func (AppendBlobSealResponse) ClientRequestID ¶ added in v0.11.0
func (absr AppendBlobSealResponse) ClientRequestID() string
ClientRequestID returns the value for header x-ms-client-request-id.
func (AppendBlobSealResponse) Date ¶ added in v0.11.0
func (absr AppendBlobSealResponse) Date() time.Time
Date returns the value for header Date.
func (AppendBlobSealResponse) ETag ¶ added in v0.11.0
func (absr AppendBlobSealResponse) ETag() ETag
ETag returns the value for header ETag.
func (AppendBlobSealResponse) ErrorCode ¶ added in v0.11.0
func (absr AppendBlobSealResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (AppendBlobSealResponse) IsSealed ¶ added in v0.11.0
func (absr AppendBlobSealResponse) IsSealed() string
IsSealed returns the value for header x-ms-blob-sealed.
func (AppendBlobSealResponse) LastModified ¶ added in v0.11.0
func (absr AppendBlobSealResponse) LastModified() time.Time
LastModified returns the value for header Last-Modified.
func (AppendBlobSealResponse) RequestID ¶ added in v0.11.0
func (absr AppendBlobSealResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (AppendBlobSealResponse) Response ¶ added in v0.11.0
func (absr AppendBlobSealResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (AppendBlobSealResponse) Status ¶ added in v0.11.0
func (absr AppendBlobSealResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (AppendBlobSealResponse) StatusCode ¶ added in v0.11.0
func (absr AppendBlobSealResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (AppendBlobSealResponse) Version ¶ added in v0.11.0
func (absr AppendBlobSealResponse) Version() string
Version returns the value for header x-ms-version.
type AppendBlobURL ¶
type AppendBlobURL struct { BlobURL // contains filtered or unexported fields }
AppendBlobURL defines a set of operations applicable to append blobs.
Example ¶
ExampleAppendBlobURL shows how to append data (in blocks) to an append blob. An append blob can have a maximum of 50,000 blocks; each block can have a maximum of 100MB. Therefore, the maximum size of an append blob is slightly more than 4.75 TB (100 MB X 50,000 blocks).
// From the Azure portal, get your Storage account blob service URL endpoint. accountName, accountKey := accountInfo() // Create a ContainerURL object that wraps a soon-to-be-created blob's URL and a default pipeline. u, _ := url.Parse(fmt.Sprintf("https://%s.blob.core.windows.net/mycontainer/MyAppendBlob.txt", accountName)) credential, err := NewSharedKeyCredential(accountName, accountKey) if err != nil { log.Fatal(err) } appendBlobURL := NewAppendBlobURL(*u, NewPipeline(credential, PipelineOptions{})) ctx := context.Background() // This example uses a never-expiring context _, err = appendBlobURL.Create(ctx, BlobHTTPHeaders{}, Metadata{}, BlobAccessConditions{}, nil, ClientProvidedKeyOptions{}, ImmutabilityPolicyOptions{}) if err != nil { log.Fatal(err) } for i := 0; i < 5; i++ { // Append 5 blocks to the append blob _, err := appendBlobURL.AppendBlock(ctx, strings.NewReader(fmt.Sprintf("Appending block #%d\n", i)), AppendBlobAccessConditions{}, nil, ClientProvidedKeyOptions{}) if err != nil { log.Fatal(err) } } // Download the entire append blob's contents and show it. get, err := appendBlobURL.Download(ctx, 0, 0, BlobAccessConditions{}, false, ClientProvidedKeyOptions{}) if err != nil { log.Fatal(err) } b := bytes.Buffer{} reader := get.Body(RetryReaderOptions{}) b.ReadFrom(reader) reader.Close() // The client must close the response body when finished with it fmt.Println(b.String())
Output:
func NewAppendBlobURL ¶
func NewAppendBlobURL(url url.URL, p pipeline.Pipeline) AppendBlobURL
NewAppendBlobURL creates an AppendBlobURL object using the specified URL and request policy pipeline.
func (AppendBlobURL) AppendBlock ¶
func (ab AppendBlobURL) AppendBlock(ctx context.Context, body io.ReadSeeker, ac AppendBlobAccessConditions, transactionalMD5 []byte, cpk ClientProvidedKeyOptions) (*AppendBlobAppendBlockResponse, error)
AppendBlock writes a stream to a new block of data to the end of the existing append blob. This method panics if the stream is not at position 0. Note that the http client closes the body stream after the request is sent to the service. For more information, see https://docs.microsoft.com/rest/api/storageservices/append-block.
func (AppendBlobURL) AppendBlockFromURL ¶
func (ab AppendBlobURL) AppendBlockFromURL(ctx context.Context, sourceURL url.URL, offset int64, count int64, destinationAccessConditions AppendBlobAccessConditions, sourceAccessConditions ModifiedAccessConditions, transactionalMD5 []byte, cpk ClientProvidedKeyOptions, sourceAuthorization TokenCredential) (*AppendBlobAppendBlockFromURLResponse, error)
AppendBlockFromURL copies a new block of data from source URL to the end of the existing append blob. For more information, see https://docs.microsoft.com/rest/api/storageservices/append-block-from-url.
func (AppendBlobURL) Create ¶
func (ab AppendBlobURL) Create(ctx context.Context, h BlobHTTPHeaders, metadata Metadata, ac BlobAccessConditions, blobTagsMap BlobTagsMap, cpk ClientProvidedKeyOptions, immutability ImmutabilityPolicyOptions) (*AppendBlobCreateResponse, error)
Create creates a 0-length append blob. Call AppendBlock to append data to an append blob. For more information, see https://docs.microsoft.com/rest/api/storageservices/put-blob.
func (AppendBlobURL) GetAccountInfo ¶ added in v0.9.0
func (ab AppendBlobURL) GetAccountInfo(ctx context.Context) (*BlobGetAccountInfoResponse, error)
func (AppendBlobURL) WithPipeline ¶
func (ab AppendBlobURL) WithPipeline(p pipeline.Pipeline) AppendBlobURL
WithPipeline creates a new AppendBlobURL object identical to the source but with the specific request policy pipeline.
func (AppendBlobURL) WithSnapshot ¶
func (ab AppendBlobURL) WithSnapshot(snapshot string) AppendBlobURL
WithSnapshot creates a new AppendBlobURL object identical to the source but with the specified snapshot timestamp. Pass "" to remove the snapshot returning a URL to the base blob.
func (AppendBlobURL) WithVersionID ¶ added in v0.11.0
func (ab AppendBlobURL) WithVersionID(versionId string) AppendBlobURL
WithVersionID creates a new AppendBlobURL object identical to the source but with the specified version id. Pass "" to remove the snapshot returning a URL to the base blob.
type AppendPositionAccessConditions ¶
type AppendPositionAccessConditions struct { // IfAppendPositionEqual ensures that the AppendBlock operation succeeds // only if the append position is equal to a value. // IfAppendPositionEqual=0 means no 'IfAppendPositionEqual' header specified. // IfAppendPositionEqual>0 means 'IfAppendPositionEqual' header specified with its value // IfAppendPositionEqual==-1 means IfAppendPositionEqual' header specified with a value of 0 IfAppendPositionEqual int64 // IfMaxSizeLessThanOrEqual ensures that the AppendBlock operation succeeds // only if the append blob's size is less than or equal to a value. // IfMaxSizeLessThanOrEqual=0 means no 'IfMaxSizeLessThanOrEqual' header specified. // IfMaxSizeLessThanOrEqual>0 means 'IfMaxSizeLessThanOrEqual' header specified with its value // IfMaxSizeLessThanOrEqual==-1 means 'IfMaxSizeLessThanOrEqual' header specified with a value of 0 IfMaxSizeLessThanOrEqual int64 }
AppendPositionAccessConditions identifies append blob-specific access conditions which you optionally set.
type ArchiveStatusType ¶
type ArchiveStatusType string
ArchiveStatusType enumerates the values for archive status type.
const ( // ArchiveStatusNone represents an empty ArchiveStatusType. ArchiveStatusNone ArchiveStatusType = "" // ArchiveStatusRehydratePendingToCool ... ArchiveStatusRehydratePendingToCool ArchiveStatusType = "rehydrate-pending-to-cool" // ArchiveStatusRehydratePendingToHot ... ArchiveStatusRehydratePendingToHot ArchiveStatusType = "rehydrate-pending-to-hot" )
func PossibleArchiveStatusTypeValues ¶
func PossibleArchiveStatusTypeValues() []ArchiveStatusType
PossibleArchiveStatusTypeValues returns an array of possible values for the ArchiveStatusType const type.
type ArrowConfiguration ¶ added in v0.14.0
type ArrowConfiguration struct {
Schema []ArrowField `xml:"Schema>Field"`
}
ArrowConfiguration - Groups the settings used for formatting the response if the response should be Arrow formatted.
type ArrowField ¶ added in v0.14.0
type ArrowField struct { // XMLName is used for marshalling and is subject to removal in a future release. XMLName xml.Name `xml:"Field"` Type string `xml:"Type"` Name *string `xml:"Name"` Precision *int32 `xml:"Precision"` Scale *int32 `xml:"Scale"` }
ArrowField - Groups settings regarding specific field of an arrow schema
type BatchTransferOptions ¶ added in v0.8.0
type BatchTransferOptions struct { TransferSize int64 ChunkSize int64 Parallelism uint16 Operation func(offset int64, chunkSize int64, ctx context.Context) error OperationName string }
BatchTransferOptions identifies options used by DoBatchTransfer.
type BlobAbortCopyFromURLResponse ¶
type BlobAbortCopyFromURLResponse struct {
// contains filtered or unexported fields
}
BlobAbortCopyFromURLResponse ...
func (BlobAbortCopyFromURLResponse) ClientRequestID ¶ added in v0.10.0
func (bacfur BlobAbortCopyFromURLResponse) ClientRequestID() string
ClientRequestID returns the value for header x-ms-client-request-id.
func (BlobAbortCopyFromURLResponse) Date ¶
func (bacfur BlobAbortCopyFromURLResponse) Date() time.Time
Date returns the value for header Date.
func (BlobAbortCopyFromURLResponse) ErrorCode ¶
func (bacfur BlobAbortCopyFromURLResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (BlobAbortCopyFromURLResponse) RequestID ¶
func (bacfur BlobAbortCopyFromURLResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (BlobAbortCopyFromURLResponse) Response ¶
func (bacfur BlobAbortCopyFromURLResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (BlobAbortCopyFromURLResponse) Status ¶
func (bacfur BlobAbortCopyFromURLResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (BlobAbortCopyFromURLResponse) StatusCode ¶
func (bacfur BlobAbortCopyFromURLResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (BlobAbortCopyFromURLResponse) Version ¶
func (bacfur BlobAbortCopyFromURLResponse) Version() string
Version returns the value for header x-ms-version.
type BlobAccessConditions ¶
type BlobAccessConditions struct { ModifiedAccessConditions LeaseAccessConditions }
BlobAccessConditions identifies blob-specific access conditions which you optionally set.
Example ¶
This example shows how to perform operations on blob conditionally.
// From the Azure portal, get your Storage account's name and account key. accountName, accountKey := accountInfo() // Create a BlockBlobURL object that wraps a blob's URL and a default pipeline. u, _ := url.Parse(fmt.Sprintf("https://%s.blob.core.windows.net/mycontainer/Data.txt", accountName)) credential, err := NewSharedKeyCredential(accountName, accountKey) if err != nil { log.Fatal(err) } blobURL := NewBlockBlobURL(*u, NewPipeline(credential, PipelineOptions{})) ctx := context.Background() // This example uses a never-expiring context // This helper function displays the results of an operation; it is called frequently below. showResult := func(response pipeline.Response, err error) { if err != nil { if stgErr, ok := err.(StorageError); !ok { log.Fatal(err) // Network failure } else { fmt.Print("Failure: " + stgErr.Response().Status + "\n") } } else { if get, ok := response.(*DownloadResponse); ok { get.Body(RetryReaderOptions{}).Close() // The client must close the response body when finished with it } fmt.Print("Success: " + response.Response().Status + "\n") } } // Create the blob (unconditionally; succeeds) upload, err := blobURL.Upload(ctx, strings.NewReader("Text-1"), BlobHTTPHeaders{}, Metadata{}, BlobAccessConditions{}, DefaultAccessTier, nil, ClientProvidedKeyOptions{}, ImmutabilityPolicyOptions{}) showResult(upload, err) // Download blob content if the blob has been modified since we uploaded it (fails): showResult(blobURL.Download(ctx, 0, 0, BlobAccessConditions{ModifiedAccessConditions: ModifiedAccessConditions{IfModifiedSince: upload.LastModified()}}, false, ClientProvidedKeyOptions{})) // Download blob content if the blob hasn't been modified in the last 24 hours (fails): showResult(blobURL.Download(ctx, 0, 0, BlobAccessConditions{ModifiedAccessConditions: ModifiedAccessConditions{IfUnmodifiedSince: time.Now().UTC().Add(time.Hour * -24)}}, false, ClientProvidedKeyOptions{})) // Upload new content if the blob hasn't changed since the version identified by ETag (succeeds): upload, err = blobURL.Upload(ctx, strings.NewReader("Text-2"), BlobHTTPHeaders{}, Metadata{}, BlobAccessConditions{ModifiedAccessConditions: ModifiedAccessConditions{IfMatch: upload.ETag()}}, DefaultAccessTier, nil, ClientProvidedKeyOptions{}, ImmutabilityPolicyOptions{}) showResult(upload, err) // Download content if it has changed since the version identified by ETag (fails): showResult(blobURL.Download(ctx, 0, 0, BlobAccessConditions{ModifiedAccessConditions: ModifiedAccessConditions{IfNoneMatch: upload.ETag()}}, false, ClientProvidedKeyOptions{})) // Upload content if the blob doesn't already exist (fails): showResult(blobURL.Upload(ctx, strings.NewReader("Text-3"), BlobHTTPHeaders{}, Metadata{}, BlobAccessConditions{ModifiedAccessConditions: ModifiedAccessConditions{IfNoneMatch: ETagAny}}, DefaultAccessTier, nil, ClientProvidedKeyOptions{}, ImmutabilityPolicyOptions{}))
Output:
type BlobAcquireLeaseResponse ¶
type BlobAcquireLeaseResponse struct {
// contains filtered or unexported fields
}
BlobAcquireLeaseResponse ...
func (BlobAcquireLeaseResponse) ClientRequestID ¶ added in v0.10.0
func (balr BlobAcquireLeaseResponse) ClientRequestID() string
ClientRequestID returns the value for header x-ms-client-request-id.
func (BlobAcquireLeaseResponse) Date ¶
func (balr BlobAcquireLeaseResponse) Date() time.Time
Date returns the value for header Date.
func (BlobAcquireLeaseResponse) ETag ¶
func (balr BlobAcquireLeaseResponse) ETag() ETag
ETag returns the value for header ETag.
func (BlobAcquireLeaseResponse) ErrorCode ¶
func (balr BlobAcquireLeaseResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (BlobAcquireLeaseResponse) LastModified ¶
func (balr BlobAcquireLeaseResponse) LastModified() time.Time
LastModified returns the value for header Last-Modified.
func (BlobAcquireLeaseResponse) LeaseID ¶
func (balr BlobAcquireLeaseResponse) LeaseID() string
LeaseID returns the value for header x-ms-lease-id.
func (BlobAcquireLeaseResponse) RequestID ¶
func (balr BlobAcquireLeaseResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (BlobAcquireLeaseResponse) Response ¶
func (balr BlobAcquireLeaseResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (BlobAcquireLeaseResponse) Status ¶
func (balr BlobAcquireLeaseResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (BlobAcquireLeaseResponse) StatusCode ¶
func (balr BlobAcquireLeaseResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (BlobAcquireLeaseResponse) Version ¶
func (balr BlobAcquireLeaseResponse) Version() string
Version returns the value for header x-ms-version.
type BlobBreakLeaseResponse ¶
type BlobBreakLeaseResponse struct {
// contains filtered or unexported fields
}
BlobBreakLeaseResponse ...
func (BlobBreakLeaseResponse) ClientRequestID ¶ added in v0.10.0
func (bblr BlobBreakLeaseResponse) ClientRequestID() string
ClientRequestID returns the value for header x-ms-client-request-id.
func (BlobBreakLeaseResponse) Date ¶
func (bblr BlobBreakLeaseResponse) Date() time.Time
Date returns the value for header Date.
func (BlobBreakLeaseResponse) ETag ¶
func (bblr BlobBreakLeaseResponse) ETag() ETag
ETag returns the value for header ETag.
func (BlobBreakLeaseResponse) ErrorCode ¶
func (bblr BlobBreakLeaseResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (BlobBreakLeaseResponse) LastModified ¶
func (bblr BlobBreakLeaseResponse) LastModified() time.Time
LastModified returns the value for header Last-Modified.
func (BlobBreakLeaseResponse) LeaseTime ¶
func (bblr BlobBreakLeaseResponse) LeaseTime() int32
LeaseTime returns the value for header x-ms-lease-time.
func (BlobBreakLeaseResponse) RequestID ¶
func (bblr BlobBreakLeaseResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (BlobBreakLeaseResponse) Response ¶
func (bblr BlobBreakLeaseResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (BlobBreakLeaseResponse) Status ¶
func (bblr BlobBreakLeaseResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (BlobBreakLeaseResponse) StatusCode ¶
func (bblr BlobBreakLeaseResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (BlobBreakLeaseResponse) Version ¶
func (bblr BlobBreakLeaseResponse) Version() string
Version returns the value for header x-ms-version.
type BlobChangeLeaseResponse ¶
type BlobChangeLeaseResponse struct {
// contains filtered or unexported fields
}
BlobChangeLeaseResponse ...
func (BlobChangeLeaseResponse) ClientRequestID ¶ added in v0.10.0
func (bclr BlobChangeLeaseResponse) ClientRequestID() string
ClientRequestID returns the value for header x-ms-client-request-id.
func (BlobChangeLeaseResponse) Date ¶
func (bclr BlobChangeLeaseResponse) Date() time.Time
Date returns the value for header Date.
func (BlobChangeLeaseResponse) ETag ¶
func (bclr BlobChangeLeaseResponse) ETag() ETag
ETag returns the value for header ETag.
func (BlobChangeLeaseResponse) ErrorCode ¶
func (bclr BlobChangeLeaseResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (BlobChangeLeaseResponse) LastModified ¶
func (bclr BlobChangeLeaseResponse) LastModified() time.Time
LastModified returns the value for header Last-Modified.
func (BlobChangeLeaseResponse) LeaseID ¶
func (bclr BlobChangeLeaseResponse) LeaseID() string
LeaseID returns the value for header x-ms-lease-id.
func (BlobChangeLeaseResponse) RequestID ¶
func (bclr BlobChangeLeaseResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (BlobChangeLeaseResponse) Response ¶
func (bclr BlobChangeLeaseResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (BlobChangeLeaseResponse) Status ¶
func (bclr BlobChangeLeaseResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (BlobChangeLeaseResponse) StatusCode ¶
func (bclr BlobChangeLeaseResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (BlobChangeLeaseResponse) Version ¶
func (bclr BlobChangeLeaseResponse) Version() string
Version returns the value for header x-ms-version.
type BlobCopyFromURLResponse ¶ added in v0.7.0
type BlobCopyFromURLResponse struct {
// contains filtered or unexported fields
}
BlobCopyFromURLResponse ...
func (BlobCopyFromURLResponse) ClientRequestID ¶ added in v0.10.0
func (bcfur BlobCopyFromURLResponse) ClientRequestID() string
ClientRequestID returns the value for header x-ms-client-request-id.
func (BlobCopyFromURLResponse) ContentMD5 ¶ added in v0.10.0
func (bcfur BlobCopyFromURLResponse) ContentMD5() []byte
ContentMD5 returns the value for header Content-MD5.
func (BlobCopyFromURLResponse) CopyID ¶ added in v0.7.0
func (bcfur BlobCopyFromURLResponse) CopyID() string
CopyID returns the value for header x-ms-copy-id.
func (BlobCopyFromURLResponse) CopyStatus ¶ added in v0.7.0
func (bcfur BlobCopyFromURLResponse) CopyStatus() SyncCopyStatusType
CopyStatus returns the value for header x-ms-copy-status.
func (BlobCopyFromURLResponse) Date ¶ added in v0.7.0
func (bcfur BlobCopyFromURLResponse) Date() time.Time
Date returns the value for header Date.
func (BlobCopyFromURLResponse) ETag ¶ added in v0.7.0
func (bcfur BlobCopyFromURLResponse) ETag() ETag
ETag returns the value for header ETag.
func (BlobCopyFromURLResponse) ErrorCode ¶ added in v0.7.0
func (bcfur BlobCopyFromURLResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (BlobCopyFromURLResponse) LastModified ¶ added in v0.7.0
func (bcfur BlobCopyFromURLResponse) LastModified() time.Time
LastModified returns the value for header Last-Modified.
func (BlobCopyFromURLResponse) RequestID ¶ added in v0.7.0
func (bcfur BlobCopyFromURLResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (BlobCopyFromURLResponse) Response ¶ added in v0.7.0
func (bcfur BlobCopyFromURLResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (BlobCopyFromURLResponse) Status ¶ added in v0.7.0
func (bcfur BlobCopyFromURLResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (BlobCopyFromURLResponse) StatusCode ¶ added in v0.7.0
func (bcfur BlobCopyFromURLResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (BlobCopyFromURLResponse) Version ¶ added in v0.7.0
func (bcfur BlobCopyFromURLResponse) Version() string
Version returns the value for header x-ms-version.
func (BlobCopyFromURLResponse) VersionID ¶ added in v0.11.0
func (bcfur BlobCopyFromURLResponse) VersionID() string
VersionID returns the value for header x-ms-version-id.
func (BlobCopyFromURLResponse) XMsContentCrc64 ¶ added in v0.10.0
func (bcfur BlobCopyFromURLResponse) XMsContentCrc64() []byte
XMsContentCrc64 returns the value for header x-ms-content-crc64.
type BlobCreateSnapshotResponse ¶
type BlobCreateSnapshotResponse struct {
// contains filtered or unexported fields
}
BlobCreateSnapshotResponse ...
func (BlobCreateSnapshotResponse) ClientRequestID ¶ added in v0.10.0
func (bcsr BlobCreateSnapshotResponse) ClientRequestID() string
ClientRequestID returns the value for header x-ms-client-request-id.
func (BlobCreateSnapshotResponse) Date ¶
func (bcsr BlobCreateSnapshotResponse) Date() time.Time
Date returns the value for header Date.
func (BlobCreateSnapshotResponse) ETag ¶
func (bcsr BlobCreateSnapshotResponse) ETag() ETag
ETag returns the value for header ETag.
func (BlobCreateSnapshotResponse) ErrorCode ¶
func (bcsr BlobCreateSnapshotResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (BlobCreateSnapshotResponse) IsServerEncrypted ¶ added in v0.10.0
func (bcsr BlobCreateSnapshotResponse) IsServerEncrypted() string
IsServerEncrypted returns the value for header x-ms-request-server-encrypted.
func (BlobCreateSnapshotResponse) LastModified ¶
func (bcsr BlobCreateSnapshotResponse) LastModified() time.Time
LastModified returns the value for header Last-Modified.
func (BlobCreateSnapshotResponse) RequestID ¶
func (bcsr BlobCreateSnapshotResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (BlobCreateSnapshotResponse) Response ¶
func (bcsr BlobCreateSnapshotResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (BlobCreateSnapshotResponse) Snapshot ¶
func (bcsr BlobCreateSnapshotResponse) Snapshot() string
Snapshot returns the value for header x-ms-snapshot.
func (BlobCreateSnapshotResponse) Status ¶
func (bcsr BlobCreateSnapshotResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (BlobCreateSnapshotResponse) StatusCode ¶
func (bcsr BlobCreateSnapshotResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (BlobCreateSnapshotResponse) Version ¶
func (bcsr BlobCreateSnapshotResponse) Version() string
Version returns the value for header x-ms-version.
func (BlobCreateSnapshotResponse) VersionID ¶ added in v0.11.0
func (bcsr BlobCreateSnapshotResponse) VersionID() string
VersionID returns the value for header x-ms-version-id.
type BlobDeleteImmutabilityPolicyResponse ¶ added in v0.15.0
type BlobDeleteImmutabilityPolicyResponse struct {
// contains filtered or unexported fields
}
BlobDeleteImmutabilityPolicyResponse ...
func (BlobDeleteImmutabilityPolicyResponse) ClientRequestID ¶ added in v0.15.0
func (bdipr BlobDeleteImmutabilityPolicyResponse) ClientRequestID() string
ClientRequestID returns the value for header x-ms-client-request-id.
func (BlobDeleteImmutabilityPolicyResponse) Date ¶ added in v0.15.0
func (bdipr BlobDeleteImmutabilityPolicyResponse) Date() time.Time
Date returns the value for header Date.
func (BlobDeleteImmutabilityPolicyResponse) ErrorCode ¶ added in v0.15.0
func (bdipr BlobDeleteImmutabilityPolicyResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (BlobDeleteImmutabilityPolicyResponse) RequestID ¶ added in v0.15.0
func (bdipr BlobDeleteImmutabilityPolicyResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (BlobDeleteImmutabilityPolicyResponse) Response ¶ added in v0.15.0
func (bdipr BlobDeleteImmutabilityPolicyResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (BlobDeleteImmutabilityPolicyResponse) Status ¶ added in v0.15.0
func (bdipr BlobDeleteImmutabilityPolicyResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (BlobDeleteImmutabilityPolicyResponse) StatusCode ¶ added in v0.15.0
func (bdipr BlobDeleteImmutabilityPolicyResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (BlobDeleteImmutabilityPolicyResponse) Version ¶ added in v0.15.0
func (bdipr BlobDeleteImmutabilityPolicyResponse) Version() string
Version returns the value for header x-ms-version.
type BlobDeleteResponse ¶
type BlobDeleteResponse struct {
// contains filtered or unexported fields
}
BlobDeleteResponse ...
func (BlobDeleteResponse) ClientRequestID ¶ added in v0.10.0
func (bdr BlobDeleteResponse) ClientRequestID() string
ClientRequestID returns the value for header x-ms-client-request-id.
func (BlobDeleteResponse) Date ¶
func (bdr BlobDeleteResponse) Date() time.Time
Date returns the value for header Date.
func (BlobDeleteResponse) ErrorCode ¶
func (bdr BlobDeleteResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (BlobDeleteResponse) RequestID ¶
func (bdr BlobDeleteResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (BlobDeleteResponse) Response ¶
func (bdr BlobDeleteResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (BlobDeleteResponse) Status ¶
func (bdr BlobDeleteResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (BlobDeleteResponse) StatusCode ¶
func (bdr BlobDeleteResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (BlobDeleteResponse) Version ¶
func (bdr BlobDeleteResponse) Version() string
Version returns the value for header x-ms-version.
type BlobDeleteType ¶ added in v0.14.0
type BlobDeleteType string
BlobDeleteType enumerates the values for blob delete type.
const ( // BlobDeleteNone represents an empty BlobDeleteType. BlobDeleteNone BlobDeleteType = "" // BlobDeletePermanent ... BlobDeletePermanent BlobDeleteType = "Permanent" )
func PossibleBlobDeleteTypeValues ¶ added in v0.14.0
func PossibleBlobDeleteTypeValues() []BlobDeleteType
PossibleBlobDeleteTypeValues returns an array of possible values for the BlobDeleteType const type.
type BlobExpiryOptionsType ¶ added in v0.11.0
type BlobExpiryOptionsType string
BlobExpiryOptionsType enumerates the values for blob expiry options type.
const ( // BlobExpiryOptionsAbsolute ... BlobExpiryOptionsAbsolute BlobExpiryOptionsType = "Absolute" // BlobExpiryOptionsNeverExpire ... BlobExpiryOptionsNeverExpire BlobExpiryOptionsType = "NeverExpire" // BlobExpiryOptionsNone represents an empty BlobExpiryOptionsType. BlobExpiryOptionsNone BlobExpiryOptionsType = "" // BlobExpiryOptionsRelativeToCreation ... BlobExpiryOptionsRelativeToCreation BlobExpiryOptionsType = "RelativeToCreation" // BlobExpiryOptionsRelativeToNow ... BlobExpiryOptionsRelativeToNow BlobExpiryOptionsType = "RelativeToNow" )
func PossibleBlobExpiryOptionsTypeValues ¶ added in v0.11.0
func PossibleBlobExpiryOptionsTypeValues() []BlobExpiryOptionsType
PossibleBlobExpiryOptionsTypeValues returns an array of possible values for the BlobExpiryOptionsType const type.
type BlobFlatListSegment ¶
type BlobFlatListSegment struct { // XMLName is used for marshalling and is subject to removal in a future release. XMLName xml.Name `xml:"Blobs"` BlobItems []BlobItemInternal `xml:"Blob"` }
BlobFlatListSegment ...
type BlobGetAccountInfoResponse ¶
type BlobGetAccountInfoResponse struct {
// contains filtered or unexported fields
}
BlobGetAccountInfoResponse ...
func (BlobGetAccountInfoResponse) AccountKind ¶
func (bgair BlobGetAccountInfoResponse) AccountKind() AccountKindType
AccountKind returns the value for header x-ms-account-kind.
func (BlobGetAccountInfoResponse) ClientRequestID ¶ added in v0.10.0
func (bgair BlobGetAccountInfoResponse) ClientRequestID() string
ClientRequestID returns the value for header x-ms-client-request-id.
func (BlobGetAccountInfoResponse) Date ¶
func (bgair BlobGetAccountInfoResponse) Date() time.Time
Date returns the value for header Date.
func (BlobGetAccountInfoResponse) ErrorCode ¶
func (bgair BlobGetAccountInfoResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (BlobGetAccountInfoResponse) RequestID ¶
func (bgair BlobGetAccountInfoResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (BlobGetAccountInfoResponse) Response ¶
func (bgair BlobGetAccountInfoResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (BlobGetAccountInfoResponse) SkuName ¶
func (bgair BlobGetAccountInfoResponse) SkuName() SkuNameType
SkuName returns the value for header x-ms-sku-name.
func (BlobGetAccountInfoResponse) Status ¶
func (bgair BlobGetAccountInfoResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (BlobGetAccountInfoResponse) StatusCode ¶
func (bgair BlobGetAccountInfoResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (BlobGetAccountInfoResponse) Version ¶
func (bgair BlobGetAccountInfoResponse) Version() string
Version returns the value for header x-ms-version.
type BlobGetPropertiesResponse ¶
type BlobGetPropertiesResponse struct {
// contains filtered or unexported fields
}
BlobGetPropertiesResponse ...
func (BlobGetPropertiesResponse) AcceptRanges ¶
func (bgpr BlobGetPropertiesResponse) AcceptRanges() string
AcceptRanges returns the value for header Accept-Ranges.
func (BlobGetPropertiesResponse) AccessTier ¶
func (bgpr BlobGetPropertiesResponse) AccessTier() string
AccessTier returns the value for header x-ms-access-tier.
func (BlobGetPropertiesResponse) AccessTierChangeTime ¶
func (bgpr BlobGetPropertiesResponse) AccessTierChangeTime() time.Time
AccessTierChangeTime returns the value for header x-ms-access-tier-change-time.
func (BlobGetPropertiesResponse) AccessTierInferred ¶
func (bgpr BlobGetPropertiesResponse) AccessTierInferred() string
AccessTierInferred returns the value for header x-ms-access-tier-inferred.
func (BlobGetPropertiesResponse) ArchiveStatus ¶
func (bgpr BlobGetPropertiesResponse) ArchiveStatus() string
ArchiveStatus returns the value for header x-ms-archive-status.
func (BlobGetPropertiesResponse) BlobCommittedBlockCount ¶
func (bgpr BlobGetPropertiesResponse) BlobCommittedBlockCount() int32
BlobCommittedBlockCount returns the value for header x-ms-blob-committed-block-count.
func (BlobGetPropertiesResponse) BlobSequenceNumber ¶
func (bgpr BlobGetPropertiesResponse) BlobSequenceNumber() int64
BlobSequenceNumber returns the value for header x-ms-blob-sequence-number.
func (BlobGetPropertiesResponse) BlobType ¶
func (bgpr BlobGetPropertiesResponse) BlobType() BlobType
BlobType returns the value for header x-ms-blob-type.
func (BlobGetPropertiesResponse) CacheControl ¶
func (bgpr BlobGetPropertiesResponse) CacheControl() string
CacheControl returns the value for header Cache-Control.
func (BlobGetPropertiesResponse) ClientRequestID ¶ added in v0.10.0
func (bgpr BlobGetPropertiesResponse) ClientRequestID() string
ClientRequestID returns the value for header x-ms-client-request-id.
func (BlobGetPropertiesResponse) ContentDisposition ¶
func (bgpr BlobGetPropertiesResponse) ContentDisposition() string
ContentDisposition returns the value for header Content-Disposition.
func (BlobGetPropertiesResponse) ContentEncoding ¶
func (bgpr BlobGetPropertiesResponse) ContentEncoding() string
ContentEncoding returns the value for header Content-Encoding.
func (BlobGetPropertiesResponse) ContentLanguage ¶
func (bgpr BlobGetPropertiesResponse) ContentLanguage() string
ContentLanguage returns the value for header Content-Language.
func (BlobGetPropertiesResponse) ContentLength ¶
func (bgpr BlobGetPropertiesResponse) ContentLength() int64
ContentLength returns the value for header Content-Length.
func (BlobGetPropertiesResponse) ContentMD5 ¶
func (bgpr BlobGetPropertiesResponse) ContentMD5() []byte
ContentMD5 returns the value for header Content-MD5.
func (BlobGetPropertiesResponse) ContentType ¶
func (bgpr BlobGetPropertiesResponse) ContentType() string
ContentType returns the value for header Content-Type.
func (BlobGetPropertiesResponse) CopyCompletionTime ¶
func (bgpr BlobGetPropertiesResponse) CopyCompletionTime() time.Time
CopyCompletionTime returns the value for header x-ms-copy-completion-time.
func (BlobGetPropertiesResponse) CopyID ¶
func (bgpr BlobGetPropertiesResponse) CopyID() string
CopyID returns the value for header x-ms-copy-id.
func (BlobGetPropertiesResponse) CopyProgress ¶
func (bgpr BlobGetPropertiesResponse) CopyProgress() string
CopyProgress returns the value for header x-ms-copy-progress.
func (BlobGetPropertiesResponse) CopySource ¶
func (bgpr BlobGetPropertiesResponse) CopySource() string
CopySource returns the value for header x-ms-copy-source.
func (BlobGetPropertiesResponse) CopyStatus ¶
func (bgpr BlobGetPropertiesResponse) CopyStatus() CopyStatusType
CopyStatus returns the value for header x-ms-copy-status.
func (BlobGetPropertiesResponse) CopyStatusDescription ¶
func (bgpr BlobGetPropertiesResponse) CopyStatusDescription() string
CopyStatusDescription returns the value for header x-ms-copy-status-description.
func (BlobGetPropertiesResponse) CreationTime ¶
func (bgpr BlobGetPropertiesResponse) CreationTime() time.Time
CreationTime returns the value for header x-ms-creation-time.
func (BlobGetPropertiesResponse) Date ¶
func (bgpr BlobGetPropertiesResponse) Date() time.Time
Date returns the value for header Date.
func (BlobGetPropertiesResponse) DestinationSnapshot ¶
func (bgpr BlobGetPropertiesResponse) DestinationSnapshot() string
DestinationSnapshot returns the value for header x-ms-copy-destination-snapshot.
func (BlobGetPropertiesResponse) ETag ¶
func (bgpr BlobGetPropertiesResponse) ETag() ETag
ETag returns the value for header ETag.
func (BlobGetPropertiesResponse) EncryptionKeySha256 ¶ added in v0.10.0
func (bgpr BlobGetPropertiesResponse) EncryptionKeySha256() string
EncryptionKeySha256 returns the value for header x-ms-encryption-key-sha256.
func (BlobGetPropertiesResponse) EncryptionScope ¶ added in v0.11.0
func (bgpr BlobGetPropertiesResponse) EncryptionScope() string
EncryptionScope returns the value for header x-ms-encryption-scope.
func (BlobGetPropertiesResponse) ErrorCode ¶
func (bgpr BlobGetPropertiesResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (BlobGetPropertiesResponse) ExpiresOn ¶ added in v0.11.0
func (bgpr BlobGetPropertiesResponse) ExpiresOn() time.Time
ExpiresOn returns the value for header x-ms-expiry-time.
func (BlobGetPropertiesResponse) ImmutabilityPolicyExpiresOn ¶ added in v0.15.0
func (bgpr BlobGetPropertiesResponse) ImmutabilityPolicyExpiresOn() time.Time
ImmutabilityPolicyExpiresOn returns the value for header x-ms-immutability-policy-until-date.
func (BlobGetPropertiesResponse) ImmutabilityPolicyMode ¶ added in v0.15.0
func (bgpr BlobGetPropertiesResponse) ImmutabilityPolicyMode() BlobImmutabilityPolicyModeType
ImmutabilityPolicyMode returns the value for header x-ms-immutability-policy-mode.
func (BlobGetPropertiesResponse) IsCurrentVersion ¶ added in v0.11.0
func (bgpr BlobGetPropertiesResponse) IsCurrentVersion() string
IsCurrentVersion returns the value for header x-ms-is-current-version.
func (BlobGetPropertiesResponse) IsIncrementalCopy ¶
func (bgpr BlobGetPropertiesResponse) IsIncrementalCopy() string
IsIncrementalCopy returns the value for header x-ms-incremental-copy.
func (BlobGetPropertiesResponse) IsSealed ¶ added in v0.11.0
func (bgpr BlobGetPropertiesResponse) IsSealed() string
IsSealed returns the value for header x-ms-blob-sealed.
func (BlobGetPropertiesResponse) IsServerEncrypted ¶
func (bgpr BlobGetPropertiesResponse) IsServerEncrypted() string
IsServerEncrypted returns the value for header x-ms-server-encrypted.
func (BlobGetPropertiesResponse) LastAccessed ¶ added in v0.14.0
func (bgpr BlobGetPropertiesResponse) LastAccessed() time.Time
LastAccessed returns the value for header x-ms-last-access-time.
func (BlobGetPropertiesResponse) LastModified ¶
func (bgpr BlobGetPropertiesResponse) LastModified() time.Time
LastModified returns the value for header Last-Modified.
func (BlobGetPropertiesResponse) LeaseDuration ¶
func (bgpr BlobGetPropertiesResponse) LeaseDuration() LeaseDurationType
LeaseDuration returns the value for header x-ms-lease-duration.
func (BlobGetPropertiesResponse) LeaseState ¶
func (bgpr BlobGetPropertiesResponse) LeaseState() LeaseStateType
LeaseState returns the value for header x-ms-lease-state.
func (BlobGetPropertiesResponse) LeaseStatus ¶
func (bgpr BlobGetPropertiesResponse) LeaseStatus() LeaseStatusType
LeaseStatus returns the value for header x-ms-lease-status.
func (BlobGetPropertiesResponse) LegalHold ¶ added in v0.15.0
func (bgpr BlobGetPropertiesResponse) LegalHold() string
LegalHold returns the value for header x-ms-legal-hold.
func (BlobGetPropertiesResponse) NewHTTPHeaders ¶
func (bgpr BlobGetPropertiesResponse) NewHTTPHeaders() BlobHTTPHeaders
NewHTTPHeaders returns the user-modifiable properties for this blob.
func (BlobGetPropertiesResponse) NewMetadata ¶
func (bgpr BlobGetPropertiesResponse) NewMetadata() Metadata
NewMetadata returns user-defined key/value pairs.
func (BlobGetPropertiesResponse) ObjectReplicationPolicyID ¶ added in v0.11.0
func (bgpr BlobGetPropertiesResponse) ObjectReplicationPolicyID() string
ObjectReplicationPolicyID returns the value for header x-ms-or-policy-id.
func (BlobGetPropertiesResponse) ObjectReplicationRules ¶ added in v0.11.0
func (bgpr BlobGetPropertiesResponse) ObjectReplicationRules() string
ObjectReplicationRules returns the value for header x-ms-or.
func (BlobGetPropertiesResponse) RehydratePriority ¶ added in v0.11.0
func (bgpr BlobGetPropertiesResponse) RehydratePriority() string
RehydratePriority returns the value for header x-ms-rehydrate-priority.
func (BlobGetPropertiesResponse) RequestID ¶
func (bgpr BlobGetPropertiesResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (BlobGetPropertiesResponse) Response ¶
func (bgpr BlobGetPropertiesResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (BlobGetPropertiesResponse) Status ¶
func (bgpr BlobGetPropertiesResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (BlobGetPropertiesResponse) StatusCode ¶
func (bgpr BlobGetPropertiesResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (BlobGetPropertiesResponse) TagCount ¶ added in v0.11.0
func (bgpr BlobGetPropertiesResponse) TagCount() int64
TagCount returns the value for header x-ms-tag-count.
func (BlobGetPropertiesResponse) Version ¶
func (bgpr BlobGetPropertiesResponse) Version() string
Version returns the value for header x-ms-version.
func (BlobGetPropertiesResponse) VersionID ¶ added in v0.11.0
func (bgpr BlobGetPropertiesResponse) VersionID() string
VersionID returns the value for header x-ms-version-id.
type BlobHTTPHeaders ¶
type BlobHTTPHeaders struct { ContentType string ContentMD5 []byte ContentEncoding string ContentLanguage string ContentDisposition string CacheControl string }
BlobHTTPHeaders contains read/writeable blob properties.
Example ¶
This examples shows how to create a blob with HTTP Headers and then how to read & update the blob's HTTP headers.
// From the Azure portal, get your Storage account blob service URL endpoint. accountName, accountKey := accountInfo() // Create a ContainerURL object that wraps a soon-to-be-created blob's URL and a default pipeline. u, _ := url.Parse(fmt.Sprintf("https://%s.blob.core.windows.net/mycontainer/ReadMe.txt", accountName)) credential, err := NewSharedKeyCredential(accountName, accountKey) if err != nil { log.Fatal(err) } blobURL := NewBlockBlobURL(*u, NewPipeline(credential, PipelineOptions{})) ctx := context.Background() // This example uses a never-expiring context // Create a blob with HTTP headers _, err = blobURL.Upload(ctx, strings.NewReader("Some text"), BlobHTTPHeaders{ ContentType: "text/html; charset=utf-8", ContentDisposition: "attachment", }, Metadata{}, BlobAccessConditions{}, DefaultAccessTier, nil, ClientProvidedKeyOptions{}, ImmutabilityPolicyOptions{}) if err != nil { log.Fatal(err) } // GetMetadata returns the blob's properties, HTTP headers, and metadata get, err := blobURL.GetProperties(ctx, BlobAccessConditions{}, ClientProvidedKeyOptions{}) if err != nil { log.Fatal(err) } // Show some of the blob's read-only properties fmt.Println(get.BlobType(), get.ETag(), get.LastModified()) // Shows some of the blob's HTTP Headers httpHeaders := get.NewHTTPHeaders() fmt.Println(httpHeaders.ContentType, httpHeaders.ContentDisposition) // Update the blob's HTTP Headers and write them back to the blob httpHeaders.ContentType = "text/plain" _, err = blobURL.SetHTTPHeaders(ctx, httpHeaders, BlobAccessConditions{}) if err != nil { log.Fatal(err) } // NOTE: The SetMetadata method updates the blob's ETag & LastModified properties
Output:
type BlobHierarchyListSegment ¶
type BlobHierarchyListSegment struct { // XMLName is used for marshalling and is subject to removal in a future release. XMLName xml.Name `xml:"Blobs"` BlobPrefixes []BlobPrefix `xml:"BlobPrefix"` BlobItems []BlobItemInternal `xml:"Blob"` }
BlobHierarchyListSegment ...
type BlobImmutabilityPolicyModeType ¶ added in v0.15.0
type BlobImmutabilityPolicyModeType string
BlobImmutabilityPolicyModeType enumerates the values for blob immutability policy mode type.
const ( // BlobImmutabilityPolicyModeLocked ... BlobImmutabilityPolicyModeLocked BlobImmutabilityPolicyModeType = "locked" // BlobImmutabilityPolicyModeMutable ... BlobImmutabilityPolicyModeMutable BlobImmutabilityPolicyModeType = "mutable" // BlobImmutabilityPolicyModeNone represents an empty BlobImmutabilityPolicyModeType. BlobImmutabilityPolicyModeNone BlobImmutabilityPolicyModeType = "" // BlobImmutabilityPolicyModeUnlocked ... BlobImmutabilityPolicyModeUnlocked BlobImmutabilityPolicyModeType = "unlocked" )
func PossibleBlobImmutabilityPolicyModeTypeValues ¶ added in v0.15.0
func PossibleBlobImmutabilityPolicyModeTypeValues() []BlobImmutabilityPolicyModeType
PossibleBlobImmutabilityPolicyModeTypeValues returns an array of possible values for the BlobImmutabilityPolicyModeType const type.
type BlobItemInternal ¶ added in v0.11.0
type BlobItemInternal struct { // XMLName is used for marshalling and is subject to removal in a future release. XMLName xml.Name `xml:"Blob"` Name string `xml:"Name"` Deleted bool `xml:"Deleted"` Snapshot string `xml:"Snapshot"` VersionID *string `xml:"VersionId"` IsCurrentVersion *bool `xml:"IsCurrentVersion"` Properties BlobPropertiesInternal `xml:"Properties"` Metadata Metadata `xml:"Metadata"` BlobTags *BlobTags `xml:"Tags"` ObjectReplicationMetadata map[string]string `xml:"ObjectReplicationMetadata"` HasVersionsOnly *bool `xml:"HasVersionsOnly"` }
BlobItemInternal - An Azure Storage blob
type BlobListingDetails ¶
type BlobListingDetails struct {
Copy, Metadata, Snapshots, UncommittedBlobs, Deleted, Tags, Versions, Permissions, LegalHold, ImmutabilityPolicy, DeletedWithVersions bool
}
BlobListingDetails indicates what additional information the service should return with each blob.
type BlobPropertiesInternal ¶ added in v0.15.0
type BlobPropertiesInternal struct { // XMLName is used for marshalling and is subject to removal in a future release. XMLName xml.Name `xml:"Properties"` CreationTime *time.Time `xml:"Creation-Time"` LastModified time.Time `xml:"Last-Modified"` Etag ETag `xml:"Etag"` // ContentLength - Size in bytes ContentLength *int64 `xml:"Content-Length"` ContentType *string `xml:"Content-Type"` ContentEncoding *string `xml:"Content-Encoding"` ContentLanguage *string `xml:"Content-Language"` ContentMD5 []byte `xml:"Content-MD5"` ContentDisposition *string `xml:"Content-Disposition"` CacheControl *string `xml:"Cache-Control"` BlobSequenceNumber *int64 `xml:"x-ms-blob-sequence-number"` // BlobType - Possible values include: 'BlobBlockBlob', 'BlobPageBlob', 'BlobAppendBlob', 'BlobNone' BlobType BlobType `xml:"BlobType"` // LeaseStatus - Possible values include: 'LeaseStatusLocked', 'LeaseStatusUnlocked', 'LeaseStatusNone' LeaseStatus LeaseStatusType `xml:"LeaseStatus"` // LeaseState - Possible values include: 'LeaseStateAvailable', 'LeaseStateLeased', 'LeaseStateExpired', 'LeaseStateBreaking', 'LeaseStateBroken', 'LeaseStateNone' LeaseState LeaseStateType `xml:"LeaseState"` // LeaseDuration - Possible values include: 'LeaseDurationInfinite', 'LeaseDurationFixed', 'LeaseDurationNone' LeaseDuration LeaseDurationType `xml:"LeaseDuration"` CopyID *string `xml:"CopyId"` // CopyStatus - Possible values include: 'CopyStatusPending', 'CopyStatusSuccess', 'CopyStatusAborted', 'CopyStatusFailed', 'CopyStatusNone' CopyStatus CopyStatusType `xml:"CopyStatus"` CopySource *string `xml:"CopySource"` CopyProgress *string `xml:"CopyProgress"` CopyCompletionTime *time.Time `xml:"CopyCompletionTime"` CopyStatusDescription *string `xml:"CopyStatusDescription"` ServerEncrypted *bool `xml:"ServerEncrypted"` IncrementalCopy *bool `xml:"IncrementalCopy"` DestinationSnapshot *string `xml:"DestinationSnapshot"` DeletedTime *time.Time `xml:"DeletedTime"` RemainingRetentionDays *int32 `xml:"RemainingRetentionDays"` // AccessTier - Possible values include: 'AccessTierP4', 'AccessTierP6', 'AccessTierP10', 'AccessTierP15', 'AccessTierP20', 'AccessTierP30', 'AccessTierP40', 'AccessTierP50', 'AccessTierP60', 'AccessTierP70', 'AccessTierP80', 'AccessTierHot', 'AccessTierCool', 'AccessTierArchive', 'AccessTierNone' AccessTier AccessTierType `xml:"AccessTier"` AccessTierInferred *bool `xml:"AccessTierInferred"` // ArchiveStatus - Possible values include: 'ArchiveStatusRehydratePendingToHot', 'ArchiveStatusRehydratePendingToCool', 'ArchiveStatusNone' ArchiveStatus ArchiveStatusType `xml:"ArchiveStatus"` CustomerProvidedKeySha256 *string `xml:"CustomerProvidedKeySha256"` // EncryptionScope - The name of the encryption scope under which the blob is encrypted. EncryptionScope *string `xml:"EncryptionScope"` AccessTierChangeTime *time.Time `xml:"AccessTierChangeTime"` TagCount *int32 `xml:"TagCount"` ExpiresOn *time.Time `xml:"Expiry-Time"` IsSealed *bool `xml:"Sealed"` // RehydratePriority - Possible values include: 'RehydratePriorityHigh', 'RehydratePriorityStandard', 'RehydratePriorityNone' RehydratePriority RehydratePriorityType `xml:"RehydratePriority"` LastAccessedOn *time.Time `xml:"LastAccessTime"` ImmutabilityPolicyExpiresOn *time.Time `xml:"ImmutabilityPolicyUntilDate"` // ImmutabilityPolicyMode - Possible values include: 'BlobImmutabilityPolicyModeMutable', 'BlobImmutabilityPolicyModeUnlocked', 'BlobImmutabilityPolicyModeLocked', 'BlobImmutabilityPolicyModeNone' ImmutabilityPolicyMode BlobImmutabilityPolicyModeType `xml:"ImmutabilityPolicyMode"` LegalHold *bool `xml:"LegalHold"` Owner *string `xml:"Owner"` Group *string `xml:"Group"` Permissions *string `xml:"Permissions"` ACL *string `xml:"Acl"` }
BlobPropertiesInternal - Properties of a blob
func (BlobPropertiesInternal) MarshalXML ¶ added in v0.15.0
func (bpi BlobPropertiesInternal) MarshalXML(e *xml.Encoder, start xml.StartElement) error
MarshalXML implements the xml.Marshaler interface for BlobPropertiesInternal.
func (*BlobPropertiesInternal) UnmarshalXML ¶ added in v0.15.0
func (bpi *BlobPropertiesInternal) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
UnmarshalXML implements the xml.Unmarshaler interface for BlobPropertiesInternal.
type BlobReleaseLeaseResponse ¶
type BlobReleaseLeaseResponse struct {
// contains filtered or unexported fields
}
BlobReleaseLeaseResponse ...
func (BlobReleaseLeaseResponse) ClientRequestID ¶ added in v0.10.0
func (brlr BlobReleaseLeaseResponse) ClientRequestID() string
ClientRequestID returns the value for header x-ms-client-request-id.
func (BlobReleaseLeaseResponse) Date ¶
func (brlr BlobReleaseLeaseResponse) Date() time.Time
Date returns the value for header Date.
func (BlobReleaseLeaseResponse) ETag ¶
func (brlr BlobReleaseLeaseResponse) ETag() ETag
ETag returns the value for header ETag.
func (BlobReleaseLeaseResponse) ErrorCode ¶
func (brlr BlobReleaseLeaseResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (BlobReleaseLeaseResponse) LastModified ¶
func (brlr BlobReleaseLeaseResponse) LastModified() time.Time
LastModified returns the value for header Last-Modified.
func (BlobReleaseLeaseResponse) RequestID ¶
func (brlr BlobReleaseLeaseResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (BlobReleaseLeaseResponse) Response ¶
func (brlr BlobReleaseLeaseResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (BlobReleaseLeaseResponse) Status ¶
func (brlr BlobReleaseLeaseResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (BlobReleaseLeaseResponse) StatusCode ¶
func (brlr BlobReleaseLeaseResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (BlobReleaseLeaseResponse) Version ¶
func (brlr BlobReleaseLeaseResponse) Version() string
Version returns the value for header x-ms-version.
type BlobRenewLeaseResponse ¶
type BlobRenewLeaseResponse struct {
// contains filtered or unexported fields
}
BlobRenewLeaseResponse ...
func (BlobRenewLeaseResponse) ClientRequestID ¶ added in v0.10.0
func (brlr BlobRenewLeaseResponse) ClientRequestID() string
ClientRequestID returns the value for header x-ms-client-request-id.
func (BlobRenewLeaseResponse) Date ¶
func (brlr BlobRenewLeaseResponse) Date() time.Time
Date returns the value for header Date.
func (BlobRenewLeaseResponse) ETag ¶
func (brlr BlobRenewLeaseResponse) ETag() ETag
ETag returns the value for header ETag.
func (BlobRenewLeaseResponse) ErrorCode ¶
func (brlr BlobRenewLeaseResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (BlobRenewLeaseResponse) LastModified ¶
func (brlr BlobRenewLeaseResponse) LastModified() time.Time
LastModified returns the value for header Last-Modified.
func (BlobRenewLeaseResponse) LeaseID ¶
func (brlr BlobRenewLeaseResponse) LeaseID() string
LeaseID returns the value for header x-ms-lease-id.
func (BlobRenewLeaseResponse) RequestID ¶
func (brlr BlobRenewLeaseResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (BlobRenewLeaseResponse) Response ¶
func (brlr BlobRenewLeaseResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (BlobRenewLeaseResponse) Status ¶
func (brlr BlobRenewLeaseResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (BlobRenewLeaseResponse) StatusCode ¶
func (brlr BlobRenewLeaseResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (BlobRenewLeaseResponse) Version ¶
func (brlr BlobRenewLeaseResponse) Version() string
Version returns the value for header x-ms-version.
type BlobSASPermissions ¶
type BlobSASPermissions struct {
Read, Add, Create, Write, Delete, DeletePreviousVersion, Tag, List, Move, Execute, Ownership, Permissions, PermanentDelete, Immutability bool
}
The BlobSASPermissions type simplifies creating the permissions string for an Azure Storage blob SAS. Initialize an instance of this type and then call its String method to set BlobSASSignatureValues's Permissions field.
func (*BlobSASPermissions) Parse ¶
func (p *BlobSASPermissions) Parse(s string) error
Parse initializes the BlobSASPermissions's fields from a string.
func (BlobSASPermissions) String ¶
func (p BlobSASPermissions) String() string
String produces the SAS permissions string for an Azure Storage blob. Call this method to set BlobSASSignatureValues's Permissions field.
type BlobSASSignatureValues ¶
type BlobSASSignatureValues struct { Version string `param:"sv"` // If not specified, this defaults to SASVersion Protocol SASProtocol `param:"spr"` // See the SASProtocol* constants StartTime time.Time `param:"st"` // Not specified if IsZero ExpiryTime time.Time `param:"se"` // Not specified if IsZero SnapshotTime time.Time Permissions string `param:"sp"` // Create by initializing a ContainerSASPermissions or BlobSASPermissions and then call String() IPRange IPRange `param:"sip"` Identifier string `param:"si"` ContainerName string BlobName string // Use "" to create a Container SAS Directory string // Not nil for a directory SAS (ie sr=d) CacheControl string // rscc ContentDisposition string // rscd ContentEncoding string // rsce ContentLanguage string // rscl ContentType string // rsct BlobVersion string // sr=bv AgentObjectId string CorrelationId string }
BlobSASSignatureValues is used to generate a Shared Access Signature (SAS) for an Azure Storage container or blob. For more information, see https://docs.microsoft.com/rest/api/storageservices/constructing-a-service-sas
Example ¶
This example shows how to create and use a Blob Service Shared Access Signature (SAS).
// From the Azure portal, get your Storage account's name and account key. accountName, accountKey := accountInfo() // Use your Storage account's name and key to create a credential object; this is required to sign a SAS. credential, err := NewSharedKeyCredential(accountName, accountKey) if err != nil { log.Fatal(err) } // This is the name of the container and blob that we're creating a SAS to. containerName := "mycontainer" // Container names require lowercase blobName := "HelloWorld.txt" // Blob names can be mixed case // Set the desired SAS signature values and sign them with the shared key credentials to get the SAS query parameters. sasQueryParams, err := BlobSASSignatureValues{ Protocol: SASProtocolHTTPS, // Users MUST use HTTPS (not HTTP) ExpiryTime: time.Now().UTC().Add(48 * time.Hour), // 48-hours before expiration ContainerName: containerName, BlobName: blobName, // To produce a container SAS (as opposed to a blob SAS), assign to Permissions using // ContainerSASPermissions and make sure the BlobName field is "" (the default). Permissions: BlobSASPermissions{Add: true, Read: true, Write: true}.String(), }.NewSASQueryParameters(credential) if err != nil { log.Fatal(err) } // Create the URL of the resource you wish to access and append the SAS query parameters. // Since this is a blob SAS, the URL is to the Azure storage blob. qp := sasQueryParams.Encode() urlToSendToSomeone := fmt.Sprintf("https://%s.blob.core.windows.net/%s/%s?%s", accountName, containerName, blobName, qp) // At this point, you can send the urlToSendToSomeone to someone via email or any other mechanism you choose. // ************************************************************************************************ // When someone receives the URL, they access the SAS-protected resource with code like this: u, _ := url.Parse(urlToSendToSomeone) // Create an BlobURL object that wraps the blob URL (and its SAS) and a pipeline. // When using a SAS URLs, anonymous credentials are required. blobURL := NewBlobURL(*u, NewPipeline(NewAnonymousCredential(), PipelineOptions{})) // Now, you can use this blobURL just like any other to make requests of the resource. // If you have a SAS query parameter string, you can parse it into its parts: blobURLParts := NewBlobURLParts(blobURL.URL()) fmt.Printf("SAS expiry time=%v", blobURLParts.SAS.ExpiryTime()) _ = blobURL // Avoid compiler's "declared and not used" error
Output:
func (BlobSASSignatureValues) NewSASQueryParameters ¶
func (v BlobSASSignatureValues) NewSASQueryParameters(credential StorageAccountCredential) (SASQueryParameters, error)
NewSASQueryParameters uses an account's StorageAccountCredential to sign this signature values to produce the proper SAS query parameters. See: StorageAccountCredential. Compatible with both UserDelegationCredential and SharedKeyCredential
type BlobSetExpiryResponse ¶ added in v0.11.0
type BlobSetExpiryResponse struct {
// contains filtered or unexported fields
}
BlobSetExpiryResponse ...
func (BlobSetExpiryResponse) ClientRequestID ¶ added in v0.11.0
func (bser BlobSetExpiryResponse) ClientRequestID() string
ClientRequestID returns the value for header x-ms-client-request-id.
func (BlobSetExpiryResponse) Date ¶ added in v0.11.0
func (bser BlobSetExpiryResponse) Date() time.Time
Date returns the value for header Date.
func (BlobSetExpiryResponse) ETag ¶ added in v0.11.0
func (bser BlobSetExpiryResponse) ETag() ETag
ETag returns the value for header ETag.
func (BlobSetExpiryResponse) ErrorCode ¶ added in v0.11.0
func (bser BlobSetExpiryResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (BlobSetExpiryResponse) LastModified ¶ added in v0.11.0
func (bser BlobSetExpiryResponse) LastModified() time.Time
LastModified returns the value for header Last-Modified.
func (BlobSetExpiryResponse) RequestID ¶ added in v0.11.0
func (bser BlobSetExpiryResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (BlobSetExpiryResponse) Response ¶ added in v0.11.0
func (bser BlobSetExpiryResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (BlobSetExpiryResponse) Status ¶ added in v0.11.0
func (bser BlobSetExpiryResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (BlobSetExpiryResponse) StatusCode ¶ added in v0.11.0
func (bser BlobSetExpiryResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (BlobSetExpiryResponse) Version ¶ added in v0.11.0
func (bser BlobSetExpiryResponse) Version() string
Version returns the value for header x-ms-version.
type BlobSetHTTPHeadersResponse ¶
type BlobSetHTTPHeadersResponse struct {
// contains filtered or unexported fields
}
BlobSetHTTPHeadersResponse ...
func (BlobSetHTTPHeadersResponse) BlobSequenceNumber ¶
func (bshhr BlobSetHTTPHeadersResponse) BlobSequenceNumber() int64
BlobSequenceNumber returns the value for header x-ms-blob-sequence-number.
func (BlobSetHTTPHeadersResponse) ClientRequestID ¶ added in v0.10.0
func (bshhr BlobSetHTTPHeadersResponse) ClientRequestID() string
ClientRequestID returns the value for header x-ms-client-request-id.
func (BlobSetHTTPHeadersResponse) Date ¶
func (bshhr BlobSetHTTPHeadersResponse) Date() time.Time
Date returns the value for header Date.
func (BlobSetHTTPHeadersResponse) ETag ¶
func (bshhr BlobSetHTTPHeadersResponse) ETag() ETag
ETag returns the value for header ETag.
func (BlobSetHTTPHeadersResponse) ErrorCode ¶
func (bshhr BlobSetHTTPHeadersResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (BlobSetHTTPHeadersResponse) LastModified ¶
func (bshhr BlobSetHTTPHeadersResponse) LastModified() time.Time
LastModified returns the value for header Last-Modified.
func (BlobSetHTTPHeadersResponse) RequestID ¶
func (bshhr BlobSetHTTPHeadersResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (BlobSetHTTPHeadersResponse) Response ¶
func (bshhr BlobSetHTTPHeadersResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (BlobSetHTTPHeadersResponse) Status ¶
func (bshhr BlobSetHTTPHeadersResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (BlobSetHTTPHeadersResponse) StatusCode ¶
func (bshhr BlobSetHTTPHeadersResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (BlobSetHTTPHeadersResponse) Version ¶
func (bshhr BlobSetHTTPHeadersResponse) Version() string
Version returns the value for header x-ms-version.
type BlobSetImmutabilityPolicyResponse ¶ added in v0.15.0
type BlobSetImmutabilityPolicyResponse struct {
// contains filtered or unexported fields
}
BlobSetImmutabilityPolicyResponse ...
func (BlobSetImmutabilityPolicyResponse) ClientRequestID ¶ added in v0.15.0
func (bsipr BlobSetImmutabilityPolicyResponse) ClientRequestID() string
ClientRequestID returns the value for header x-ms-client-request-id.
func (BlobSetImmutabilityPolicyResponse) Date ¶ added in v0.15.0
func (bsipr BlobSetImmutabilityPolicyResponse) Date() time.Time
Date returns the value for header Date.
func (BlobSetImmutabilityPolicyResponse) ErrorCode ¶ added in v0.15.0
func (bsipr BlobSetImmutabilityPolicyResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (BlobSetImmutabilityPolicyResponse) ImmutabilityPolicyExpiry ¶ added in v0.15.0
func (bsipr BlobSetImmutabilityPolicyResponse) ImmutabilityPolicyExpiry() time.Time
ImmutabilityPolicyExpiry returns the value for header x-ms-immutability-policy-until-date.
func (BlobSetImmutabilityPolicyResponse) ImmutabilityPolicyMode ¶ added in v0.15.0
func (bsipr BlobSetImmutabilityPolicyResponse) ImmutabilityPolicyMode() BlobImmutabilityPolicyModeType
ImmutabilityPolicyMode returns the value for header x-ms-immutability-policy-mode.
func (BlobSetImmutabilityPolicyResponse) RequestID ¶ added in v0.15.0
func (bsipr BlobSetImmutabilityPolicyResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (BlobSetImmutabilityPolicyResponse) Response ¶ added in v0.15.0
func (bsipr BlobSetImmutabilityPolicyResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (BlobSetImmutabilityPolicyResponse) Status ¶ added in v0.15.0
func (bsipr BlobSetImmutabilityPolicyResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (BlobSetImmutabilityPolicyResponse) StatusCode ¶ added in v0.15.0
func (bsipr BlobSetImmutabilityPolicyResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (BlobSetImmutabilityPolicyResponse) Version ¶ added in v0.15.0
func (bsipr BlobSetImmutabilityPolicyResponse) Version() string
Version returns the value for header x-ms-version.
type BlobSetLegalHoldResponse ¶ added in v0.15.0
type BlobSetLegalHoldResponse struct {
// contains filtered or unexported fields
}
BlobSetLegalHoldResponse ...
func (BlobSetLegalHoldResponse) ClientRequestID ¶ added in v0.15.0
func (bslhr BlobSetLegalHoldResponse) ClientRequestID() string
ClientRequestID returns the value for header x-ms-client-request-id.
func (BlobSetLegalHoldResponse) Date ¶ added in v0.15.0
func (bslhr BlobSetLegalHoldResponse) Date() time.Time
Date returns the value for header Date.
func (BlobSetLegalHoldResponse) ErrorCode ¶ added in v0.15.0
func (bslhr BlobSetLegalHoldResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (BlobSetLegalHoldResponse) LegalHold ¶ added in v0.15.0
func (bslhr BlobSetLegalHoldResponse) LegalHold() string
LegalHold returns the value for header x-ms-legal-hold.
func (BlobSetLegalHoldResponse) RequestID ¶ added in v0.15.0
func (bslhr BlobSetLegalHoldResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (BlobSetLegalHoldResponse) Response ¶ added in v0.15.0
func (bslhr BlobSetLegalHoldResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (BlobSetLegalHoldResponse) Status ¶ added in v0.15.0
func (bslhr BlobSetLegalHoldResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (BlobSetLegalHoldResponse) StatusCode ¶ added in v0.15.0
func (bslhr BlobSetLegalHoldResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (BlobSetLegalHoldResponse) Version ¶ added in v0.15.0
func (bslhr BlobSetLegalHoldResponse) Version() string
Version returns the value for header x-ms-version.
type BlobSetMetadataResponse ¶
type BlobSetMetadataResponse struct {
// contains filtered or unexported fields
}
BlobSetMetadataResponse ...
func (BlobSetMetadataResponse) ClientRequestID ¶ added in v0.10.0
func (bsmr BlobSetMetadataResponse) ClientRequestID() string
ClientRequestID returns the value for header x-ms-client-request-id.
func (BlobSetMetadataResponse) Date ¶
func (bsmr BlobSetMetadataResponse) Date() time.Time
Date returns the value for header Date.
func (BlobSetMetadataResponse) ETag ¶
func (bsmr BlobSetMetadataResponse) ETag() ETag
ETag returns the value for header ETag.
func (BlobSetMetadataResponse) EncryptionKeySha256 ¶ added in v0.10.0
func (bsmr BlobSetMetadataResponse) EncryptionKeySha256() string
EncryptionKeySha256 returns the value for header x-ms-encryption-key-sha256.
func (BlobSetMetadataResponse) EncryptionScope ¶ added in v0.11.0
func (bsmr BlobSetMetadataResponse) EncryptionScope() string
EncryptionScope returns the value for header x-ms-encryption-scope.
func (BlobSetMetadataResponse) ErrorCode ¶
func (bsmr BlobSetMetadataResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (BlobSetMetadataResponse) IsServerEncrypted ¶
func (bsmr BlobSetMetadataResponse) IsServerEncrypted() string
IsServerEncrypted returns the value for header x-ms-request-server-encrypted.
func (BlobSetMetadataResponse) LastModified ¶
func (bsmr BlobSetMetadataResponse) LastModified() time.Time
LastModified returns the value for header Last-Modified.
func (BlobSetMetadataResponse) RequestID ¶
func (bsmr BlobSetMetadataResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (BlobSetMetadataResponse) Response ¶
func (bsmr BlobSetMetadataResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (BlobSetMetadataResponse) Status ¶
func (bsmr BlobSetMetadataResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (BlobSetMetadataResponse) StatusCode ¶
func (bsmr BlobSetMetadataResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (BlobSetMetadataResponse) Version ¶
func (bsmr BlobSetMetadataResponse) Version() string
Version returns the value for header x-ms-version.
func (BlobSetMetadataResponse) VersionID ¶ added in v0.11.0
func (bsmr BlobSetMetadataResponse) VersionID() string
VersionID returns the value for header x-ms-version-id.
type BlobSetTagsResponse ¶ added in v0.11.0
type BlobSetTagsResponse struct {
// contains filtered or unexported fields
}
BlobSetTagsResponse ...
func (BlobSetTagsResponse) ClientRequestID ¶ added in v0.11.0
func (bstr BlobSetTagsResponse) ClientRequestID() string
ClientRequestID returns the value for header x-ms-client-request-id.
func (BlobSetTagsResponse) Date ¶ added in v0.11.0
func (bstr BlobSetTagsResponse) Date() time.Time
Date returns the value for header Date.
func (BlobSetTagsResponse) ErrorCode ¶ added in v0.11.0
func (bstr BlobSetTagsResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (BlobSetTagsResponse) RequestID ¶ added in v0.11.0
func (bstr BlobSetTagsResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (BlobSetTagsResponse) Response ¶ added in v0.11.0
func (bstr BlobSetTagsResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (BlobSetTagsResponse) Status ¶ added in v0.11.0
func (bstr BlobSetTagsResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (BlobSetTagsResponse) StatusCode ¶ added in v0.11.0
func (bstr BlobSetTagsResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (BlobSetTagsResponse) Version ¶ added in v0.11.0
func (bstr BlobSetTagsResponse) Version() string
Version returns the value for header x-ms-version.
type BlobSetTierResponse ¶
type BlobSetTierResponse struct {
// contains filtered or unexported fields
}
BlobSetTierResponse ...
func (BlobSetTierResponse) ClientRequestID ¶ added in v0.10.0
func (bstr BlobSetTierResponse) ClientRequestID() string
ClientRequestID returns the value for header x-ms-client-request-id.
func (BlobSetTierResponse) ErrorCode ¶
func (bstr BlobSetTierResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (BlobSetTierResponse) RequestID ¶
func (bstr BlobSetTierResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (BlobSetTierResponse) Response ¶
func (bstr BlobSetTierResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (BlobSetTierResponse) Status ¶
func (bstr BlobSetTierResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (BlobSetTierResponse) StatusCode ¶
func (bstr BlobSetTierResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (BlobSetTierResponse) Version ¶
func (bstr BlobSetTierResponse) Version() string
Version returns the value for header x-ms-version.
type BlobStartCopyFromURLResponse ¶
type BlobStartCopyFromURLResponse struct {
// contains filtered or unexported fields
}
BlobStartCopyFromURLResponse ...
func (BlobStartCopyFromURLResponse) ClientRequestID ¶ added in v0.10.0
func (bscfur BlobStartCopyFromURLResponse) ClientRequestID() string
ClientRequestID returns the value for header x-ms-client-request-id.
func (BlobStartCopyFromURLResponse) CopyID ¶
func (bscfur BlobStartCopyFromURLResponse) CopyID() string
CopyID returns the value for header x-ms-copy-id.
func (BlobStartCopyFromURLResponse) CopyStatus ¶
func (bscfur BlobStartCopyFromURLResponse) CopyStatus() CopyStatusType
CopyStatus returns the value for header x-ms-copy-status.
func (BlobStartCopyFromURLResponse) Date ¶
func (bscfur BlobStartCopyFromURLResponse) Date() time.Time
Date returns the value for header Date.
func (BlobStartCopyFromURLResponse) ETag ¶
func (bscfur BlobStartCopyFromURLResponse) ETag() ETag
ETag returns the value for header ETag.
func (BlobStartCopyFromURLResponse) ErrorCode ¶
func (bscfur BlobStartCopyFromURLResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (BlobStartCopyFromURLResponse) LastModified ¶
func (bscfur BlobStartCopyFromURLResponse) LastModified() time.Time
LastModified returns the value for header Last-Modified.
func (BlobStartCopyFromURLResponse) RequestID ¶
func (bscfur BlobStartCopyFromURLResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (BlobStartCopyFromURLResponse) Response ¶
func (bscfur BlobStartCopyFromURLResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (BlobStartCopyFromURLResponse) Status ¶
func (bscfur BlobStartCopyFromURLResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (BlobStartCopyFromURLResponse) StatusCode ¶
func (bscfur BlobStartCopyFromURLResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (BlobStartCopyFromURLResponse) Version ¶
func (bscfur BlobStartCopyFromURLResponse) Version() string
Version returns the value for header x-ms-version.
func (BlobStartCopyFromURLResponse) VersionID ¶ added in v0.11.0
func (bscfur BlobStartCopyFromURLResponse) VersionID() string
VersionID returns the value for header x-ms-version-id.
type BlobTag ¶ added in v0.11.0
type BlobTag struct { // XMLName is used for marshalling and is subject to removal in a future release. XMLName xml.Name `xml:"Tag"` Key string `xml:"Key"` Value string `xml:"Value"` }
BlobTag ...
type BlobTags ¶ added in v0.11.0
type BlobTags struct { // XMLName is used for marshalling and is subject to removal in a future release. XMLName xml.Name `xml:"Tags"` BlobTagSet []BlobTag `xml:"TagSet>Tag"` // contains filtered or unexported fields }
BlobTags - Blob tags
func SerializeBlobTags ¶ added in v0.11.0
func SerializeBlobTags(blobTagsMap BlobTagsMap) BlobTags
func (BlobTags) ClientRequestID ¶ added in v0.11.0
ClientRequestID returns the value for header x-ms-client-request-id.
func (BlobTags) ErrorCode ¶ added in v0.11.0
ErrorCode returns the value for header x-ms-error-code.
func (BlobTags) RequestID ¶ added in v0.11.0
RequestID returns the value for header x-ms-request-id.
func (BlobTags) Status ¶ added in v0.11.0
Status returns the HTTP status message of the response, e.g. "200 OK".
func (BlobTags) StatusCode ¶ added in v0.11.0
StatusCode returns the HTTP status code of the response, e.g. 200.
type BlobTagsMap ¶ added in v0.11.0
type BlobType ¶
type BlobType string
BlobType enumerates the values for blob type.
func PossibleBlobTypeValues ¶
func PossibleBlobTypeValues() []BlobType
PossibleBlobTypeValues returns an array of possible values for the BlobType const type.
type BlobURL ¶
type BlobURL struct {
// contains filtered or unexported fields
}
A BlobURL represents a URL to an Azure Storage blob; the blob may be a block blob, append blob, or page blob.
Example (StartCopy) ¶
This example shows how to copy a source document on the Internet to a blob.
// From the Azure portal, get your Storage account blob service URL endpoint. accountName, accountKey := accountInfo() // Create a ContainerURL object to a container where we'll create a blob and its snapshot. // Create a BlockBlobURL object to a blob in the container. u, _ := url.Parse(fmt.Sprintf("https://%s.blob.core.windows.net/mycontainer/CopiedBlob.bin", accountName)) credential, err := NewSharedKeyCredential(accountName, accountKey) if err != nil { log.Fatal(err) } blobURL := NewBlobURL(*u, NewPipeline(credential, PipelineOptions{})) ctx := context.Background() // This example uses a never-expiring context src, _ := url.Parse("https://cdn2.auth0.com/docs/media/addons/azure_blob.svg") startCopy, err := blobURL.StartCopyFromURL(ctx, *src, nil, ModifiedAccessConditions{}, BlobAccessConditions{}, DefaultAccessTier, nil) if err != nil { log.Fatal(err) } copyID := startCopy.CopyID() copyStatus := startCopy.CopyStatus() for copyStatus == CopyStatusPending { time.Sleep(time.Second * 2) getMetadata, err := blobURL.GetProperties(ctx, BlobAccessConditions{}, ClientProvidedKeyOptions{}) if err != nil { log.Fatal(err) } copyStatus = getMetadata.CopyStatus() } fmt.Printf("Copy from %s to %s: ID=%s, Status=%s\n", src.String(), blobURL, copyID, copyStatus)
Output:
func NewBlobURL ¶
NewBlobURL creates a BlobURL object using the specified URL and request policy pipeline.
func (BlobURL) AbortCopyFromURL ¶
func (b BlobURL) AbortCopyFromURL(ctx context.Context, copyID string, ac LeaseAccessConditions) (*BlobAbortCopyFromURLResponse, error)
AbortCopyFromURL stops a pending copy that was previously started and leaves a destination blob with 0 length and metadata. For more information, see https://docs.microsoft.com/rest/api/storageservices/abort-copy-blob.
func (BlobURL) AcquireLease ¶
func (b BlobURL) AcquireLease(ctx context.Context, proposedID string, duration int32, ac ModifiedAccessConditions) (*BlobAcquireLeaseResponse, error)
AcquireLease acquires a lease on the blob for write and delete operations. The lease duration must be between 15 to 60 seconds, or infinite (-1). For more information, see https://docs.microsoft.com/rest/api/storageservices/lease-blob.
func (BlobURL) BreakLease ¶
func (b BlobURL) BreakLease(ctx context.Context, breakPeriodInSeconds int32, ac ModifiedAccessConditions) (*BlobBreakLeaseResponse, error)
BreakLease breaks the blob's previously-acquired lease (if it exists). Pass the LeaseBreakDefault (-1) constant to break a fixed-duration lease when it expires or an infinite lease immediately. For more information, see https://docs.microsoft.com/rest/api/storageservices/lease-blob.
func (BlobURL) ChangeLease ¶
func (b BlobURL) ChangeLease(ctx context.Context, leaseID string, proposedID string, ac ModifiedAccessConditions) (*BlobChangeLeaseResponse, error)
ChangeLease changes the blob's lease ID. For more information, see https://docs.microsoft.com/rest/api/storageservices/lease-blob.
func (BlobURL) CreateSnapshot ¶
func (b BlobURL) CreateSnapshot(ctx context.Context, metadata Metadata, ac BlobAccessConditions, cpk ClientProvidedKeyOptions) (*BlobCreateSnapshotResponse, error)
CreateSnapshot creates a read-only snapshot of a blob. For more information, see https://docs.microsoft.com/rest/api/storageservices/snapshot-blob.
func (BlobURL) Delete ¶
func (b BlobURL) Delete(ctx context.Context, deleteOptions DeleteSnapshotsOptionType, ac BlobAccessConditions) (*BlobDeleteResponse, error)
Delete marks the specified blob or snapshot for deletion. The blob is later deleted during garbage collection. Note 1: that deleting a blob also deletes all its snapshots. Note 2: Snapshot/VersionId are optional parameters which are part of request URL query params.
These parameters can be explicitly set by calling WithSnapshot(snapshot string)/WithVersionID(versionID string) Therefore it not required to pass these here.
For more information, see https://docs.microsoft.com/rest/api/storageservices/delete-blob.
func (BlobURL) DeleteImmutabilityPolicy ¶ added in v0.15.0
func (b BlobURL) DeleteImmutabilityPolicy(ctx context.Context) (*BlobDeleteImmutabilityPolicyResponse, error)
DeleteImmutabilityPolicy deletes a temporary immutability policy with an expiration date. While the immutability policy is active, the blob can be read but not modified or deleted. For more information, see https://docs.microsoft.com/en-us/azure/storage/blobs/immutable-time-based-retention-policy-overview (Feature overview) and https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob-immutability-policy (REST API reference) A container with object-level immutability enabled is required.
func (BlobURL) Download ¶
func (b BlobURL) Download(ctx context.Context, offset int64, count int64, ac BlobAccessConditions, rangeGetContentMD5 bool, cpk ClientProvidedKeyOptions) (*DownloadResponse, error)
Download reads a range of bytes from a blob. The response also includes the blob's properties and metadata. Passing azblob.CountToEnd (0) for count will download the blob from the offset to the end. Note: Snapshot/VersionId are optional parameters which are part of request URL query params.
These parameters can be explicitly set by calling WithSnapshot(snapshot string)/WithVersionID(versionID string) Therefore it not required to pass these here.
For more information, see https://docs.microsoft.com/rest/api/storageservices/get-blob.
func (BlobURL) GetAccountInfo ¶ added in v0.9.0
func (b BlobURL) GetAccountInfo(ctx context.Context) (*BlobGetAccountInfoResponse, error)
func (BlobURL) GetProperties ¶
func (b BlobURL) GetProperties(ctx context.Context, ac BlobAccessConditions, cpk ClientProvidedKeyOptions) (*BlobGetPropertiesResponse, error)
GetProperties returns the blob's properties. Note: Snapshot/VersionId are optional parameters which are part of request URL query params. These parameters can be explicitly set by calling WithSnapshot(snapshot string)/WithVersionID(versionID string) Therefore it not required to pass these here. For more information, see https://docs.microsoft.com/rest/api/storageservices/get-blob-properties.
func (BlobURL) GetTags ¶ added in v0.11.0
GetTags operation enables users to get tags on a blob or specific blob version, or snapshot. https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-tags
func (BlobURL) PermanentDelete ¶ added in v0.15.0
func (b BlobURL) PermanentDelete(ctx context.Context, deleteOptions DeleteSnapshotsOptionType, ac BlobAccessConditions) (*BlobDeleteResponse, error)
PermanentDelete permanently deletes soft-deleted snapshots & soft-deleted version blobs and is a dangerous operation and SHOULD NOT BE USED. WARNING: This operation should not be used unless you know exactly the implications. We will not provide support for this API. For more information, see https://docs.microsoft.com/rest/api/storageservices/delete-blob.
func (BlobURL) ReleaseLease ¶
func (b BlobURL) ReleaseLease(ctx context.Context, leaseID string, ac ModifiedAccessConditions) (*BlobReleaseLeaseResponse, error)
ReleaseLease releases the blob's previously-acquired lease. For more information, see https://docs.microsoft.com/rest/api/storageservices/lease-blob.
func (BlobURL) RenewLease ¶
func (b BlobURL) RenewLease(ctx context.Context, leaseID string, ac ModifiedAccessConditions) (*BlobRenewLeaseResponse, error)
RenewLease renews the blob's previously-acquired lease. For more information, see https://docs.microsoft.com/rest/api/storageservices/lease-blob.
func (BlobURL) SetHTTPHeaders ¶
func (b BlobURL) SetHTTPHeaders(ctx context.Context, h BlobHTTPHeaders, ac BlobAccessConditions) (*BlobSetHTTPHeadersResponse, error)
SetHTTPHeaders changes a blob's HTTP headers. For more information, see https://docs.microsoft.com/rest/api/storageservices/set-blob-properties.
func (BlobURL) SetImmutabilityPolicy ¶ added in v0.15.0
func (b BlobURL) SetImmutabilityPolicy(ctx context.Context, expiry time.Time, mode BlobImmutabilityPolicyModeType, ifUnmodifiedSince *time.Time) (*BlobSetImmutabilityPolicyResponse, error)
SetImmutabilityPolicy sets a temporary immutability policy with an expiration date. The expiration date must be in the future. While the immutability policy is active, the blob can be read but not modified or deleted. For more information, see https://docs.microsoft.com/en-us/azure/storage/blobs/immutable-time-based-retention-policy-overview (Feature overview) and https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-immutability-policy (REST API reference) A container with object-level immutability enabled is required.
func (BlobURL) SetLegalHold ¶ added in v0.15.0
func (b BlobURL) SetLegalHold(ctx context.Context, legalHold bool) (*BlobSetLegalHoldResponse, error)
SetLegalHold enables a temporary immutability policy that can be applied for general data protection purposes. It stores the current blob version in a WORM (Write-Once Read-Many) state. While in effect, the blob can be read but not modified or deleted. For more information, see https://docs.microsoft.com/en-us/azure/storage/blobs/immutable-legal-hold-overview (Feature overview) and https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-legal-hold (REST API reference) A container with object-level immutability enabled is required.
func (BlobURL) SetMetadata ¶
func (b BlobURL) SetMetadata(ctx context.Context, metadata Metadata, ac BlobAccessConditions, cpk ClientProvidedKeyOptions) (*BlobSetMetadataResponse, error)
SetMetadata changes a blob's metadata. https://docs.microsoft.com/rest/api/storageservices/set-blob-metadata.
func (BlobURL) SetTags ¶ added in v0.11.0
func (b BlobURL) SetTags(ctx context.Context, transactionalContentMD5 []byte, transactionalContentCrc64 []byte, ifTags *string, blobTagsMap BlobTagsMap) (*BlobSetTagsResponse, error)
SetTags operation enables users to set tags on a blob or specific blob version, but not snapshot. Each call to this operation replaces all existing tags attached to the blob. To remove all tags from the blob, call this operation with no tags set. https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-tags
func (BlobURL) SetTier ¶
func (b BlobURL) SetTier(ctx context.Context, tier AccessTierType, lac LeaseAccessConditions, rehydratePriority RehydratePriorityType) (*BlobSetTierResponse, error)
SetTier operation sets the tier on a blob. The operation is allowed on a page blob in a premium storage account and on a block blob in a blob storage account (locally redundant storage only). A premium page blob's tier determines the allowed size, IOPS, and bandwidth of the blob. A block blob's tier determines Hot/Cool/Archive storage type. This operation does not update the blob's ETag. Note: VersionId is an optional parameter which is part of request URL query params. It can be explicitly set by calling WithVersionID(versionID string) function and hence it not required to pass it here. For detailed information about block blob level tiering see https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers.
func (BlobURL) StartCopyFromURL ¶
func (b BlobURL) StartCopyFromURL(ctx context.Context, source url.URL, metadata Metadata, srcac ModifiedAccessConditions, dstac BlobAccessConditions, tier AccessTierType, blobTagsMap BlobTagsMap) (*BlobStartCopyFromURLResponse, error)
StartCopyFromURL copies the data at the source URL to a blob. For more information, see https://docs.microsoft.com/rest/api/storageservices/copy-blob.
func (BlobURL) ToAppendBlobURL ¶
func (b BlobURL) ToAppendBlobURL() AppendBlobURL
ToAppendBlobURL creates an AppendBlobURL using the source's URL and pipeline.
func (BlobURL) ToBlockBlobURL ¶
func (b BlobURL) ToBlockBlobURL() BlockBlobURL
ToBlockBlobURL creates a BlockBlobURL using the source's URL and pipeline.
func (BlobURL) ToPageBlobURL ¶
func (b BlobURL) ToPageBlobURL() PageBlobURL
ToPageBlobURL creates a PageBlobURL using the source's URL and pipeline.
func (BlobURL) Undelete ¶
func (b BlobURL) Undelete(ctx context.Context) (*BlobUndeleteResponse, error)
Undelete restores the contents and metadata of a soft-deleted blob and any associated soft-deleted snapshots. For more information, see https://docs.microsoft.com/rest/api/storageservices/undelete-blob.
func (BlobURL) WithPipeline ¶
WithPipeline creates a new BlobURL object identical to the source but with the specified request policy pipeline.
func (BlobURL) WithSnapshot ¶
WithSnapshot creates a new BlobURL object identical to the source but with the specified snapshot timestamp. Pass "" to remove the snapshot returning a URL to the base blob.
func (BlobURL) WithVersionID ¶ added in v0.11.0
WithVersionID creates a new BlobURL object identical to the source but with the specified version id. Pass "" to remove the snapshot returning a URL to the base blob.
type BlobURLParts ¶
type BlobURLParts struct { Scheme string // Ex: "https://" Host string // Ex: "account.blob.core.windows.net", "10.132.141.33", "10.132.141.33:80" IPEndpointStyleInfo IPEndpointStyleInfo ContainerName string // "" if no container BlobName string // "" if no blob Snapshot string // "" if not a snapshot SAS SASQueryParameters UnparsedParams string VersionID string // "" if not versioning enabled }
A BlobURLParts object represents the components that make up an Azure Storage Container/Blob URL. You parse an existing URL into its parts by calling NewBlobURLParts(). You construct a URL from parts by calling URL(). NOTE: Changing any SAS-related field requires computing a new SAS signature.
Example ¶
This example shows how to break a URL into its parts so you can examine and/or change some of its values and then construct a new URL.
// Let's start with a URL that identifies a snapshot of a blob in a container. // The URL also contains a Shared Access Signature (SAS): u, _ := url.Parse("https://myaccount.blob.core.windows.net/mycontainter/ReadMe.txt?" + "snapshot=2011-03-09T01:42:34Z&" + "sv=2015-02-21&sr=b&st=2111-01-09T01:42:34.936Z&se=2222-03-09T01:42:34.936Z&sp=rw&sip=168.1.5.60-168.1.5.70&" + "spr=https,http&si=myIdentifier&ss=bf&srt=s&sig=92836758923659283652983562==") // You can parse this URL into its constituent parts: parts := NewBlobURLParts(*u) // Now, we access the parts (this example prints them). fmt.Println(parts.Host, parts.ContainerName, parts.BlobName, parts.Snapshot) sas := parts.SAS fmt.Println(sas.Version(), sas.Resource(), sas.StartTime(), sas.ExpiryTime(), sas.Permissions(), sas.IPRange(), sas.Protocol(), sas.Identifier(), sas.Services(), sas.Signature()) // You can then change some of the fields and construct a new URL: parts.SAS = SASQueryParameters{} // Remove the SAS query parameters parts.Snapshot = "" // Remove the snapshot timestamp parts.ContainerName = "othercontainer" // Change the container name // In this example, we'll keep the blob name as is. // Construct a new URL from the parts: newURL := parts.URL() fmt.Print(newURL.String()) // NOTE: You can pass the new URL to NewBlockBlobURL (or similar methods) to manipulate the blob.
Output:
func NewBlobURLParts ¶
func NewBlobURLParts(u url.URL) BlobURLParts
NewBlobURLParts parses a URL initializing BlobURLParts' fields including any SAS-related & snapshot query parameters. Any other query parameters remain in the UnparsedParams field. This method overwrites all fields in the BlobURLParts object.
func (BlobURLParts) URL ¶
func (up BlobURLParts) URL() url.URL
URL returns a URL object whose fields are initialized from the BlobURLParts fields. The URL's RawQuery field contains the SAS, snapshot, and unparsed query parameters.
type BlobUndeleteResponse ¶
type BlobUndeleteResponse struct {
// contains filtered or unexported fields
}
BlobUndeleteResponse ...
func (BlobUndeleteResponse) ClientRequestID ¶ added in v0.10.0
func (bur BlobUndeleteResponse) ClientRequestID() string
ClientRequestID returns the value for header x-ms-client-request-id.
func (BlobUndeleteResponse) Date ¶
func (bur BlobUndeleteResponse) Date() time.Time
Date returns the value for header Date.
func (BlobUndeleteResponse) ErrorCode ¶
func (bur BlobUndeleteResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (BlobUndeleteResponse) RequestID ¶
func (bur BlobUndeleteResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (BlobUndeleteResponse) Response ¶
func (bur BlobUndeleteResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (BlobUndeleteResponse) Status ¶
func (bur BlobUndeleteResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (BlobUndeleteResponse) StatusCode ¶
func (bur BlobUndeleteResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (BlobUndeleteResponse) Version ¶
func (bur BlobUndeleteResponse) Version() string
Version returns the value for header x-ms-version.
type Block ¶
type Block struct { // Name - The base64 encoded block ID. Name string `xml:"Name"` // Size - The block size in bytes. Size int64 `xml:"Size"` }
Block - Represents a single block in a block blob. It describes the block's ID and size.
type BlockBlobCommitBlockListResponse ¶
type BlockBlobCommitBlockListResponse struct {
// contains filtered or unexported fields
}
BlockBlobCommitBlockListResponse ...
func (BlockBlobCommitBlockListResponse) ClientRequestID ¶ added in v0.10.0
func (bbcblr BlockBlobCommitBlockListResponse) ClientRequestID() string
ClientRequestID returns the value for header x-ms-client-request-id.
func (BlockBlobCommitBlockListResponse) ContentMD5 ¶
func (bbcblr BlockBlobCommitBlockListResponse) ContentMD5() []byte
ContentMD5 returns the value for header Content-MD5.
func (BlockBlobCommitBlockListResponse) Date ¶
func (bbcblr BlockBlobCommitBlockListResponse) Date() time.Time
Date returns the value for header Date.
func (BlockBlobCommitBlockListResponse) ETag ¶
func (bbcblr BlockBlobCommitBlockListResponse) ETag() ETag
ETag returns the value for header ETag.
func (BlockBlobCommitBlockListResponse) EncryptionKeySha256 ¶ added in v0.10.0
func (bbcblr BlockBlobCommitBlockListResponse) EncryptionKeySha256() string
EncryptionKeySha256 returns the value for header x-ms-encryption-key-sha256.
func (BlockBlobCommitBlockListResponse) EncryptionScope ¶ added in v0.11.0
func (bbcblr BlockBlobCommitBlockListResponse) EncryptionScope() string
EncryptionScope returns the value for header x-ms-encryption-scope.
func (BlockBlobCommitBlockListResponse) ErrorCode ¶
func (bbcblr BlockBlobCommitBlockListResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (BlockBlobCommitBlockListResponse) IsServerEncrypted ¶
func (bbcblr BlockBlobCommitBlockListResponse) IsServerEncrypted() string
IsServerEncrypted returns the value for header x-ms-request-server-encrypted.
func (BlockBlobCommitBlockListResponse) LastModified ¶
func (bbcblr BlockBlobCommitBlockListResponse) LastModified() time.Time
LastModified returns the value for header Last-Modified.
func (BlockBlobCommitBlockListResponse) RequestID ¶
func (bbcblr BlockBlobCommitBlockListResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (BlockBlobCommitBlockListResponse) Response ¶
func (bbcblr BlockBlobCommitBlockListResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (BlockBlobCommitBlockListResponse) Status ¶
func (bbcblr BlockBlobCommitBlockListResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (BlockBlobCommitBlockListResponse) StatusCode ¶
func (bbcblr BlockBlobCommitBlockListResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (BlockBlobCommitBlockListResponse) Version ¶
func (bbcblr BlockBlobCommitBlockListResponse) Version() string
Version returns the value for header x-ms-version.
func (BlockBlobCommitBlockListResponse) VersionID ¶ added in v0.11.0
func (bbcblr BlockBlobCommitBlockListResponse) VersionID() string
VersionID returns the value for header x-ms-version-id.
func (BlockBlobCommitBlockListResponse) XMsContentCrc64 ¶ added in v0.10.0
func (bbcblr BlockBlobCommitBlockListResponse) XMsContentCrc64() []byte
XMsContentCrc64 returns the value for header x-ms-content-crc64.
type BlockBlobPutBlobFromURLResponse ¶ added in v0.14.0
type BlockBlobPutBlobFromURLResponse struct {
// contains filtered or unexported fields
}
BlockBlobPutBlobFromURLResponse ...
func (BlockBlobPutBlobFromURLResponse) ClientRequestID ¶ added in v0.14.0
func (bbpbfur BlockBlobPutBlobFromURLResponse) ClientRequestID() string
ClientRequestID returns the value for header x-ms-client-request-id.
func (BlockBlobPutBlobFromURLResponse) ContentMD5 ¶ added in v0.14.0
func (bbpbfur BlockBlobPutBlobFromURLResponse) ContentMD5() []byte
ContentMD5 returns the value for header Content-MD5.
func (BlockBlobPutBlobFromURLResponse) Date ¶ added in v0.14.0
func (bbpbfur BlockBlobPutBlobFromURLResponse) Date() time.Time
Date returns the value for header Date.
func (BlockBlobPutBlobFromURLResponse) ETag ¶ added in v0.14.0
func (bbpbfur BlockBlobPutBlobFromURLResponse) ETag() ETag
ETag returns the value for header ETag.
func (BlockBlobPutBlobFromURLResponse) EncryptionKeySha256 ¶ added in v0.14.0
func (bbpbfur BlockBlobPutBlobFromURLResponse) EncryptionKeySha256() string
EncryptionKeySha256 returns the value for header x-ms-encryption-key-sha256.
func (BlockBlobPutBlobFromURLResponse) EncryptionScope ¶ added in v0.14.0
func (bbpbfur BlockBlobPutBlobFromURLResponse) EncryptionScope() string
EncryptionScope returns the value for header x-ms-encryption-scope.
func (BlockBlobPutBlobFromURLResponse) ErrorCode ¶ added in v0.14.0
func (bbpbfur BlockBlobPutBlobFromURLResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (BlockBlobPutBlobFromURLResponse) IsServerEncrypted ¶ added in v0.14.0
func (bbpbfur BlockBlobPutBlobFromURLResponse) IsServerEncrypted() string
IsServerEncrypted returns the value for header x-ms-request-server-encrypted.
func (BlockBlobPutBlobFromURLResponse) LastModified ¶ added in v0.14.0
func (bbpbfur BlockBlobPutBlobFromURLResponse) LastModified() time.Time
LastModified returns the value for header Last-Modified.
func (BlockBlobPutBlobFromURLResponse) RequestID ¶ added in v0.14.0
func (bbpbfur BlockBlobPutBlobFromURLResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (BlockBlobPutBlobFromURLResponse) Response ¶ added in v0.14.0
func (bbpbfur BlockBlobPutBlobFromURLResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (BlockBlobPutBlobFromURLResponse) Status ¶ added in v0.14.0
func (bbpbfur BlockBlobPutBlobFromURLResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (BlockBlobPutBlobFromURLResponse) StatusCode ¶ added in v0.14.0
func (bbpbfur BlockBlobPutBlobFromURLResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (BlockBlobPutBlobFromURLResponse) Version ¶ added in v0.14.0
func (bbpbfur BlockBlobPutBlobFromURLResponse) Version() string
Version returns the value for header x-ms-version.
func (BlockBlobPutBlobFromURLResponse) VersionID ¶ added in v0.14.0
func (bbpbfur BlockBlobPutBlobFromURLResponse) VersionID() string
VersionID returns the value for header x-ms-version-id.
type BlockBlobStageBlockFromURLResponse ¶
type BlockBlobStageBlockFromURLResponse struct {
// contains filtered or unexported fields
}
BlockBlobStageBlockFromURLResponse ...
func (BlockBlobStageBlockFromURLResponse) ClientRequestID ¶ added in v0.10.0
func (bbsbfur BlockBlobStageBlockFromURLResponse) ClientRequestID() string
ClientRequestID returns the value for header x-ms-client-request-id.
func (BlockBlobStageBlockFromURLResponse) ContentMD5 ¶
func (bbsbfur BlockBlobStageBlockFromURLResponse) ContentMD5() []byte
ContentMD5 returns the value for header Content-MD5.
func (BlockBlobStageBlockFromURLResponse) Date ¶
func (bbsbfur BlockBlobStageBlockFromURLResponse) Date() time.Time
Date returns the value for header Date.
func (BlockBlobStageBlockFromURLResponse) EncryptionKeySha256 ¶ added in v0.10.0
func (bbsbfur BlockBlobStageBlockFromURLResponse) EncryptionKeySha256() string
EncryptionKeySha256 returns the value for header x-ms-encryption-key-sha256.
func (BlockBlobStageBlockFromURLResponse) EncryptionScope ¶ added in v0.11.0
func (bbsbfur BlockBlobStageBlockFromURLResponse) EncryptionScope() string
EncryptionScope returns the value for header x-ms-encryption-scope.
func (BlockBlobStageBlockFromURLResponse) ErrorCode ¶
func (bbsbfur BlockBlobStageBlockFromURLResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (BlockBlobStageBlockFromURLResponse) IsServerEncrypted ¶
func (bbsbfur BlockBlobStageBlockFromURLResponse) IsServerEncrypted() string
IsServerEncrypted returns the value for header x-ms-request-server-encrypted.
func (BlockBlobStageBlockFromURLResponse) RequestID ¶
func (bbsbfur BlockBlobStageBlockFromURLResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (BlockBlobStageBlockFromURLResponse) Response ¶
func (bbsbfur BlockBlobStageBlockFromURLResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (BlockBlobStageBlockFromURLResponse) Status ¶
func (bbsbfur BlockBlobStageBlockFromURLResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (BlockBlobStageBlockFromURLResponse) StatusCode ¶
func (bbsbfur BlockBlobStageBlockFromURLResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (BlockBlobStageBlockFromURLResponse) Version ¶
func (bbsbfur BlockBlobStageBlockFromURLResponse) Version() string
Version returns the value for header x-ms-version.
func (BlockBlobStageBlockFromURLResponse) XMsContentCrc64 ¶ added in v0.10.0
func (bbsbfur BlockBlobStageBlockFromURLResponse) XMsContentCrc64() []byte
XMsContentCrc64 returns the value for header x-ms-content-crc64.
type BlockBlobStageBlockResponse ¶
type BlockBlobStageBlockResponse struct {
// contains filtered or unexported fields
}
BlockBlobStageBlockResponse ...
func (BlockBlobStageBlockResponse) ClientRequestID ¶ added in v0.10.0
func (bbsbr BlockBlobStageBlockResponse) ClientRequestID() string
ClientRequestID returns the value for header x-ms-client-request-id.
func (BlockBlobStageBlockResponse) ContentMD5 ¶
func (bbsbr BlockBlobStageBlockResponse) ContentMD5() []byte
ContentMD5 returns the value for header Content-MD5.
func (BlockBlobStageBlockResponse) Date ¶
func (bbsbr BlockBlobStageBlockResponse) Date() time.Time
Date returns the value for header Date.
func (BlockBlobStageBlockResponse) EncryptionKeySha256 ¶ added in v0.10.0
func (bbsbr BlockBlobStageBlockResponse) EncryptionKeySha256() string
EncryptionKeySha256 returns the value for header x-ms-encryption-key-sha256.
func (BlockBlobStageBlockResponse) EncryptionScope ¶ added in v0.11.0
func (bbsbr BlockBlobStageBlockResponse) EncryptionScope() string
EncryptionScope returns the value for header x-ms-encryption-scope.
func (BlockBlobStageBlockResponse) ErrorCode ¶
func (bbsbr BlockBlobStageBlockResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (BlockBlobStageBlockResponse) IsServerEncrypted ¶
func (bbsbr BlockBlobStageBlockResponse) IsServerEncrypted() string
IsServerEncrypted returns the value for header x-ms-request-server-encrypted.
func (BlockBlobStageBlockResponse) RequestID ¶
func (bbsbr BlockBlobStageBlockResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (BlockBlobStageBlockResponse) Response ¶
func (bbsbr BlockBlobStageBlockResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (BlockBlobStageBlockResponse) Status ¶
func (bbsbr BlockBlobStageBlockResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (BlockBlobStageBlockResponse) StatusCode ¶
func (bbsbr BlockBlobStageBlockResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (BlockBlobStageBlockResponse) Version ¶
func (bbsbr BlockBlobStageBlockResponse) Version() string
Version returns the value for header x-ms-version.
func (BlockBlobStageBlockResponse) XMsContentCrc64 ¶ added in v0.10.0
func (bbsbr BlockBlobStageBlockResponse) XMsContentCrc64() []byte
XMsContentCrc64 returns the value for header x-ms-content-crc64.
type BlockBlobURL ¶
type BlockBlobURL struct { BlobURL // contains filtered or unexported fields }
BlockBlobURL defines a set of operations applicable to block blobs.
Example ¶
ExampleBlockBlobURL shows how to upload a lot of data (in blocks) to a blob. A block blob can have a maximum of 50,000 blocks; each block can have a maximum of 100MB. Therefore, the maximum size of a block blob is slightly more than 4.75 TB (100 MB X 50,000 blocks).
// From the Azure portal, get your Storage account blob service URL endpoint. accountName, accountKey := accountInfo() // Create a ContainerURL object that wraps a soon-to-be-created blob's URL and a default pipeline. u, _ := url.Parse(fmt.Sprintf("https://%s.blob.core.windows.net/mycontainer/MyBlockBlob.txt", accountName)) credential, err := NewSharedKeyCredential(accountName, accountKey) if err != nil { log.Fatal(err) } blobURL := NewBlockBlobURL(*u, NewPipeline(credential, PipelineOptions{})) ctx := context.Background() // This example uses a never-expiring context // These helper functions convert a binary block ID to a base-64 string and vice versa // NOTE: The blockID must be <= 64 bytes and ALL blockIDs for the block must be the same length blockIDBinaryToBase64 := func(blockID []byte) string { return base64.StdEncoding.EncodeToString(blockID) } blockIDBase64ToBinary := func(blockID string) []byte { binary, _ := base64.StdEncoding.DecodeString(blockID); return binary } // These helper functions convert an int block ID to a base-64 string and vice versa blockIDIntToBase64 := func(blockID int) string { binaryBlockID := (&[4]byte{})[:] // All block IDs are 4 bytes long binary.LittleEndian.PutUint32(binaryBlockID, uint32(blockID)) return blockIDBinaryToBase64(binaryBlockID) } blockIDBase64ToInt := func(blockID string) int { blockIDBase64ToBinary(blockID) return int(binary.LittleEndian.Uint32(blockIDBase64ToBinary(blockID))) } // Upload 4 blocks to the blob (these blocks are tiny; they can be up to 100MB each) words := []string{"Azure ", "Storage ", "Block ", "Blob."} base64BlockIDs := make([]string, len(words)) // The collection of block IDs (base 64 strings) // Upload each block sequentially (one after the other); for better performance, you want to upload multiple blocks in parallel) for index, word := range words { // This example uses the index as the block ID; convert the index/ID into a base-64 encoded string as required by the service. // NOTE: Over the lifetime of a blob, all block IDs (before base 64 encoding) must be the same length (this example uses 4 byte block IDs). base64BlockIDs[index] = blockIDIntToBase64(index) // Some people use UUIDs for block IDs // Upload a block to this blob specifying the Block ID and its content (up to 100MB); this block is uncommitted. _, err := blobURL.StageBlock(ctx, base64BlockIDs[index], strings.NewReader(word), LeaseAccessConditions{}, nil, ClientProvidedKeyOptions{}) if err != nil { log.Fatal(err) } } // After all the blocks are uploaded, atomically commit them to the blob. _, err = blobURL.CommitBlockList(ctx, base64BlockIDs, BlobHTTPHeaders{}, Metadata{}, BlobAccessConditions{}, DefaultAccessTier, nil, ClientProvidedKeyOptions{}, ImmutabilityPolicyOptions{}) if err != nil { log.Fatal(err) } // For the blob, show each block (ID and size) that is a committed part of it. getBlock, err := blobURL.GetBlockList(ctx, BlockListAll, LeaseAccessConditions{}) if err != nil { log.Fatal(err) } for _, block := range getBlock.CommittedBlocks { fmt.Printf("Block ID=%d, Size=%d\n", blockIDBase64ToInt(block.Name), block.Size) } // Download the blob in its entirety; download operations do not take blocks into account. // NOTE: For really large blobs, downloading them like allocates a lot of memory. get, err := blobURL.Download(ctx, 0, 0, BlobAccessConditions{}, false, ClientProvidedKeyOptions{}) if err != nil { log.Fatal(err) } blobData := &bytes.Buffer{} reader := get.Body(RetryReaderOptions{}) blobData.ReadFrom(reader) reader.Close() // The client must close the response body when finished with it fmt.Println(blobData)
Output:
func NewBlockBlobURL ¶
func NewBlockBlobURL(url url.URL, p pipeline.Pipeline) BlockBlobURL
NewBlockBlobURL creates a BlockBlobURL object using the specified URL and request policy pipeline.
func (BlockBlobURL) CommitBlockList ¶
func (bb BlockBlobURL) CommitBlockList(ctx context.Context, base64BlockIDs []string, h BlobHTTPHeaders, metadata Metadata, ac BlobAccessConditions, tier AccessTierType, blobTagsMap BlobTagsMap, cpk ClientProvidedKeyOptions, immutability ImmutabilityPolicyOptions) (*BlockBlobCommitBlockListResponse, error)
CommitBlockList 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 PutBlock operation. You can call PutBlockList to update a blob by uploading only those blocks that have changed, then committing the new and existing blocks together. Any blocks not specified in the block list and permanently deleted. For more information, see https://docs.microsoft.com/rest/api/storageservices/put-block-list.
func (BlockBlobURL) CopyFromURL ¶ added in v0.10.0
func (bb BlockBlobURL) CopyFromURL(ctx context.Context, source url.URL, metadata Metadata, srcac ModifiedAccessConditions, dstac BlobAccessConditions, srcContentMD5 []byte, tier AccessTierType, blobTagsMap BlobTagsMap, immutability ImmutabilityPolicyOptions, sourceAuthorization TokenCredential) (*BlobCopyFromURLResponse, error)
CopyFromURL synchronously copies the data at the source URL to a block blob, with sizes up to 256 MB. For more information, see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob-from-url.
func (BlockBlobURL) GetAccountInfo ¶ added in v0.9.0
func (bb BlockBlobURL) GetAccountInfo(ctx context.Context) (*BlobGetAccountInfoResponse, error)
func (BlockBlobURL) GetBlockList ¶
func (bb BlockBlobURL) GetBlockList(ctx context.Context, listType BlockListType, ac LeaseAccessConditions) (*BlockList, error)
GetBlockList returns the list of blocks that have been uploaded as part of a block blob using the specified block list filter. For more information, see https://docs.microsoft.com/rest/api/storageservices/get-block-list.
func (BlockBlobURL) PutBlobFromURL ¶ added in v0.14.0
func (bb BlockBlobURL) PutBlobFromURL(ctx context.Context, h BlobHTTPHeaders, source url.URL, metadata Metadata, srcac ModifiedAccessConditions, dstac BlobAccessConditions, srcContentMD5 []byte, dstContentMD5 []byte, tier AccessTierType, blobTagsMap BlobTagsMap, cpk ClientProvidedKeyOptions, sourceAuthorization TokenCredential) (*BlockBlobPutBlobFromURLResponse, error)
PutBlobFromURL synchronously creates a new Block Blob with data from the source URL up to a max length of 256MB. For more information, see https://docs.microsoft.com/en-us/rest/api/storageservices/put-blob-from-url.
func (BlockBlobURL) StageBlock ¶
func (bb BlockBlobURL) StageBlock(ctx context.Context, base64BlockID string, body io.ReadSeeker, ac LeaseAccessConditions, transactionalMD5 []byte, cpk ClientProvidedKeyOptions) (*BlockBlobStageBlockResponse, error)
StageBlock uploads the specified block to the block blob's "staging area" to be later committed by a call to CommitBlockList. Note that the http client closes the body stream after the request is sent to the service. For more information, see https://docs.microsoft.com/rest/api/storageservices/put-block.
func (BlockBlobURL) StageBlockFromURL ¶
func (bb BlockBlobURL) StageBlockFromURL(ctx context.Context, base64BlockID string, sourceURL url.URL, offset int64, count int64, destinationAccessConditions LeaseAccessConditions, sourceAccessConditions ModifiedAccessConditions, cpk ClientProvidedKeyOptions, sourceAuthorization TokenCredential) (*BlockBlobStageBlockFromURLResponse, error)
StageBlockFromURL copies the specified block from a source URL to the block blob's "staging area" to be later committed by a call to CommitBlockList. If count is CountToEnd (0), then data is read from specified offset to the end. For more information, see https://docs.microsoft.com/en-us/rest/api/storageservices/put-block-from-url.
func (BlockBlobURL) Upload ¶
func (bb BlockBlobURL) Upload(ctx context.Context, body io.ReadSeeker, h BlobHTTPHeaders, metadata Metadata, ac BlobAccessConditions, tier AccessTierType, blobTagsMap BlobTagsMap, cpk ClientProvidedKeyOptions, immutability ImmutabilityPolicyOptions) (*BlockBlobUploadResponse, error)
Upload creates a new block blob or overwrites an existing block blob. Updating an existing block blob overwrites any existing metadata on the blob. Partial updates are not supported with Upload; the content of the existing blob is overwritten with the new content. To perform a partial update of a block blob, use StageBlock and CommitBlockList. This method panics if the stream is not at position 0. Note that the http client closes the body stream after the request is sent to the service. For more information, see https://docs.microsoft.com/rest/api/storageservices/put-blob.
func (BlockBlobURL) WithPipeline ¶
func (bb BlockBlobURL) WithPipeline(p pipeline.Pipeline) BlockBlobURL
WithPipeline creates a new BlockBlobURL object identical to the source but with the specific request policy pipeline.
func (BlockBlobURL) WithSnapshot ¶
func (bb BlockBlobURL) WithSnapshot(snapshot string) BlockBlobURL
WithSnapshot creates a new BlockBlobURL object identical to the source but with the specified snapshot timestamp. Pass "" to remove the snapshot returning a URL to the base blob.
func (BlockBlobURL) WithVersionID ¶ added in v0.11.0
func (bb BlockBlobURL) WithVersionID(versionId string) BlockBlobURL
WithVersionID creates a new BlockBlobURRL object identical to the source but with the specified version id. Pass "" to remove the snapshot returning a URL to the base blob.
type BlockBlobUploadResponse ¶
type BlockBlobUploadResponse struct {
// contains filtered or unexported fields
}
BlockBlobUploadResponse ...
func (BlockBlobUploadResponse) ClientRequestID ¶ added in v0.10.0
func (bbur BlockBlobUploadResponse) ClientRequestID() string
ClientRequestID returns the value for header x-ms-client-request-id.
func (BlockBlobUploadResponse) ContentMD5 ¶
func (bbur BlockBlobUploadResponse) ContentMD5() []byte
ContentMD5 returns the value for header Content-MD5.
func (BlockBlobUploadResponse) Date ¶
func (bbur BlockBlobUploadResponse) Date() time.Time
Date returns the value for header Date.
func (BlockBlobUploadResponse) ETag ¶
func (bbur BlockBlobUploadResponse) ETag() ETag
ETag returns the value for header ETag.
func (BlockBlobUploadResponse) EncryptionKeySha256 ¶ added in v0.10.0
func (bbur BlockBlobUploadResponse) EncryptionKeySha256() string
EncryptionKeySha256 returns the value for header x-ms-encryption-key-sha256.
func (BlockBlobUploadResponse) EncryptionScope ¶ added in v0.11.0
func (bbur BlockBlobUploadResponse) EncryptionScope() string
EncryptionScope returns the value for header x-ms-encryption-scope.
func (BlockBlobUploadResponse) ErrorCode ¶
func (bbur BlockBlobUploadResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (BlockBlobUploadResponse) IsServerEncrypted ¶
func (bbur BlockBlobUploadResponse) IsServerEncrypted() string
IsServerEncrypted returns the value for header x-ms-request-server-encrypted.
func (BlockBlobUploadResponse) LastModified ¶
func (bbur BlockBlobUploadResponse) LastModified() time.Time
LastModified returns the value for header Last-Modified.
func (BlockBlobUploadResponse) RequestID ¶
func (bbur BlockBlobUploadResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (BlockBlobUploadResponse) Response ¶
func (bbur BlockBlobUploadResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (BlockBlobUploadResponse) Status ¶
func (bbur BlockBlobUploadResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (BlockBlobUploadResponse) StatusCode ¶
func (bbur BlockBlobUploadResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (BlockBlobUploadResponse) Version ¶
func (bbur BlockBlobUploadResponse) Version() string
Version returns the value for header x-ms-version.
func (BlockBlobUploadResponse) VersionID ¶ added in v0.11.0
func (bbur BlockBlobUploadResponse) VersionID() string
VersionID returns the value for header x-ms-version-id.
type BlockList ¶
type BlockList struct { CommittedBlocks []Block `xml:"CommittedBlocks>Block"` UncommittedBlocks []Block `xml:"UncommittedBlocks>Block"` // contains filtered or unexported fields }
BlockList ...
func (BlockList) BlobContentLength ¶
BlobContentLength returns the value for header x-ms-blob-content-length.
func (BlockList) ClientRequestID ¶ added in v0.10.0
ClientRequestID returns the value for header x-ms-client-request-id.
func (BlockList) ContentType ¶
ContentType returns the value for header Content-Type.
func (BlockList) LastModified ¶
LastModified returns the value for header Last-Modified.
func (BlockList) StatusCode ¶
StatusCode returns the HTTP status code of the response, e.g. 200.
type BlockListType ¶
type BlockListType string
BlockListType enumerates the values for block list type.
const ( // BlockListAll ... BlockListAll BlockListType = "all" // BlockListCommitted ... BlockListCommitted BlockListType = "committed" // BlockListNone represents an empty BlockListType. BlockListNone BlockListType = "" // BlockListUncommitted ... BlockListUncommitted BlockListType = "uncommitted" )
func PossibleBlockListTypeValues ¶
func PossibleBlockListTypeValues() []BlockListType
PossibleBlockListTypeValues returns an array of possible values for the BlockListType const type.
type BlockLookupList ¶
type BlockLookupList struct { // XMLName is used for marshalling and is subject to removal in a future release. XMLName xml.Name `xml:"BlockList"` Committed []string `xml:"Committed"` Uncommitted []string `xml:"Uncommitted"` Latest []string `xml:"Latest"` }
BlockLookupList ...
type ClearRange ¶
ClearRange ...
type ClientProvidedKeyOptions ¶ added in v0.12.0
type ClientProvidedKeyOptions struct { // A Base64-encoded AES-256 encryption key value. EncryptionKey *string // The Base64-encoded SHA256 of the encryption key. EncryptionKeySha256 *string // Specifies the algorithm to use when encrypting data using the given key. Must be AES256. EncryptionAlgorithm EncryptionAlgorithmType // Specifies the name of the encryption scope to use to encrypt the data provided in the request // https://docs.microsoft.com/en-us/azure/storage/blobs/encryption-scope-overview // https://docs.microsoft.com/en-us/azure/key-vault/general/overview EncryptionScope *string }
ClientProvidedKeyOptions contains headers which may be be specified from service version 2019-02-02 or higher to encrypts the data on the service-side with the given key. Use of customer-provided keys must be done over HTTPS. As the encryption key itself is provided in the request, a secure connection must be established to transfer the key. Note: Azure Storage does not store or manage customer provided encryption keys. Keys are securely discarded as soon as possible after they’ve been used to encrypt or decrypt the blob data. https://docs.microsoft.com/en-us/azure/storage/common/storage-service-encryption https://docs.microsoft.com/en-us/azure/storage/common/customer-managed-keys-overview
func NewClientProvidedKeyOptions ¶ added in v0.12.0
func NewClientProvidedKeyOptions(ek *string, eksha256 *string, es *string) (cpk ClientProvidedKeyOptions)
NewClientProvidedKeyOptions function. By default the value of encryption algorithm params is "AES256" for service version 2019-02-02 or higher.
type CommonResponse ¶
type CommonResponse interface { // ETag returns the value for header ETag. ETag() ETag // LastModified returns the value for header Last-Modified. LastModified() time.Time // RequestID returns the value for header x-ms-request-id. RequestID() string // Date returns the value for header Date. Date() time.Time // Version returns the value for header x-ms-version. Version() string // Response returns the raw HTTP response object. Response() *http.Response }
CommonResponse returns the headers common to all blob REST API responses.
func UploadBufferToBlockBlob ¶
func UploadBufferToBlockBlob(ctx context.Context, b []byte, blockBlobURL BlockBlobURL, o UploadToBlockBlobOptions) (CommonResponse, error)
UploadBufferToBlockBlob uploads a buffer in blocks to a block blob.
func UploadFileToBlockBlob ¶
func UploadFileToBlockBlob(ctx context.Context, file *os.File, blockBlobURL BlockBlobURL, o UploadToBlockBlobOptions) (CommonResponse, error)
UploadFileToBlockBlob uploads a file in blocks to a block blob.
func UploadStreamToBlockBlob ¶
func UploadStreamToBlockBlob(ctx context.Context, reader io.Reader, blockBlobURL BlockBlobURL, o UploadStreamToBlockBlobOptions) (CommonResponse, error)
UploadStreamToBlockBlob copies the file held in io.Reader to the Blob at blockBlobURL. A Context deadline or cancellation will cause this to error.
Example ¶
// From the Azure portal, get your Storage account blob service URL endpoint. accountName, accountKey := accountInfo() // Create a BlockBlobURL object to a blob in the container (we assume the container already exists). u, _ := url.Parse(fmt.Sprintf("https://%s.blob.core.windows.net/mycontainer/BigBlockBlob.bin", accountName)) credential, err := NewSharedKeyCredential(accountName, accountKey) if err != nil { log.Fatal(err) } blockBlobURL := NewBlockBlobURL(*u, NewPipeline(credential, PipelineOptions{})) ctx := context.Background() // This example uses a never-expiring context // Create some data to test the upload stream blobSize := 8 * 1024 * 1024 data := make([]byte, blobSize) rand.Read(data) // Perform UploadStreamToBlockBlob bufferSize := 2 * 1024 * 1024 // Configure the size of the rotating buffers that are used when uploading maxBuffers := 3 // Configure the number of rotating buffers that are used when uploading _, err = UploadStreamToBlockBlob(ctx, bytes.NewReader(data), blockBlobURL, UploadStreamToBlockBlobOptions{BufferSize: bufferSize, MaxBuffers: maxBuffers}) // Verify that upload was successful if err != nil { log.Fatal(err) }
Output:
type ContainerAccessConditions ¶
type ContainerAccessConditions struct { ModifiedAccessConditions LeaseAccessConditions }
ContainerAccessConditions identifies container-specific access conditions which you optionally set.
type ContainerAcquireLeaseResponse ¶
type ContainerAcquireLeaseResponse struct {
// contains filtered or unexported fields
}
ContainerAcquireLeaseResponse ...
func (ContainerAcquireLeaseResponse) ClientRequestID ¶ added in v0.10.0
func (calr ContainerAcquireLeaseResponse) ClientRequestID() string
ClientRequestID returns the value for header x-ms-client-request-id.
func (ContainerAcquireLeaseResponse) Date ¶
func (calr ContainerAcquireLeaseResponse) Date() time.Time
Date returns the value for header Date.
func (ContainerAcquireLeaseResponse) ETag ¶
func (calr ContainerAcquireLeaseResponse) ETag() ETag
ETag returns the value for header ETag.
func (ContainerAcquireLeaseResponse) ErrorCode ¶
func (calr ContainerAcquireLeaseResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (ContainerAcquireLeaseResponse) LastModified ¶
func (calr ContainerAcquireLeaseResponse) LastModified() time.Time
LastModified returns the value for header Last-Modified.
func (ContainerAcquireLeaseResponse) LeaseID ¶
func (calr ContainerAcquireLeaseResponse) LeaseID() string
LeaseID returns the value for header x-ms-lease-id.
func (ContainerAcquireLeaseResponse) RequestID ¶
func (calr ContainerAcquireLeaseResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (ContainerAcquireLeaseResponse) Response ¶
func (calr ContainerAcquireLeaseResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (ContainerAcquireLeaseResponse) Status ¶
func (calr ContainerAcquireLeaseResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (ContainerAcquireLeaseResponse) StatusCode ¶
func (calr ContainerAcquireLeaseResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (ContainerAcquireLeaseResponse) Version ¶
func (calr ContainerAcquireLeaseResponse) Version() string
Version returns the value for header x-ms-version.
type ContainerBreakLeaseResponse ¶
type ContainerBreakLeaseResponse struct {
// contains filtered or unexported fields
}
ContainerBreakLeaseResponse ...
func (ContainerBreakLeaseResponse) ClientRequestID ¶ added in v0.10.0
func (cblr ContainerBreakLeaseResponse) ClientRequestID() string
ClientRequestID returns the value for header x-ms-client-request-id.
func (ContainerBreakLeaseResponse) Date ¶
func (cblr ContainerBreakLeaseResponse) Date() time.Time
Date returns the value for header Date.
func (ContainerBreakLeaseResponse) ETag ¶
func (cblr ContainerBreakLeaseResponse) ETag() ETag
ETag returns the value for header ETag.
func (ContainerBreakLeaseResponse) ErrorCode ¶
func (cblr ContainerBreakLeaseResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (ContainerBreakLeaseResponse) LastModified ¶
func (cblr ContainerBreakLeaseResponse) LastModified() time.Time
LastModified returns the value for header Last-Modified.
func (ContainerBreakLeaseResponse) LeaseTime ¶
func (cblr ContainerBreakLeaseResponse) LeaseTime() int32
LeaseTime returns the value for header x-ms-lease-time.
func (ContainerBreakLeaseResponse) RequestID ¶
func (cblr ContainerBreakLeaseResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (ContainerBreakLeaseResponse) Response ¶
func (cblr ContainerBreakLeaseResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (ContainerBreakLeaseResponse) Status ¶
func (cblr ContainerBreakLeaseResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (ContainerBreakLeaseResponse) StatusCode ¶
func (cblr ContainerBreakLeaseResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (ContainerBreakLeaseResponse) Version ¶
func (cblr ContainerBreakLeaseResponse) Version() string
Version returns the value for header x-ms-version.
type ContainerChangeLeaseResponse ¶
type ContainerChangeLeaseResponse struct {
// contains filtered or unexported fields
}
ContainerChangeLeaseResponse ...
func (ContainerChangeLeaseResponse) ClientRequestID ¶ added in v0.10.0
func (cclr ContainerChangeLeaseResponse) ClientRequestID() string
ClientRequestID returns the value for header x-ms-client-request-id.
func (ContainerChangeLeaseResponse) Date ¶
func (cclr ContainerChangeLeaseResponse) Date() time.Time
Date returns the value for header Date.
func (ContainerChangeLeaseResponse) ETag ¶
func (cclr ContainerChangeLeaseResponse) ETag() ETag
ETag returns the value for header ETag.
func (ContainerChangeLeaseResponse) ErrorCode ¶
func (cclr ContainerChangeLeaseResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (ContainerChangeLeaseResponse) LastModified ¶
func (cclr ContainerChangeLeaseResponse) LastModified() time.Time
LastModified returns the value for header Last-Modified.
func (ContainerChangeLeaseResponse) LeaseID ¶
func (cclr ContainerChangeLeaseResponse) LeaseID() string
LeaseID returns the value for header x-ms-lease-id.
func (ContainerChangeLeaseResponse) RequestID ¶
func (cclr ContainerChangeLeaseResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (ContainerChangeLeaseResponse) Response ¶
func (cclr ContainerChangeLeaseResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (ContainerChangeLeaseResponse) Status ¶
func (cclr ContainerChangeLeaseResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (ContainerChangeLeaseResponse) StatusCode ¶
func (cclr ContainerChangeLeaseResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (ContainerChangeLeaseResponse) Version ¶
func (cclr ContainerChangeLeaseResponse) Version() string
Version returns the value for header x-ms-version.
type ContainerCreateResponse ¶
type ContainerCreateResponse struct {
// contains filtered or unexported fields
}
ContainerCreateResponse ...
func (ContainerCreateResponse) ClientRequestID ¶ added in v0.10.0
func (ccr ContainerCreateResponse) ClientRequestID() string
ClientRequestID returns the value for header x-ms-client-request-id.
func (ContainerCreateResponse) Date ¶
func (ccr ContainerCreateResponse) Date() time.Time
Date returns the value for header Date.
func (ContainerCreateResponse) ETag ¶
func (ccr ContainerCreateResponse) ETag() ETag
ETag returns the value for header ETag.
func (ContainerCreateResponse) ErrorCode ¶
func (ccr ContainerCreateResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (ContainerCreateResponse) LastModified ¶
func (ccr ContainerCreateResponse) LastModified() time.Time
LastModified returns the value for header Last-Modified.
func (ContainerCreateResponse) RequestID ¶
func (ccr ContainerCreateResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (ContainerCreateResponse) Response ¶
func (ccr ContainerCreateResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (ContainerCreateResponse) Status ¶
func (ccr ContainerCreateResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (ContainerCreateResponse) StatusCode ¶
func (ccr ContainerCreateResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (ContainerCreateResponse) Version ¶
func (ccr ContainerCreateResponse) Version() string
Version returns the value for header x-ms-version.
type ContainerDeleteResponse ¶
type ContainerDeleteResponse struct {
// contains filtered or unexported fields
}
ContainerDeleteResponse ...
func (ContainerDeleteResponse) ClientRequestID ¶ added in v0.10.0
func (cdr ContainerDeleteResponse) ClientRequestID() string
ClientRequestID returns the value for header x-ms-client-request-id.
func (ContainerDeleteResponse) Date ¶
func (cdr ContainerDeleteResponse) Date() time.Time
Date returns the value for header Date.
func (ContainerDeleteResponse) ErrorCode ¶
func (cdr ContainerDeleteResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (ContainerDeleteResponse) RequestID ¶
func (cdr ContainerDeleteResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (ContainerDeleteResponse) Response ¶
func (cdr ContainerDeleteResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (ContainerDeleteResponse) Status ¶
func (cdr ContainerDeleteResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (ContainerDeleteResponse) StatusCode ¶
func (cdr ContainerDeleteResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (ContainerDeleteResponse) Version ¶
func (cdr ContainerDeleteResponse) Version() string
Version returns the value for header x-ms-version.
type ContainerGetAccountInfoResponse ¶
type ContainerGetAccountInfoResponse struct {
// contains filtered or unexported fields
}
ContainerGetAccountInfoResponse ...
func (ContainerGetAccountInfoResponse) AccountKind ¶
func (cgair ContainerGetAccountInfoResponse) AccountKind() AccountKindType
AccountKind returns the value for header x-ms-account-kind.
func (ContainerGetAccountInfoResponse) ClientRequestID ¶ added in v0.10.0
func (cgair ContainerGetAccountInfoResponse) ClientRequestID() string
ClientRequestID returns the value for header x-ms-client-request-id.
func (ContainerGetAccountInfoResponse) Date ¶
func (cgair ContainerGetAccountInfoResponse) Date() time.Time
Date returns the value for header Date.
func (ContainerGetAccountInfoResponse) ErrorCode ¶
func (cgair ContainerGetAccountInfoResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (ContainerGetAccountInfoResponse) RequestID ¶
func (cgair ContainerGetAccountInfoResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (ContainerGetAccountInfoResponse) Response ¶
func (cgair ContainerGetAccountInfoResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (ContainerGetAccountInfoResponse) SkuName ¶
func (cgair ContainerGetAccountInfoResponse) SkuName() SkuNameType
SkuName returns the value for header x-ms-sku-name.
func (ContainerGetAccountInfoResponse) Status ¶
func (cgair ContainerGetAccountInfoResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (ContainerGetAccountInfoResponse) StatusCode ¶
func (cgair ContainerGetAccountInfoResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (ContainerGetAccountInfoResponse) Version ¶
func (cgair ContainerGetAccountInfoResponse) Version() string
Version returns the value for header x-ms-version.
type ContainerGetPropertiesResponse ¶
type ContainerGetPropertiesResponse struct {
// contains filtered or unexported fields
}
ContainerGetPropertiesResponse ...
func (ContainerGetPropertiesResponse) BlobPublicAccess ¶
func (cgpr ContainerGetPropertiesResponse) BlobPublicAccess() PublicAccessType
BlobPublicAccess returns the value for header x-ms-blob-public-access.
func (ContainerGetPropertiesResponse) ClientRequestID ¶ added in v0.10.0
func (cgpr ContainerGetPropertiesResponse) ClientRequestID() string
ClientRequestID returns the value for header x-ms-client-request-id.
func (ContainerGetPropertiesResponse) Date ¶
func (cgpr ContainerGetPropertiesResponse) Date() time.Time
Date returns the value for header Date.
func (ContainerGetPropertiesResponse) DefaultEncryptionScope ¶ added in v0.11.0
func (cgpr ContainerGetPropertiesResponse) DefaultEncryptionScope() string
DefaultEncryptionScope returns the value for header x-ms-default-encryption-scope.
func (ContainerGetPropertiesResponse) DenyEncryptionScopeOverride ¶ added in v0.11.0
func (cgpr ContainerGetPropertiesResponse) DenyEncryptionScopeOverride() string
DenyEncryptionScopeOverride returns the value for header x-ms-deny-encryption-scope-override.
func (ContainerGetPropertiesResponse) ETag ¶
func (cgpr ContainerGetPropertiesResponse) ETag() ETag
ETag returns the value for header ETag.
func (ContainerGetPropertiesResponse) ErrorCode ¶
func (cgpr ContainerGetPropertiesResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (ContainerGetPropertiesResponse) HasImmutabilityPolicy ¶
func (cgpr ContainerGetPropertiesResponse) HasImmutabilityPolicy() string
HasImmutabilityPolicy returns the value for header x-ms-has-immutability-policy.
func (ContainerGetPropertiesResponse) HasLegalHold ¶
func (cgpr ContainerGetPropertiesResponse) HasLegalHold() string
HasLegalHold returns the value for header x-ms-has-legal-hold.
func (ContainerGetPropertiesResponse) IsImmutableStorageWithVersioningEnabled ¶ added in v0.15.0
func (cgpr ContainerGetPropertiesResponse) IsImmutableStorageWithVersioningEnabled() string
IsImmutableStorageWithVersioningEnabled returns the value for header x-ms-immutable-storage-with-versioning-enabled.
func (ContainerGetPropertiesResponse) LastModified ¶
func (cgpr ContainerGetPropertiesResponse) LastModified() time.Time
LastModified returns the value for header Last-Modified.
func (ContainerGetPropertiesResponse) LeaseDuration ¶
func (cgpr ContainerGetPropertiesResponse) LeaseDuration() LeaseDurationType
LeaseDuration returns the value for header x-ms-lease-duration.
func (ContainerGetPropertiesResponse) LeaseState ¶
func (cgpr ContainerGetPropertiesResponse) LeaseState() LeaseStateType
LeaseState returns the value for header x-ms-lease-state.
func (ContainerGetPropertiesResponse) LeaseStatus ¶
func (cgpr ContainerGetPropertiesResponse) LeaseStatus() LeaseStatusType
LeaseStatus returns the value for header x-ms-lease-status.
func (ContainerGetPropertiesResponse) NewMetadata ¶
func (cgpr ContainerGetPropertiesResponse) NewMetadata() Metadata
NewMetadata returns user-defined key/value pairs.
func (ContainerGetPropertiesResponse) RequestID ¶
func (cgpr ContainerGetPropertiesResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (ContainerGetPropertiesResponse) Response ¶
func (cgpr ContainerGetPropertiesResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (ContainerGetPropertiesResponse) Status ¶
func (cgpr ContainerGetPropertiesResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (ContainerGetPropertiesResponse) StatusCode ¶
func (cgpr ContainerGetPropertiesResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (ContainerGetPropertiesResponse) Version ¶
func (cgpr ContainerGetPropertiesResponse) Version() string
Version returns the value for header x-ms-version.
type ContainerItem ¶
type ContainerItem struct { // XMLName is used for marshalling and is subject to removal in a future release. XMLName xml.Name `xml:"Container"` Name string `xml:"Name"` Deleted *bool `xml:"Deleted"` Version *string `xml:"Version"` Properties ContainerProperties `xml:"Properties"` Metadata Metadata `xml:"Metadata"` }
ContainerItem - An Azure Storage container
type ContainerProperties ¶
type ContainerProperties struct { LastModified time.Time `xml:"Last-Modified"` Etag ETag `xml:"Etag"` // LeaseStatus - Possible values include: 'LeaseStatusLocked', 'LeaseStatusUnlocked', 'LeaseStatusNone' LeaseStatus LeaseStatusType `xml:"LeaseStatus"` // LeaseState - Possible values include: 'LeaseStateAvailable', 'LeaseStateLeased', 'LeaseStateExpired', 'LeaseStateBreaking', 'LeaseStateBroken', 'LeaseStateNone' LeaseState LeaseStateType `xml:"LeaseState"` // LeaseDuration - Possible values include: 'LeaseDurationInfinite', 'LeaseDurationFixed', 'LeaseDurationNone' LeaseDuration LeaseDurationType `xml:"LeaseDuration"` // PublicAccess - Possible values include: 'PublicAccessContainer', 'PublicAccessBlob', 'PublicAccessNone' PublicAccess PublicAccessType `xml:"PublicAccess"` HasImmutabilityPolicy *bool `xml:"HasImmutabilityPolicy"` HasLegalHold *bool `xml:"HasLegalHold"` DefaultEncryptionScope *string `xml:"DefaultEncryptionScope"` PreventEncryptionScopeOverride *bool `xml:"DenyEncryptionScopeOverride"` DeletedTime *time.Time `xml:"DeletedTime"` RemainingRetentionDays *int32 `xml:"RemainingRetentionDays"` // IsImmutableStorageWithVersioningEnabled - Indicates if version level worm is enabled on this container. IsImmutableStorageWithVersioningEnabled *bool `xml:"ImmutableStorageWithVersioningEnabled"` }
ContainerProperties - Properties of a container
func (ContainerProperties) MarshalXML ¶
func (cp ContainerProperties) MarshalXML(e *xml.Encoder, start xml.StartElement) error
MarshalXML implements the xml.Marshaler interface for ContainerProperties.
func (*ContainerProperties) UnmarshalXML ¶
func (cp *ContainerProperties) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
UnmarshalXML implements the xml.Unmarshaler interface for ContainerProperties.
type ContainerReleaseLeaseResponse ¶
type ContainerReleaseLeaseResponse struct {
// contains filtered or unexported fields
}
ContainerReleaseLeaseResponse ...
func (ContainerReleaseLeaseResponse) ClientRequestID ¶ added in v0.10.0
func (crlr ContainerReleaseLeaseResponse) ClientRequestID() string
ClientRequestID returns the value for header x-ms-client-request-id.
func (ContainerReleaseLeaseResponse) Date ¶
func (crlr ContainerReleaseLeaseResponse) Date() time.Time
Date returns the value for header Date.
func (ContainerReleaseLeaseResponse) ETag ¶
func (crlr ContainerReleaseLeaseResponse) ETag() ETag
ETag returns the value for header ETag.
func (ContainerReleaseLeaseResponse) ErrorCode ¶
func (crlr ContainerReleaseLeaseResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (ContainerReleaseLeaseResponse) LastModified ¶
func (crlr ContainerReleaseLeaseResponse) LastModified() time.Time
LastModified returns the value for header Last-Modified.
func (ContainerReleaseLeaseResponse) RequestID ¶
func (crlr ContainerReleaseLeaseResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (ContainerReleaseLeaseResponse) Response ¶
func (crlr ContainerReleaseLeaseResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (ContainerReleaseLeaseResponse) Status ¶
func (crlr ContainerReleaseLeaseResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (ContainerReleaseLeaseResponse) StatusCode ¶
func (crlr ContainerReleaseLeaseResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (ContainerReleaseLeaseResponse) Version ¶
func (crlr ContainerReleaseLeaseResponse) Version() string
Version returns the value for header x-ms-version.
type ContainerRenameResponse ¶ added in v0.14.0
type ContainerRenameResponse struct {
// contains filtered or unexported fields
}
ContainerRenameResponse ...
func (ContainerRenameResponse) ClientRequestID ¶ added in v0.14.0
func (crr ContainerRenameResponse) ClientRequestID() string
ClientRequestID returns the value for header x-ms-client-request-id.
func (ContainerRenameResponse) Date ¶ added in v0.14.0
func (crr ContainerRenameResponse) Date() time.Time
Date returns the value for header Date.
func (ContainerRenameResponse) ErrorCode ¶ added in v0.14.0
func (crr ContainerRenameResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (ContainerRenameResponse) RequestID ¶ added in v0.14.0
func (crr ContainerRenameResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (ContainerRenameResponse) Response ¶ added in v0.14.0
func (crr ContainerRenameResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (ContainerRenameResponse) Status ¶ added in v0.14.0
func (crr ContainerRenameResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (ContainerRenameResponse) StatusCode ¶ added in v0.14.0
func (crr ContainerRenameResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (ContainerRenameResponse) Version ¶ added in v0.14.0
func (crr ContainerRenameResponse) Version() string
Version returns the value for header x-ms-version.
type ContainerRenewLeaseResponse ¶
type ContainerRenewLeaseResponse struct {
// contains filtered or unexported fields
}
ContainerRenewLeaseResponse ...
func (ContainerRenewLeaseResponse) ClientRequestID ¶ added in v0.10.0
func (crlr ContainerRenewLeaseResponse) ClientRequestID() string
ClientRequestID returns the value for header x-ms-client-request-id.
func (ContainerRenewLeaseResponse) Date ¶
func (crlr ContainerRenewLeaseResponse) Date() time.Time
Date returns the value for header Date.
func (ContainerRenewLeaseResponse) ETag ¶
func (crlr ContainerRenewLeaseResponse) ETag() ETag
ETag returns the value for header ETag.
func (ContainerRenewLeaseResponse) ErrorCode ¶
func (crlr ContainerRenewLeaseResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (ContainerRenewLeaseResponse) LastModified ¶
func (crlr ContainerRenewLeaseResponse) LastModified() time.Time
LastModified returns the value for header Last-Modified.
func (ContainerRenewLeaseResponse) LeaseID ¶
func (crlr ContainerRenewLeaseResponse) LeaseID() string
LeaseID returns the value for header x-ms-lease-id.
func (ContainerRenewLeaseResponse) RequestID ¶
func (crlr ContainerRenewLeaseResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (ContainerRenewLeaseResponse) Response ¶
func (crlr ContainerRenewLeaseResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (ContainerRenewLeaseResponse) Status ¶
func (crlr ContainerRenewLeaseResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (ContainerRenewLeaseResponse) StatusCode ¶
func (crlr ContainerRenewLeaseResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (ContainerRenewLeaseResponse) Version ¶
func (crlr ContainerRenewLeaseResponse) Version() string
Version returns the value for header x-ms-version.
type ContainerRestoreResponse ¶ added in v0.11.0
type ContainerRestoreResponse struct {
// contains filtered or unexported fields
}
ContainerRestoreResponse ...
func (ContainerRestoreResponse) ClientRequestID ¶ added in v0.11.0
func (crr ContainerRestoreResponse) ClientRequestID() string
ClientRequestID returns the value for header x-ms-client-request-id.
func (ContainerRestoreResponse) Date ¶ added in v0.11.0
func (crr ContainerRestoreResponse) Date() time.Time
Date returns the value for header Date.
func (ContainerRestoreResponse) ErrorCode ¶ added in v0.11.0
func (crr ContainerRestoreResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (ContainerRestoreResponse) RequestID ¶ added in v0.11.0
func (crr ContainerRestoreResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (ContainerRestoreResponse) Response ¶ added in v0.11.0
func (crr ContainerRestoreResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (ContainerRestoreResponse) Status ¶ added in v0.11.0
func (crr ContainerRestoreResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (ContainerRestoreResponse) StatusCode ¶ added in v0.11.0
func (crr ContainerRestoreResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (ContainerRestoreResponse) Version ¶ added in v0.11.0
func (crr ContainerRestoreResponse) Version() string
Version returns the value for header x-ms-version.
type ContainerSASPermissions ¶
type ContainerSASPermissions struct {
Read, Add, Create, Write, Delete, DeletePreviousVersion, List, Tag, Immutability bool
Execute, ModifyOwnership, ModifyPermissions bool // Hierarchical Namespace only
}
The ContainerSASPermissions type simplifies creating the permissions string for an Azure Storage container SAS. Initialize an instance of this type and then call its String method to set BlobSASSignatureValues's Permissions field. All permissions descriptions can be found here: https://docs.microsoft.com/en-us/rest/api/storageservices/create-service-sas#permissions-for-a-directory-container-or-blob
func (*ContainerSASPermissions) Parse ¶
func (p *ContainerSASPermissions) Parse(s string) error
Parse initializes the ContainerSASPermissions's fields from a string.
func (ContainerSASPermissions) String ¶
func (p ContainerSASPermissions) String() string
String produces the SAS permissions string for an Azure Storage container. Call this method to set BlobSASSignatureValues's Permissions field.
type ContainerSetAccessPolicyResponse ¶
type ContainerSetAccessPolicyResponse struct {
// contains filtered or unexported fields
}
ContainerSetAccessPolicyResponse ...
func (ContainerSetAccessPolicyResponse) ClientRequestID ¶ added in v0.10.0
func (csapr ContainerSetAccessPolicyResponse) ClientRequestID() string
ClientRequestID returns the value for header x-ms-client-request-id.
func (ContainerSetAccessPolicyResponse) Date ¶
func (csapr ContainerSetAccessPolicyResponse) Date() time.Time
Date returns the value for header Date.
func (ContainerSetAccessPolicyResponse) ETag ¶
func (csapr ContainerSetAccessPolicyResponse) ETag() ETag
ETag returns the value for header ETag.
func (ContainerSetAccessPolicyResponse) ErrorCode ¶
func (csapr ContainerSetAccessPolicyResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (ContainerSetAccessPolicyResponse) LastModified ¶
func (csapr ContainerSetAccessPolicyResponse) LastModified() time.Time
LastModified returns the value for header Last-Modified.
func (ContainerSetAccessPolicyResponse) RequestID ¶
func (csapr ContainerSetAccessPolicyResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (ContainerSetAccessPolicyResponse) Response ¶
func (csapr ContainerSetAccessPolicyResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (ContainerSetAccessPolicyResponse) Status ¶
func (csapr ContainerSetAccessPolicyResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (ContainerSetAccessPolicyResponse) StatusCode ¶
func (csapr ContainerSetAccessPolicyResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (ContainerSetAccessPolicyResponse) Version ¶
func (csapr ContainerSetAccessPolicyResponse) Version() string
Version returns the value for header x-ms-version.
type ContainerSetMetadataResponse ¶
type ContainerSetMetadataResponse struct {
// contains filtered or unexported fields
}
ContainerSetMetadataResponse ...
func (ContainerSetMetadataResponse) ClientRequestID ¶ added in v0.10.0
func (csmr ContainerSetMetadataResponse) ClientRequestID() string
ClientRequestID returns the value for header x-ms-client-request-id.
func (ContainerSetMetadataResponse) Date ¶
func (csmr ContainerSetMetadataResponse) Date() time.Time
Date returns the value for header Date.
func (ContainerSetMetadataResponse) ETag ¶
func (csmr ContainerSetMetadataResponse) ETag() ETag
ETag returns the value for header ETag.
func (ContainerSetMetadataResponse) ErrorCode ¶
func (csmr ContainerSetMetadataResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (ContainerSetMetadataResponse) LastModified ¶
func (csmr ContainerSetMetadataResponse) LastModified() time.Time
LastModified returns the value for header Last-Modified.
func (ContainerSetMetadataResponse) RequestID ¶
func (csmr ContainerSetMetadataResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (ContainerSetMetadataResponse) Response ¶
func (csmr ContainerSetMetadataResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (ContainerSetMetadataResponse) Status ¶
func (csmr ContainerSetMetadataResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (ContainerSetMetadataResponse) StatusCode ¶
func (csmr ContainerSetMetadataResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (ContainerSetMetadataResponse) Version ¶
func (csmr ContainerSetMetadataResponse) Version() string
Version returns the value for header x-ms-version.
type ContainerURL ¶
type ContainerURL struct {
// contains filtered or unexported fields
}
A ContainerURL represents a URL to the Azure Storage container allowing you to manipulate its blobs.
func NewContainerURL ¶
func NewContainerURL(url url.URL, p pipeline.Pipeline) ContainerURL
NewContainerURL creates a ContainerURL object using the specified URL and request policy pipeline.
func (ContainerURL) AcquireLease ¶
func (c ContainerURL) AcquireLease(ctx context.Context, proposedID string, duration int32, ac ModifiedAccessConditions) (*ContainerAcquireLeaseResponse, error)
AcquireLease acquires a lease on the container for delete operations. The lease duration must be between 15 to 60 seconds, or infinite (-1). For more information, see https://docs.microsoft.com/rest/api/storageservices/lease-container.
func (ContainerURL) BreakLease ¶
func (c ContainerURL) BreakLease(ctx context.Context, period int32, ac ModifiedAccessConditions) (*ContainerBreakLeaseResponse, error)
BreakLease breaks the container's previously-acquired lease (if it exists). For more information, see https://docs.microsoft.com/rest/api/storageservices/lease-container.
func (ContainerURL) ChangeLease ¶
func (c ContainerURL) ChangeLease(ctx context.Context, leaseID string, proposedID string, ac ModifiedAccessConditions) (*ContainerChangeLeaseResponse, error)
ChangeLease changes the container's lease ID. For more information, see https://docs.microsoft.com/rest/api/storageservices/lease-container.
func (ContainerURL) Create ¶
func (c ContainerURL) Create(ctx context.Context, metadata Metadata, publicAccessType PublicAccessType) (*ContainerCreateResponse, error)
Create creates a new container within a storage account. If a container with the same name already exists, the operation fails. For more information, see https://docs.microsoft.com/rest/api/storageservices/create-container.
func (ContainerURL) Delete ¶
func (c ContainerURL) Delete(ctx context.Context, ac ContainerAccessConditions) (*ContainerDeleteResponse, error)
Delete marks the specified container for deletion. The container and any blobs contained within it are later deleted during garbage collection. For more information, see https://docs.microsoft.com/rest/api/storageservices/delete-container.
func (ContainerURL) GetAccessPolicy ¶
func (c ContainerURL) GetAccessPolicy(ctx context.Context, ac LeaseAccessConditions) (*SignedIdentifiers, error)
GetAccessPolicy returns the container's access policy. The access policy indicates whether container's blobs may be accessed publicly. For more information, see https://docs.microsoft.com/rest/api/storageservices/get-container-acl.
func (ContainerURL) GetAccountInfo ¶ added in v0.9.0
func (c ContainerURL) GetAccountInfo(ctx context.Context) (*ContainerGetAccountInfoResponse, error)
func (ContainerURL) GetProperties ¶
func (c ContainerURL) GetProperties(ctx context.Context, ac LeaseAccessConditions) (*ContainerGetPropertiesResponse, error)
GetProperties returns the container's properties. For more information, see https://docs.microsoft.com/rest/api/storageservices/get-container-metadata.
func (ContainerURL) ListBlobsFlatSegment ¶
func (c ContainerURL) ListBlobsFlatSegment(ctx context.Context, marker Marker, o ListBlobsSegmentOptions) (*ListBlobsFlatSegmentResponse, error)
ListBlobsFlatSegment returns a single segment of blobs starting from the specified Marker. Use an empty Marker to start enumeration from the beginning. Blob names are returned in lexicographic order. After getting a segment, process it, and then call ListBlobsFlatSegment again (passing the the previously-returned Marker) to get the next segment. For more information, see https://docs.microsoft.com/rest/api/storageservices/list-blobs.
func (ContainerURL) ListBlobsHierarchySegment ¶
func (c ContainerURL) ListBlobsHierarchySegment(ctx context.Context, marker Marker, delimiter string, o ListBlobsSegmentOptions) (*ListBlobsHierarchySegmentResponse, error)
ListBlobsHierarchySegment returns a single segment of blobs starting from the specified Marker. Use an empty Marker to start enumeration from the beginning. Blob names are returned in lexicographic order. After getting a segment, process it, and then call ListBlobsHierarchicalSegment again (passing the the previously-returned Marker) to get the next segment. For more information, see https://docs.microsoft.com/rest/api/storageservices/list-blobs.
func (ContainerURL) NewAppendBlobURL ¶
func (c ContainerURL) NewAppendBlobURL(blobName string) AppendBlobURL
NewAppendBlobURL creates a new AppendBlobURL object by concatenating blobName to the end of ContainerURL's URL. The new AppendBlobURL uses the same request policy pipeline as the ContainerURL. To change the pipeline, create the AppendBlobURL and then call its WithPipeline method passing in the desired pipeline object. Or, call this package's NewAppendBlobURL instead of calling this object's NewAppendBlobURL method.
func (ContainerURL) NewBlobURL ¶
func (c ContainerURL) NewBlobURL(blobName string) BlobURL
NewBlobURL creates a new BlobURL object by concatenating blobName to the end of ContainerURL's URL. The new BlobURL uses the same request policy pipeline as the ContainerURL. To change the pipeline, create the BlobURL and then call its WithPipeline method passing in the desired pipeline object. Or, call this package's NewBlobURL instead of calling this object's NewBlobURL method.
func (ContainerURL) NewBlockBlobURL ¶
func (c ContainerURL) NewBlockBlobURL(blobName string) BlockBlobURL
NewBlockBlobURL creates a new BlockBlobURL object by concatenating blobName to the end of ContainerURL's URL. The new BlockBlobURL uses the same request policy pipeline as the ContainerURL. To change the pipeline, create the BlockBlobURL and then call its WithPipeline method passing in the desired pipeline object. Or, call this package's NewBlockBlobURL instead of calling this object's NewBlockBlobURL method.
func (ContainerURL) NewPageBlobURL ¶
func (c ContainerURL) NewPageBlobURL(blobName string) PageBlobURL
NewPageBlobURL creates a new PageBlobURL object by concatenating blobName to the end of ContainerURL's URL. The new PageBlobURL uses the same request policy pipeline as the ContainerURL. To change the pipeline, create the PageBlobURL and then call its WithPipeline method passing in the desired pipeline object. Or, call this package's NewPageBlobURL instead of calling this object's NewPageBlobURL method.
func (ContainerURL) ReleaseLease ¶
func (c ContainerURL) ReleaseLease(ctx context.Context, leaseID string, ac ModifiedAccessConditions) (*ContainerReleaseLeaseResponse, error)
ReleaseLease releases the container's previously-acquired lease. For more information, see https://docs.microsoft.com/rest/api/storageservices/lease-container.
func (ContainerURL) RenewLease ¶
func (c ContainerURL) RenewLease(ctx context.Context, leaseID string, ac ModifiedAccessConditions) (*ContainerRenewLeaseResponse, error)
RenewLease renews the container's previously-acquired lease. For more information, see https://docs.microsoft.com/rest/api/storageservices/lease-container.
func (ContainerURL) SetAccessPolicy ¶
func (c ContainerURL) SetAccessPolicy(ctx context.Context, accessType PublicAccessType, si []SignedIdentifier, ac ContainerAccessConditions) (*ContainerSetAccessPolicyResponse, error)
SetAccessPolicy sets the container's permissions. The access policy indicates whether blobs in a container may be accessed publicly. For more information, see https://docs.microsoft.com/rest/api/storageservices/set-container-acl.
func (ContainerURL) SetMetadata ¶
func (c ContainerURL) SetMetadata(ctx context.Context, metadata Metadata, ac ContainerAccessConditions) (*ContainerSetMetadataResponse, error)
SetMetadata sets the container's metadata. For more information, see https://docs.microsoft.com/rest/api/storageservices/set-container-metadata.
func (ContainerURL) String ¶
func (c ContainerURL) String() string
String returns the URL as a string.
func (ContainerURL) URL ¶
func (c ContainerURL) URL() url.URL
URL returns the URL endpoint used by the ContainerURL object.
func (ContainerURL) WithPipeline ¶
func (c ContainerURL) WithPipeline(p pipeline.Pipeline) ContainerURL
WithPipeline creates a new ContainerURL object identical to the source but with the specified request policy pipeline.
type CopyStatusType ¶
type CopyStatusType string
CopyStatusType enumerates the values for copy status type.
const ( // CopyStatusAborted ... CopyStatusAborted CopyStatusType = "aborted" // CopyStatusFailed ... CopyStatusFailed CopyStatusType = "failed" // CopyStatusNone represents an empty CopyStatusType. CopyStatusNone CopyStatusType = "" // CopyStatusPending ... CopyStatusPending CopyStatusType = "pending" // CopyStatusSuccess ... CopyStatusSuccess CopyStatusType = "success" )
func PossibleCopyStatusTypeValues ¶
func PossibleCopyStatusTypeValues() []CopyStatusType
PossibleCopyStatusTypeValues returns an array of possible values for the CopyStatusType const type.
type CorsRule ¶
type CorsRule struct { // AllowedOrigins - The origin domains that are permitted to make a request against the storage service via CORS. The origin domain is the domain from which the request originates. Note that the origin must be an exact case-sensitive match with the origin that the user age sends to the service. You can also use the wildcard character '*' to allow all origin domains to make requests via CORS. AllowedOrigins string `xml:"AllowedOrigins"` // AllowedMethods - The methods (HTTP request verbs) that the origin domain may use for a CORS request. (comma separated) AllowedMethods string `xml:"AllowedMethods"` // AllowedHeaders - the request headers that the origin domain may specify on the CORS request. AllowedHeaders string `xml:"AllowedHeaders"` // ExposedHeaders - The response headers that may be sent in the response to the CORS request and exposed by the browser to the request issuer ExposedHeaders string `xml:"ExposedHeaders"` // MaxAgeInSeconds - The maximum amount time that a browser should cache the preflight OPTIONS request. MaxAgeInSeconds int32 `xml:"MaxAgeInSeconds"` }
CorsRule - CORS is an HTTP feature that enables a web application running under one domain to access resources in another domain. Web browsers implement a security restriction known as same-origin policy that prevents a web page from calling APIs in a different domain; CORS provides a secure way to allow one domain (the origin domain) to call APIs in another domain
type Credential ¶
Credential represent any credential type; it is used to create a credential policy Factory.
func NewAnonymousCredential ¶
func NewAnonymousCredential() Credential
NewAnonymousCredential creates an anonymous credential for use with HTTP(S) requests that read public resource or for use with Shared Access Signatures (SAS).
type DeleteSnapshotsOptionType ¶
type DeleteSnapshotsOptionType string
DeleteSnapshotsOptionType enumerates the values for delete snapshots option type.
const ( // DeleteSnapshotsOptionInclude ... DeleteSnapshotsOptionInclude DeleteSnapshotsOptionType = "include" // DeleteSnapshotsOptionNone represents an empty DeleteSnapshotsOptionType. DeleteSnapshotsOptionNone DeleteSnapshotsOptionType = "" // DeleteSnapshotsOptionOnly ... DeleteSnapshotsOptionOnly DeleteSnapshotsOptionType = "only" )
func PossibleDeleteSnapshotsOptionTypeValues ¶
func PossibleDeleteSnapshotsOptionTypeValues() []DeleteSnapshotsOptionType
PossibleDeleteSnapshotsOptionTypeValues returns an array of possible values for the DeleteSnapshotsOptionType const type.
type DelimitedTextConfiguration ¶ added in v0.11.0
type DelimitedTextConfiguration struct { // ColumnSeparator - The string used to separate columns. ColumnSeparator *string `xml:"ColumnSeparator"` // FieldQuote - The string used to quote a specific field. FieldQuote *string `xml:"FieldQuote"` // RecordSeparator - The string used to separate records. RecordSeparator *string `xml:"RecordSeparator"` // EscapeChar - The string used as an escape character. EscapeChar *string `xml:"EscapeChar"` // HeadersPresent - Represents whether the data has headers. HeadersPresent *bool `xml:"HasHeaders"` }
DelimitedTextConfiguration - Groups the settings used for interpreting the blob data if the blob is delimited text formatted.
type DownloadFromBlobOptions ¶
type DownloadFromBlobOptions struct { // BlockSize specifies the block size to use for each parallel download; the default size is BlobDefaultDownloadBlockSize. BlockSize int64 // Progress is a function that is invoked periodically as bytes are received. Progress pipeline.ProgressReceiver // AccessConditions indicates the access conditions used when making HTTP GET requests against the blob. AccessConditions BlobAccessConditions // ClientProvidedKeyOptions indicates the client provided key by name and/or by value to encrypt/decrypt data. ClientProvidedKeyOptions ClientProvidedKeyOptions // Parallelism indicates the maximum number of blocks to download in parallel (0=default) Parallelism uint16 // RetryReaderOptionsPerBlock is used when downloading each block. RetryReaderOptionsPerBlock RetryReaderOptions }
DownloadFromBlobOptions identifies options used by the DownloadBlobToBuffer and DownloadBlobToFile functions.
type DownloadResponse ¶
type DownloadResponse struct {
// contains filtered or unexported fields
}
DownloadResponse wraps AutoRest generated downloadResponse and helps to provide info for retry.
func (DownloadResponse) AcceptRanges ¶
func (r DownloadResponse) AcceptRanges() string
AcceptRanges returns the value for header Accept-Ranges.
func (DownloadResponse) BlobCommittedBlockCount ¶
func (r DownloadResponse) BlobCommittedBlockCount() int32
BlobCommittedBlockCount returns the value for header x-ms-blob-committed-block-count.
func (DownloadResponse) BlobContentMD5 ¶
func (r DownloadResponse) BlobContentMD5() []byte
BlobContentMD5 returns the value for header x-ms-blob-content-md5.
func (DownloadResponse) BlobSequenceNumber ¶
func (r DownloadResponse) BlobSequenceNumber() int64
BlobSequenceNumber returns the value for header x-ms-blob-sequence-number.
func (DownloadResponse) BlobType ¶
func (r DownloadResponse) BlobType() BlobType
BlobType returns the value for header x-ms-blob-type.
func (*DownloadResponse) Body ¶
func (r *DownloadResponse) Body(o RetryReaderOptions) io.ReadCloser
Body constructs new RetryReader stream for reading data. If a connection failes while reading, it will make additional requests to reestablish a connection and continue reading. Specifying a RetryReaderOption's with MaxRetryRequests set to 0 (the default), returns the original response body and no retries will be performed.
func (DownloadResponse) CacheControl ¶
func (r DownloadResponse) CacheControl() string
CacheControl returns the value for header Cache-Control.
func (DownloadResponse) ContentDisposition ¶
func (r DownloadResponse) ContentDisposition() string
ContentDisposition returns the value for header Content-Disposition.
func (DownloadResponse) ContentEncoding ¶
func (r DownloadResponse) ContentEncoding() string
ContentEncoding returns the value for header Content-Encoding.
func (DownloadResponse) ContentLanguage ¶
func (r DownloadResponse) ContentLanguage() string
ContentLanguage returns the value for header Content-Language.
func (DownloadResponse) ContentLength ¶
func (r DownloadResponse) ContentLength() int64
ContentLength returns the value for header Content-Length.
func (DownloadResponse) ContentMD5 ¶
func (r DownloadResponse) ContentMD5() []byte
ContentMD5 returns the value for header Content-MD5.
func (DownloadResponse) ContentRange ¶
func (r DownloadResponse) ContentRange() string
ContentRange returns the value for header Content-Range.
func (DownloadResponse) ContentType ¶
func (r DownloadResponse) ContentType() string
ContentType returns the value for header Content-Type.
func (DownloadResponse) CopyCompletionTime ¶
func (r DownloadResponse) CopyCompletionTime() time.Time
CopyCompletionTime returns the value for header x-ms-copy-completion-time.
func (DownloadResponse) CopyID ¶
func (r DownloadResponse) CopyID() string
CopyID returns the value for header x-ms-copy-id.
func (DownloadResponse) CopyProgress ¶
func (r DownloadResponse) CopyProgress() string
CopyProgress returns the value for header x-ms-copy-progress.
func (DownloadResponse) CopySource ¶
func (r DownloadResponse) CopySource() string
CopySource returns the value for header x-ms-copy-source.
func (DownloadResponse) CopyStatus ¶
func (r DownloadResponse) CopyStatus() CopyStatusType
CopyStatus returns the value for header x-ms-copy-status.
func (DownloadResponse) CopyStatusDescription ¶
func (r DownloadResponse) CopyStatusDescription() string
CopyStatusDescription returns the value for header x-ms-copy-status-description.
func (DownloadResponse) Date ¶
func (r DownloadResponse) Date() time.Time
Date returns the value for header Date.
func (DownloadResponse) ETag ¶
func (r DownloadResponse) ETag() ETag
ETag returns the value for header ETag.
func (DownloadResponse) IsServerEncrypted ¶
func (r DownloadResponse) IsServerEncrypted() string
IsServerEncrypted returns the value for header x-ms-server-encrypted.
func (DownloadResponse) LastModified ¶
func (r DownloadResponse) LastModified() time.Time
LastModified returns the value for header Last-Modified.
func (DownloadResponse) LeaseDuration ¶
func (r DownloadResponse) LeaseDuration() LeaseDurationType
LeaseDuration returns the value for header x-ms-lease-duration.
func (DownloadResponse) LeaseState ¶
func (r DownloadResponse) LeaseState() LeaseStateType
LeaseState returns the value for header x-ms-lease-state.
func (DownloadResponse) LeaseStatus ¶
func (r DownloadResponse) LeaseStatus() LeaseStatusType
LeaseStatus returns the value for header x-ms-lease-status.
func (DownloadResponse) NewHTTPHeaders ¶
func (r DownloadResponse) NewHTTPHeaders() BlobHTTPHeaders
NewHTTPHeaders returns the user-modifiable properties for this blob.
func (DownloadResponse) NewMetadata ¶
func (r DownloadResponse) NewMetadata() Metadata
NewMetadata returns user-defined key/value pairs.
func (DownloadResponse) RequestID ¶
func (r DownloadResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (DownloadResponse) Response ¶
func (r DownloadResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (DownloadResponse) Status ¶
func (r DownloadResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (DownloadResponse) StatusCode ¶
func (r DownloadResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (DownloadResponse) Version ¶
func (r DownloadResponse) Version() string
Version returns the value for header x-ms-version.
type EncryptionAlgorithmType ¶ added in v0.10.0
type EncryptionAlgorithmType string
EncryptionAlgorithmType enumerates the values for encryption algorithm type.
const ( // EncryptionAlgorithmAES256 ... EncryptionAlgorithmAES256 EncryptionAlgorithmType = "AES256" // EncryptionAlgorithmNone represents an empty EncryptionAlgorithmType. EncryptionAlgorithmNone EncryptionAlgorithmType = "" )
func PossibleEncryptionAlgorithmTypeValues ¶ added in v0.10.0
func PossibleEncryptionAlgorithmTypeValues() []EncryptionAlgorithmType
PossibleEncryptionAlgorithmTypeValues returns an array of possible values for the EncryptionAlgorithmType const type.
type FailedReadNotifier ¶
type FailedReadNotifier func(failureCount int, lastError error, offset int64, count int64, willRetry bool)
FailedReadNotifier is a function type that represents the notification function called when a read fails
type FilterBlobItem ¶ added in v0.11.0
type FilterBlobItem struct { // XMLName is used for marshalling and is subject to removal in a future release. XMLName xml.Name `xml:"Blob"` Name string `xml:"Name"` ContainerName string `xml:"ContainerName"` Tags *BlobTags `xml:"Tags"` }
FilterBlobItem - Blob info from a Filter Blobs API call
type FilterBlobSegment ¶ added in v0.11.0
type FilterBlobSegment struct { // XMLName is used for marshalling and is subject to removal in a future release. XMLName xml.Name `xml:"EnumerationResults"` ServiceEndpoint string `xml:"ServiceEndpoint,attr"` Where string `xml:"Where"` Blobs []FilterBlobItem `xml:"Blobs>Blob"` NextMarker *string `xml:"NextMarker"` // contains filtered or unexported fields }
FilterBlobSegment - The result of a Filter Blobs API call
func (FilterBlobSegment) ClientRequestID ¶ added in v0.11.0
func (fbs FilterBlobSegment) ClientRequestID() string
ClientRequestID returns the value for header x-ms-client-request-id.
func (FilterBlobSegment) Date ¶ added in v0.11.0
func (fbs FilterBlobSegment) Date() time.Time
Date returns the value for header Date.
func (FilterBlobSegment) ErrorCode ¶ added in v0.11.0
func (fbs FilterBlobSegment) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (FilterBlobSegment) RequestID ¶ added in v0.11.0
func (fbs FilterBlobSegment) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (FilterBlobSegment) Response ¶ added in v0.11.0
func (fbs FilterBlobSegment) Response() *http.Response
Response returns the raw HTTP response object.
func (FilterBlobSegment) Status ¶ added in v0.11.0
func (fbs FilterBlobSegment) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (FilterBlobSegment) StatusCode ¶ added in v0.11.0
func (fbs FilterBlobSegment) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (FilterBlobSegment) Version ¶ added in v0.11.0
func (fbs FilterBlobSegment) Version() string
Version returns the value for header x-ms-version.
type GeoReplication ¶
type GeoReplication struct { // Status - The status of the secondary location. Possible values include: 'GeoReplicationStatusLive', 'GeoReplicationStatusBootstrap', 'GeoReplicationStatusUnavailable', 'GeoReplicationStatusNone' Status GeoReplicationStatusType `xml:"Status"` // LastSyncTime - A GMT date/time value, to the second. All primary writes preceding this value are guaranteed to be available for read operations at the secondary. Primary writes after this point in time may or may not be available for reads. LastSyncTime time.Time `xml:"LastSyncTime"` }
GeoReplication - Geo-Replication information for the Secondary Storage Service
func (GeoReplication) MarshalXML ¶
func (gr GeoReplication) MarshalXML(e *xml.Encoder, start xml.StartElement) error
MarshalXML implements the xml.Marshaler interface for GeoReplication.
func (*GeoReplication) UnmarshalXML ¶
func (gr *GeoReplication) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
UnmarshalXML implements the xml.Unmarshaler interface for GeoReplication.
type GeoReplicationStatusType ¶
type GeoReplicationStatusType string
GeoReplicationStatusType enumerates the values for geo replication status type.
const ( // GeoReplicationStatusBootstrap ... GeoReplicationStatusBootstrap GeoReplicationStatusType = "bootstrap" // GeoReplicationStatusLive ... GeoReplicationStatusLive GeoReplicationStatusType = "live" // GeoReplicationStatusNone represents an empty GeoReplicationStatusType. GeoReplicationStatusNone GeoReplicationStatusType = "" GeoReplicationStatusUnavailable GeoReplicationStatusType = "unavailable" )
func PossibleGeoReplicationStatusTypeValues ¶
func PossibleGeoReplicationStatusTypeValues() []GeoReplicationStatusType
PossibleGeoReplicationStatusTypeValues returns an array of possible values for the GeoReplicationStatusType const type.
type HTTPGetter ¶
HTTPGetter is a function type that refers to a method that performs an HTTP GET operation.
type HTTPGetterInfo ¶
type HTTPGetterInfo struct { // Offset specifies the start offset that should be used when // creating the HTTP GET request's Range header Offset int64 // Count specifies the count of bytes that should be used to calculate // the end offset when creating the HTTP GET request's Range header Count int64 // ETag specifies the resource's etag that should be used when creating // the HTTP GET request's If-Match header ETag ETag }
HTTPGetterInfo is passed to an HTTPGetter function passing it parameters that should be used to make an HTTP GET request.
type IPEndpointStyleInfo ¶
type IPEndpointStyleInfo struct {
AccountName string // "" if not using IP endpoint style
}
IPEndpointStyleInfo is used for IP endpoint style URL when working with Azure storage emulator. Ex: "https://10.132.141.33/accountname/containername"
type IPRange ¶
type IPRange struct { Start net.IP // Not specified if length = 0 End net.IP // Not specified if length = 0 }
IPRange represents a SAS IP range's start IP and (optionally) end IP.
type ImmutabilityPolicyOptions ¶ added in v0.15.0
type ImmutabilityPolicyOptions struct { // A container with object-level immutability enabled is required for any options. // Both ImmutabilityPolicy options must be filled to set an immutability policy. ImmutabilityPolicyUntilDate *time.Time ImmutabilityPolicyMode BlobImmutabilityPolicyModeType LegalHold *bool }
func NewImmutabilityPolicyOptions ¶ added in v0.15.0
func NewImmutabilityPolicyOptions(untilDate *time.Time, policyMode BlobImmutabilityPolicyModeType, legalHold *bool) ImmutabilityPolicyOptions
type JSONTextConfiguration ¶ added in v0.11.0
type JSONTextConfiguration struct { // XMLName is used for marshalling and is subject to removal in a future release. XMLName xml.Name `xml:"JsonTextConfiguration"` // RecordSeparator - The string used to separate records. RecordSeparator *string `xml:"RecordSeparator"` }
JSONTextConfiguration - json text configuration
type KeyInfo ¶ added in v0.7.0
type KeyInfo struct { // Start - The date-time the key is active in ISO 8601 UTC time Start string `xml:"Start"` // Expiry - The date-time the key expires in ISO 8601 UTC time Expiry string `xml:"Expiry"` }
KeyInfo - Key information
func NewKeyInfo ¶ added in v0.7.0
TODO this was supposed to be generated NewKeyInfo creates a new KeyInfo struct with the correct time formatting & conversion
type LeaseAccessConditions ¶
type LeaseAccessConditions struct {
LeaseID string
}
LeaseAccessConditions identifies lease access conditions for a container or blob which you optionally set.
type LeaseDurationType ¶
type LeaseDurationType string
LeaseDurationType enumerates the values for lease duration type.
const ( // LeaseDurationFixed ... LeaseDurationFixed LeaseDurationType = "fixed" // LeaseDurationInfinite ... LeaseDurationInfinite LeaseDurationType = "infinite" // LeaseDurationNone represents an empty LeaseDurationType. LeaseDurationNone LeaseDurationType = "" )
func PossibleLeaseDurationTypeValues ¶
func PossibleLeaseDurationTypeValues() []LeaseDurationType
PossibleLeaseDurationTypeValues returns an array of possible values for the LeaseDurationType const type.
type LeaseStateType ¶
type LeaseStateType string
LeaseStateType enumerates the values for lease state type.
const ( // LeaseStateAvailable ... LeaseStateAvailable LeaseStateType = "available" // LeaseStateBreaking ... LeaseStateBreaking LeaseStateType = "breaking" // LeaseStateBroken ... LeaseStateBroken LeaseStateType = "broken" // LeaseStateExpired ... LeaseStateExpired LeaseStateType = "expired" // LeaseStateLeased ... LeaseStateLeased LeaseStateType = "leased" // LeaseStateNone represents an empty LeaseStateType. LeaseStateNone LeaseStateType = "" )
func PossibleLeaseStateTypeValues ¶
func PossibleLeaseStateTypeValues() []LeaseStateType
PossibleLeaseStateTypeValues returns an array of possible values for the LeaseStateType const type.
type LeaseStatusType ¶
type LeaseStatusType string
LeaseStatusType enumerates the values for lease status type.
const ( // LeaseStatusLocked ... LeaseStatusLocked LeaseStatusType = "locked" // LeaseStatusNone represents an empty LeaseStatusType. LeaseStatusNone LeaseStatusType = "" // LeaseStatusUnlocked ... LeaseStatusUnlocked LeaseStatusType = "unlocked" )
func PossibleLeaseStatusTypeValues ¶
func PossibleLeaseStatusTypeValues() []LeaseStatusType
PossibleLeaseStatusTypeValues returns an array of possible values for the LeaseStatusType const type.
type ListBlobsFlatSegmentResponse ¶
type ListBlobsFlatSegmentResponse struct { // XMLName is used for marshalling and is subject to removal in a future release. XMLName xml.Name `xml:"EnumerationResults"` ServiceEndpoint string `xml:"ServiceEndpoint,attr"` ContainerName string `xml:"ContainerName,attr"` Prefix *string `xml:"Prefix"` Marker *string `xml:"Marker"` MaxResults *int32 `xml:"MaxResults"` Segment BlobFlatListSegment `xml:"Blobs"` NextMarker Marker `xml:"NextMarker"` // contains filtered or unexported fields }
ListBlobsFlatSegmentResponse - An enumeration of blobs
func (ListBlobsFlatSegmentResponse) ClientRequestID ¶ added in v0.10.0
func (lbfsr ListBlobsFlatSegmentResponse) ClientRequestID() string
ClientRequestID returns the value for header x-ms-client-request-id.
func (ListBlobsFlatSegmentResponse) ContentType ¶
func (lbfsr ListBlobsFlatSegmentResponse) ContentType() string
ContentType returns the value for header Content-Type.
func (ListBlobsFlatSegmentResponse) Date ¶
func (lbfsr ListBlobsFlatSegmentResponse) Date() time.Time
Date returns the value for header Date.
func (ListBlobsFlatSegmentResponse) ErrorCode ¶
func (lbfsr ListBlobsFlatSegmentResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (ListBlobsFlatSegmentResponse) RequestID ¶
func (lbfsr ListBlobsFlatSegmentResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (ListBlobsFlatSegmentResponse) Response ¶
func (lbfsr ListBlobsFlatSegmentResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (ListBlobsFlatSegmentResponse) Status ¶
func (lbfsr ListBlobsFlatSegmentResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (ListBlobsFlatSegmentResponse) StatusCode ¶
func (lbfsr ListBlobsFlatSegmentResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (ListBlobsFlatSegmentResponse) Version ¶
func (lbfsr ListBlobsFlatSegmentResponse) Version() string
Version returns the value for header x-ms-version.
type ListBlobsHierarchySegmentResponse ¶
type ListBlobsHierarchySegmentResponse struct { // XMLName is used for marshalling and is subject to removal in a future release. XMLName xml.Name `xml:"EnumerationResults"` ServiceEndpoint string `xml:"ServiceEndpoint,attr"` ContainerName string `xml:"ContainerName,attr"` Prefix *string `xml:"Prefix"` Marker *string `xml:"Marker"` MaxResults *int32 `xml:"MaxResults"` Delimiter *string `xml:"Delimiter"` Segment BlobHierarchyListSegment `xml:"Blobs"` NextMarker Marker `xml:"NextMarker"` // contains filtered or unexported fields }
ListBlobsHierarchySegmentResponse - An enumeration of blobs
func (ListBlobsHierarchySegmentResponse) ClientRequestID ¶ added in v0.10.0
func (lbhsr ListBlobsHierarchySegmentResponse) ClientRequestID() string
ClientRequestID returns the value for header x-ms-client-request-id.
func (ListBlobsHierarchySegmentResponse) ContentType ¶
func (lbhsr ListBlobsHierarchySegmentResponse) ContentType() string
ContentType returns the value for header Content-Type.
func (ListBlobsHierarchySegmentResponse) Date ¶
func (lbhsr ListBlobsHierarchySegmentResponse) Date() time.Time
Date returns the value for header Date.
func (ListBlobsHierarchySegmentResponse) ErrorCode ¶
func (lbhsr ListBlobsHierarchySegmentResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (ListBlobsHierarchySegmentResponse) RequestID ¶
func (lbhsr ListBlobsHierarchySegmentResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (ListBlobsHierarchySegmentResponse) Response ¶
func (lbhsr ListBlobsHierarchySegmentResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (ListBlobsHierarchySegmentResponse) Status ¶
func (lbhsr ListBlobsHierarchySegmentResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (ListBlobsHierarchySegmentResponse) StatusCode ¶
func (lbhsr ListBlobsHierarchySegmentResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (ListBlobsHierarchySegmentResponse) Version ¶
func (lbhsr ListBlobsHierarchySegmentResponse) Version() string
Version returns the value for header x-ms-version.
type ListBlobsIncludeItemType ¶
type ListBlobsIncludeItemType string
ListBlobsIncludeItemType enumerates the values for list blobs include item type.
const ( // ListBlobsIncludeItemCopy ... ListBlobsIncludeItemCopy ListBlobsIncludeItemType = "copy" // ListBlobsIncludeItemDeleted ... ListBlobsIncludeItemDeleted ListBlobsIncludeItemType = "deleted" // ListBlobsIncludeItemDeletedwithversions ... ListBlobsIncludeItemDeletedwithversions ListBlobsIncludeItemType = "deletedwithversions" // ListBlobsIncludeItemImmutabilitypolicy ... ListBlobsIncludeItemImmutabilitypolicy ListBlobsIncludeItemType = "immutabilitypolicy" // ListBlobsIncludeItemLegalhold ... ListBlobsIncludeItemLegalhold ListBlobsIncludeItemType = "legalhold" // ListBlobsIncludeItemMetadata ... ListBlobsIncludeItemMetadata ListBlobsIncludeItemType = "metadata" // ListBlobsIncludeItemNone represents an empty ListBlobsIncludeItemType. ListBlobsIncludeItemNone ListBlobsIncludeItemType = "" // ListBlobsIncludeItemPermissions ... ListBlobsIncludeItemPermissions ListBlobsIncludeItemType = "permissions" // ListBlobsIncludeItemSnapshots ... ListBlobsIncludeItemSnapshots ListBlobsIncludeItemType = "snapshots" // ListBlobsIncludeItemTags ... ListBlobsIncludeItemTags ListBlobsIncludeItemType = "tags" // ListBlobsIncludeItemUncommittedblobs ... ListBlobsIncludeItemUncommittedblobs ListBlobsIncludeItemType = "uncommittedblobs" // ListBlobsIncludeItemVersions ... ListBlobsIncludeItemVersions ListBlobsIncludeItemType = "versions" )
func PossibleListBlobsIncludeItemTypeValues ¶
func PossibleListBlobsIncludeItemTypeValues() []ListBlobsIncludeItemType
PossibleListBlobsIncludeItemTypeValues returns an array of possible values for the ListBlobsIncludeItemType const type.
type ListBlobsSegmentOptions ¶
type ListBlobsSegmentOptions struct { Details BlobListingDetails // No IncludeType header is produced if "" Prefix string // No Prefix header is produced if "" // SetMaxResults sets the maximum desired results you want the service to return. Note, the // service may return fewer results than requested. // MaxResults=0 means no 'MaxResults' header specified. MaxResults int32 }
ListBlobsSegmentOptions defines options available when calling ListBlobs.
type ListContainersDetail ¶
type ListContainersDetail struct { // Tells the service whether to return metadata for each container. Metadata bool }
ListContainersFlatDetail indicates what additional information the service should return with each container.
type ListContainersIncludeType ¶
type ListContainersIncludeType string
ListContainersIncludeType enumerates the values for list containers include type.
const ( // ListContainersIncludeDeleted ... ListContainersIncludeDeleted ListContainersIncludeType = "deleted" // ListContainersIncludeMetadata ... ListContainersIncludeMetadata ListContainersIncludeType = "metadata" // ListContainersIncludeNone represents an empty ListContainersIncludeType. ListContainersIncludeNone ListContainersIncludeType = "" // ListContainersIncludeSystem ... ListContainersIncludeSystem ListContainersIncludeType = "system" )
func PossibleListContainersIncludeTypeValues ¶
func PossibleListContainersIncludeTypeValues() []ListContainersIncludeType
PossibleListContainersIncludeTypeValues returns an array of possible values for the ListContainersIncludeType const type.
type ListContainersSegmentOptions ¶
type ListContainersSegmentOptions struct { Detail ListContainersDetail // No IncludeType header is produced if "" Prefix string // No Prefix header is produced if "" MaxResults int32 // 0 means unspecified }
ListContainersOptions defines options available when calling ListContainers.
type ListContainersSegmentResponse ¶
type ListContainersSegmentResponse struct { // XMLName is used for marshalling and is subject to removal in a future release. XMLName xml.Name `xml:"EnumerationResults"` ServiceEndpoint string `xml:"ServiceEndpoint,attr"` Prefix *string `xml:"Prefix"` Marker *string `xml:"Marker"` MaxResults *int32 `xml:"MaxResults"` ContainerItems []ContainerItem `xml:"Containers>Container"` NextMarker Marker `xml:"NextMarker"` // contains filtered or unexported fields }
ListContainersSegmentResponse - An enumeration of containers
func (ListContainersSegmentResponse) ClientRequestID ¶ added in v0.10.0
func (lcsr ListContainersSegmentResponse) ClientRequestID() string
ClientRequestID returns the value for header x-ms-client-request-id.
func (ListContainersSegmentResponse) ErrorCode ¶
func (lcsr ListContainersSegmentResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (ListContainersSegmentResponse) RequestID ¶
func (lcsr ListContainersSegmentResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (ListContainersSegmentResponse) Response ¶
func (lcsr ListContainersSegmentResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (ListContainersSegmentResponse) Status ¶
func (lcsr ListContainersSegmentResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (ListContainersSegmentResponse) StatusCode ¶
func (lcsr ListContainersSegmentResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (ListContainersSegmentResponse) Version ¶
func (lcsr ListContainersSegmentResponse) Version() string
Version returns the value for header x-ms-version.
type Logging ¶
type Logging struct { // Version - The version of Storage Analytics to configure. Version string `xml:"Version"` // Delete - Indicates whether all delete requests should be logged. Delete bool `xml:"Delete"` // Read - Indicates whether all read requests should be logged. Read bool `xml:"Read"` // Write - Indicates whether all write requests should be logged. Write bool `xml:"Write"` RetentionPolicy RetentionPolicy `xml:"RetentionPolicy"` }
Logging - Azure Analytics Logging settings.
type Marker ¶
type Marker struct {
Val *string
}
Marker represents an opaque value used in paged responses.
func (Marker) NotDone ¶
NotDone returns true if the list enumeration should be started or is not yet complete. Specifically, NotDone returns true for a just-initialized (zero value) Marker indicating that you should make an initial request to get a result portion from the service. NotDone also returns true whenever the service returns an interim result portion. NotDone returns false only after the service has returned the final result portion.
func (*Marker) UnmarshalXML ¶
UnmarshalXML implements the xml.Unmarshaler interface for Marker.
type Metadata ¶
Metadata contains metadata key/value pairs.
Example (Blobs) ¶
This examples shows how to create a blob with metadata and then how to read & update the blob's read-only properties and metadata.
// From the Azure portal, get your Storage account blob service URL endpoint. accountName, accountKey := accountInfo() // Create a ContainerURL object that wraps a soon-to-be-created blob's URL and a default pipeline. u, _ := url.Parse(fmt.Sprintf("https://%s.blob.core.windows.net/mycontainer/ReadMe.txt", accountName)) credential, err := NewSharedKeyCredential(accountName, accountKey) if err != nil { log.Fatal(err) } blobURL := NewBlockBlobURL(*u, NewPipeline(credential, PipelineOptions{})) ctx := context.Background() // This example uses a never-expiring context // Create a blob with metadata (string key/value pairs) // NOTE: Metadata key names are always converted to lowercase before being sent to the Storage Service. // Therefore, you should always use lowercase letters; especially when querying a map for a metadata key. creatingApp, _ := os.Executable() _, err = blobURL.Upload(ctx, strings.NewReader("Some text"), BlobHTTPHeaders{}, Metadata{"author": "Jeffrey", "app": creatingApp}, BlobAccessConditions{}, DefaultAccessTier, nil, ClientProvidedKeyOptions{}, ImmutabilityPolicyOptions{}) if err != nil { log.Fatal(err) } // Query the blob's properties and metadata get, err := blobURL.GetProperties(ctx, BlobAccessConditions{}, ClientProvidedKeyOptions{}) if err != nil { log.Fatal(err) } // Show some of the blob's read-only properties fmt.Println(get.BlobType(), get.ETag(), get.LastModified()) // Show the blob's metadata metadata := get.NewMetadata() for k, v := range metadata { fmt.Print(k + "=" + v + "\n") } // Update the blob's metadata and write it back to the blob metadata["editor"] = "Grant" // Add a new key/value; NOTE: The keyname is in all lowercase letters _, err = blobURL.SetMetadata(ctx, metadata, BlobAccessConditions{}, ClientProvidedKeyOptions{}) if err != nil { log.Fatal(err) } // NOTE: The SetMetadata method updates the blob's ETag & LastModified properties
Output:
Example (Containers) ¶
This examples shows how to create a container with metadata and then how to read & update the metadata.
// From the Azure portal, get your Storage account blob service URL endpoint. accountName, accountKey := accountInfo() // Create a ContainerURL object that wraps a soon-to-be-created container's URL and a default pipeline. u, _ := url.Parse(fmt.Sprintf("https://%s.blob.core.windows.net/mycontainer", accountName)) credential, err := NewSharedKeyCredential(accountName, accountKey) if err != nil { log.Fatal(err) } containerURL := NewContainerURL(*u, NewPipeline(credential, PipelineOptions{})) ctx := context.Background() // This example uses a never-expiring context // Create a container with some metadata (string key/value pairs) // NOTE: Metadata key names are always converted to lowercase before being sent to the Storage Service. // Therefore, you should always use lowercase letters; especially when querying a map for a metadata key. creatingApp, _ := os.Executable() _, err = containerURL.Create(ctx, Metadata{"author": "Jeffrey", "app": creatingApp}, PublicAccessNone) if err != nil { log.Fatal(err) } // Query the container's metadata get, err := containerURL.GetProperties(ctx, LeaseAccessConditions{}) if err != nil { log.Fatal(err) } // Show the container's metadata metadata := get.NewMetadata() for k, v := range metadata { fmt.Print(k + "=" + v + "\n") } // Update the metadata and write it back to the container metadata["author"] = "Aidan" // NOTE: The keyname is in all lowercase letters _, err = containerURL.SetMetadata(ctx, metadata, ContainerAccessConditions{}) if err != nil { log.Fatal(err) } // NOTE: The SetMetadata & SetProperties methods update the container's ETag & LastModified properties
Output:
func (*Metadata) UnmarshalXML ¶
UnmarshalXML implements the xml.Unmarshaler interface for Metadata.
type Metrics ¶
type Metrics struct { // Version - The version of Storage Analytics to configure. Version *string `xml:"Version"` // Enabled - Indicates whether metrics are enabled for the Blob service. Enabled bool `xml:"Enabled"` // IncludeAPIs - Indicates whether metrics should generate summary statistics for called API operations. IncludeAPIs *bool `xml:"IncludeAPIs"` RetentionPolicy *RetentionPolicy `xml:"RetentionPolicy"` }
Metrics - a summary of request statistics grouped by API in hour or minute aggregates for blobs
type ModifiedAccessConditions ¶
type ModifiedAccessConditions struct { IfModifiedSince time.Time IfUnmodifiedSince time.Time IfMatch ETag IfNoneMatch ETag }
ModifiedAccessConditions identifies standard HTTP access conditions which you optionally set.
type PageBlobAccessConditions ¶
type PageBlobAccessConditions struct { ModifiedAccessConditions LeaseAccessConditions SequenceNumberAccessConditions }
type PageBlobClearPagesResponse ¶
type PageBlobClearPagesResponse struct {
// contains filtered or unexported fields
}
PageBlobClearPagesResponse ...
func (PageBlobClearPagesResponse) BlobSequenceNumber ¶
func (pbcpr PageBlobClearPagesResponse) BlobSequenceNumber() int64
BlobSequenceNumber returns the value for header x-ms-blob-sequence-number.
func (PageBlobClearPagesResponse) ClientRequestID ¶ added in v0.10.0
func (pbcpr PageBlobClearPagesResponse) ClientRequestID() string
ClientRequestID returns the value for header x-ms-client-request-id.
func (PageBlobClearPagesResponse) ContentMD5 ¶
func (pbcpr PageBlobClearPagesResponse) ContentMD5() []byte
ContentMD5 returns the value for header Content-MD5.
func (PageBlobClearPagesResponse) Date ¶
func (pbcpr PageBlobClearPagesResponse) Date() time.Time
Date returns the value for header Date.
func (PageBlobClearPagesResponse) ETag ¶
func (pbcpr PageBlobClearPagesResponse) ETag() ETag
ETag returns the value for header ETag.
func (PageBlobClearPagesResponse) ErrorCode ¶
func (pbcpr PageBlobClearPagesResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (PageBlobClearPagesResponse) LastModified ¶
func (pbcpr PageBlobClearPagesResponse) LastModified() time.Time
LastModified returns the value for header Last-Modified.
func (PageBlobClearPagesResponse) RequestID ¶
func (pbcpr PageBlobClearPagesResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (PageBlobClearPagesResponse) Response ¶
func (pbcpr PageBlobClearPagesResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (PageBlobClearPagesResponse) Status ¶
func (pbcpr PageBlobClearPagesResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (PageBlobClearPagesResponse) StatusCode ¶
func (pbcpr PageBlobClearPagesResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (PageBlobClearPagesResponse) Version ¶
func (pbcpr PageBlobClearPagesResponse) Version() string
Version returns the value for header x-ms-version.
func (PageBlobClearPagesResponse) XMsContentCrc64 ¶ added in v0.10.0
func (pbcpr PageBlobClearPagesResponse) XMsContentCrc64() []byte
XMsContentCrc64 returns the value for header x-ms-content-crc64.
type PageBlobCopyIncrementalResponse ¶
type PageBlobCopyIncrementalResponse struct {
// contains filtered or unexported fields
}
PageBlobCopyIncrementalResponse ...
func (PageBlobCopyIncrementalResponse) ClientRequestID ¶ added in v0.10.0
func (pbcir PageBlobCopyIncrementalResponse) ClientRequestID() string
ClientRequestID returns the value for header x-ms-client-request-id.
func (PageBlobCopyIncrementalResponse) CopyID ¶
func (pbcir PageBlobCopyIncrementalResponse) CopyID() string
CopyID returns the value for header x-ms-copy-id.
func (PageBlobCopyIncrementalResponse) CopyStatus ¶
func (pbcir PageBlobCopyIncrementalResponse) CopyStatus() CopyStatusType
CopyStatus returns the value for header x-ms-copy-status.
func (PageBlobCopyIncrementalResponse) Date ¶
func (pbcir PageBlobCopyIncrementalResponse) Date() time.Time
Date returns the value for header Date.
func (PageBlobCopyIncrementalResponse) ETag ¶
func (pbcir PageBlobCopyIncrementalResponse) ETag() ETag
ETag returns the value for header ETag.
func (PageBlobCopyIncrementalResponse) ErrorCode ¶
func (pbcir PageBlobCopyIncrementalResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (PageBlobCopyIncrementalResponse) LastModified ¶
func (pbcir PageBlobCopyIncrementalResponse) LastModified() time.Time
LastModified returns the value for header Last-Modified.
func (PageBlobCopyIncrementalResponse) RequestID ¶
func (pbcir PageBlobCopyIncrementalResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (PageBlobCopyIncrementalResponse) Response ¶
func (pbcir PageBlobCopyIncrementalResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (PageBlobCopyIncrementalResponse) Status ¶
func (pbcir PageBlobCopyIncrementalResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (PageBlobCopyIncrementalResponse) StatusCode ¶
func (pbcir PageBlobCopyIncrementalResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (PageBlobCopyIncrementalResponse) Version ¶
func (pbcir PageBlobCopyIncrementalResponse) Version() string
Version returns the value for header x-ms-version.
type PageBlobCreateResponse ¶
type PageBlobCreateResponse struct {
// contains filtered or unexported fields
}
PageBlobCreateResponse ...
func (PageBlobCreateResponse) ClientRequestID ¶ added in v0.10.0
func (pbcr PageBlobCreateResponse) ClientRequestID() string
ClientRequestID returns the value for header x-ms-client-request-id.
func (PageBlobCreateResponse) ContentMD5 ¶
func (pbcr PageBlobCreateResponse) ContentMD5() []byte
ContentMD5 returns the value for header Content-MD5.
func (PageBlobCreateResponse) Date ¶
func (pbcr PageBlobCreateResponse) Date() time.Time
Date returns the value for header Date.
func (PageBlobCreateResponse) ETag ¶
func (pbcr PageBlobCreateResponse) ETag() ETag
ETag returns the value for header ETag.
func (PageBlobCreateResponse) EncryptionKeySha256 ¶ added in v0.10.0
func (pbcr PageBlobCreateResponse) EncryptionKeySha256() string
EncryptionKeySha256 returns the value for header x-ms-encryption-key-sha256.
func (PageBlobCreateResponse) EncryptionScope ¶ added in v0.11.0
func (pbcr PageBlobCreateResponse) EncryptionScope() string
EncryptionScope returns the value for header x-ms-encryption-scope.
func (PageBlobCreateResponse) ErrorCode ¶
func (pbcr PageBlobCreateResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (PageBlobCreateResponse) IsServerEncrypted ¶
func (pbcr PageBlobCreateResponse) IsServerEncrypted() string
IsServerEncrypted returns the value for header x-ms-request-server-encrypted.
func (PageBlobCreateResponse) LastModified ¶
func (pbcr PageBlobCreateResponse) LastModified() time.Time
LastModified returns the value for header Last-Modified.
func (PageBlobCreateResponse) RequestID ¶
func (pbcr PageBlobCreateResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (PageBlobCreateResponse) Response ¶
func (pbcr PageBlobCreateResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (PageBlobCreateResponse) Status ¶
func (pbcr PageBlobCreateResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (PageBlobCreateResponse) StatusCode ¶
func (pbcr PageBlobCreateResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (PageBlobCreateResponse) Version ¶
func (pbcr PageBlobCreateResponse) Version() string
Version returns the value for header x-ms-version.
func (PageBlobCreateResponse) VersionID ¶ added in v0.11.0
func (pbcr PageBlobCreateResponse) VersionID() string
VersionID returns the value for header x-ms-version-id.
type PageBlobResizeResponse ¶
type PageBlobResizeResponse struct {
// contains filtered or unexported fields
}
PageBlobResizeResponse ...
func (PageBlobResizeResponse) BlobSequenceNumber ¶
func (pbrr PageBlobResizeResponse) BlobSequenceNumber() int64
BlobSequenceNumber returns the value for header x-ms-blob-sequence-number.
func (PageBlobResizeResponse) ClientRequestID ¶ added in v0.10.0
func (pbrr PageBlobResizeResponse) ClientRequestID() string
ClientRequestID returns the value for header x-ms-client-request-id.
func (PageBlobResizeResponse) Date ¶
func (pbrr PageBlobResizeResponse) Date() time.Time
Date returns the value for header Date.
func (PageBlobResizeResponse) ETag ¶
func (pbrr PageBlobResizeResponse) ETag() ETag
ETag returns the value for header ETag.
func (PageBlobResizeResponse) ErrorCode ¶
func (pbrr PageBlobResizeResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (PageBlobResizeResponse) LastModified ¶
func (pbrr PageBlobResizeResponse) LastModified() time.Time
LastModified returns the value for header Last-Modified.
func (PageBlobResizeResponse) RequestID ¶
func (pbrr PageBlobResizeResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (PageBlobResizeResponse) Response ¶
func (pbrr PageBlobResizeResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (PageBlobResizeResponse) Status ¶
func (pbrr PageBlobResizeResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (PageBlobResizeResponse) StatusCode ¶
func (pbrr PageBlobResizeResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (PageBlobResizeResponse) Version ¶
func (pbrr PageBlobResizeResponse) Version() string
Version returns the value for header x-ms-version.
type PageBlobURL ¶
type PageBlobURL struct { BlobURL // contains filtered or unexported fields }
PageBlobURL defines a set of operations applicable to page blobs.
Example ¶
ExamplePageBlobURL shows how to manipulate a page blob with PageBlobURL. A page blob is a collection of 512-byte pages optimized for random read and write operations. The maximum size for a page blob is 8 TB.
// From the Azure portal, get your Storage account blob service URL endpoint. accountName, accountKey := accountInfo() // Create a ContainerURL object that wraps a soon-to-be-created blob's URL and a default pipeline. u, _ := url.Parse(fmt.Sprintf("https://%s.blob.core.windows.net/mycontainer/MyPageBlob.txt", accountName)) credential, err := NewSharedKeyCredential(accountName, accountKey) if err != nil { log.Fatal(err) } blobURL := NewPageBlobURL(*u, NewPipeline(credential, PipelineOptions{})) ctx := context.Background() // This example uses a never-expiring context _, err = blobURL.Create(ctx, PageBlobPageBytes*4, 0, BlobHTTPHeaders{}, Metadata{}, BlobAccessConditions{}, DefaultPremiumBlobAccessTier, nil, ClientProvidedKeyOptions{}, ImmutabilityPolicyOptions{}) if err != nil { log.Fatal(err) } page := [PageBlobPageBytes]byte{} copy(page[:], "Page 0") _, err = blobURL.UploadPages(ctx, 0*PageBlobPageBytes, bytes.NewReader(page[:]), PageBlobAccessConditions{}, nil, ClientProvidedKeyOptions{}) if err != nil { log.Fatal(err) } copy(page[:], "Page 1") _, err = blobURL.UploadPages(ctx, 2*PageBlobPageBytes, bytes.NewReader(page[:]), PageBlobAccessConditions{}, nil, ClientProvidedKeyOptions{}) if err != nil { log.Fatal(err) } getPages, err := blobURL.GetPageRanges(ctx, 0*PageBlobPageBytes, 10*PageBlobPageBytes, BlobAccessConditions{}) if err != nil { log.Fatal(err) } for _, pr := range getPages.PageRange { fmt.Printf("Start=%d, End=%d\n", pr.Start, pr.End) } _, err = blobURL.ClearPages(ctx, 0*PageBlobPageBytes, 1*PageBlobPageBytes, PageBlobAccessConditions{}, ClientProvidedKeyOptions{}) if err != nil { log.Fatal(err) } getPages, err = blobURL.GetPageRanges(ctx, 0*PageBlobPageBytes, 10*PageBlobPageBytes, BlobAccessConditions{}) if err != nil { log.Fatal(err) } for _, pr := range getPages.PageRange { fmt.Printf("Start=%d, End=%d\n", pr.Start, pr.End) } get, err := blobURL.Download(ctx, 0, 0, BlobAccessConditions{}, false, ClientProvidedKeyOptions{}) if err != nil { log.Fatal(err) } blobData := &bytes.Buffer{} reader := get.Body(RetryReaderOptions{}) blobData.ReadFrom(reader) reader.Close() // The client must close the response body when finished with it fmt.Printf("%#v", blobData.Bytes())
Output:
func NewPageBlobURL ¶
func NewPageBlobURL(url url.URL, p pipeline.Pipeline) PageBlobURL
NewPageBlobURL creates a PageBlobURL object using the specified URL and request policy pipeline.
func (PageBlobURL) ClearPages ¶
func (pb PageBlobURL) ClearPages(ctx context.Context, offset int64, count int64, ac PageBlobAccessConditions, cpk ClientProvidedKeyOptions) (*PageBlobClearPagesResponse, error)
ClearPages frees the specified pages from the page blob. For more information, see https://docs.microsoft.com/rest/api/storageservices/put-page.
func (PageBlobURL) Create ¶
func (pb PageBlobURL) Create(ctx context.Context, size int64, sequenceNumber int64, h BlobHTTPHeaders, metadata Metadata, ac BlobAccessConditions, tier PremiumPageBlobAccessTierType, blobTagsMap BlobTagsMap, cpk ClientProvidedKeyOptions, immutability ImmutabilityPolicyOptions) (*PageBlobCreateResponse, error)
Create creates a page blob of the specified length. Call PutPage to upload data to a page blob. For more information, see https://docs.microsoft.com/rest/api/storageservices/put-blob.
func (PageBlobURL) GetAccountInfo ¶ added in v0.9.0
func (pb PageBlobURL) GetAccountInfo(ctx context.Context) (*BlobGetAccountInfoResponse, error)
func (PageBlobURL) GetManagedDiskPageRangesDiff ¶ added in v0.11.0
func (pb PageBlobURL) GetManagedDiskPageRangesDiff(ctx context.Context, offset int64, count int64, prevSnapshot *string, prevSnapshotURL *string, ac BlobAccessConditions) (*PageList, error)
GetManagedDiskPageRangesDiff gets the collection of page ranges that differ between a specified snapshot and this page blob representing managed disk. For more information, see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges.
func (PageBlobURL) GetPageRanges ¶
func (pb PageBlobURL) GetPageRanges(ctx context.Context, offset int64, count int64, ac BlobAccessConditions) (*PageList, error)
GetPageRanges returns the list of valid page ranges for a page blob or snapshot of a page blob. For more information, see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges.
func (PageBlobURL) GetPageRangesDiff ¶
func (pb PageBlobURL) GetPageRangesDiff(ctx context.Context, offset int64, count int64, prevSnapshot string, ac BlobAccessConditions) (*PageList, error)
GetPageRangesDiff gets the collection of page ranges that differ between a specified snapshot and this page blob. For more information, see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges.
func (PageBlobURL) Resize ¶
func (pb PageBlobURL) Resize(ctx context.Context, size int64, ac BlobAccessConditions, cpk ClientProvidedKeyOptions) (*PageBlobResizeResponse, error)
Resize resizes the page blob to the specified size (which must be a multiple of 512). For more information, see https://docs.microsoft.com/rest/api/storageservices/set-blob-properties.
func (PageBlobURL) StartCopyIncremental ¶
func (pb PageBlobURL) StartCopyIncremental(ctx context.Context, source url.URL, snapshot string, ac BlobAccessConditions) (*PageBlobCopyIncrementalResponse, error)
StartCopyIncremental begins an operation to start an incremental copy from one page blob's snapshot to this 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. For more information, see https://docs.microsoft.com/rest/api/storageservices/incremental-copy-blob and https://docs.microsoft.com/en-us/azure/virtual-machines/windows/incremental-snapshots.
func (PageBlobURL) UpdateSequenceNumber ¶
func (pb PageBlobURL) UpdateSequenceNumber(ctx context.Context, action SequenceNumberActionType, sequenceNumber int64, ac BlobAccessConditions) (*PageBlobUpdateSequenceNumberResponse, error)
UpdateSequenceNumber sets the page blob's sequence number.
func (PageBlobURL) UploadPages ¶
func (pb PageBlobURL) UploadPages(ctx context.Context, offset int64, body io.ReadSeeker, ac PageBlobAccessConditions, transactionalMD5 []byte, cpk ClientProvidedKeyOptions) (*PageBlobUploadPagesResponse, error)
UploadPages writes 1 or more pages to the page blob. The start offset and the stream size must be a multiple of 512 bytes. This method panics if the stream is not at position 0. Note that the http client closes the body stream after the request is sent to the service. For more information, see https://docs.microsoft.com/rest/api/storageservices/put-page.
func (PageBlobURL) UploadPagesFromURL ¶
func (pb PageBlobURL) UploadPagesFromURL(ctx context.Context, sourceURL url.URL, sourceOffset int64, destOffset int64, count int64, transactionalMD5 []byte, destinationAccessConditions PageBlobAccessConditions, sourceAccessConditions ModifiedAccessConditions, cpk ClientProvidedKeyOptions, sourceAuthorization TokenCredential) (*PageBlobUploadPagesFromURLResponse, error)
UploadPagesFromURL copies 1 or more pages from a source URL to the page blob. The sourceOffset specifies the start offset of source data to copy from. The destOffset specifies the start offset of data in page blob will be written to. The count must be a multiple of 512 bytes. For more information, see https://docs.microsoft.com/rest/api/storageservices/put-page-from-url.
func (PageBlobURL) WithPipeline ¶
func (pb PageBlobURL) WithPipeline(p pipeline.Pipeline) PageBlobURL
WithPipeline creates a new PageBlobURL object identical to the source but with the specific request policy pipeline.
func (PageBlobURL) WithSnapshot ¶
func (pb PageBlobURL) WithSnapshot(snapshot string) PageBlobURL
WithSnapshot creates a new PageBlobURL object identical to the source but with the specified snapshot timestamp. Pass "" to remove the snapshot returning a URL to the base blob.
func (PageBlobURL) WithVersionID ¶ added in v0.11.0
func (pb PageBlobURL) WithVersionID(versionId string) PageBlobURL
WithVersionID creates a new PageBlobURL object identical to the source but with the specified snapshot timestamp. Pass "" to remove the snapshot returning a URL to the base blob.
type PageBlobUpdateSequenceNumberResponse ¶
type PageBlobUpdateSequenceNumberResponse struct {
// contains filtered or unexported fields
}
PageBlobUpdateSequenceNumberResponse ...
func (PageBlobUpdateSequenceNumberResponse) BlobSequenceNumber ¶
func (pbusnr PageBlobUpdateSequenceNumberResponse) BlobSequenceNumber() int64
BlobSequenceNumber returns the value for header x-ms-blob-sequence-number.
func (PageBlobUpdateSequenceNumberResponse) ClientRequestID ¶ added in v0.10.0
func (pbusnr PageBlobUpdateSequenceNumberResponse) ClientRequestID() string
ClientRequestID returns the value for header x-ms-client-request-id.
func (PageBlobUpdateSequenceNumberResponse) Date ¶
func (pbusnr PageBlobUpdateSequenceNumberResponse) Date() time.Time
Date returns the value for header Date.
func (PageBlobUpdateSequenceNumberResponse) ETag ¶
func (pbusnr PageBlobUpdateSequenceNumberResponse) ETag() ETag
ETag returns the value for header ETag.
func (PageBlobUpdateSequenceNumberResponse) ErrorCode ¶
func (pbusnr PageBlobUpdateSequenceNumberResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (PageBlobUpdateSequenceNumberResponse) LastModified ¶
func (pbusnr PageBlobUpdateSequenceNumberResponse) LastModified() time.Time
LastModified returns the value for header Last-Modified.
func (PageBlobUpdateSequenceNumberResponse) RequestID ¶
func (pbusnr PageBlobUpdateSequenceNumberResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (PageBlobUpdateSequenceNumberResponse) Response ¶
func (pbusnr PageBlobUpdateSequenceNumberResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (PageBlobUpdateSequenceNumberResponse) Status ¶
func (pbusnr PageBlobUpdateSequenceNumberResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (PageBlobUpdateSequenceNumberResponse) StatusCode ¶
func (pbusnr PageBlobUpdateSequenceNumberResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (PageBlobUpdateSequenceNumberResponse) Version ¶
func (pbusnr PageBlobUpdateSequenceNumberResponse) Version() string
Version returns the value for header x-ms-version.
type PageBlobUploadPagesFromURLResponse ¶
type PageBlobUploadPagesFromURLResponse struct {
// contains filtered or unexported fields
}
PageBlobUploadPagesFromURLResponse ...
func (PageBlobUploadPagesFromURLResponse) BlobSequenceNumber ¶
func (pbupfur PageBlobUploadPagesFromURLResponse) BlobSequenceNumber() int64
BlobSequenceNumber returns the value for header x-ms-blob-sequence-number.
func (PageBlobUploadPagesFromURLResponse) ContentMD5 ¶
func (pbupfur PageBlobUploadPagesFromURLResponse) ContentMD5() []byte
ContentMD5 returns the value for header Content-MD5.
func (PageBlobUploadPagesFromURLResponse) Date ¶
func (pbupfur PageBlobUploadPagesFromURLResponse) Date() time.Time
Date returns the value for header Date.
func (PageBlobUploadPagesFromURLResponse) ETag ¶
func (pbupfur PageBlobUploadPagesFromURLResponse) ETag() ETag
ETag returns the value for header ETag.
func (PageBlobUploadPagesFromURLResponse) EncryptionKeySha256 ¶ added in v0.10.0
func (pbupfur PageBlobUploadPagesFromURLResponse) EncryptionKeySha256() string
EncryptionKeySha256 returns the value for header x-ms-encryption-key-sha256.
func (PageBlobUploadPagesFromURLResponse) EncryptionScope ¶ added in v0.11.0
func (pbupfur PageBlobUploadPagesFromURLResponse) EncryptionScope() string
EncryptionScope returns the value for header x-ms-encryption-scope.
func (PageBlobUploadPagesFromURLResponse) ErrorCode ¶
func (pbupfur PageBlobUploadPagesFromURLResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (PageBlobUploadPagesFromURLResponse) IsServerEncrypted ¶
func (pbupfur PageBlobUploadPagesFromURLResponse) IsServerEncrypted() string
IsServerEncrypted returns the value for header x-ms-request-server-encrypted.
func (PageBlobUploadPagesFromURLResponse) LastModified ¶
func (pbupfur PageBlobUploadPagesFromURLResponse) LastModified() time.Time
LastModified returns the value for header Last-Modified.
func (PageBlobUploadPagesFromURLResponse) RequestID ¶
func (pbupfur PageBlobUploadPagesFromURLResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (PageBlobUploadPagesFromURLResponse) Response ¶
func (pbupfur PageBlobUploadPagesFromURLResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (PageBlobUploadPagesFromURLResponse) Status ¶
func (pbupfur PageBlobUploadPagesFromURLResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (PageBlobUploadPagesFromURLResponse) StatusCode ¶
func (pbupfur PageBlobUploadPagesFromURLResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (PageBlobUploadPagesFromURLResponse) Version ¶
func (pbupfur PageBlobUploadPagesFromURLResponse) Version() string
Version returns the value for header x-ms-version.
func (PageBlobUploadPagesFromURLResponse) XMsContentCrc64 ¶ added in v0.10.0
func (pbupfur PageBlobUploadPagesFromURLResponse) XMsContentCrc64() []byte
XMsContentCrc64 returns the value for header x-ms-content-crc64.
type PageBlobUploadPagesResponse ¶
type PageBlobUploadPagesResponse struct {
// contains filtered or unexported fields
}
PageBlobUploadPagesResponse ...
func (PageBlobUploadPagesResponse) BlobSequenceNumber ¶
func (pbupr PageBlobUploadPagesResponse) BlobSequenceNumber() int64
BlobSequenceNumber returns the value for header x-ms-blob-sequence-number.
func (PageBlobUploadPagesResponse) ClientRequestID ¶ added in v0.10.0
func (pbupr PageBlobUploadPagesResponse) ClientRequestID() string
ClientRequestID returns the value for header x-ms-client-request-id.
func (PageBlobUploadPagesResponse) ContentMD5 ¶
func (pbupr PageBlobUploadPagesResponse) ContentMD5() []byte
ContentMD5 returns the value for header Content-MD5.
func (PageBlobUploadPagesResponse) Date ¶
func (pbupr PageBlobUploadPagesResponse) Date() time.Time
Date returns the value for header Date.
func (PageBlobUploadPagesResponse) ETag ¶
func (pbupr PageBlobUploadPagesResponse) ETag() ETag
ETag returns the value for header ETag.
func (PageBlobUploadPagesResponse) EncryptionKeySha256 ¶ added in v0.10.0
func (pbupr PageBlobUploadPagesResponse) EncryptionKeySha256() string
EncryptionKeySha256 returns the value for header x-ms-encryption-key-sha256.
func (PageBlobUploadPagesResponse) EncryptionScope ¶ added in v0.11.0
func (pbupr PageBlobUploadPagesResponse) EncryptionScope() string
EncryptionScope returns the value for header x-ms-encryption-scope.
func (PageBlobUploadPagesResponse) ErrorCode ¶
func (pbupr PageBlobUploadPagesResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (PageBlobUploadPagesResponse) IsServerEncrypted ¶
func (pbupr PageBlobUploadPagesResponse) IsServerEncrypted() string
IsServerEncrypted returns the value for header x-ms-request-server-encrypted.
func (PageBlobUploadPagesResponse) LastModified ¶
func (pbupr PageBlobUploadPagesResponse) LastModified() time.Time
LastModified returns the value for header Last-Modified.
func (PageBlobUploadPagesResponse) RequestID ¶
func (pbupr PageBlobUploadPagesResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (PageBlobUploadPagesResponse) Response ¶
func (pbupr PageBlobUploadPagesResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (PageBlobUploadPagesResponse) Status ¶
func (pbupr PageBlobUploadPagesResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (PageBlobUploadPagesResponse) StatusCode ¶
func (pbupr PageBlobUploadPagesResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (PageBlobUploadPagesResponse) Version ¶
func (pbupr PageBlobUploadPagesResponse) Version() string
Version returns the value for header x-ms-version.
func (PageBlobUploadPagesResponse) XMsContentCrc64 ¶ added in v0.10.0
func (pbupr PageBlobUploadPagesResponse) XMsContentCrc64() []byte
XMsContentCrc64 returns the value for header x-ms-content-crc64.
type PageList ¶
type PageList struct { PageRange []PageRange `xml:"PageRange"` ClearRange []ClearRange `xml:"ClearRange"` NextMarker Marker `xml:"NextMarker"` // contains filtered or unexported fields }
PageList - the list of pages
func (PageList) BlobContentLength ¶
BlobContentLength returns the value for header x-ms-blob-content-length.
func (PageList) ClientRequestID ¶ added in v0.10.0
ClientRequestID returns the value for header x-ms-client-request-id.
func (PageList) LastModified ¶
LastModified returns the value for header Last-Modified.
func (PageList) StatusCode ¶
StatusCode returns the HTTP status code of the response, e.g. 200.
type PipelineOptions ¶
type PipelineOptions struct { // Log configures the pipeline's logging infrastructure indicating what information is logged and where. Log pipeline.LogOptions // Retry configures the built-in retry policy behavior. Retry RetryOptions // RequestLog configures the built-in request logging policy. RequestLog RequestLogOptions // Telemetry configures the built-in telemetry policy behavior. Telemetry TelemetryOptions // HTTPSender configures the sender of HTTP requests HTTPSender pipeline.Factory }
PipelineOptions is used to configure a request policy pipeline's retry policy and logging.
type PremiumPageBlobAccessTierType ¶ added in v0.10.0
type PremiumPageBlobAccessTierType string
PremiumPageBlobAccessTierType enumerates the values for premium page blob access tier type.
const ( // PremiumPageBlobAccessTierNone represents an empty PremiumPageBlobAccessTierType. PremiumPageBlobAccessTierNone PremiumPageBlobAccessTierType = "" // PremiumPageBlobAccessTierP10 ... PremiumPageBlobAccessTierP10 PremiumPageBlobAccessTierType = "P10" // PremiumPageBlobAccessTierP15 ... PremiumPageBlobAccessTierP15 PremiumPageBlobAccessTierType = "P15" // PremiumPageBlobAccessTierP20 ... PremiumPageBlobAccessTierP20 PremiumPageBlobAccessTierType = "P20" // PremiumPageBlobAccessTierP30 ... PremiumPageBlobAccessTierP30 PremiumPageBlobAccessTierType = "P30" // PremiumPageBlobAccessTierP4 ... PremiumPageBlobAccessTierP4 PremiumPageBlobAccessTierType = "P4" // PremiumPageBlobAccessTierP40 ... PremiumPageBlobAccessTierP40 PremiumPageBlobAccessTierType = "P40" // PremiumPageBlobAccessTierP50 ... PremiumPageBlobAccessTierP50 PremiumPageBlobAccessTierType = "P50" // PremiumPageBlobAccessTierP6 ... PremiumPageBlobAccessTierP6 PremiumPageBlobAccessTierType = "P6" // PremiumPageBlobAccessTierP60 ... PremiumPageBlobAccessTierP60 PremiumPageBlobAccessTierType = "P60" // PremiumPageBlobAccessTierP70 ... PremiumPageBlobAccessTierP70 PremiumPageBlobAccessTierType = "P70" // PremiumPageBlobAccessTierP80 ... PremiumPageBlobAccessTierP80 PremiumPageBlobAccessTierType = "P80" )
func PossiblePremiumPageBlobAccessTierTypeValues ¶ added in v0.10.0
func PossiblePremiumPageBlobAccessTierTypeValues() []PremiumPageBlobAccessTierType
PossiblePremiumPageBlobAccessTierTypeValues returns an array of possible values for the PremiumPageBlobAccessTierType const type.
type PublicAccessType ¶
type PublicAccessType string
PublicAccessType enumerates the values for public access type.
const ( // PublicAccessBlob ... PublicAccessBlob PublicAccessType = "blob" // PublicAccessContainer ... PublicAccessContainer PublicAccessType = "container" // PublicAccessNone represents an empty PublicAccessType. PublicAccessNone PublicAccessType = "" )
func PossiblePublicAccessTypeValues ¶
func PossiblePublicAccessTypeValues() []PublicAccessType
PossiblePublicAccessTypeValues returns an array of possible values for the PublicAccessType const type.
type QueryFormat ¶ added in v0.11.0
type QueryFormat struct { // Type - Possible values include: 'QueryFormatDelimited', 'QueryFormatJSON', 'QueryFormatArrow', 'QueryFormatParquet', 'QueryFormatNone' Type QueryFormatType `xml:"Type"` DelimitedTextConfiguration *DelimitedTextConfiguration `xml:"DelimitedTextConfiguration"` JSONTextConfiguration *JSONTextConfiguration `xml:"JsonTextConfiguration"` ArrowConfiguration *ArrowConfiguration `xml:"ArrowConfiguration"` ParquetTextConfiguration map[string]interface{} `xml:"ParquetTextConfiguration"` }
QueryFormat ...
type QueryFormatType ¶ added in v0.11.0
type QueryFormatType string
QueryFormatType enumerates the values for query format type.
const ( // QueryFormatArrow ... QueryFormatArrow QueryFormatType = "arrow" // QueryFormatDelimited ... QueryFormatDelimited QueryFormatType = "delimited" // QueryFormatJSON ... QueryFormatJSON QueryFormatType = "json" // QueryFormatNone represents an empty QueryFormatType. QueryFormatNone QueryFormatType = "" // QueryFormatParquet ... QueryFormatParquet QueryFormatType = "parquet" )
func PossibleQueryFormatTypeValues ¶ added in v0.11.0
func PossibleQueryFormatTypeValues() []QueryFormatType
PossibleQueryFormatTypeValues returns an array of possible values for the QueryFormatType const type.
type QueryRequest ¶ added in v0.11.0
type QueryRequest struct { // QueryType - Required. The type of the provided query expression. QueryType string `xml:"QueryType"` // Expression - The query expression in SQL. The maximum size of the query expression is 256KiB. Expression string `xml:"Expression"` InputSerialization *QuerySerialization `xml:"InputSerialization"` OutputSerialization *QuerySerialization `xml:"OutputSerialization"` }
QueryRequest - Groups the set of query request settings.
type QueryResponse ¶ added in v0.11.0
type QueryResponse struct {
// contains filtered or unexported fields
}
QueryResponse - Wraps the response from the blobClient.Query method.
func (QueryResponse) AcceptRanges ¶ added in v0.11.0
func (qr QueryResponse) AcceptRanges() string
AcceptRanges returns the value for header Accept-Ranges.
func (QueryResponse) BlobCommittedBlockCount ¶ added in v0.11.0
func (qr QueryResponse) BlobCommittedBlockCount() int32
BlobCommittedBlockCount returns the value for header x-ms-blob-committed-block-count.
func (QueryResponse) BlobContentMD5 ¶ added in v0.11.0
func (qr QueryResponse) BlobContentMD5() []byte
BlobContentMD5 returns the value for header x-ms-blob-content-md5.
func (QueryResponse) BlobSequenceNumber ¶ added in v0.11.0
func (qr QueryResponse) BlobSequenceNumber() int64
BlobSequenceNumber returns the value for header x-ms-blob-sequence-number.
func (QueryResponse) BlobType ¶ added in v0.11.0
func (qr QueryResponse) BlobType() BlobType
BlobType returns the value for header x-ms-blob-type.
func (QueryResponse) Body ¶ added in v0.11.0
func (qr QueryResponse) Body() io.ReadCloser
Body returns the raw HTTP response object's Body.
func (QueryResponse) CacheControl ¶ added in v0.11.0
func (qr QueryResponse) CacheControl() string
CacheControl returns the value for header Cache-Control.
func (QueryResponse) ClientRequestID ¶ added in v0.11.0
func (qr QueryResponse) ClientRequestID() string
ClientRequestID returns the value for header x-ms-client-request-id.
func (QueryResponse) ContentCrc64 ¶ added in v0.11.0
func (qr QueryResponse) ContentCrc64() []byte
ContentCrc64 returns the value for header x-ms-content-crc64.
func (QueryResponse) ContentDisposition ¶ added in v0.11.0
func (qr QueryResponse) ContentDisposition() string
ContentDisposition returns the value for header Content-Disposition.
func (QueryResponse) ContentEncoding ¶ added in v0.11.0
func (qr QueryResponse) ContentEncoding() string
ContentEncoding returns the value for header Content-Encoding.
func (QueryResponse) ContentLanguage ¶ added in v0.11.0
func (qr QueryResponse) ContentLanguage() string
ContentLanguage returns the value for header Content-Language.
func (QueryResponse) ContentLength ¶ added in v0.11.0
func (qr QueryResponse) ContentLength() int64
ContentLength returns the value for header Content-Length.
func (QueryResponse) ContentMD5 ¶ added in v0.11.0
func (qr QueryResponse) ContentMD5() []byte
ContentMD5 returns the value for header Content-MD5.
func (QueryResponse) ContentRange ¶ added in v0.11.0
func (qr QueryResponse) ContentRange() string
ContentRange returns the value for header Content-Range.
func (QueryResponse) ContentType ¶ added in v0.11.0
func (qr QueryResponse) ContentType() string
ContentType returns the value for header Content-Type.
func (QueryResponse) CopyCompletionTime ¶ added in v0.11.0
func (qr QueryResponse) CopyCompletionTime() time.Time
CopyCompletionTime returns the value for header x-ms-copy-completion-time.
func (QueryResponse) CopyID ¶ added in v0.11.0
func (qr QueryResponse) CopyID() string
CopyID returns the value for header x-ms-copy-id.
func (QueryResponse) CopyProgress ¶ added in v0.11.0
func (qr QueryResponse) CopyProgress() string
CopyProgress returns the value for header x-ms-copy-progress.
func (QueryResponse) CopySource ¶ added in v0.11.0
func (qr QueryResponse) CopySource() string
CopySource returns the value for header x-ms-copy-source.
func (QueryResponse) CopyStatus ¶ added in v0.11.0
func (qr QueryResponse) CopyStatus() CopyStatusType
CopyStatus returns the value for header x-ms-copy-status.
func (QueryResponse) CopyStatusDescription ¶ added in v0.11.0
func (qr QueryResponse) CopyStatusDescription() string
CopyStatusDescription returns the value for header x-ms-copy-status-description.
func (QueryResponse) Date ¶ added in v0.11.0
func (qr QueryResponse) Date() time.Time
Date returns the value for header Date.
func (QueryResponse) ETag ¶ added in v0.11.0
func (qr QueryResponse) ETag() ETag
ETag returns the value for header ETag.
func (QueryResponse) EncryptionKeySha256 ¶ added in v0.11.0
func (qr QueryResponse) EncryptionKeySha256() string
EncryptionKeySha256 returns the value for header x-ms-encryption-key-sha256.
func (QueryResponse) EncryptionScope ¶ added in v0.11.0
func (qr QueryResponse) EncryptionScope() string
EncryptionScope returns the value for header x-ms-encryption-scope.
func (QueryResponse) ErrorCode ¶ added in v0.11.0
func (qr QueryResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (QueryResponse) IsServerEncrypted ¶ added in v0.11.0
func (qr QueryResponse) IsServerEncrypted() string
IsServerEncrypted returns the value for header x-ms-server-encrypted.
func (QueryResponse) LastModified ¶ added in v0.11.0
func (qr QueryResponse) LastModified() time.Time
LastModified returns the value for header Last-Modified.
func (QueryResponse) LeaseDuration ¶ added in v0.11.0
func (qr QueryResponse) LeaseDuration() LeaseDurationType
LeaseDuration returns the value for header x-ms-lease-duration.
func (QueryResponse) LeaseState ¶ added in v0.11.0
func (qr QueryResponse) LeaseState() LeaseStateType
LeaseState returns the value for header x-ms-lease-state.
func (QueryResponse) LeaseStatus ¶ added in v0.11.0
func (qr QueryResponse) LeaseStatus() LeaseStatusType
LeaseStatus returns the value for header x-ms-lease-status.
func (QueryResponse) NewMetadata ¶ added in v0.11.0
func (qr QueryResponse) NewMetadata() Metadata
NewMetadata returns user-defined key/value pairs.
func (QueryResponse) RequestID ¶ added in v0.11.0
func (qr QueryResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (QueryResponse) Response ¶ added in v0.11.0
func (qr QueryResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (QueryResponse) Status ¶ added in v0.11.0
func (qr QueryResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (QueryResponse) StatusCode ¶ added in v0.11.0
func (qr QueryResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (QueryResponse) Version ¶ added in v0.11.0
func (qr QueryResponse) Version() string
Version returns the value for header x-ms-version.
type QuerySerialization ¶ added in v0.11.0
type QuerySerialization struct {
Format QueryFormat `xml:"Format"`
}
QuerySerialization ...
type RehydratePriorityType ¶ added in v0.10.0
type RehydratePriorityType string
RehydratePriorityType enumerates the values for rehydrate priority type.
const ( // RehydratePriorityHigh ... RehydratePriorityHigh RehydratePriorityType = "High" // RehydratePriorityNone represents an empty RehydratePriorityType. RehydratePriorityNone RehydratePriorityType = "" // RehydratePriorityStandard ... RehydratePriorityStandard RehydratePriorityType = "Standard" )
func PossibleRehydratePriorityTypeValues ¶ added in v0.10.0
func PossibleRehydratePriorityTypeValues() []RehydratePriorityType
PossibleRehydratePriorityTypeValues returns an array of possible values for the RehydratePriorityType const type.
type RequestLogOptions ¶
type RequestLogOptions struct { // LogWarningIfTryOverThreshold logs a warning if a tried operation takes longer than the specified // duration (-1=no logging; 0=default threshold). LogWarningIfTryOverThreshold time.Duration // SyslogDisabled is a flag to check if logging to Syslog/Windows-Event-Logger is enabled or not // We by default print to Syslog/Windows-Event-Logger. // If SyslogDisabled is not provided explicitly, the default value will be false. SyslogDisabled bool }
RequestLogOptions configures the retry policy's behavior.
type ResponseError ¶
type ResponseError interface { // Error exposes the Error(), Temporary() and Timeout() methods. net.Error // Includes the Go error interface // Response returns the HTTP response. You may examine this but you should not modify it. Response() *http.Response }
ResponseError identifies a responder-generated network or response parsing error.
type RetentionPolicy ¶
type RetentionPolicy struct { // Enabled - Indicates whether a retention policy is enabled for the storage service Enabled bool `xml:"Enabled"` // Days - Indicates the number of days that metrics or logging or soft-deleted data should be retained. All data older than this value will be deleted Days *int32 `xml:"Days"` // AllowPermanentDelete - Indicates whether permanent delete is allowed on this storage account. AllowPermanentDelete *bool `xml:"AllowPermanentDelete"` }
RetentionPolicy - the retention policy which determines how long the associated data should persist
type RetryOptions ¶
type RetryOptions struct { // Policy tells the pipeline what kind of retry policy to use. See the RetryPolicy* constants.\ // A value of zero means that you accept our default policy. Policy RetryPolicy // MaxTries specifies the maximum number of attempts an operation will be tried before producing an error (0=default). // A value of zero means that you accept our default policy. A value of 1 means 1 try and no retries. MaxTries int32 // TryTimeout indicates the maximum time allowed for any single try of an HTTP request. // A value of zero means that you accept our default timeout. NOTE: When transferring large amounts // of data, the default TryTimeout will probably not be sufficient. You should override this value // based on the bandwidth available to the host machine and proximity to the Storage service. A good // starting point may be something like (60 seconds per MB of anticipated-payload-size). TryTimeout time.Duration // RetryDelay specifies the amount of delay to use before retrying an operation (0=default). // When RetryPolicy is specified as RetryPolicyExponential, the delay increases exponentially // with each retry up to a maximum specified by MaxRetryDelay. // If you specify 0, then you must also specify 0 for MaxRetryDelay. // If you specify RetryDelay, then you must also specify MaxRetryDelay, and MaxRetryDelay should be // equal to or greater than RetryDelay. RetryDelay time.Duration // MaxRetryDelay specifies the maximum delay allowed before retrying an operation (0=default). // If you specify 0, then you must also specify 0 for RetryDelay. MaxRetryDelay time.Duration // RetryReadsFromSecondaryHost specifies whether the retry policy should retry a read operation against another host. // If RetryReadsFromSecondaryHost is "" (the default) then operations are not retried against another host. // NOTE: Before setting this field, make sure you understand the issues around reading stale & potentially-inconsistent // data at this webpage: https://docs.microsoft.com/en-us/azure/storage/common/storage-designing-ha-apps-with-ragrs RetryReadsFromSecondaryHost string // Comment this our for non-Blob SDKs }
RetryOptions configures the retry policy's behavior.
type RetryPolicy ¶
type RetryPolicy int32
RetryPolicy tells the pipeline what kind of retry policy to use. See the RetryPolicy* constants.
const ( // RetryPolicyExponential tells the pipeline to use an exponential back-off retry policy RetryPolicyExponential RetryPolicy = 0 // RetryPolicyFixed tells the pipeline to use a fixed back-off retry policy RetryPolicyFixed RetryPolicy = 1 )
type RetryReaderOptions ¶
type RetryReaderOptions struct { // MaxRetryRequests specifies the maximum number of HTTP GET requests that will be made // while reading from a RetryReader. A value of zero means that no additional HTTP // GET requests will be made. MaxRetryRequests int // NotifyFailedRead is called, if non-nil, after any failure to read. Expected usage is diagnostic logging. NotifyFailedRead FailedReadNotifier // TreatEarlyCloseAsError can be set to true to prevent retries after "read on closed response body". By default, // retryReader has the following special behaviour: closing the response body before it is all read is treated as a // retryable error. This is to allow callers to force a retry by closing the body from another goroutine (e.g. if the = // read is too slow, caller may want to force a retry in the hope that the retry will be quicker). If // TreatEarlyCloseAsError is true, then retryReader's special behaviour is suppressed, and "read on closed body" is instead // treated as a fatal (non-retryable) error. // Note that setting TreatEarlyCloseAsError only guarantees that Closing will produce a fatal error if the Close happens // from the same "thread" (goroutine) as Read. Concurrent Close calls from other goroutines may instead produce network errors // which will be retried. TreatEarlyCloseAsError bool ClientProvidedKeyOptions ClientProvidedKeyOptions // contains filtered or unexported fields }
RetryReaderOptions contains properties which can help to decide when to do retry.
type SASProtocol ¶
type SASProtocol string
const ( // SASProtocolHTTPS can be specified for a SAS protocol SASProtocolHTTPS SASProtocol = "https" // SASProtocolHTTPSandHTTP can be specified for a SAS protocol SASProtocolHTTPSandHTTP SASProtocol = "https,http" )
type SASQueryParameters ¶
type SASQueryParameters struct {
// contains filtered or unexported fields
}
A SASQueryParameters object represents the components that make up an Azure Storage SAS' query parameters. You parse a map of query parameters into its fields by calling NewSASQueryParameters(). You add the components to a query parameter map by calling AddToValues(). NOTE: Changing any field requires computing a new SAS signature using a XxxSASSignatureValues type.
This type defines the components used by all Azure Storage resources (Containers, Blobs, Files, & Queues).
func (*SASQueryParameters) AgentObjectId ¶ added in v0.15.0
func (p *SASQueryParameters) AgentObjectId() string
func (*SASQueryParameters) CacheControl ¶
func (p *SASQueryParameters) CacheControl() string
func (*SASQueryParameters) ContentDisposition ¶
func (p *SASQueryParameters) ContentDisposition() string
func (*SASQueryParameters) ContentEncoding ¶
func (p *SASQueryParameters) ContentEncoding() string
func (*SASQueryParameters) ContentLanguage ¶
func (p *SASQueryParameters) ContentLanguage() string
func (*SASQueryParameters) ContentType ¶
func (p *SASQueryParameters) ContentType() string
func (*SASQueryParameters) Encode ¶
func (p *SASQueryParameters) Encode() string
Encode encodes the SAS query parameters into URL encoded form sorted by key.
func (*SASQueryParameters) ExpiryTime ¶
func (p *SASQueryParameters) ExpiryTime() time.Time
func (*SASQueryParameters) IPRange ¶
func (p *SASQueryParameters) IPRange() IPRange
func (*SASQueryParameters) Identifier ¶
func (p *SASQueryParameters) Identifier() string
func (*SASQueryParameters) Permissions ¶
func (p *SASQueryParameters) Permissions() string
func (*SASQueryParameters) PreauthorizedAgentObjectId ¶ added in v0.15.0
func (p *SASQueryParameters) PreauthorizedAgentObjectId() string
func (*SASQueryParameters) Protocol ¶
func (p *SASQueryParameters) Protocol() SASProtocol
func (*SASQueryParameters) Resource ¶
func (p *SASQueryParameters) Resource() string
func (*SASQueryParameters) ResourceTypes ¶
func (p *SASQueryParameters) ResourceTypes() string
func (*SASQueryParameters) Services ¶
func (p *SASQueryParameters) Services() string
func (*SASQueryParameters) Signature ¶
func (p *SASQueryParameters) Signature() string
func (*SASQueryParameters) SignedCorrelationId ¶ added in v0.15.0
func (p *SASQueryParameters) SignedCorrelationId() string
func (*SASQueryParameters) SignedDirectoryDepth ¶ added in v0.15.0
func (p *SASQueryParameters) SignedDirectoryDepth() string
func (*SASQueryParameters) SignedExpiry ¶ added in v0.7.0
func (p *SASQueryParameters) SignedExpiry() time.Time
func (*SASQueryParameters) SignedService ¶ added in v0.7.0
func (p *SASQueryParameters) SignedService() string
func (*SASQueryParameters) SignedStart ¶ added in v0.7.0
func (p *SASQueryParameters) SignedStart() time.Time
func (*SASQueryParameters) SignedTid ¶ added in v0.7.0
func (p *SASQueryParameters) SignedTid() string
func (*SASQueryParameters) SignedVersion ¶ added in v0.7.0
func (p *SASQueryParameters) SignedVersion() string
func (*SASQueryParameters) SnapshotTime ¶ added in v0.7.0
func (p *SASQueryParameters) SnapshotTime() time.Time
func (*SASQueryParameters) StartTime ¶
func (p *SASQueryParameters) StartTime() time.Time
func (*SASQueryParameters) Version ¶
func (p *SASQueryParameters) Version() string
type SequenceNumberAccessConditions ¶
type SequenceNumberAccessConditions struct { // IfSequenceNumberLessThan ensures that the page blob operation succeeds // only if the blob's sequence number is less than a value. // IfSequenceNumberLessThan=0 means no 'IfSequenceNumberLessThan' header specified. // IfSequenceNumberLessThan>0 means 'IfSequenceNumberLessThan' header specified with its value // IfSequenceNumberLessThan==-1 means 'IfSequenceNumberLessThan' header specified with a value of 0 IfSequenceNumberLessThan int64 // IfSequenceNumberLessThanOrEqual ensures that the page blob operation succeeds // only if the blob's sequence number is less than or equal to a value. // IfSequenceNumberLessThanOrEqual=0 means no 'IfSequenceNumberLessThanOrEqual' header specified. // IfSequenceNumberLessThanOrEqual>0 means 'IfSequenceNumberLessThanOrEqual' header specified with its value // IfSequenceNumberLessThanOrEqual=-1 means 'IfSequenceNumberLessThanOrEqual' header specified with a value of 0 IfSequenceNumberLessThanOrEqual int64 // IfSequenceNumberEqual ensures that the page blob operation succeeds // only if the blob's sequence number is equal to a value. // IfSequenceNumberEqual=0 means no 'IfSequenceNumberEqual' header specified. // IfSequenceNumberEqual>0 means 'IfSequenceNumberEqual' header specified with its value // IfSequenceNumberEqual=-1 means 'IfSequenceNumberEqual' header specified with a value of 0 IfSequenceNumberEqual int64 }
SequenceNumberAccessConditions identifies page blob-specific access conditions which you optionally set.
type SequenceNumberActionType ¶
type SequenceNumberActionType string
SequenceNumberActionType enumerates the values for sequence number action type.
const ( // SequenceNumberActionIncrement ... SequenceNumberActionIncrement SequenceNumberActionType = "increment" // SequenceNumberActionMax ... SequenceNumberActionMax SequenceNumberActionType = "max" // SequenceNumberActionNone represents an empty SequenceNumberActionType. SequenceNumberActionNone SequenceNumberActionType = "" // SequenceNumberActionUpdate ... SequenceNumberActionUpdate SequenceNumberActionType = "update" )
func PossibleSequenceNumberActionTypeValues ¶
func PossibleSequenceNumberActionTypeValues() []SequenceNumberActionType
PossibleSequenceNumberActionTypeValues returns an array of possible values for the SequenceNumberActionType const type.
type ServiceCodeType ¶
type ServiceCodeType string
ServiceCodeType is a string identifying a storage service error. For more information, see https://docs.microsoft.com/en-us/rest/api/storageservices/status-and-error-codes2
const ( // ServiceCodeAppendPositionConditionNotMet means the append position condition specified was not met. ServiceCodeAppendPositionConditionNotMet ServiceCodeType = "AppendPositionConditionNotMet" // ServiceCodeBlobAlreadyExists means the specified blob already exists. ServiceCodeBlobAlreadyExists ServiceCodeType = "BlobAlreadyExists" // ServiceCodeBlobNotFound means the specified blob does not exist. ServiceCodeBlobNotFound ServiceCodeType = "BlobNotFound" // ServiceCodeBlobOverwritten means the blob has been recreated since the previous snapshot was taken. ServiceCodeBlobOverwritten ServiceCodeType = "BlobOverwritten" // ServiceCodeBlobTierInadequateForContentLength means the specified blob tier size limit cannot be less than content length. ServiceCodeBlobTierInadequateForContentLength ServiceCodeType = "BlobTierInadequateForContentLength" // ServiceCodeBlockCountExceedsLimit means the committed block count cannot exceed the maximum limit of 50,000 blocks // or that the uncommitted block count cannot exceed the maximum limit of 100,000 blocks. ServiceCodeBlockCountExceedsLimit ServiceCodeType = "BlockCountExceedsLimit" // ServiceCodeBlockListTooLong means the block list may not contain more than 50,000 blocks. ServiceCodeBlockListTooLong ServiceCodeType = "BlockListTooLong" // ServiceCodeCannotChangeToLowerTier means that a higher blob tier has already been explicitly set. ServiceCodeCannotChangeToLowerTier ServiceCodeType = "CannotChangeToLowerTier" // ServiceCodeCannotVerifyCopySource means that the service could not verify the copy source within the specified time. // Examine the HTTP status code and message for more information about the failure. ServiceCodeCannotVerifyCopySource ServiceCodeType = "CannotVerifyCopySource" // ServiceCodeContainerAlreadyExists means the specified container already exists. ServiceCodeContainerAlreadyExists ServiceCodeType = "ContainerAlreadyExists" // ServiceCodeContainerBeingDeleted means the specified container is being deleted. ServiceCodeContainerBeingDeleted ServiceCodeType = "ContainerBeingDeleted" // ServiceCodeContainerDisabled means the specified container has been disabled by the administrator. ServiceCodeContainerDisabled ServiceCodeType = "ContainerDisabled" // ServiceCodeContainerNotFound means the specified container does not exist. ServiceCodeContainerNotFound ServiceCodeType = "ContainerNotFound" // ServiceCodeContentLengthLargerThanTierLimit means the blob's content length cannot exceed its tier limit. ServiceCodeContentLengthLargerThanTierLimit ServiceCodeType = "ContentLengthLargerThanTierLimit" // ServiceCodeCopyAcrossAccountsNotSupported means the copy source account and destination account must be the same. ServiceCodeCopyAcrossAccountsNotSupported ServiceCodeType = "CopyAcrossAccountsNotSupported" // ServiceCodeCopyIDMismatch means the specified copy ID did not match the copy ID for the pending copy operation. ServiceCodeCopyIDMismatch ServiceCodeType = "CopyIdMismatch" // ServiceCodeFeatureVersionMismatch means the type of blob in the container is unrecognized by this version or // that the operation for AppendBlob requires at least version 2015-02-21. ServiceCodeFeatureVersionMismatch ServiceCodeType = "FeatureVersionMismatch" // ServiceCodeIncrementalCopyBlobMismatch means the specified source blob is different than the copy source of the existing incremental copy blob. ServiceCodeIncrementalCopyBlobMismatch ServiceCodeType = "IncrementalCopyBlobMismatch" // ServiceCodeFeatureEncryptionMismatch means the given customer specified encryption does not match the encryption used to encrypt the blob. ServiceCodeFeatureEncryptionMismatch ServiceCodeType = "BlobCustomerSpecifiedEncryptionMismatch" // ServiceCodeIncrementalCopyOfEarlierVersionSnapshotNotAllowed means the specified snapshot is earlier than the last snapshot copied into the incremental copy blob. ServiceCodeIncrementalCopyOfEarlierVersionSnapshotNotAllowed ServiceCodeType = "IncrementalCopyOfEarlierVersionSnapshotNotAllowed" // ServiceCodeIncrementalCopySourceMustBeSnapshot means the source for incremental copy request must be a snapshot. ServiceCodeIncrementalCopySourceMustBeSnapshot ServiceCodeType = "IncrementalCopySourceMustBeSnapshot" // ServiceCodeInfiniteLeaseDurationRequired means the lease ID matched, but the specified lease must be an infinite-duration lease. ServiceCodeInfiniteLeaseDurationRequired ServiceCodeType = "InfiniteLeaseDurationRequired" // ServiceCodeInvalidBlobOrBlock means the specified blob or block content is invalid. ServiceCodeInvalidBlobOrBlock ServiceCodeType = "InvalidBlobOrBlock" // ServiceCodeInvalidBlobType means the blob type is invalid for this operation. ServiceCodeInvalidBlobType ServiceCodeType = "InvalidBlobType" // ServiceCodeInvalidBlockID means the specified block ID is invalid. The block ID must be Base64-encoded. ServiceCodeInvalidBlockID ServiceCodeType = "InvalidBlockId" // ServiceCodeInvalidBlockList means the specified block list is invalid. ServiceCodeInvalidBlockList ServiceCodeType = "InvalidBlockList" // ServiceCodeInvalidOperation means an invalid operation against a blob snapshot. ServiceCodeInvalidOperation ServiceCodeType = "InvalidOperation" // ServiceCodeInvalidPageRange means the page range specified is invalid. ServiceCodeInvalidPageRange ServiceCodeType = "InvalidPageRange" // ServiceCodeInvalidSourceBlobType means the copy source blob type is invalid for this operation. ServiceCodeInvalidSourceBlobType ServiceCodeType = "InvalidSourceBlobType" // ServiceCodeInvalidSourceBlobURL means the source URL for incremental copy request must be valid Azure Storage blob URL. ServiceCodeInvalidSourceBlobURL ServiceCodeType = "InvalidSourceBlobUrl" // ServiceCodeInvalidVersionForPageBlobOperation means that all operations on page blobs require at least version 2009-09-19. ServiceCodeInvalidVersionForPageBlobOperation ServiceCodeType = "InvalidVersionForPageBlobOperation" // ServiceCodeLeaseAlreadyPresent means there is already a lease present. ServiceCodeLeaseAlreadyPresent ServiceCodeType = "LeaseAlreadyPresent" // ServiceCodeLeaseAlreadyBroken means the lease has already been broken and cannot be broken again. ServiceCodeLeaseAlreadyBroken ServiceCodeType = "LeaseAlreadyBroken" // ServiceCodeLeaseIDMismatchWithBlobOperation means the lease ID specified did not match the lease ID for the blob. ServiceCodeLeaseIDMismatchWithBlobOperation ServiceCodeType = "LeaseIdMismatchWithBlobOperation" // ServiceCodeLeaseIDMismatchWithContainerOperation means the lease ID specified did not match the lease ID for the container. ServiceCodeLeaseIDMismatchWithContainerOperation ServiceCodeType = "LeaseIdMismatchWithContainerOperation" // ServiceCodeLeaseIDMismatchWithLeaseOperation means the lease ID specified did not match the lease ID for the blob/container. ServiceCodeLeaseIDMismatchWithLeaseOperation ServiceCodeType = "LeaseIdMismatchWithLeaseOperation" // ServiceCodeLeaseIDMissing means there is currently a lease on the blob/container and no lease ID was specified in the request. ServiceCodeLeaseIDMissing ServiceCodeType = "LeaseIdMissing" // ServiceCodeLeaseIsBreakingAndCannotBeAcquired means the lease ID matched, but the lease is currently in breaking state and cannot be acquired until it is broken. ServiceCodeLeaseIsBreakingAndCannotBeAcquired ServiceCodeType = "LeaseIsBreakingAndCannotBeAcquired" // ServiceCodeLeaseIsBreakingAndCannotBeChanged means the lease ID matched, but the lease is currently in breaking state and cannot be changed. ServiceCodeLeaseIsBreakingAndCannotBeChanged ServiceCodeType = "LeaseIsBreakingAndCannotBeChanged" // ServiceCodeLeaseIsBrokenAndCannotBeRenewed means the lease ID matched, but the lease has been broken explicitly and cannot be renewed. ServiceCodeLeaseIsBrokenAndCannotBeRenewed ServiceCodeType = "LeaseIsBrokenAndCannotBeRenewed" // ServiceCodeLeaseLost means a lease ID was specified, but the lease for the blob/container has expired. ServiceCodeLeaseLost ServiceCodeType = "LeaseLost" // ServiceCodeLeaseNotPresentWithBlobOperation means there is currently no lease on the blob. ServiceCodeLeaseNotPresentWithBlobOperation ServiceCodeType = "LeaseNotPresentWithBlobOperation" // ServiceCodeLeaseNotPresentWithContainerOperation means there is currently no lease on the container. ServiceCodeLeaseNotPresentWithContainerOperation ServiceCodeType = "LeaseNotPresentWithContainerOperation" // ServiceCodeLeaseNotPresentWithLeaseOperation means there is currently no lease on the blob/container. ServiceCodeLeaseNotPresentWithLeaseOperation ServiceCodeType = "LeaseNotPresentWithLeaseOperation" // ServiceCodeMaxBlobSizeConditionNotMet means the max blob size condition specified was not met. ServiceCodeMaxBlobSizeConditionNotMet ServiceCodeType = "MaxBlobSizeConditionNotMet" // ServiceCodeNoPendingCopyOperation means there is currently no pending copy operation. ServiceCodeNoPendingCopyOperation ServiceCodeType = "NoPendingCopyOperation" // ServiceCodeOperationNotAllowedOnIncrementalCopyBlob means the specified operation is not allowed on an incremental copy blob. ServiceCodeOperationNotAllowedOnIncrementalCopyBlob ServiceCodeType = "OperationNotAllowedOnIncrementalCopyBlob" // ServiceCodePendingCopyOperation means there is currently a pending copy operation. ServiceCodePendingCopyOperation ServiceCodeType = "PendingCopyOperation" // ServiceCodePreviousSnapshotCannotBeNewer means the prevsnapshot query parameter value cannot be newer than snapshot query parameter value. ServiceCodePreviousSnapshotCannotBeNewer ServiceCodeType = "PreviousSnapshotCannotBeNewer" // ServiceCodePreviousSnapshotNotFound means the previous snapshot is not found. ServiceCodePreviousSnapshotNotFound ServiceCodeType = "PreviousSnapshotNotFound" // ServiceCodePreviousSnapshotOperationNotSupported means that differential Get Page Ranges is not supported on the previous snapshot. ServiceCodePreviousSnapshotOperationNotSupported ServiceCodeType = "PreviousSnapshotOperationNotSupported" // ServiceCodeSequenceNumberConditionNotMet means the sequence number condition specified was not met. ServiceCodeSequenceNumberConditionNotMet ServiceCodeType = "SequenceNumberConditionNotMet" // ServiceCodeSequenceNumberIncrementTooLarge means the sequence number increment cannot be performed because it would result in overflow of the sequence number. ServiceCodeSequenceNumberIncrementTooLarge ServiceCodeType = "SequenceNumberIncrementTooLarge" // ServiceCodeSnapshotCountExceeded means the snapshot count against this blob has been exceeded. ServiceCodeSnapshotCountExceeded ServiceCodeType = "SnapshotCountExceeded" // ServiceCodeSnaphotOperationRateExceeded means the rate of snapshot operations against this blob has been exceeded. ServiceCodeSnaphotOperationRateExceeded ServiceCodeType = "SnaphotOperationRateExceeded" // ServiceCodeSnapshotsPresent means this operation is not permitted while the blob has snapshots. ServiceCodeSnapshotsPresent ServiceCodeType = "SnapshotsPresent" // ServiceCodeSourceConditionNotMet means the source condition specified using HTTP conditional header(s) is not met. ServiceCodeSourceConditionNotMet ServiceCodeType = "SourceConditionNotMet" // ServiceCodeSystemInUse means this blob is in use by the system. ServiceCodeSystemInUse ServiceCodeType = "SystemInUse" // ServiceCodeTargetConditionNotMet means the target condition specified using HTTP conditional header(s) is not met. ServiceCodeTargetConditionNotMet ServiceCodeType = "TargetConditionNotMet" ServiceCodeUnauthorizedBlobOverwrite ServiceCodeType = "UnauthorizedBlobOverwrite" // ServiceCodeBlobBeingRehydrated means this operation is not permitted because the blob is being rehydrated. ServiceCodeBlobBeingRehydrated ServiceCodeType = "BlobBeingRehydrated" // ServiceCodeBlobArchived means this operation is not permitted on an archived blob. ServiceCodeBlobArchived ServiceCodeType = "BlobArchived" // ServiceCodeBlobNotArchived means this blob is currently not in the archived state. ServiceCodeBlobNotArchived ServiceCodeType = "BlobNotArchived" )
ServiceCode values indicate a service failure.
const ( // ServiceCodeNone is the default value. It indicates that the error was related to the service or that the service didn't return a code. ServiceCodeNone ServiceCodeType = "" // ServiceCodeAccountAlreadyExists means the specified account already exists. ServiceCodeAccountAlreadyExists ServiceCodeType = "AccountAlreadyExists" // ServiceCodeAccountBeingCreated means the specified account is in the process of being created (403). ServiceCodeAccountBeingCreated ServiceCodeType = "AccountBeingCreated" // ServiceCodeAccountIsDisabled means the specified account is disabled (403). ServiceCodeAccountIsDisabled ServiceCodeType = "AccountIsDisabled" // ServiceCodeAuthenticationFailed means the server failed to authenticate the request. Make sure the value of the Authorization header is formed correctly including the signature (403). ServiceCodeAuthenticationFailed ServiceCodeType = "AuthenticationFailed" // ServiceCodeConditionHeadersNotSupported means the condition headers are not supported (400). ServiceCodeConditionHeadersNotSupported ServiceCodeType = "ConditionHeadersNotSupported" // ServiceCodeConditionNotMet means the condition specified in the conditional header(s) was not met for a read/write operation (304/412). ServiceCodeConditionNotMet ServiceCodeType = "ConditionNotMet" // ServiceCodeEmptyMetadataKey means the key for one of the metadata key-value pairs is empty (400). ServiceCodeEmptyMetadataKey ServiceCodeType = "EmptyMetadataKey" // ServiceCodeInsufficientAccountPermissions means read operations are currently disabled or Write operations are not allowed or The account being accessed does not have sufficient permissions to execute this operation (403). ServiceCodeInsufficientAccountPermissions ServiceCodeType = "InsufficientAccountPermissions" // ServiceCodeInternalError means the server encountered an internal error. Please retry the request (500). ServiceCodeInternalError ServiceCodeType = "InternalError" // ServiceCodeInvalidAuthenticationInfo means the authentication information was not provided in the correct format. Verify the value of Authorization header (400). ServiceCodeInvalidAuthenticationInfo ServiceCodeType = "InvalidAuthenticationInfo" // ServiceCodeInvalidHeaderValue means the value provided for one of the HTTP headers was not in the correct format (400). ServiceCodeInvalidHeaderValue ServiceCodeType = "InvalidHeaderValue" // ServiceCodeInvalidHTTPVerb means the HTTP verb specified was not recognized by the server (400). ServiceCodeInvalidHTTPVerb ServiceCodeType = "InvalidHttpVerb" // ServiceCodeInvalidInput means one of the request inputs is not valid (400). ServiceCodeInvalidInput ServiceCodeType = "InvalidInput" // ServiceCodeInvalidMd5 means the MD5 value specified in the request is invalid. The MD5 value must be 128 bits and Base64-encoded (400). ServiceCodeInvalidMd5 ServiceCodeType = "InvalidMd5" // ServiceCodeInvalidMetadata means the specified metadata is invalid. It includes characters that are not permitted (400). ServiceCodeInvalidMetadata ServiceCodeType = "InvalidMetadata" // ServiceCodeInvalidQueryParameterValue means an invalid value was specified for one of the query parameters in the request URI (400). ServiceCodeInvalidQueryParameterValue ServiceCodeType = "InvalidQueryParameterValue" // ServiceCodeInvalidRange means the range specified is invalid for the current size of the resource (416). ServiceCodeInvalidRange ServiceCodeType = "InvalidRange" // ServiceCodeInvalidResourceName means the specified resource name contains invalid characters (400). ServiceCodeInvalidResourceName ServiceCodeType = "InvalidResourceName" // ServiceCodeInvalidURI means the requested URI does not represent any resource on the server (400). ServiceCodeInvalidURI ServiceCodeType = "InvalidUri" // ServiceCodeInvalidXMLDocument means the specified XML is not syntactically valid (400). ServiceCodeInvalidXMLDocument ServiceCodeType = "InvalidXmlDocument" // ServiceCodeInvalidXMLNodeValue means the value provided for one of the XML nodes in the request body was not in the correct format (400). ServiceCodeInvalidXMLNodeValue ServiceCodeType = "InvalidXmlNodeValue" // ServiceCodeMd5Mismatch means the MD5 value specified in the request did not match the MD5 value calculated by the server (400). ServiceCodeMd5Mismatch ServiceCodeType = "Md5Mismatch" // ServiceCodeMetadataTooLarge means the size of the specified metadata exceeds the maximum size permitted (400). ServiceCodeMetadataTooLarge ServiceCodeType = "MetadataTooLarge" // ServiceCodeMissingContentLengthHeader means the Content-Length header was not specified (411). ServiceCodeMissingContentLengthHeader ServiceCodeType = "MissingContentLengthHeader" // ServiceCodeMissingRequiredQueryParameter means a required query parameter was not specified for this request (400). ServiceCodeMissingRequiredQueryParameter ServiceCodeType = "MissingRequiredQueryParameter" // ServiceCodeMissingRequiredHeader means a required HTTP header was not specified (400). ServiceCodeMissingRequiredHeader ServiceCodeType = "MissingRequiredHeader" // ServiceCodeMissingRequiredXMLNode means a required XML node was not specified in the request body (400). ServiceCodeMissingRequiredXMLNode ServiceCodeType = "MissingRequiredXmlNode" // ServiceCodeMultipleConditionHeadersNotSupported means multiple condition headers are not supported (400). ServiceCodeMultipleConditionHeadersNotSupported ServiceCodeType = "MultipleConditionHeadersNotSupported" // ServiceCodeOperationTimedOut means the operation could not be completed within the permitted time (500). ServiceCodeOperationTimedOut ServiceCodeType = "OperationTimedOut" // ServiceCodeOutOfRangeInput means one of the request inputs is out of range (400). ServiceCodeOutOfRangeInput ServiceCodeType = "OutOfRangeInput" // ServiceCodeOutOfRangeQueryParameterValue means a query parameter specified in the request URI is outside the permissible range (400). ServiceCodeOutOfRangeQueryParameterValue ServiceCodeType = "OutOfRangeQueryParameterValue" // ServiceCodeRequestBodyTooLarge means the size of the request body exceeds the maximum size permitted (413). ServiceCodeRequestBodyTooLarge ServiceCodeType = "RequestBodyTooLarge" // ServiceCodeResourceTypeMismatch means the specified resource type does not match the type of the existing resource (409). ServiceCodeResourceTypeMismatch ServiceCodeType = "ResourceTypeMismatch" // ServiceCodeRequestURLFailedToParse means the url in the request could not be parsed (400). ServiceCodeRequestURLFailedToParse ServiceCodeType = "RequestUrlFailedToParse" // ServiceCodeResourceAlreadyExists means the specified resource already exists (409). ServiceCodeResourceAlreadyExists ServiceCodeType = "ResourceAlreadyExists" // ServiceCodeResourceNotFound means the specified resource does not exist (404). ServiceCodeResourceNotFound ServiceCodeType = "ResourceNotFound" // ServiceCodeNoAuthenticationInformation means the specified authentication for the resource does not exist (401). ServiceCodeNoAuthenticationInformation ServiceCodeType = "NoAuthenticationInformation" // ServiceCodeServerBusy means the server is currently unable to receive requests. Please retry your request or Ingress/egress is over the account limit or operations per second is over the account limit (503). ServiceCodeServerBusy ServiceCodeType = "ServerBusy" // ServiceCodeUnsupportedHeader means one of the HTTP headers specified in the request is not supported (400). ServiceCodeUnsupportedHeader ServiceCodeType = "UnsupportedHeader" // ServiceCodeUnsupportedXMLNode means one of the XML nodes specified in the request body is not supported (400). ServiceCodeUnsupportedXMLNode ServiceCodeType = "UnsupportedXmlNode" // ServiceCodeUnsupportedQueryParameter means one of the query parameters specified in the request URI is not supported (400). ServiceCodeUnsupportedQueryParameter ServiceCodeType = "UnsupportedQueryParameter" // ServiceCodeUnsupportedHTTPVerb means the resource doesn't support the specified HTTP verb (405). ServiceCodeUnsupportedHTTPVerb ServiceCodeType = "UnsupportedHttpVerb" )
type ServiceGetAccountInfoResponse ¶
type ServiceGetAccountInfoResponse struct {
// contains filtered or unexported fields
}
ServiceGetAccountInfoResponse ...
func (ServiceGetAccountInfoResponse) AccountKind ¶
func (sgair ServiceGetAccountInfoResponse) AccountKind() AccountKindType
AccountKind returns the value for header x-ms-account-kind.
func (ServiceGetAccountInfoResponse) ClientRequestID ¶ added in v0.10.0
func (sgair ServiceGetAccountInfoResponse) ClientRequestID() string
ClientRequestID returns the value for header x-ms-client-request-id.
func (ServiceGetAccountInfoResponse) Date ¶
func (sgair ServiceGetAccountInfoResponse) Date() time.Time
Date returns the value for header Date.
func (ServiceGetAccountInfoResponse) ErrorCode ¶
func (sgair ServiceGetAccountInfoResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (ServiceGetAccountInfoResponse) IsHierarchicalNamespaceEnabled ¶ added in v0.14.0
func (sgair ServiceGetAccountInfoResponse) IsHierarchicalNamespaceEnabled() string
IsHierarchicalNamespaceEnabled returns the value for header x-ms-is-hns-enabled.
func (ServiceGetAccountInfoResponse) RequestID ¶
func (sgair ServiceGetAccountInfoResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (ServiceGetAccountInfoResponse) Response ¶
func (sgair ServiceGetAccountInfoResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (ServiceGetAccountInfoResponse) SkuName ¶
func (sgair ServiceGetAccountInfoResponse) SkuName() SkuNameType
SkuName returns the value for header x-ms-sku-name.
func (ServiceGetAccountInfoResponse) Status ¶
func (sgair ServiceGetAccountInfoResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (ServiceGetAccountInfoResponse) StatusCode ¶
func (sgair ServiceGetAccountInfoResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (ServiceGetAccountInfoResponse) Version ¶
func (sgair ServiceGetAccountInfoResponse) Version() string
Version returns the value for header x-ms-version.
type ServiceSetPropertiesResponse ¶
type ServiceSetPropertiesResponse struct {
// contains filtered or unexported fields
}
ServiceSetPropertiesResponse ...
func (ServiceSetPropertiesResponse) ClientRequestID ¶ added in v0.10.0
func (sspr ServiceSetPropertiesResponse) ClientRequestID() string
ClientRequestID returns the value for header x-ms-client-request-id.
func (ServiceSetPropertiesResponse) ErrorCode ¶
func (sspr ServiceSetPropertiesResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (ServiceSetPropertiesResponse) RequestID ¶
func (sspr ServiceSetPropertiesResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (ServiceSetPropertiesResponse) Response ¶
func (sspr ServiceSetPropertiesResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (ServiceSetPropertiesResponse) Status ¶
func (sspr ServiceSetPropertiesResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (ServiceSetPropertiesResponse) StatusCode ¶
func (sspr ServiceSetPropertiesResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (ServiceSetPropertiesResponse) Version ¶
func (sspr ServiceSetPropertiesResponse) Version() string
Version returns the value for header x-ms-version.
type ServiceURL ¶
type ServiceURL struct {
// contains filtered or unexported fields
}
A ServiceURL represents a URL to the Azure Storage Blob service allowing you to manipulate blob containers.
func NewServiceURL ¶
func NewServiceURL(primaryURL url.URL, p pipeline.Pipeline) ServiceURL
NewServiceURL creates a ServiceURL object using the specified URL and request policy pipeline.
func (ServiceURL) FindBlobsByTags ¶ added in v0.11.0
func (bsu ServiceURL) FindBlobsByTags(ctx context.Context, timeout *int32, requestID *string, where *string, marker Marker, maxResults *int32) (*FilterBlobSegment, error)
FindBlobsByTags operation finds all blobs in the storage account whose tags match a given search expression. Filter blobs searches across all containers within a storage account but can be scoped within the expression to a single container. https://docs.microsoft.com/en-us/rest/api/storageservices/find-blobs-by-tags eg. "dog='germanshepherd' and penguin='emperorpenguin'" To specify a container, eg. "@container=’containerName’ and Name = ‘C’"
func (ServiceURL) GetAccountInfo ¶ added in v0.9.0
func (s ServiceURL) GetAccountInfo(ctx context.Context) (*ServiceGetAccountInfoResponse, error)
func (ServiceURL) GetProperties ¶
func (bsu ServiceURL) GetProperties(ctx context.Context) (*StorageServiceProperties, error)
func (ServiceURL) GetStatistics ¶
func (bsu ServiceURL) GetStatistics(ctx context.Context) (*StorageServiceStats, error)
func (ServiceURL) GetUserDelegationCredential ¶ added in v0.7.0
func (s ServiceURL) GetUserDelegationCredential(ctx context.Context, info KeyInfo, timeout *int32, requestID *string) (UserDelegationCredential, error)
GetUserDelegationCredential obtains a UserDelegationKey object using the base ServiceURL object. OAuth is required for this call, as well as any role that can delegate access to the storage account.
func (ServiceURL) ListContainersSegment ¶
func (s ServiceURL) ListContainersSegment(ctx context.Context, marker Marker, o ListContainersSegmentOptions) (*ListContainersSegmentResponse, error)
ListContainersFlatSegment returns a single segment of containers starting from the specified Marker. Use an empty Marker to start enumeration from the beginning. Container names are returned in lexicographic order. After getting a segment, process it, and then call ListContainersFlatSegment again (passing the the previously-returned Marker) to get the next segment. For more information, see https://docs.microsoft.com/rest/api/storageservices/list-containers2.
func (ServiceURL) NewContainerURL ¶
func (s ServiceURL) NewContainerURL(containerName string) ContainerURL
NewContainerURL creates a new ContainerURL object by concatenating containerName to the end of ServiceURL's URL. The new ContainerURL uses the same request policy pipeline as the ServiceURL. To change the pipeline, create the ContainerURL and then call its WithPipeline method passing in the desired pipeline object. Or, call this package's NewContainerURL instead of calling this object's NewContainerURL method.
func (ServiceURL) SetProperties ¶
func (bsu ServiceURL) SetProperties(ctx context.Context, properties StorageServiceProperties) (*ServiceSetPropertiesResponse, error)
func (ServiceURL) URL ¶
func (s ServiceURL) URL() url.URL
URL returns the URL endpoint used by the ServiceURL object.
func (ServiceURL) WithPipeline ¶
func (s ServiceURL) WithPipeline(p pipeline.Pipeline) ServiceURL
WithPipeline creates a new ServiceURL object identical to the source but with the specified request policy pipeline.
type SharedKeyCredential ¶
type SharedKeyCredential struct {
// contains filtered or unexported fields
}
SharedKeyCredential contains an account's name and its primary or secondary key. It is immutable making it shareable and goroutine-safe.
func NewSharedKeyCredential ¶
func NewSharedKeyCredential(accountName, accountKey string) (*SharedKeyCredential, error)
NewSharedKeyCredential creates an immutable SharedKeyCredential containing the storage account's name and either its primary or secondary key.
func (SharedKeyCredential) AccountName ¶
func (f SharedKeyCredential) AccountName() string
AccountName returns the Storage account's name.
func (SharedKeyCredential) ComputeHMACSHA256 ¶
func (f SharedKeyCredential) ComputeHMACSHA256(message string) (base64String string)
ComputeHMACSHA256 generates a hash signature for an HTTP request or for a SAS.
func (*SharedKeyCredential) New ¶
func (f *SharedKeyCredential) New(next pipeline.Policy, po *pipeline.PolicyOptions) pipeline.Policy
New creates a credential policy object.
type SignedIdentifier ¶
type SignedIdentifier struct { // ID - a unique id ID string `xml:"Id"` AccessPolicy AccessPolicy `xml:"AccessPolicy"` }
SignedIdentifier - signed identifier
type SignedIdentifiers ¶
type SignedIdentifiers struct { Items []SignedIdentifier `xml:"SignedIdentifier"` // contains filtered or unexported fields }
SignedIdentifiers - Wraps the response from the containerClient.GetAccessPolicy method.
func (SignedIdentifiers) BlobPublicAccess ¶
func (si SignedIdentifiers) BlobPublicAccess() PublicAccessType
BlobPublicAccess returns the value for header x-ms-blob-public-access.
func (SignedIdentifiers) ClientRequestID ¶ added in v0.10.0
func (si SignedIdentifiers) ClientRequestID() string
ClientRequestID returns the value for header x-ms-client-request-id.
func (SignedIdentifiers) Date ¶
func (si SignedIdentifiers) Date() time.Time
Date returns the value for header Date.
func (SignedIdentifiers) ETag ¶
func (si SignedIdentifiers) ETag() ETag
ETag returns the value for header ETag.
func (SignedIdentifiers) ErrorCode ¶
func (si SignedIdentifiers) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (SignedIdentifiers) LastModified ¶
func (si SignedIdentifiers) LastModified() time.Time
LastModified returns the value for header Last-Modified.
func (SignedIdentifiers) RequestID ¶
func (si SignedIdentifiers) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (SignedIdentifiers) Response ¶
func (si SignedIdentifiers) Response() *http.Response
Response returns the raw HTTP response object.
func (SignedIdentifiers) Status ¶
func (si SignedIdentifiers) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (SignedIdentifiers) StatusCode ¶
func (si SignedIdentifiers) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (SignedIdentifiers) Version ¶
func (si SignedIdentifiers) Version() string
Version returns the value for header x-ms-version.
type SkuNameType ¶
type SkuNameType string
SkuNameType enumerates the values for sku name type.
const ( // SkuNameNone represents an empty SkuNameType. SkuNameNone SkuNameType = "" // SkuNamePremiumLRS ... SkuNamePremiumLRS SkuNameType = "Premium_LRS" // SkuNameStandardGRS ... SkuNameStandardGRS SkuNameType = "Standard_GRS" // SkuNameStandardLRS ... SkuNameStandardLRS SkuNameType = "Standard_LRS" // SkuNameStandardRAGRS ... SkuNameStandardRAGRS SkuNameType = "Standard_RAGRS" // SkuNameStandardZRS ... SkuNameStandardZRS SkuNameType = "Standard_ZRS" )
func PossibleSkuNameTypeValues ¶
func PossibleSkuNameTypeValues() []SkuNameType
PossibleSkuNameTypeValues returns an array of possible values for the SkuNameType const type.
type StaticWebsite ¶
type StaticWebsite struct { // Enabled - Indicates whether this account is hosting a static website Enabled bool `xml:"Enabled"` // IndexDocument - The default name of the index page under each directory IndexDocument *string `xml:"IndexDocument"` // ErrorDocument404Path - The absolute path of the custom 404 page ErrorDocument404Path *string `xml:"ErrorDocument404Path"` // DefaultIndexDocumentPath - Absolute path of the default index page DefaultIndexDocumentPath *string `xml:"DefaultIndexDocumentPath"` }
StaticWebsite - The properties that enable an account to host a static website
type StorageAccountCredential ¶ added in v0.7.0
type StorageAccountCredential interface { AccountName() string ComputeHMACSHA256(message string) (base64String string) // contains filtered or unexported methods }
StorageAccountCredential is a wrapper interface for SharedKeyCredential and UserDelegationCredential
type StorageError ¶
type StorageError interface { // ResponseError implements error's Error(), net.Error's Temporary() and Timeout() methods & Response(). ResponseError // ServiceCode returns a service error code. Your code can use this to make error recovery decisions. ServiceCode() ServiceCodeType }
StorageError identifies a responder-generated network or response parsing error.
Example ¶
// This example shows how to handle errors returned from various XxxURL methods. All these methods return an // object implementing the pipeline.Response interface and an object implementing Go's error interface. // The error result is nil if the request was successful; your code can safely use the Response interface object. // If error is non-nil, the error could be due to: // 1. An invalid argument passed to the method. You should not write code to handle these errors; // instead, fix these errors as they appear during development/testing. // 2. A network request didn't reach an Azure Storage Service. This usually happens due to a bad URL or // faulty networking infrastructure (like a router issue). In this case, an object implementing the // net.Error interface will be returned. The net.Error interface offers Timeout and Temporary methods // which return true if the network error is determined to be a timeout or temporary condition. If // your pipeline uses the retry policy factory, then this policy looks for Timeout/Temporary and // automatically retries based on the retry options you've configured. Because of the retry policy, // your code will usually not call the Timeout/Temporary methods explicitly other than possibly logging // the network failure. // 3. A network request did reach the Azure Storage Service but the service failed to perform the // requested operation. In this case, an object implementing the StorageError interface is returned. // The StorageError interface also implements the net.Error interface and, if you use the retry policy, // you would most likely ignore the Timeout/Temporary methods. However, the StorageError interface exposes // richer information such as a service error code, an error description, details data, and the // service-returned http.Response. And, from the http.Response, you can get the initiating http.Request. u, _ := url.Parse("http://myaccount.blob.core.windows.net/mycontainer") containerURL := NewContainerURL(*u, NewPipeline(NewAnonymousCredential(), PipelineOptions{})) create, err := containerURL.Create(context.Background(), Metadata{}, PublicAccessNone) if err != nil { // An error occurred if stgErr, ok := err.(StorageError); ok { // This error is a Service-specific error // StorageError also implements net.Error so you could call its Timeout/Temporary methods if you want. switch stgErr.ServiceCode() { // Compare serviceCode to various ServiceCodeXxx constants case ServiceCodeContainerAlreadyExists: // You can also look at the http.Response object that failed. if failedResponse := stgErr.Response(); failedResponse != nil { // From the response object, you can get the initiating http.Request object failedRequest := failedResponse.Request _ = failedRequest // Avoid compiler's "declared and not used" error } case ServiceCodeContainerBeingDeleted: // Handle this error ... default: // Handle other errors ... } } log.Fatal(err) // Error is not due to Azure Storage service; networking infrastructure failure } // If err is nil, then the method was successful; use the response to access the result _ = create // Avoid compiler's "declared and not used" error
Output:
type StorageErrorCodeType ¶
type StorageErrorCodeType string
StorageErrorCodeType enumerates the values for storage error code type.
const ( // StorageErrorCodeAccountAlreadyExists ... StorageErrorCodeAccountAlreadyExists StorageErrorCodeType = "AccountAlreadyExists" // StorageErrorCodeAccountBeingCreated ... StorageErrorCodeAccountBeingCreated StorageErrorCodeType = "AccountBeingCreated" // StorageErrorCodeAccountIsDisabled ... StorageErrorCodeAccountIsDisabled StorageErrorCodeType = "AccountIsDisabled" // StorageErrorCodeAppendPositionConditionNotMet ... StorageErrorCodeAppendPositionConditionNotMet StorageErrorCodeType = "AppendPositionConditionNotMet" // StorageErrorCodeAuthenticationFailed ... StorageErrorCodeAuthenticationFailed StorageErrorCodeType = "AuthenticationFailed" // StorageErrorCodeAuthorizationFailure ... StorageErrorCodeAuthorizationFailure StorageErrorCodeType = "AuthorizationFailure" // StorageErrorCodeAuthorizationPermissionMismatch ... StorageErrorCodeAuthorizationPermissionMismatch StorageErrorCodeType = "AuthorizationPermissionMismatch" // StorageErrorCodeAuthorizationProtocolMismatch ... StorageErrorCodeAuthorizationProtocolMismatch StorageErrorCodeType = "AuthorizationProtocolMismatch" // StorageErrorCodeAuthorizationResourceTypeMismatch ... StorageErrorCodeAuthorizationResourceTypeMismatch StorageErrorCodeType = "AuthorizationResourceTypeMismatch" // StorageErrorCodeAuthorizationServiceMismatch ... StorageErrorCodeAuthorizationServiceMismatch StorageErrorCodeType = "AuthorizationServiceMismatch" // StorageErrorCodeAuthorizationSourceIPMismatch ... StorageErrorCodeAuthorizationSourceIPMismatch StorageErrorCodeType = "AuthorizationSourceIPMismatch" // StorageErrorCodeBlobAlreadyExists ... StorageErrorCodeBlobAlreadyExists StorageErrorCodeType = "BlobAlreadyExists" // StorageErrorCodeBlobArchived ... StorageErrorCodeBlobArchived StorageErrorCodeType = "BlobArchived" // StorageErrorCodeBlobBeingRehydrated ... StorageErrorCodeBlobBeingRehydrated StorageErrorCodeType = "BlobBeingRehydrated" // StorageErrorCodeBlobImmutableDueToPolicy ... StorageErrorCodeBlobImmutableDueToPolicy StorageErrorCodeType = "BlobImmutableDueToPolicy" // StorageErrorCodeBlobNotArchived ... StorageErrorCodeBlobNotArchived StorageErrorCodeType = "BlobNotArchived" // StorageErrorCodeBlobNotFound ... StorageErrorCodeBlobNotFound StorageErrorCodeType = "BlobNotFound" // StorageErrorCodeBlobOverwritten ... StorageErrorCodeBlobOverwritten StorageErrorCodeType = "BlobOverwritten" // StorageErrorCodeBlobTierInadequateForContentLength ... StorageErrorCodeBlobTierInadequateForContentLength StorageErrorCodeType = "BlobTierInadequateForContentLength" // StorageErrorCodeBlobUsesCustomerSpecifiedEncryption ... StorageErrorCodeBlobUsesCustomerSpecifiedEncryption StorageErrorCodeType = "BlobUsesCustomerSpecifiedEncryption" // StorageErrorCodeBlockCountExceedsLimit ... StorageErrorCodeBlockCountExceedsLimit StorageErrorCodeType = "BlockCountExceedsLimit" // StorageErrorCodeBlockListTooLong ... StorageErrorCodeBlockListTooLong StorageErrorCodeType = "BlockListTooLong" // StorageErrorCodeCannotChangeToLowerTier ... StorageErrorCodeCannotChangeToLowerTier StorageErrorCodeType = "CannotChangeToLowerTier" // StorageErrorCodeCannotVerifyCopySource ... StorageErrorCodeCannotVerifyCopySource StorageErrorCodeType = "CannotVerifyCopySource" // StorageErrorCodeConditionHeadersNotSupported ... StorageErrorCodeConditionHeadersNotSupported StorageErrorCodeType = "ConditionHeadersNotSupported" // StorageErrorCodeConditionNotMet ... StorageErrorCodeConditionNotMet StorageErrorCodeType = "ConditionNotMet" // StorageErrorCodeContainerAlreadyExists ... StorageErrorCodeContainerAlreadyExists StorageErrorCodeType = "ContainerAlreadyExists" // StorageErrorCodeContainerBeingDeleted ... StorageErrorCodeContainerBeingDeleted StorageErrorCodeType = "ContainerBeingDeleted" // StorageErrorCodeContainerDisabled ... StorageErrorCodeContainerDisabled StorageErrorCodeType = "ContainerDisabled" // StorageErrorCodeContainerNotFound ... StorageErrorCodeContainerNotFound StorageErrorCodeType = "ContainerNotFound" // StorageErrorCodeContentLengthLargerThanTierLimit ... StorageErrorCodeContentLengthLargerThanTierLimit StorageErrorCodeType = "ContentLengthLargerThanTierLimit" // StorageErrorCodeCopyAcrossAccountsNotSupported ... StorageErrorCodeCopyAcrossAccountsNotSupported StorageErrorCodeType = "CopyAcrossAccountsNotSupported" // StorageErrorCodeCopyIDMismatch ... StorageErrorCodeCopyIDMismatch StorageErrorCodeType = "CopyIdMismatch" // StorageErrorCodeEmptyMetadataKey ... StorageErrorCodeEmptyMetadataKey StorageErrorCodeType = "EmptyMetadataKey" // StorageErrorCodeFeatureVersionMismatch ... StorageErrorCodeFeatureVersionMismatch StorageErrorCodeType = "FeatureVersionMismatch" // StorageErrorCodeIncrementalCopyBlobMismatch ... StorageErrorCodeIncrementalCopyBlobMismatch StorageErrorCodeType = "IncrementalCopyBlobMismatch" // StorageErrorCodeIncrementalCopyOfEralierVersionSnapshotNotAllowed ... StorageErrorCodeIncrementalCopyOfEralierVersionSnapshotNotAllowed StorageErrorCodeType = "IncrementalCopyOfEralierVersionSnapshotNotAllowed" // StorageErrorCodeIncrementalCopySourceMustBeSnapshot ... StorageErrorCodeIncrementalCopySourceMustBeSnapshot StorageErrorCodeType = "IncrementalCopySourceMustBeSnapshot" // StorageErrorCodeInfiniteLeaseDurationRequired ... StorageErrorCodeInfiniteLeaseDurationRequired StorageErrorCodeType = "InfiniteLeaseDurationRequired" // StorageErrorCodeInsufficientAccountPermissions ... StorageErrorCodeInsufficientAccountPermissions StorageErrorCodeType = "InsufficientAccountPermissions" // StorageErrorCodeInternalError ... StorageErrorCodeInternalError StorageErrorCodeType = "InternalError" // StorageErrorCodeInvalidAuthenticationInfo ... StorageErrorCodeInvalidAuthenticationInfo StorageErrorCodeType = "InvalidAuthenticationInfo" // StorageErrorCodeInvalidBlobOrBlock ... StorageErrorCodeInvalidBlobOrBlock StorageErrorCodeType = "InvalidBlobOrBlock" // StorageErrorCodeInvalidBlobTier ... StorageErrorCodeInvalidBlobTier StorageErrorCodeType = "InvalidBlobTier" // StorageErrorCodeInvalidBlobType ... StorageErrorCodeInvalidBlobType StorageErrorCodeType = "InvalidBlobType" // StorageErrorCodeInvalidBlockID ... StorageErrorCodeInvalidBlockID StorageErrorCodeType = "InvalidBlockId" // StorageErrorCodeInvalidBlockList ... StorageErrorCodeInvalidBlockList StorageErrorCodeType = "InvalidBlockList" // StorageErrorCodeInvalidHeaderValue ... StorageErrorCodeInvalidHeaderValue StorageErrorCodeType = "InvalidHeaderValue" // StorageErrorCodeInvalidHTTPVerb ... StorageErrorCodeInvalidHTTPVerb StorageErrorCodeType = "InvalidHttpVerb" // StorageErrorCodeInvalidInput ... StorageErrorCodeInvalidInput StorageErrorCodeType = "InvalidInput" // StorageErrorCodeInvalidMd5 ... StorageErrorCodeInvalidMd5 StorageErrorCodeType = "InvalidMd5" // StorageErrorCodeInvalidMetadata ... StorageErrorCodeInvalidMetadata StorageErrorCodeType = "InvalidMetadata" // StorageErrorCodeInvalidOperation ... StorageErrorCodeInvalidOperation StorageErrorCodeType = "InvalidOperation" // StorageErrorCodeInvalidPageRange ... StorageErrorCodeInvalidPageRange StorageErrorCodeType = "InvalidPageRange" // StorageErrorCodeInvalidQueryParameterValue ... StorageErrorCodeInvalidQueryParameterValue StorageErrorCodeType = "InvalidQueryParameterValue" // StorageErrorCodeInvalidRange ... StorageErrorCodeInvalidRange StorageErrorCodeType = "InvalidRange" // StorageErrorCodeInvalidResourceName ... StorageErrorCodeInvalidResourceName StorageErrorCodeType = "InvalidResourceName" // StorageErrorCodeInvalidSourceBlobType ... StorageErrorCodeInvalidSourceBlobType StorageErrorCodeType = "InvalidSourceBlobType" // StorageErrorCodeInvalidSourceBlobURL ... StorageErrorCodeInvalidSourceBlobURL StorageErrorCodeType = "InvalidSourceBlobUrl" // StorageErrorCodeInvalidURI ... StorageErrorCodeInvalidURI StorageErrorCodeType = "InvalidUri" // StorageErrorCodeInvalidVersionForPageBlobOperation ... StorageErrorCodeInvalidVersionForPageBlobOperation StorageErrorCodeType = "InvalidVersionForPageBlobOperation" // StorageErrorCodeInvalidXMLDocument ... StorageErrorCodeInvalidXMLDocument StorageErrorCodeType = "InvalidXmlDocument" // StorageErrorCodeInvalidXMLNodeValue ... StorageErrorCodeInvalidXMLNodeValue StorageErrorCodeType = "InvalidXmlNodeValue" // StorageErrorCodeLeaseAlreadyBroken ... StorageErrorCodeLeaseAlreadyBroken StorageErrorCodeType = "LeaseAlreadyBroken" // StorageErrorCodeLeaseAlreadyPresent ... StorageErrorCodeLeaseAlreadyPresent StorageErrorCodeType = "LeaseAlreadyPresent" // StorageErrorCodeLeaseIDMismatchWithBlobOperation ... StorageErrorCodeLeaseIDMismatchWithBlobOperation StorageErrorCodeType = "LeaseIdMismatchWithBlobOperation" // StorageErrorCodeLeaseIDMismatchWithContainerOperation ... StorageErrorCodeLeaseIDMismatchWithContainerOperation StorageErrorCodeType = "LeaseIdMismatchWithContainerOperation" // StorageErrorCodeLeaseIDMismatchWithLeaseOperation ... StorageErrorCodeLeaseIDMismatchWithLeaseOperation StorageErrorCodeType = "LeaseIdMismatchWithLeaseOperation" // StorageErrorCodeLeaseIDMissing ... StorageErrorCodeLeaseIDMissing StorageErrorCodeType = "LeaseIdMissing" // StorageErrorCodeLeaseIsBreakingAndCannotBeAcquired ... StorageErrorCodeLeaseIsBreakingAndCannotBeAcquired StorageErrorCodeType = "LeaseIsBreakingAndCannotBeAcquired" // StorageErrorCodeLeaseIsBreakingAndCannotBeChanged ... StorageErrorCodeLeaseIsBreakingAndCannotBeChanged StorageErrorCodeType = "LeaseIsBreakingAndCannotBeChanged" // StorageErrorCodeLeaseIsBrokenAndCannotBeRenewed ... StorageErrorCodeLeaseIsBrokenAndCannotBeRenewed StorageErrorCodeType = "LeaseIsBrokenAndCannotBeRenewed" // StorageErrorCodeLeaseLost ... StorageErrorCodeLeaseLost StorageErrorCodeType = "LeaseLost" // StorageErrorCodeLeaseNotPresentWithBlobOperation ... StorageErrorCodeLeaseNotPresentWithBlobOperation StorageErrorCodeType = "LeaseNotPresentWithBlobOperation" // StorageErrorCodeLeaseNotPresentWithContainerOperation ... StorageErrorCodeLeaseNotPresentWithContainerOperation StorageErrorCodeType = "LeaseNotPresentWithContainerOperation" // StorageErrorCodeLeaseNotPresentWithLeaseOperation ... StorageErrorCodeLeaseNotPresentWithLeaseOperation StorageErrorCodeType = "LeaseNotPresentWithLeaseOperation" // StorageErrorCodeMaxBlobSizeConditionNotMet ... StorageErrorCodeMaxBlobSizeConditionNotMet StorageErrorCodeType = "MaxBlobSizeConditionNotMet" // StorageErrorCodeMd5Mismatch ... StorageErrorCodeMd5Mismatch StorageErrorCodeType = "Md5Mismatch" // StorageErrorCodeMetadataTooLarge ... StorageErrorCodeMetadataTooLarge StorageErrorCodeType = "MetadataTooLarge" // StorageErrorCodeMissingContentLengthHeader ... StorageErrorCodeMissingContentLengthHeader StorageErrorCodeType = "MissingContentLengthHeader" // StorageErrorCodeMissingRequiredHeader ... StorageErrorCodeMissingRequiredHeader StorageErrorCodeType = "MissingRequiredHeader" // StorageErrorCodeMissingRequiredQueryParameter ... StorageErrorCodeMissingRequiredQueryParameter StorageErrorCodeType = "MissingRequiredQueryParameter" // StorageErrorCodeMissingRequiredXMLNode ... StorageErrorCodeMissingRequiredXMLNode StorageErrorCodeType = "MissingRequiredXmlNode" // StorageErrorCodeMultipleConditionHeadersNotSupported ... StorageErrorCodeMultipleConditionHeadersNotSupported StorageErrorCodeType = "MultipleConditionHeadersNotSupported" // StorageErrorCodeNoAuthenticationInformation ... StorageErrorCodeNoAuthenticationInformation StorageErrorCodeType = "NoAuthenticationInformation" // StorageErrorCodeNone represents an empty StorageErrorCodeType. StorageErrorCodeNone StorageErrorCodeType = "" // StorageErrorCodeNoPendingCopyOperation ... StorageErrorCodeNoPendingCopyOperation StorageErrorCodeType = "NoPendingCopyOperation" // StorageErrorCodeOperationNotAllowedOnIncrementalCopyBlob ... StorageErrorCodeOperationNotAllowedOnIncrementalCopyBlob StorageErrorCodeType = "OperationNotAllowedOnIncrementalCopyBlob" // StorageErrorCodeOperationTimedOut ... StorageErrorCodeOperationTimedOut StorageErrorCodeType = "OperationTimedOut" // StorageErrorCodeOutOfRangeInput ... StorageErrorCodeOutOfRangeInput StorageErrorCodeType = "OutOfRangeInput" // StorageErrorCodeOutOfRangeQueryParameterValue ... StorageErrorCodeOutOfRangeQueryParameterValue StorageErrorCodeType = "OutOfRangeQueryParameterValue" // StorageErrorCodePendingCopyOperation ... StorageErrorCodePendingCopyOperation StorageErrorCodeType = "PendingCopyOperation" // StorageErrorCodePreviousSnapshotCannotBeNewer ... StorageErrorCodePreviousSnapshotCannotBeNewer StorageErrorCodeType = "PreviousSnapshotCannotBeNewer" // StorageErrorCodePreviousSnapshotNotFound ... StorageErrorCodePreviousSnapshotNotFound StorageErrorCodeType = "PreviousSnapshotNotFound" // StorageErrorCodePreviousSnapshotOperationNotSupported ... StorageErrorCodePreviousSnapshotOperationNotSupported StorageErrorCodeType = "PreviousSnapshotOperationNotSupported" // StorageErrorCodeRequestBodyTooLarge ... StorageErrorCodeRequestBodyTooLarge StorageErrorCodeType = "RequestBodyTooLarge" // StorageErrorCodeRequestURLFailedToParse ... StorageErrorCodeRequestURLFailedToParse StorageErrorCodeType = "RequestUrlFailedToParse" // StorageErrorCodeResourceAlreadyExists ... StorageErrorCodeResourceAlreadyExists StorageErrorCodeType = "ResourceAlreadyExists" // StorageErrorCodeResourceNotFound ... StorageErrorCodeResourceNotFound StorageErrorCodeType = "ResourceNotFound" // StorageErrorCodeResourceTypeMismatch ... StorageErrorCodeResourceTypeMismatch StorageErrorCodeType = "ResourceTypeMismatch" // StorageErrorCodeSequenceNumberConditionNotMet ... StorageErrorCodeSequenceNumberConditionNotMet StorageErrorCodeType = "SequenceNumberConditionNotMet" // StorageErrorCodeSequenceNumberIncrementTooLarge ... StorageErrorCodeSequenceNumberIncrementTooLarge StorageErrorCodeType = "SequenceNumberIncrementTooLarge" // StorageErrorCodeServerBusy ... StorageErrorCodeServerBusy StorageErrorCodeType = "ServerBusy" // StorageErrorCodeSnapshotCountExceeded ... StorageErrorCodeSnapshotCountExceeded StorageErrorCodeType = "SnapshotCountExceeded" // StorageErrorCodeSnapshotOperationRateExceeded ... StorageErrorCodeSnapshotOperationRateExceeded StorageErrorCodeType = "SnapshotOperationRateExceeded" // StorageErrorCodeSnapshotsPresent ... StorageErrorCodeSnapshotsPresent StorageErrorCodeType = "SnapshotsPresent" // StorageErrorCodeSourceConditionNotMet ... StorageErrorCodeSourceConditionNotMet StorageErrorCodeType = "SourceConditionNotMet" // StorageErrorCodeSystemInUse ... StorageErrorCodeSystemInUse StorageErrorCodeType = "SystemInUse" // StorageErrorCodeTargetConditionNotMet ... StorageErrorCodeTargetConditionNotMet StorageErrorCodeType = "TargetConditionNotMet" StorageErrorCodeUnauthorizedBlobOverwrite StorageErrorCodeType = "UnauthorizedBlobOverwrite" // StorageErrorCodeUnsupportedHeader ... StorageErrorCodeUnsupportedHeader StorageErrorCodeType = "UnsupportedHeader" // StorageErrorCodeUnsupportedHTTPVerb ... StorageErrorCodeUnsupportedHTTPVerb StorageErrorCodeType = "UnsupportedHttpVerb" // StorageErrorCodeUnsupportedQueryParameter ... StorageErrorCodeUnsupportedQueryParameter StorageErrorCodeType = "UnsupportedQueryParameter" // StorageErrorCodeUnsupportedXMLNode ... StorageErrorCodeUnsupportedXMLNode StorageErrorCodeType = "UnsupportedXmlNode" )
func PossibleStorageErrorCodeTypeValues ¶
func PossibleStorageErrorCodeTypeValues() []StorageErrorCodeType
PossibleStorageErrorCodeTypeValues returns an array of possible values for the StorageErrorCodeType const type.
type StorageServiceProperties ¶
type StorageServiceProperties struct { Logging *Logging `xml:"Logging"` HourMetrics *Metrics `xml:"HourMetrics"` MinuteMetrics *Metrics `xml:"MinuteMetrics"` // Cors - The set of CORS rules. Cors []CorsRule `xml:"Cors>CorsRule"` // DefaultServiceVersion - The default version to use for requests to the Blob service if an incoming request's version is not specified. Possible values include version 2008-10-27 and all more recent versions DefaultServiceVersion *string `xml:"DefaultServiceVersion"` DeleteRetentionPolicy *RetentionPolicy `xml:"DeleteRetentionPolicy"` StaticWebsite *StaticWebsite `xml:"StaticWebsite"` // contains filtered or unexported fields }
StorageServiceProperties - Storage Service Properties.
func (StorageServiceProperties) ClientRequestID ¶ added in v0.10.0
func (ssp StorageServiceProperties) ClientRequestID() string
ClientRequestID returns the value for header x-ms-client-request-id.
func (StorageServiceProperties) ErrorCode ¶
func (ssp StorageServiceProperties) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (StorageServiceProperties) RequestID ¶
func (ssp StorageServiceProperties) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (StorageServiceProperties) Response ¶
func (ssp StorageServiceProperties) Response() *http.Response
Response returns the raw HTTP response object.
func (StorageServiceProperties) Status ¶
func (ssp StorageServiceProperties) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (StorageServiceProperties) StatusCode ¶
func (ssp StorageServiceProperties) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (StorageServiceProperties) Version ¶
func (ssp StorageServiceProperties) Version() string
Version returns the value for header x-ms-version.
type StorageServiceStats ¶
type StorageServiceStats struct { GeoReplication *GeoReplication `xml:"GeoReplication"` // contains filtered or unexported fields }
StorageServiceStats - Stats for the storage service.
func (StorageServiceStats) ClientRequestID ¶ added in v0.10.0
func (sss StorageServiceStats) ClientRequestID() string
ClientRequestID returns the value for header x-ms-client-request-id.
func (StorageServiceStats) Date ¶
func (sss StorageServiceStats) Date() time.Time
Date returns the value for header Date.
func (StorageServiceStats) ErrorCode ¶
func (sss StorageServiceStats) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (StorageServiceStats) RequestID ¶
func (sss StorageServiceStats) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (StorageServiceStats) Response ¶
func (sss StorageServiceStats) Response() *http.Response
Response returns the raw HTTP response object.
func (StorageServiceStats) Status ¶
func (sss StorageServiceStats) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (StorageServiceStats) StatusCode ¶
func (sss StorageServiceStats) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (StorageServiceStats) Version ¶
func (sss StorageServiceStats) Version() string
Version returns the value for header x-ms-version.
type SubmitBatchResponse ¶ added in v0.10.0
type SubmitBatchResponse struct {
// contains filtered or unexported fields
}
SubmitBatchResponse - Wraps the response from the containerClient.SubmitBatch method.
func (SubmitBatchResponse) Body ¶ added in v0.10.0
func (sbr SubmitBatchResponse) Body() io.ReadCloser
Body returns the raw HTTP response object's Body.
func (SubmitBatchResponse) ContentType ¶ added in v0.10.0
func (sbr SubmitBatchResponse) ContentType() string
ContentType returns the value for header Content-Type.
func (SubmitBatchResponse) ErrorCode ¶ added in v0.10.0
func (sbr SubmitBatchResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (SubmitBatchResponse) RequestID ¶ added in v0.10.0
func (sbr SubmitBatchResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (SubmitBatchResponse) Response ¶ added in v0.10.0
func (sbr SubmitBatchResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (SubmitBatchResponse) Status ¶ added in v0.10.0
func (sbr SubmitBatchResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (SubmitBatchResponse) StatusCode ¶ added in v0.10.0
func (sbr SubmitBatchResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (SubmitBatchResponse) Version ¶ added in v0.10.0
func (sbr SubmitBatchResponse) Version() string
Version returns the value for header x-ms-version.
type SyncCopyStatusType ¶ added in v0.7.0
type SyncCopyStatusType string
SyncCopyStatusType enumerates the values for sync copy status type.
const ( // SyncCopyStatusNone represents an empty SyncCopyStatusType. SyncCopyStatusNone SyncCopyStatusType = "" // SyncCopyStatusSuccess ... SyncCopyStatusSuccess SyncCopyStatusType = "success" )
func PossibleSyncCopyStatusTypeValues ¶ added in v0.7.0
func PossibleSyncCopyStatusTypeValues() []SyncCopyStatusType
PossibleSyncCopyStatusTypeValues returns an array of possible values for the SyncCopyStatusType const type.
type TelemetryOptions ¶
type TelemetryOptions struct { // Value is a string prepended to each request's User-Agent and sent to the service. // The service records the user-agent in logs for diagnostics and tracking of client requests. Value string }
TelemetryOptions configures the telemetry policy's behavior.
type TokenCredential ¶
type TokenCredential interface { Credential Token() string SetToken(newToken string) }
TokenCredential represents a token credential (which is also a pipeline.Factory).
func NewTokenCredential ¶
func NewTokenCredential(initialToken string, tokenRefresher TokenRefresher) TokenCredential
NewTokenCredential creates a token credential for use with role-based access control (RBAC) access to Azure Storage resources. You initialize the TokenCredential with an initial token value. If you pass a non-nil value for tokenRefresher, then the function you pass will be called immediately so it can refresh and change the TokenCredential's token value by calling SetToken. Your tokenRefresher function must return a time.Duration indicating how long the TokenCredential object should wait before calling your tokenRefresher function again. If your tokenRefresher callback fails to refresh the token, you can return a duration of 0 to stop your TokenCredential object from ever invoking tokenRefresher again. Also, one way to deal with failing to refresh a token is to cancel a context.Context object used by requests that have the TokenCredential object in their pipeline.
type TokenRefresher ¶
type TokenRefresher func(credential TokenCredential) time.Duration
TokenRefresher represents a callback method that you write; this method is called periodically so you can refresh the token credential's value.
type TransferManager ¶ added in v0.13.0
type TransferManager interface { // Get provides a buffer that will be used to read data into and write out to the stream. // It is guaranteed by this package to not read or write beyond the size of the slice. Get() []byte // Put may or may not put the buffer into underlying storage, depending on settings. // The buffer must not be touched after this has been called. Put(b []byte) // Run will use a goroutine pool entry to run a function. This blocks until a pool // goroutine becomes available. Run(func()) // Closes shuts down all internal goroutines. This must be called when the TransferManager // will no longer be used. Not closing it will cause a goroutine leak. Close() }
TransferManager provides a buffer and thread pool manager for certain transfer options. It is undefined behavior if code outside of this package call any of these methods.
func NewStaticBuffer ¶ added in v0.13.0
func NewStaticBuffer(size, max int) (TransferManager, error)
NewStaticBuffer creates a TransferManager that will use a channel as a circular buffer that can hold "max" buffers of "size". The goroutine pool is also sized at max. This can be shared between calls if you wish to control maximum memory and concurrency with multiple concurrent calls.
func NewSyncPool ¶ added in v0.13.0
func NewSyncPool(size, concurrency int) (TransferManager, error)
NewSyncPool creates a TransferManager that will use a sync.Pool that can hold a non-capped number of buffers constrained by concurrency. This can be shared between calls if you wish to share memory and concurrency.
type UploadStreamOptions ¶
UploadStreamOptions (defunct) was used internally. This will be removed or made private in a future version. TODO: Remove on next minor release in v0 or before v1.
type UploadStreamToBlockBlobOptions ¶
type UploadStreamToBlockBlobOptions struct { // TransferManager provides a TransferManager that controls buffer allocation/reuse and // concurrency. This overrides BufferSize and MaxBuffers if set. TransferManager TransferManager // BufferSize sizes the buffer used to read data from source. If < 1 MiB, defaults to 1 MiB. BufferSize int // MaxBuffers defines the number of simultaneous uploads will be performed to upload the file. MaxBuffers int BlobHTTPHeaders BlobHTTPHeaders Metadata Metadata AccessConditions BlobAccessConditions BlobAccessTier AccessTierType BlobTagsMap BlobTagsMap ClientProvidedKeyOptions ClientProvidedKeyOptions ImmutabilityPolicyOptions ImmutabilityPolicyOptions // contains filtered or unexported fields }
UploadStreamToBlockBlobOptions is options for UploadStreamToBlockBlob.
type UploadToBlockBlobOptions ¶
type UploadToBlockBlobOptions struct { // BlockSize specifies the block size to use; the default (and maximum size) is BlockBlobMaxStageBlockBytes. BlockSize int64 // Progress is a function that is invoked periodically as bytes are sent to the BlockBlobURL. // Note that the progress reporting is not always increasing; it can go down when retrying a request. Progress pipeline.ProgressReceiver // BlobHTTPHeaders indicates the HTTP headers to be associated with the blob. BlobHTTPHeaders BlobHTTPHeaders // Metadata indicates the metadata to be associated with the blob when PutBlockList is called. Metadata Metadata // AccessConditions indicates the access conditions for the block blob. AccessConditions BlobAccessConditions // BlobAccessTier indicates the tier of blob BlobAccessTier AccessTierType // BlobTagsMap BlobTagsMap BlobTagsMap // ClientProvidedKeyOptions indicates the client provided key by name and/or by value to encrypt/decrypt data. ClientProvidedKeyOptions ClientProvidedKeyOptions // ImmutabilityPolicyOptions indicates a immutability policy or legal hold to be placed upon finishing upload. // A container with object-level immutability enabled is required. ImmutabilityPolicyOptions ImmutabilityPolicyOptions // Parallelism indicates the maximum number of blocks to upload in parallel (0=default) Parallelism uint16 }
UploadToBlockBlobOptions identifies options used by the UploadBufferToBlockBlob and UploadFileToBlockBlob functions.
type UserDelegationCredential ¶ added in v0.7.0
type UserDelegationCredential struct {
// contains filtered or unexported fields
}
func NewUserDelegationCredential ¶ added in v0.7.0
func NewUserDelegationCredential(accountName string, key UserDelegationKey) UserDelegationCredential
NewUserDelegationCredential creates a new UserDelegationCredential using a Storage account's name and a user delegation key from it
func (UserDelegationCredential) AccountName ¶ added in v0.7.0
func (f UserDelegationCredential) AccountName() string
AccountName returns the Storage account's name
func (UserDelegationCredential) ComputeHMACSHA256 ¶ added in v0.7.0
func (f UserDelegationCredential) ComputeHMACSHA256(message string) (base64String string)
ComputeHMAC
type UserDelegationKey ¶ added in v0.7.0
type UserDelegationKey struct { // SignedOid - The Azure Active Directory object ID in GUID format. SignedOid string `xml:"SignedOid"` // SignedTid - The Azure Active Directory tenant ID in GUID format SignedTid string `xml:"SignedTid"` // SignedStart - The date-time the key is active SignedStart time.Time `xml:"SignedStart"` // SignedExpiry - The date-time the key expires SignedExpiry time.Time `xml:"SignedExpiry"` // SignedService - Abbreviation of the Azure Storage service that accepts the key SignedService string `xml:"SignedService"` // SignedVersion - The service version that created the key SignedVersion string `xml:"SignedVersion"` // Value - The key as a base64 string Value string `xml:"Value"` // contains filtered or unexported fields }
UserDelegationKey - A user delegation key
func (UserDelegationKey) ClientRequestID ¶ added in v0.10.0
func (udk UserDelegationKey) ClientRequestID() string
ClientRequestID returns the value for header x-ms-client-request-id.
func (UserDelegationKey) Date ¶ added in v0.7.0
func (udk UserDelegationKey) Date() time.Time
Date returns the value for header Date.
func (UserDelegationKey) ErrorCode ¶ added in v0.7.0
func (udk UserDelegationKey) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (UserDelegationKey) MarshalXML ¶ added in v0.7.0
func (udk UserDelegationKey) MarshalXML(e *xml.Encoder, start xml.StartElement) error
MarshalXML implements the xml.Marshaler interface for UserDelegationKey.
func (UserDelegationKey) RequestID ¶ added in v0.7.0
func (udk UserDelegationKey) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (UserDelegationKey) Response ¶ added in v0.7.0
func (udk UserDelegationKey) Response() *http.Response
Response returns the raw HTTP response object.
func (UserDelegationKey) Status ¶ added in v0.7.0
func (udk UserDelegationKey) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (UserDelegationKey) StatusCode ¶ added in v0.7.0
func (udk UserDelegationKey) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (*UserDelegationKey) UnmarshalXML ¶ added in v0.7.0
func (udk *UserDelegationKey) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
UnmarshalXML implements the xml.Unmarshaler interface for UserDelegationKey.
func (UserDelegationKey) Version ¶ added in v0.7.0
func (udk UserDelegationKey) Version() string
Version returns the value for header x-ms-version.
Source Files ¶
- access_conditions.go
- bytes_writer.go
- chunkwriting.go
- common_utils.go
- highlevel.go
- parsing_urls.go
- request_common.go
- sas_service.go
- section_writer.go
- service_codes_blob.go
- storage_account_credential.go
- url_append_blob.go
- url_blob.go
- url_block_blob.go
- url_container.go
- url_page_blob.go
- url_service.go
- user_delegation_credential.go
- version.go
- zc_credential_anonymous.go
- zc_credential_shared_key.go
- zc_credential_token.go
- zc_pipeline.go
- zc_policy_request_log.go
- zc_policy_retry.go
- zc_policy_telemetry.go
- zc_policy_unique_request_id.go
- zc_retry_reader.go
- zc_sas_account.go
- zc_sas_query_params.go
- zc_service_codes_common.go
- zc_storage_error.go
- zc_util_validate.go
- zc_uuid.go
- zt_doc.go
- zz_generated_append_blob.go
- zz_generated_blob.go
- zz_generated_block_blob.go
- zz_generated_client.go
- zz_generated_container.go
- zz_generated_models.go
- zz_generated_page_blob.go
- zz_generated_responder_policy.go
- zz_generated_response_error.go
- zz_generated_service.go
- zz_generated_validation.go
- zz_generated_version.go
- zz_response_helpers.go