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